Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
MuonDVNConfig
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/AccessControl.sol"; contract MuonDVNConfig is AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant CONFIG_ROLE = keccak256("CONFIG_ROLE"); uint256 public lastConfigIndex; // oapp => shield node address mapping(address => address) public shieldNodes; mapping(uint256 => string) public configKeys; mapping(string => uint256) public configKeyIndexes; // oapp => (key => value) mapping(address => mapping(string => string)) public configs; event ConfigKeyAdd(string indexed key, uint256 index); event ConfigKeyRemove(string indexed key); event ConfigSet(address indexed oapp, string indexed key, string value); event ShieldNodeSet(address indexed oapp, address indexed shieldNode); event ConfigUnSet(address indexed oapp, string indexed key); event Verified(uint32 srcEid, uint256 jobId); constructor() { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(ADMIN_ROLE, msg.sender); _grantRole(CONFIG_ROLE, msg.sender); } /** * @dev Add several configuration keys. * Only callable by the ADMIN_ROLE. * @param keys The configuration keys. */ function addConfigKeys(string[] memory keys) external onlyRole(ADMIN_ROLE) { uint256 length = keys.length; for (uint256 i = 0; i < length; i++) { string memory key = keys[i]; require(configKeyIndexes[key] == 0, "Already existed"); configKeyIndexes[key] = ++lastConfigIndex; configKeys[lastConfigIndex] = key; emit ConfigKeyAdd(key, lastConfigIndex); } } /** * @dev Remove several configuration keys. * Only callable by the ADMIN_ROLE. * @param keys The configuration keys. */ function removeConfigKey( string[] memory keys ) external onlyRole(ADMIN_ROLE) { uint256 length = keys.length; for (uint256 i = 0; i < length; i++) { string memory key = keys[i]; require(configKeyIndexes[key] != 0, "Invalid key"); uint256 index = configKeyIndexes[key]; delete configKeyIndexes[key]; delete configKeys[index]; emit ConfigKeyRemove(key); } } /** * @dev Set multiple configuration values. * Only callable by the CONFIG_ROLE. * @param oapp The address of OApp. * @param keys The configuration keys. * @param values The values to be set. */ function setConfig( address oapp, string[] memory keys, string[] memory values ) external onlyRole(CONFIG_ROLE) { require(keys.length == values.length, "Mismatched lengths"); uint256 length = keys.length; for (uint256 i = 0; i < length; i++) { string memory key = keys[i]; string memory val = values[i]; require(configKeyIndexes[key] != 0, "Invalid key"); configs[oapp][key] = val; emit ConfigSet(oapp, key, val); } } /** * @dev Unset multiple configuration values. * Only callable by the CONFIG_ROLE. * @param keys The configuration keys. */ function unsetConfig( address oapp, string[] memory keys ) external onlyRole(CONFIG_ROLE) { uint256 length = keys.length; for (uint256 i = 0; i < length; i++) { string memory key = keys[i]; require(configKeyIndexes[key] != 0, "Invalid key"); delete configs[oapp][key]; emit ConfigUnSet(oapp, key); } } /** * @dev Set oapp's shield node. * Only callable by the CONFIG_ROLE. * @param oapp The address of OApp. * @param shieldNode The configuration keys. */ function setShieldNode( address oapp, address shieldNode ) external onlyRole(CONFIG_ROLE) { shieldNodes[oapp] = shieldNode; emit ShieldNodeSet(oapp, shieldNode); } /** * @dev Retrieves various contract information. * @param _configKeys An array of configuration keys to retrieve. * @return configValues An array of configuration values corresponding to the keys. * @return shieldNode The address of oapp's shield node. */ function getInfo( address oapp, string[] memory _configKeys ) external view returns (string[] memory, address) { uint256 configLength = _configKeys.length; string[] memory configValues = new string[](configLength); for (uint256 i = 0; i < configLength; i++) { configValues[i] = configs[oapp][_configKeys[i]]; } return (configValues, shieldNodes[oapp]); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"ConfigKeyAdd","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"key","type":"string"}],"name":"ConfigKeyRemove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oapp","type":"address"},{"indexed":true,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"ConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oapp","type":"address"},{"indexed":true,"internalType":"string","name":"key","type":"string"}],"name":"ConfigUnSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oapp","type":"address"},{"indexed":true,"internalType":"address","name":"shieldNode","type":"address"}],"name":"ShieldNodeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"jobId","type":"uint256"}],"name":"Verified","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"keys","type":"string[]"}],"name":"addConfigKeys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"configKeyIndexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"configKeys","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"name":"configs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"string[]","name":"_configKeys","type":"string[]"}],"name":"getInfo","outputs":[{"internalType":"string[]","name":"","type":"string[]"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastConfigIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"keys","type":"string[]"}],"name":"removeConfigKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"string[]","name":"values","type":"string[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"address","name":"shieldNode","type":"address"}],"name":"setShieldNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"shieldNodes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"string[]","name":"keys","type":"string[]"}],"name":"unsetConfig","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001c600033610078565b506100477fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533610078565b506100727f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f533610078565b50610124565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1661011a576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100d23390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161011e565b5060005b92915050565b61149a80620001346000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806375b238fc116100ad578063a4d19feb11610071578063a4d19feb146102ed578063c7d6b47d14610302578063c927e20c14610315578063ccb7668214610328578063d547741f1461033157600080fd5b806375b238fc146102855780638613663f146102ac57806391d14854146102bf57806397e01ef9146102d2578063a217fddf146102e557600080fd5b806333d35cb1116100f457806333d35cb1146101d257806336568abe146102135780635742deeb1461022657806368d8802c1461025157806371cc7f791461027257600080fd5b806301ffc9a714610131578063245167e214610159578063248a9ca31461017957806324c1c71c146101aa5780632f2ff15d146101bf575b600080fd5b61014461013f366004610e09565b610344565b60405190151581526020015b60405180910390f35b61016c610167366004610f0d565b61037b565b6040516101509190610fab565b61019c610187366004610fbe565b60009081526020819052604090206001015490565b604051908152602001610150565b6101bd6101b8366004611076565b610431565b005b6101bd6101cd3660046110b3565b6105a1565b6101fb6101e03660046110df565b6002602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610150565b6101bd6102213660046110b3565b6105c6565b61019c6102343660046110fa565b805160208183018101805160048252928201919093012091525481565b61026461025f36600461112f565b6105fe565b604051610150929190611173565b61016c610280366004610fbe565b610790565b61019c7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101bd6102ba36600461112f565b6107a9565b6101446102cd3660046110b3565b6108ce565b6101bd6102e03660046111e8565b6108f7565b61019c600081565b61019c60008051602061144583398151915281565b6101bd610310366004611076565b610a95565b6101bd61032336600461125c565b610bdf565b61019c60015481565b6101bd61033f3660046110b3565b610c4f565b60006001600160e01b03198216637965db0b60e01b148061037557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60056020908152600092835260409092208151808301840180519281529084019290930191909120915280546103b090611286565b80601f01602080910402602001604051908101604052809291908181526020018280546103dc90611286565b80156104295780601f106103fe57610100808354040283529160200191610429565b820191906000526020600020905b81548152906001019060200180831161040c57829003601f168201915b505050505081565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561045b81610c74565b815160005b8181101561059b57600084828151811061047c5761047c6112c0565b6020026020010151905060048160405161049691906112d6565b9081526020016040518091039020546000146104eb5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e48195e1a5cdd1959608a1b60448201526064015b60405180910390fd5b6001600081546104fa906112f2565b91905081905560048260405161051091906112d6565b908152604080516020928190038301902092909255600154600090815260039091522061053d828261135f565b508060405161054c91906112d6565b6040519081900381206001548252907f2da13f070af95f162e8ae7daac28d366fcefec8fc45fe639a2fc6c9734159eb39060200160405180910390a25080610593816112f2565b915050610460565b50505050565b6000828152602081905260409020600101546105bc81610c74565b61059b8383610c81565b6001600160a01b03811633146105ef5760405163334bd91960e11b815260040160405180910390fd5b6105f98282610d13565b505050565b8051606090600090818167ffffffffffffffff81111561062057610620610e56565b60405190808252806020026020018201604052801561065357816020015b606081526020019060019003908161063e5790505b50905060005b82811015610769576001600160a01b0387166000908152600560205260409020865187908390811061068d5761068d6112c0565b60200260200101516040516106a291906112d6565b908152602001604051809103902080546106bb90611286565b80601f01602080910402602001604051908101604052809291908181526020018280546106e790611286565b80156107345780601f1061070957610100808354040283529160200191610734565b820191906000526020600020905b81548152906001019060200180831161071757829003601f168201915b505050505082828151811061074b5761074b6112c0565b60200260200101819052508080610761906112f2565b915050610659565b506001600160a01b0395861660009081526002602052604090205490969516949350505050565b600360205260009081526040902080546103b090611286565b6000805160206114458339815191526107c181610c74565b815160005b818110156108c75760008482815181106107e2576107e26112c0565b602002602001015190506004816040516107fc91906112d6565b90815260200160405180910390205460000361082a5760405162461bcd60e51b81526004016104e29061141f565b6001600160a01b0386166000908152600560205260409081902090516108519083906112d6565b9081526020016040518091039020600061086b9190610dbb565b8060405161087991906112d6565b604051908190038120906001600160a01b038816907f169ad0be13cfb0ae31211f98bdd0f7b866a17d735a823edd9ba9a7d4a0243bdc90600090a350806108bf816112f2565b9150506107c6565b5050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061144583398151915261090f81610c74565b81518351146109555760405162461bcd60e51b81526020600482015260126024820152714d69736d617463686564206c656e6774687360701b60448201526064016104e2565b825160005b81811015610a8d576000858281518110610976576109766112c0565b602002602001015190506000858381518110610994576109946112c0565b602002602001015190506004826040516109ae91906112d6565b9081526020016040518091039020546000036109dc5760405162461bcd60e51b81526004016104e29061141f565b6001600160a01b038816600090815260056020526040908190209051829190610a069085906112d6565b90815260200160405180910390209081610a20919061135f565b5081604051610a2f91906112d6565b6040518091039020886001600160a01b03167fd15836d9cfdcc51ec0fcac83e6e66a7772a892ec88a426838ba421a96d3da71383604051610a709190610fab565b60405180910390a350508080610a85906112f2565b91505061095a565b505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610abf81610c74565b815160005b8181101561059b576000848281518110610ae057610ae06112c0565b60200260200101519050600481604051610afa91906112d6565b908152602001604051809103902054600003610b285760405162461bcd60e51b81526004016104e29061141f565b6000600482604051610b3a91906112d6565b9081526020016040518091039020549050600482604051610b5b91906112d6565b908152602001604051809103902060009055600360008281526020019081526020016000206000610b8c9190610dbb565b81604051610b9a91906112d6565b604051908190038120907fe77ff68ea9741d47593276d3acdd2fe28f3ef9c317852356914fc154c393beb590600090a250508080610bd7906112f2565b915050610ac4565b600080516020611445833981519152610bf781610c74565b6001600160a01b0383811660008181526002602052604080822080546001600160a01b0319169487169485179055517f0b8155cf32d0f29efa10b8bfa833f8d1580df56392afcc80b19e5fffdd6147239190a3505050565b600082815260208190526040902060010154610c6a81610c74565b61059b8383610d13565b610c7e8133610d7e565b50565b6000610c8d83836108ce565b610d0b576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610cc33390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610375565b506000610375565b6000610d1f83836108ce565b15610d0b576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610375565b610d8882826108ce565b610db75760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016104e2565b5050565b508054610dc790611286565b6000825580601f10610dd7575050565b601f016020900490600052602060002090810190610c7e91905b80821115610e055760008155600101610df1565b5090565b600060208284031215610e1b57600080fd5b81356001600160e01b031981168114610e3357600080fd5b9392505050565b80356001600160a01b0381168114610e5157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e9557610e95610e56565b604052919050565b600082601f830112610eae57600080fd5b813567ffffffffffffffff811115610ec857610ec8610e56565b610edb601f8201601f1916602001610e6c565b818152846020838601011115610ef057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610f2057600080fd5b610f2983610e3a565b9150602083013567ffffffffffffffff811115610f4557600080fd5b610f5185828601610e9d565b9150509250929050565b60005b83811015610f76578181015183820152602001610f5e565b50506000910152565b60008151808452610f97816020860160208601610f5b565b601f01601f19169290920160200192915050565b602081526000610e336020830184610f7f565b600060208284031215610fd057600080fd5b5035919050565b600082601f830112610fe857600080fd5b8135602067ffffffffffffffff8083111561100557611005610e56565b8260051b611014838201610e6c565b938452858101830193838101908886111561102e57600080fd5b84880192505b8583101561106a5782358481111561104c5760008081fd5b61105a8a87838c0101610e9d565b8352509184019190840190611034565b98975050505050505050565b60006020828403121561108857600080fd5b813567ffffffffffffffff81111561109f57600080fd5b6110ab84828501610fd7565b949350505050565b600080604083850312156110c657600080fd5b823591506110d660208401610e3a565b90509250929050565b6000602082840312156110f157600080fd5b610e3382610e3a565b60006020828403121561110c57600080fd5b813567ffffffffffffffff81111561112357600080fd5b6110ab84828501610e9d565b6000806040838503121561114257600080fd5b61114b83610e3a565b9150602083013567ffffffffffffffff81111561116757600080fd5b610f5185828601610fd7565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156111ca57605f198887030185526111b8868351610f7f565b9550938201939082019060010161119c565b50506001600160a01b03969096169490950193909352949350505050565b6000806000606084860312156111fd57600080fd5b61120684610e3a565b9250602084013567ffffffffffffffff8082111561122357600080fd5b61122f87838801610fd7565b9350604086013591508082111561124557600080fd5b5061125286828701610fd7565b9150509250925092565b6000806040838503121561126f57600080fd5b61127883610e3a565b91506110d660208401610e3a565b600181811c9082168061129a57607f821691505b6020821081036112ba57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600082516112e8818460208701610f5b565b9190910192915050565b60006001820161131257634e487b7160e01b600052601160045260246000fd5b5060010190565b601f8211156105f957600081815260208120601f850160051c810160208610156113405750805b601f850160051c820191505b81811015610a8d5782815560010161134c565b815167ffffffffffffffff81111561137957611379610e56565b61138d816113878454611286565b84611319565b602080601f8311600181146113c257600084156113aa5750858301515b600019600386901b1c1916600185901b178555610a8d565b600085815260208120601f198616915b828110156113f1578886015182559484019460019091019084016113d2565b508582101561140f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600b908201526a496e76616c6964206b657960a81b60408201526060019056fe82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f5a26469706673582212209e98a5815b08ecf60599a7a9acec18f6a9642979b373b38fd79c61b03255aff164736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806375b238fc116100ad578063a4d19feb11610071578063a4d19feb146102ed578063c7d6b47d14610302578063c927e20c14610315578063ccb7668214610328578063d547741f1461033157600080fd5b806375b238fc146102855780638613663f146102ac57806391d14854146102bf57806397e01ef9146102d2578063a217fddf146102e557600080fd5b806333d35cb1116100f457806333d35cb1146101d257806336568abe146102135780635742deeb1461022657806368d8802c1461025157806371cc7f791461027257600080fd5b806301ffc9a714610131578063245167e214610159578063248a9ca31461017957806324c1c71c146101aa5780632f2ff15d146101bf575b600080fd5b61014461013f366004610e09565b610344565b60405190151581526020015b60405180910390f35b61016c610167366004610f0d565b61037b565b6040516101509190610fab565b61019c610187366004610fbe565b60009081526020819052604090206001015490565b604051908152602001610150565b6101bd6101b8366004611076565b610431565b005b6101bd6101cd3660046110b3565b6105a1565b6101fb6101e03660046110df565b6002602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610150565b6101bd6102213660046110b3565b6105c6565b61019c6102343660046110fa565b805160208183018101805160048252928201919093012091525481565b61026461025f36600461112f565b6105fe565b604051610150929190611173565b61016c610280366004610fbe565b610790565b61019c7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101bd6102ba36600461112f565b6107a9565b6101446102cd3660046110b3565b6108ce565b6101bd6102e03660046111e8565b6108f7565b61019c600081565b61019c60008051602061144583398151915281565b6101bd610310366004611076565b610a95565b6101bd61032336600461125c565b610bdf565b61019c60015481565b6101bd61033f3660046110b3565b610c4f565b60006001600160e01b03198216637965db0b60e01b148061037557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60056020908152600092835260409092208151808301840180519281529084019290930191909120915280546103b090611286565b80601f01602080910402602001604051908101604052809291908181526020018280546103dc90611286565b80156104295780601f106103fe57610100808354040283529160200191610429565b820191906000526020600020905b81548152906001019060200180831161040c57829003601f168201915b505050505081565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561045b81610c74565b815160005b8181101561059b57600084828151811061047c5761047c6112c0565b6020026020010151905060048160405161049691906112d6565b9081526020016040518091039020546000146104eb5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e48195e1a5cdd1959608a1b60448201526064015b60405180910390fd5b6001600081546104fa906112f2565b91905081905560048260405161051091906112d6565b908152604080516020928190038301902092909255600154600090815260039091522061053d828261135f565b508060405161054c91906112d6565b6040519081900381206001548252907f2da13f070af95f162e8ae7daac28d366fcefec8fc45fe639a2fc6c9734159eb39060200160405180910390a25080610593816112f2565b915050610460565b50505050565b6000828152602081905260409020600101546105bc81610c74565b61059b8383610c81565b6001600160a01b03811633146105ef5760405163334bd91960e11b815260040160405180910390fd5b6105f98282610d13565b505050565b8051606090600090818167ffffffffffffffff81111561062057610620610e56565b60405190808252806020026020018201604052801561065357816020015b606081526020019060019003908161063e5790505b50905060005b82811015610769576001600160a01b0387166000908152600560205260409020865187908390811061068d5761068d6112c0565b60200260200101516040516106a291906112d6565b908152602001604051809103902080546106bb90611286565b80601f01602080910402602001604051908101604052809291908181526020018280546106e790611286565b80156107345780601f1061070957610100808354040283529160200191610734565b820191906000526020600020905b81548152906001019060200180831161071757829003601f168201915b505050505082828151811061074b5761074b6112c0565b60200260200101819052508080610761906112f2565b915050610659565b506001600160a01b0395861660009081526002602052604090205490969516949350505050565b600360205260009081526040902080546103b090611286565b6000805160206114458339815191526107c181610c74565b815160005b818110156108c75760008482815181106107e2576107e26112c0565b602002602001015190506004816040516107fc91906112d6565b90815260200160405180910390205460000361082a5760405162461bcd60e51b81526004016104e29061141f565b6001600160a01b0386166000908152600560205260409081902090516108519083906112d6565b9081526020016040518091039020600061086b9190610dbb565b8060405161087991906112d6565b604051908190038120906001600160a01b038816907f169ad0be13cfb0ae31211f98bdd0f7b866a17d735a823edd9ba9a7d4a0243bdc90600090a350806108bf816112f2565b9150506107c6565b5050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061144583398151915261090f81610c74565b81518351146109555760405162461bcd60e51b81526020600482015260126024820152714d69736d617463686564206c656e6774687360701b60448201526064016104e2565b825160005b81811015610a8d576000858281518110610976576109766112c0565b602002602001015190506000858381518110610994576109946112c0565b602002602001015190506004826040516109ae91906112d6565b9081526020016040518091039020546000036109dc5760405162461bcd60e51b81526004016104e29061141f565b6001600160a01b038816600090815260056020526040908190209051829190610a069085906112d6565b90815260200160405180910390209081610a20919061135f565b5081604051610a2f91906112d6565b6040518091039020886001600160a01b03167fd15836d9cfdcc51ec0fcac83e6e66a7772a892ec88a426838ba421a96d3da71383604051610a709190610fab565b60405180910390a350508080610a85906112f2565b91505061095a565b505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610abf81610c74565b815160005b8181101561059b576000848281518110610ae057610ae06112c0565b60200260200101519050600481604051610afa91906112d6565b908152602001604051809103902054600003610b285760405162461bcd60e51b81526004016104e29061141f565b6000600482604051610b3a91906112d6565b9081526020016040518091039020549050600482604051610b5b91906112d6565b908152602001604051809103902060009055600360008281526020019081526020016000206000610b8c9190610dbb565b81604051610b9a91906112d6565b604051908190038120907fe77ff68ea9741d47593276d3acdd2fe28f3ef9c317852356914fc154c393beb590600090a250508080610bd7906112f2565b915050610ac4565b600080516020611445833981519152610bf781610c74565b6001600160a01b0383811660008181526002602052604080822080546001600160a01b0319169487169485179055517f0b8155cf32d0f29efa10b8bfa833f8d1580df56392afcc80b19e5fffdd6147239190a3505050565b600082815260208190526040902060010154610c6a81610c74565b61059b8383610d13565b610c7e8133610d7e565b50565b6000610c8d83836108ce565b610d0b576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610cc33390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610375565b506000610375565b6000610d1f83836108ce565b15610d0b576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610375565b610d8882826108ce565b610db75760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016104e2565b5050565b508054610dc790611286565b6000825580601f10610dd7575050565b601f016020900490600052602060002090810190610c7e91905b80821115610e055760008155600101610df1565b5090565b600060208284031215610e1b57600080fd5b81356001600160e01b031981168114610e3357600080fd5b9392505050565b80356001600160a01b0381168114610e5157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e9557610e95610e56565b604052919050565b600082601f830112610eae57600080fd5b813567ffffffffffffffff811115610ec857610ec8610e56565b610edb601f8201601f1916602001610e6c565b818152846020838601011115610ef057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610f2057600080fd5b610f2983610e3a565b9150602083013567ffffffffffffffff811115610f4557600080fd5b610f5185828601610e9d565b9150509250929050565b60005b83811015610f76578181015183820152602001610f5e565b50506000910152565b60008151808452610f97816020860160208601610f5b565b601f01601f19169290920160200192915050565b602081526000610e336020830184610f7f565b600060208284031215610fd057600080fd5b5035919050565b600082601f830112610fe857600080fd5b8135602067ffffffffffffffff8083111561100557611005610e56565b8260051b611014838201610e6c565b938452858101830193838101908886111561102e57600080fd5b84880192505b8583101561106a5782358481111561104c5760008081fd5b61105a8a87838c0101610e9d565b8352509184019190840190611034565b98975050505050505050565b60006020828403121561108857600080fd5b813567ffffffffffffffff81111561109f57600080fd5b6110ab84828501610fd7565b949350505050565b600080604083850312156110c657600080fd5b823591506110d660208401610e3a565b90509250929050565b6000602082840312156110f157600080fd5b610e3382610e3a565b60006020828403121561110c57600080fd5b813567ffffffffffffffff81111561112357600080fd5b6110ab84828501610e9d565b6000806040838503121561114257600080fd5b61114b83610e3a565b9150602083013567ffffffffffffffff81111561116757600080fd5b610f5185828601610fd7565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156111ca57605f198887030185526111b8868351610f7f565b9550938201939082019060010161119c565b50506001600160a01b03969096169490950193909352949350505050565b6000806000606084860312156111fd57600080fd5b61120684610e3a565b9250602084013567ffffffffffffffff8082111561122357600080fd5b61122f87838801610fd7565b9350604086013591508082111561124557600080fd5b5061125286828701610fd7565b9150509250925092565b6000806040838503121561126f57600080fd5b61127883610e3a565b91506110d660208401610e3a565b600181811c9082168061129a57607f821691505b6020821081036112ba57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600082516112e8818460208701610f5b565b9190910192915050565b60006001820161131257634e487b7160e01b600052601160045260246000fd5b5060010190565b601f8211156105f957600081815260208120601f850160051c810160208610156113405750805b601f850160051c820191505b81811015610a8d5782815560010161134c565b815167ffffffffffffffff81111561137957611379610e56565b61138d816113878454611286565b84611319565b602080601f8311600181146113c257600084156113aa5750858301515b600019600386901b1c1916600185901b178555610a8d565b600085815260208120601f198616915b828110156113f1578886015182559484019460019091019084016113d2565b508582101561140f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600b908201526a496e76616c6964206b657960a81b60408201526060019056fe82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f5a26469706673582212209e98a5815b08ecf60599a7a9acec18f6a9642979b373b38fd79c61b03255aff164736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.