Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
MarketRegistry
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.4; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../Controller.sol"; /** * @title MarketRegistry Contract * @dev Registering and managing all the lending markets. */ contract MarketRegistry is Controller { using EnumerableSet for EnumerableSet.AddressSet; struct Market { address uToken; address userManager; } EnumerableSet.AddressSet private uTokenList; EnumerableSet.AddressSet private userManagerList; mapping(address => Market) public tokens; event LogAddUToken(address indexed tokenAddress, address contractAddress); event LogAddUserManager(address indexed tokenAddress, address contractAddress); modifier newToken(address token) { require(tokens[token].uToken == address(0), "MarketRegistry: has already exist this uToken"); _; } modifier newUserManager(address token) { require(tokens[token].userManager == address(0), "MarketRegistry: has already exist this userManager"); _; } /** * @dev Initialization function */ function __MarketRegistry_init() public initializer { Controller.__Controller_init(msg.sender); } /** * @dev Retrieves the value of the state variable `uTokenList` * @return Stored uToken address */ function getUTokens() public view returns (address[] memory) { return uTokenList.values(); } function getUserManagers() public view returns (address[] memory) { return userManagerList.values(); } function addUToken(address token, address uToken) public newToken(token) onlyAdmin { require(token != address(0) && uToken != address(0), "MarketRegistry: token and uToken can not be zero"); uTokenList.add(uToken); tokens[token].uToken = uToken; emit LogAddUToken(token, uToken); } function addUserManager(address token, address userManager) public newUserManager(token) onlyAdmin { require( token != address(0) && userManager != address(0), "MarketRegistry: token and userManager can not be zero" ); userManagerList.add(userManager); tokens[token].userManager = userManager; emit LogAddUserManager(token, userManager); } function deleteMarket(address token) public onlyAdmin { uTokenList.remove(tokens[token].uToken); userManagerList.remove(tokens[token].userManager); delete tokens[token].uToken; delete tokens[token].userManager; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.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: * * ``` * 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}: * * ``` * 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. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @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 override 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. */ function grantRole(bytes32 role, address account) public virtual override 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. */ function revokeRole(bytes32 role, address account) public virtual override 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 `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @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 Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @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. * * _Available since v3.1._ */ 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 `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal initializer { __ERC1967Upgrade_init_unchained(); } function __ERC1967Upgrade_init_unchained() internal initializer { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; _functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal initializer { __ERC1967Upgrade_init_unchained(); __UUPSUpgradeable_init_unchained(); } function __UUPSUpgradeable_init_unchained() internal initializer { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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 IERC165Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.4; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; /** * @title Controller component * @dev For easy access to any core components */ abstract contract Controller is Initializable, UUPSUpgradeable, AccessControlUpgradeable { bytes32 public constant ROLE_ADMIN = keccak256("ROLE_ADMIN"); mapping(address => address) private _admins; // slither-disable-next-line uninitialized-state bool private _paused; // slither-disable-next-line uninitialized-state address public pauseGuardian; /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused, "Controller: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused, "Controller: not paused"); _; } modifier onlyAdmin() { require(hasRole(ROLE_ADMIN, msg.sender), "Controller: not admin"); _; } modifier onlyGuardian() { require(pauseGuardian == msg.sender, "Controller: caller does not have the guardian role"); _; } //When using minimal deploy, do not call initialize directly during deploy, because msg.sender is the proxyFactory address, and you need to call it manually function __Controller_init(address admin_) public initializer { require(admin_ != address(0), "Controller: address zero"); _paused = false; _admins[admin_] = admin_; __UUPSUpgradeable_init(); _setupRole(ROLE_ADMIN, admin_); pauseGuardian = admin_; } function _authorizeUpgrade(address) internal view override onlyAdmin {} /** * @dev Check if the address provided is the admin * @param account Account address */ function isAdmin(address account) public view returns (bool) { return hasRole(ROLE_ADMIN, account); } /** * @dev Add a new admin account * @param account Account address */ function addAdmin(address account) public onlyAdmin { require(account != address(0), "Controller: address zero"); require(_admins[account] == address(0), "Controller: admin already existed"); _admins[account] = account; _setupRole(ROLE_ADMIN, account); } /** * @dev Set pauseGuardian account * @param account Account address */ function setGuardian(address account) public onlyAdmin { pauseGuardian = account; } /** * @dev Renouce the admin from the sender's address */ function renounceAdmin() public { renounceRole(ROLE_ADMIN, msg.sender); delete _admins[msg.sender]; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Called by a pauser to pause, triggers stopped state. */ function pause() public onlyGuardian whenNotPaused { _paused = true; emit Paused(msg.sender); } /** * @dev Called by a pauser to unpause, returns to normal state. */ function unpause() public onlyGuardian whenPaused { _paused = false; emit Unpaused(msg.sender); } uint256[50] private ______gap; }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 100 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"}],"name":"LogAddUToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"}],"name":"LogAddUserManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin_","type":"address"}],"name":"__Controller_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__MarketRegistry_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"uToken","type":"address"}],"name":"addUToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"userManager","type":"address"}],"name":"addUserManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"deleteMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUserManagers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"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":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseGuardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","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":"account","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","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":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"address","name":"uToken","type":"address"},{"internalType":"address","name":"userManager","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a06040523060601b60805234801561001757600080fd5b5060805160601c611fc661004b60003960008181610605015281816106450152818161078c01526107cc0152611fc66000f3fe6080604052600436106101615760003560e01c80636c461a73116100c15780639c93ff011161007a5780639c93ff01146103ce578063a217fddf146103e3578063cdbffbf8146103f8578063d391014b14610418578063d547741f1461043a578063d960e94a1461045a578063e48603391461047a57600080fd5b80636c461a731461032457806370480275146103445780638456cb59146103645780638a0dac4a146103795780638bad0c0a1461039957806391d14854146103ae57600080fd5b80632f2ff15d1161011e5780632f2ff15d1461026257806336568abe146102845780633659cfe6146102a45780633f4ba83a146102c45780634f1ef286146102d9578063561b08da146102ec5780635c975abb1461030c57600080fd5b806301ffc9a71461016657806314833a3b1461019b578063248a9ca3146101bd57806324a3d622146101fb57806324d7806c1461022d578063292252881461024d575b600080fd5b34801561017257600080fd5b50610186610181366004611ba8565b6104dc565b60405190151581526020015b60405180910390f35b3480156101a757600080fd5b506101b0610513565b6040516101929190611c6f565b3480156101c957600080fd5b506101ed6101d8366004611b6e565b600090815260c9602052604090206001015490565b604051908152602001610192565b34801561020757600080fd5b5060fc546102209061010090046001600160a01b031681565b6040516101929190611c5b565b34801561023957600080fd5b50610186610248366004611a65565b610525565b34801561025957600080fd5b506101b061053f565b34801561026e57600080fd5b5061028261027d366004611b86565b61054c565b005b34801561029057600080fd5b5061028261029f366004611b86565b610577565b3480156102b057600080fd5b506102826102bf366004611a65565b6105fa565b3480156102d057600080fd5b506102826106c3565b6102826102e7366004611ab1565b610781565b3480156102f857600080fd5b50610282610307366004611a7f565b610837565b34801561031857600080fd5b5060fc5460ff16610186565b34801561033057600080fd5b5061028261033f366004611a65565b6109fc565b34801561035057600080fd5b5061028261035f366004611a65565b610b01565b34801561037057600080fd5b50610282610c0e565b34801561038557600080fd5b50610282610394366004611a65565b610cc2565b3480156103a557600080fd5b50610282610d1e565b3480156103ba57600080fd5b506101866103c9366004611b86565b610d55565b3480156103da57600080fd5b50610282610d80565b3480156103ef57600080fd5b506101ed600081565b34801561040457600080fd5b50610282610413366004611a7f565b610df4565b34801561042457600080fd5b506101ed600080516020611f4a83398151915281565b34801561044657600080fd5b50610282610455366004611b86565b610f9c565b34801561046657600080fd5b50610282610475366004611a65565b610fc2565b34801561048657600080fd5b506104bc610495366004611a65565b61013360205260009081526040902080546001909101546001600160a01b03918216911682565b604080516001600160a01b03938416815292909116602083015201610192565b60006001600160e01b03198216637965db0b60e01b148061050d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610520610131611083565b905090565b600061050d600080516020611f4a83398151915283610d55565b606061052061012f611083565b600082815260c960205260409020600101546105688133611097565b61057283836110fb565b505050565b6001600160a01b03811633146105ec5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f68282611181565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156106435760405162461bcd60e51b81526004016105e390611cef565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106756111e8565b6001600160a01b03161461069b5760405162461bcd60e51b81526004016105e390611d3b565b6106a481611216565b604080516000808252602082019092526106c09183919061124a565b50565b60fc5461010090046001600160a01b031633146106f25760405162461bcd60e51b81526004016105e390611db6565b60fc5460ff1661073d5760405162461bcd60e51b815260206004820152601660248201527510dbdb9d1c9bdb1b195c8e881b9bdd081c185d5cd95960521b60448201526064016105e3565b60fc805460ff191690556040517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90610777903390611c5b565b60405180910390a1565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156107ca5760405162461bcd60e51b81526004016105e390611cef565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107fc6111e8565b6001600160a01b0316146108225760405162461bcd60e51b81526004016105e390611d3b565b61082b82611216565b6105f68282600161124a565b6001600160a01b0380831660009081526101336020526040902060010154839116156108c05760405162461bcd60e51b815260206004820152603260248201527f4d61726b657452656769737472793a2068617320616c726561647920657869736044820152713a103a3434b9903ab9b2b926b0b730b3b2b960711b60648201526084016105e3565b6108d8600080516020611f4a83398151915233610d55565b6108f45760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b0383161580159061091457506001600160a01b03821615155b61097e5760405162461bcd60e51b815260206004820152603560248201527f4d61726b657452656769737472793a20746f6b656e20616e6420757365724d616044820152746e616765722063616e206e6f74206265207a65726f60581b60648201526084016105e3565b61098a61013183611391565b506001600160a01b03838116600081815261013360205260409081902060010180546001600160a01b0319169386169390931790925590517f081428de8cb860717cb137b42e1e2226ea2f3e6c9f6b811bc12c8d611157aaf3906109ef908590611c5b565b60405180910390a2505050565b600054610100900460ff1680610a15575060005460ff16155b610a315760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610a53576000805461ffff19166101011790555b6001600160a01b038216610a795760405162461bcd60e51b81526004016105e390611e08565b60fc805460ff191690556001600160a01b038216600081815260fb6020526040902080546001600160a01b0319169091179055610ab46113a6565b610acc600080516020611f4a8339815191528361140d565b60fc8054610100600160a81b0319166101006001600160a01b0385160217905580156105f6576000805461ff00191690555050565b610b19600080516020611f4a83398151915233610d55565b610b355760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b038116610b5b5760405162461bcd60e51b81526004016105e390611e08565b6001600160a01b03818116600090815260fb60205260409020541615610bcd5760405162461bcd60e51b815260206004820152602160248201527f436f6e74726f6c6c65723a2061646d696e20616c7265616479206578697374656044820152601960fa1b60648201526084016105e3565b6001600160a01b038116600081815260fb6020526040902080546001600160a01b03191690911790556106c0600080516020611f4a8339815191528261140d565b60fc5461010090046001600160a01b03163314610c3d5760405162461bcd60e51b81526004016105e390611db6565b60fc5460ff1615610c855760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9bdb1b195c8e881c185d5cd95960721b60448201526064016105e3565b60fc805460ff191660011790556040517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890610777903390611c5b565b610cda600080516020611f4a83398151915233610d55565b610cf65760405162461bcd60e51b81526004016105e390611d87565b60fc80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610d36600080516020611f4a83398151915233610577565b33600090815260fb6020526040902080546001600160a01b0319169055565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff1680610d99575060005460ff16155b610db55760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610dd7576000805461ffff19166101011790555b610de0336109fc565b80156106c0576000805461ff001916905550565b6001600160a01b038083166000908152610133602052604090205483911615610e755760405162461bcd60e51b815260206004820152602d60248201527f4d61726b657452656769737472793a2068617320616c7265616479206578697360448201526c3a103a3434b9903aaa37b5b2b760991b60648201526084016105e3565b610e8d600080516020611f4a83398151915233610d55565b610ea95760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b03831615801590610ec957506001600160a01b03821615155b610f2e5760405162461bcd60e51b815260206004820152603060248201527f4d61726b657452656769737472793a20746f6b656e20616e642075546f6b656e60448201526f2063616e206e6f74206265207a65726f60801b60648201526084016105e3565b610f3a61012f83611391565b506001600160a01b03838116600081815261013360205260409081902080546001600160a01b0319169386169390931790925590517fa8ddf380e0018e0fe64254567490e65f8df5c1e5ad620dad96349c8eecc4475c906109ef908590611c5b565b600082815260c96020526040902060010154610fb88133611097565b6105728383611181565b610fda600080516020611f4a83398151915233610d55565b610ff65760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b038082166000908152610133602052604090205461101f9161012f9116611417565b506001600160a01b038082166000908152610133602052604090206001015461104c916101319116611417565b506001600160a01b031660009081526101336020526040902080546001600160a01b03199081168255600190910180549091169055565b606060006110908361142c565b9392505050565b6110a18282610d55565b6105f6576110b9816001600160a01b03166014611488565b6110c4836020611488565b6040516020016110d5929190611bec565b60408051601f198184030181529082905262461bcd60e51b82526105e391600401611cbc565b6111058282610d55565b6105f657600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561113d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61118b8282610d55565b156105f657600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b61122e600080516020611f4a83398151915233610d55565b6106c05760405162461bcd60e51b81526004016105e390611d87565b60006112546111e8565b905061125f8461166a565b60008351118061126c5750815b1561127d5761127b848461170f565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661138a57805460ff191660011781556040516112f89086906112c9908590602401611c5b565b60408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261170f565b50805460ff191681556113096111e8565b6001600160a01b0316826001600160a01b0316146113815760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016105e3565b61138a856117fa565b5050505050565b6000611090836001600160a01b03841661183a565b600054610100900460ff16806113bf575060005460ff16155b6113db5760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff161580156113fd576000805461ffff19166101011790555b611405611889565b610de0611889565b6105f682826110fb565b6000611090836001600160a01b0384166118f3565b60608160000180548060200260200160405190810160405280929190818152602001828054801561147c57602002820191906000526020600020905b815481526020019060010190808311611468575b50505050509050919050565b60606000611497836002611ea0565b6114a2906002611e88565b67ffffffffffffffff8111156114c857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156114f2576020820181803683370190505b509050600360fc1b8160008151811061151b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061157c846002611ea0565b611587906001611e88565b90505b600181111561161b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115c957634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106115ed57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361161481611f06565b905061158a565b5083156110905760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e3565b803b6116ce5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105e3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b61176e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016105e3565b600080846001600160a01b0316846040516117899190611bd0565b600060405180830381855af49150503d80600081146117c4576040519150601f19603f3d011682016040523d82523d6000602084013e6117c9565b606091505b50915091506117f18282604051806060016040528060278152602001611f6a60279139611a10565b95945050505050565b6118038161166a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60008181526001830160205260408120546118815750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561050d565b50600061050d565b600054610100900460ff16806118a2575060005460ff16155b6118be5760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610de0576000805461ffff191661010117905580156106c0576000805461ff001916905550565b60008181526001830160205260408120548015611a06576000611917600183611ebf565b855490915060009061192b90600190611ebf565b90508181146119ac57600086600001828154811061195957634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061198a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806119cb57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061050d565b600091505061050d565b60608315611a1f575081611090565b825115611a2f5782518084602001fd5b8160405162461bcd60e51b81526004016105e39190611cbc565b80356001600160a01b0381168114611a6057600080fd5b919050565b600060208284031215611a76578081fd5b61109082611a49565b60008060408385031215611a91578081fd5b611a9a83611a49565b9150611aa860208401611a49565b90509250929050565b60008060408385031215611ac3578182fd5b611acc83611a49565b9150602083013567ffffffffffffffff80821115611ae8578283fd5b818501915085601f830112611afb578283fd5b813581811115611b0d57611b0d611f33565b604051601f8201601f19908116603f01168101908382118183101715611b3557611b35611f33565b81604052828152886020848701011115611b4d578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611b7f578081fd5b5035919050565b60008060408385031215611b98578182fd5b82359150611aa860208401611a49565b600060208284031215611bb9578081fd5b81356001600160e01b031981168114611090578182fd5b60008251611be2818460208701611ed6565b9190910192915050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351611c1e816017850160208801611ed6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c4f816028840160208801611ed6565b01602801949350505050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b81811015611cb05783516001600160a01b031683529284019291840191600101611c8b565b50909695505050505050565b6020815260008251806020840152611cdb816040850160208701611ed6565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526015908201527421b7b73a3937b63632b91d103737ba1030b236b4b760591b604082015260600190565b60208082526032908201527f436f6e74726f6c6c65723a2063616c6c657220646f6573206e6f7420686176656040820152712074686520677561726469616e20726f6c6560701b606082015260800190565b602080825260189082015277436f6e74726f6c6c65723a2061646472657373207a65726f60401b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611e9b57611e9b611f1d565b500190565b6000816000190483118215151615611eba57611eba611f1d565b500290565b600082821015611ed157611ed1611f1d565b500390565b60005b83811015611ef1578181015183820152602001611ed9565b83811115611f00576000848401525b50505050565b600081611f1557611f15611f1d565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a13527a48414d73964a992dc0081d5aa46eaf19c129ab0c79080e306ff6f6a6864736f6c63430008040033
Deployed Bytecode
0x6080604052600436106101615760003560e01c80636c461a73116100c15780639c93ff011161007a5780639c93ff01146103ce578063a217fddf146103e3578063cdbffbf8146103f8578063d391014b14610418578063d547741f1461043a578063d960e94a1461045a578063e48603391461047a57600080fd5b80636c461a731461032457806370480275146103445780638456cb59146103645780638a0dac4a146103795780638bad0c0a1461039957806391d14854146103ae57600080fd5b80632f2ff15d1161011e5780632f2ff15d1461026257806336568abe146102845780633659cfe6146102a45780633f4ba83a146102c45780634f1ef286146102d9578063561b08da146102ec5780635c975abb1461030c57600080fd5b806301ffc9a71461016657806314833a3b1461019b578063248a9ca3146101bd57806324a3d622146101fb57806324d7806c1461022d578063292252881461024d575b600080fd5b34801561017257600080fd5b50610186610181366004611ba8565b6104dc565b60405190151581526020015b60405180910390f35b3480156101a757600080fd5b506101b0610513565b6040516101929190611c6f565b3480156101c957600080fd5b506101ed6101d8366004611b6e565b600090815260c9602052604090206001015490565b604051908152602001610192565b34801561020757600080fd5b5060fc546102209061010090046001600160a01b031681565b6040516101929190611c5b565b34801561023957600080fd5b50610186610248366004611a65565b610525565b34801561025957600080fd5b506101b061053f565b34801561026e57600080fd5b5061028261027d366004611b86565b61054c565b005b34801561029057600080fd5b5061028261029f366004611b86565b610577565b3480156102b057600080fd5b506102826102bf366004611a65565b6105fa565b3480156102d057600080fd5b506102826106c3565b6102826102e7366004611ab1565b610781565b3480156102f857600080fd5b50610282610307366004611a7f565b610837565b34801561031857600080fd5b5060fc5460ff16610186565b34801561033057600080fd5b5061028261033f366004611a65565b6109fc565b34801561035057600080fd5b5061028261035f366004611a65565b610b01565b34801561037057600080fd5b50610282610c0e565b34801561038557600080fd5b50610282610394366004611a65565b610cc2565b3480156103a557600080fd5b50610282610d1e565b3480156103ba57600080fd5b506101866103c9366004611b86565b610d55565b3480156103da57600080fd5b50610282610d80565b3480156103ef57600080fd5b506101ed600081565b34801561040457600080fd5b50610282610413366004611a7f565b610df4565b34801561042457600080fd5b506101ed600080516020611f4a83398151915281565b34801561044657600080fd5b50610282610455366004611b86565b610f9c565b34801561046657600080fd5b50610282610475366004611a65565b610fc2565b34801561048657600080fd5b506104bc610495366004611a65565b61013360205260009081526040902080546001909101546001600160a01b03918216911682565b604080516001600160a01b03938416815292909116602083015201610192565b60006001600160e01b03198216637965db0b60e01b148061050d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610520610131611083565b905090565b600061050d600080516020611f4a83398151915283610d55565b606061052061012f611083565b600082815260c960205260409020600101546105688133611097565b61057283836110fb565b505050565b6001600160a01b03811633146105ec5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f68282611181565b5050565b306001600160a01b037f000000000000000000000000b9e958fdc190b069cc941fdd2a4f9b2d88db0c4c1614156106435760405162461bcd60e51b81526004016105e390611cef565b7f000000000000000000000000b9e958fdc190b069cc941fdd2a4f9b2d88db0c4c6001600160a01b03166106756111e8565b6001600160a01b03161461069b5760405162461bcd60e51b81526004016105e390611d3b565b6106a481611216565b604080516000808252602082019092526106c09183919061124a565b50565b60fc5461010090046001600160a01b031633146106f25760405162461bcd60e51b81526004016105e390611db6565b60fc5460ff1661073d5760405162461bcd60e51b815260206004820152601660248201527510dbdb9d1c9bdb1b195c8e881b9bdd081c185d5cd95960521b60448201526064016105e3565b60fc805460ff191690556040517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90610777903390611c5b565b60405180910390a1565b306001600160a01b037f000000000000000000000000b9e958fdc190b069cc941fdd2a4f9b2d88db0c4c1614156107ca5760405162461bcd60e51b81526004016105e390611cef565b7f000000000000000000000000b9e958fdc190b069cc941fdd2a4f9b2d88db0c4c6001600160a01b03166107fc6111e8565b6001600160a01b0316146108225760405162461bcd60e51b81526004016105e390611d3b565b61082b82611216565b6105f68282600161124a565b6001600160a01b0380831660009081526101336020526040902060010154839116156108c05760405162461bcd60e51b815260206004820152603260248201527f4d61726b657452656769737472793a2068617320616c726561647920657869736044820152713a103a3434b9903ab9b2b926b0b730b3b2b960711b60648201526084016105e3565b6108d8600080516020611f4a83398151915233610d55565b6108f45760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b0383161580159061091457506001600160a01b03821615155b61097e5760405162461bcd60e51b815260206004820152603560248201527f4d61726b657452656769737472793a20746f6b656e20616e6420757365724d616044820152746e616765722063616e206e6f74206265207a65726f60581b60648201526084016105e3565b61098a61013183611391565b506001600160a01b03838116600081815261013360205260409081902060010180546001600160a01b0319169386169390931790925590517f081428de8cb860717cb137b42e1e2226ea2f3e6c9f6b811bc12c8d611157aaf3906109ef908590611c5b565b60405180910390a2505050565b600054610100900460ff1680610a15575060005460ff16155b610a315760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610a53576000805461ffff19166101011790555b6001600160a01b038216610a795760405162461bcd60e51b81526004016105e390611e08565b60fc805460ff191690556001600160a01b038216600081815260fb6020526040902080546001600160a01b0319169091179055610ab46113a6565b610acc600080516020611f4a8339815191528361140d565b60fc8054610100600160a81b0319166101006001600160a01b0385160217905580156105f6576000805461ff00191690555050565b610b19600080516020611f4a83398151915233610d55565b610b355760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b038116610b5b5760405162461bcd60e51b81526004016105e390611e08565b6001600160a01b03818116600090815260fb60205260409020541615610bcd5760405162461bcd60e51b815260206004820152602160248201527f436f6e74726f6c6c65723a2061646d696e20616c7265616479206578697374656044820152601960fa1b60648201526084016105e3565b6001600160a01b038116600081815260fb6020526040902080546001600160a01b03191690911790556106c0600080516020611f4a8339815191528261140d565b60fc5461010090046001600160a01b03163314610c3d5760405162461bcd60e51b81526004016105e390611db6565b60fc5460ff1615610c855760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9bdb1b195c8e881c185d5cd95960721b60448201526064016105e3565b60fc805460ff191660011790556040517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890610777903390611c5b565b610cda600080516020611f4a83398151915233610d55565b610cf65760405162461bcd60e51b81526004016105e390611d87565b60fc80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610d36600080516020611f4a83398151915233610577565b33600090815260fb6020526040902080546001600160a01b0319169055565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff1680610d99575060005460ff16155b610db55760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610dd7576000805461ffff19166101011790555b610de0336109fc565b80156106c0576000805461ff001916905550565b6001600160a01b038083166000908152610133602052604090205483911615610e755760405162461bcd60e51b815260206004820152602d60248201527f4d61726b657452656769737472793a2068617320616c7265616479206578697360448201526c3a103a3434b9903aaa37b5b2b760991b60648201526084016105e3565b610e8d600080516020611f4a83398151915233610d55565b610ea95760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b03831615801590610ec957506001600160a01b03821615155b610f2e5760405162461bcd60e51b815260206004820152603060248201527f4d61726b657452656769737472793a20746f6b656e20616e642075546f6b656e60448201526f2063616e206e6f74206265207a65726f60801b60648201526084016105e3565b610f3a61012f83611391565b506001600160a01b03838116600081815261013360205260409081902080546001600160a01b0319169386169390931790925590517fa8ddf380e0018e0fe64254567490e65f8df5c1e5ad620dad96349c8eecc4475c906109ef908590611c5b565b600082815260c96020526040902060010154610fb88133611097565b6105728383611181565b610fda600080516020611f4a83398151915233610d55565b610ff65760405162461bcd60e51b81526004016105e390611d87565b6001600160a01b038082166000908152610133602052604090205461101f9161012f9116611417565b506001600160a01b038082166000908152610133602052604090206001015461104c916101319116611417565b506001600160a01b031660009081526101336020526040902080546001600160a01b03199081168255600190910180549091169055565b606060006110908361142c565b9392505050565b6110a18282610d55565b6105f6576110b9816001600160a01b03166014611488565b6110c4836020611488565b6040516020016110d5929190611bec565b60408051601f198184030181529082905262461bcd60e51b82526105e391600401611cbc565b6111058282610d55565b6105f657600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561113d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61118b8282610d55565b156105f657600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b61122e600080516020611f4a83398151915233610d55565b6106c05760405162461bcd60e51b81526004016105e390611d87565b60006112546111e8565b905061125f8461166a565b60008351118061126c5750815b1561127d5761127b848461170f565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff1661138a57805460ff191660011781556040516112f89086906112c9908590602401611c5b565b60408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b17905261170f565b50805460ff191681556113096111e8565b6001600160a01b0316826001600160a01b0316146113815760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016105e3565b61138a856117fa565b5050505050565b6000611090836001600160a01b03841661183a565b600054610100900460ff16806113bf575060005460ff16155b6113db5760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff161580156113fd576000805461ffff19166101011790555b611405611889565b610de0611889565b6105f682826110fb565b6000611090836001600160a01b0384166118f3565b60608160000180548060200260200160405190810160405280929190818152602001828054801561147c57602002820191906000526020600020905b815481526020019060010190808311611468575b50505050509050919050565b60606000611497836002611ea0565b6114a2906002611e88565b67ffffffffffffffff8111156114c857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156114f2576020820181803683370190505b509050600360fc1b8160008151811061151b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061157c846002611ea0565b611587906001611e88565b90505b600181111561161b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115c957634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106115ed57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361161481611f06565b905061158a565b5083156110905760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e3565b803b6116ce5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105e3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b61176e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016105e3565b600080846001600160a01b0316846040516117899190611bd0565b600060405180830381855af49150503d80600081146117c4576040519150601f19603f3d011682016040523d82523d6000602084013e6117c9565b606091505b50915091506117f18282604051806060016040528060278152602001611f6a60279139611a10565b95945050505050565b6118038161166a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60008181526001830160205260408120546118815750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561050d565b50600061050d565b600054610100900460ff16806118a2575060005460ff16155b6118be5760405162461bcd60e51b81526004016105e390611e3a565b600054610100900460ff16158015610de0576000805461ffff191661010117905580156106c0576000805461ff001916905550565b60008181526001830160205260408120548015611a06576000611917600183611ebf565b855490915060009061192b90600190611ebf565b90508181146119ac57600086600001828154811061195957634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061198a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806119cb57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061050d565b600091505061050d565b60608315611a1f575081611090565b825115611a2f5782518084602001fd5b8160405162461bcd60e51b81526004016105e39190611cbc565b80356001600160a01b0381168114611a6057600080fd5b919050565b600060208284031215611a76578081fd5b61109082611a49565b60008060408385031215611a91578081fd5b611a9a83611a49565b9150611aa860208401611a49565b90509250929050565b60008060408385031215611ac3578182fd5b611acc83611a49565b9150602083013567ffffffffffffffff80821115611ae8578283fd5b818501915085601f830112611afb578283fd5b813581811115611b0d57611b0d611f33565b604051601f8201601f19908116603f01168101908382118183101715611b3557611b35611f33565b81604052828152886020848701011115611b4d578586fd5b82602086016020830137856020848301015280955050505050509250929050565b600060208284031215611b7f578081fd5b5035919050565b60008060408385031215611b98578182fd5b82359150611aa860208401611a49565b600060208284031215611bb9578081fd5b81356001600160e01b031981168114611090578182fd5b60008251611be2818460208701611ed6565b9190910192915050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351611c1e816017850160208801611ed6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c4f816028840160208801611ed6565b01602801949350505050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b81811015611cb05783516001600160a01b031683529284019291840191600101611c8b565b50909695505050505050565b6020815260008251806020840152611cdb816040850160208701611ed6565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526015908201527421b7b73a3937b63632b91d103737ba1030b236b4b760591b604082015260600190565b60208082526032908201527f436f6e74726f6c6c65723a2063616c6c657220646f6573206e6f7420686176656040820152712074686520677561726469616e20726f6c6560701b606082015260800190565b602080825260189082015277436f6e74726f6c6c65723a2061646472657373207a65726f60401b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115611e9b57611e9b611f1d565b500190565b6000816000190483118215151615611eba57611eba611f1d565b500290565b600082821015611ed157611ed1611f1d565b500390565b60005b83811015611ef1578181015183820152602001611ed9565b83811115611f00576000848401525b50505050565b600081611f1557611f15611f1d565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a13527a48414d73964a992dc0081d5aa46eaf19c129ab0c79080e306ff6f6a6864736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.