RSC_AddressBook

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "src/RSC_AddressBook.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {Ownable} from "./utils/Ownable.sol";

/// @title RSC_AddressBook
/// @notice Canonical addresses of contracts and system actors keyed by bytes32
contract RSC_AddressBook is Ownable {
    mapping(bytes32 => address) public addr;
    event AddressSet(bytes32 indexed key, address indexed value);

    function set(bytes32 key, address value) external onlyOwner {
        addr[key] = value;
        emit AddressSet(key, value);
    }
}


"
    },
    "src/utils/Ownable.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

/// @title Minimal Ownable utility
abstract contract Ownable {
    error NotOwner();

    address public owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor() {
        owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
    }

    modifier onlyOwner() {
        if (msg.sender != owner) revert NotOwner();
        _;
    }

    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Owner=zero");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}


"
    }
  },
  "settings": {
    "remappings": [
      "forge-std/=lib/forge-std/src/",
      "reactive-lib/=lib/reactive-lib/src/"
    ],
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "ipfs",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "cancun",
    "viaIR": true
  }
}}

Tags:
Factory|addr:0x0d2050f6e6947637eabb0d566559682e2b3edfb4|verified:true|block:23452056|tx:0x663f2d9fc64d4bee7ab9a7b26f399f373b6be8a8669aa779a036b56f9cf68716|first_check:1758966651

Submitted on: 2025-09-27 11:50:52

Comments

Log in to comment.

No comments yet.