Overview
ETH Balance
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 11 from a total of 11 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Revoke Role | 115995912 | 300 days ago | IN | 0 ETH | 0.000244473424 | ||||
Grant Role | 115995909 | 300 days ago | IN | 0 ETH | 0.000280371163 | ||||
Remove Risk Admi... | 115995904 | 300 days ago | IN | 0 ETH | 0.000248809 | ||||
Add Risk Admin | 115995899 | 300 days ago | IN | 0 ETH | 0.000280652777 | ||||
Remove Emergency... | 115995895 | 300 days ago | IN | 0 ETH | 0.000262753923 | ||||
Add Emergency Ad... | 115995891 | 300 days ago | IN | 0 ETH | 0.000298914177 | ||||
Remove Guild Adm... | 115995886 | 300 days ago | IN | 0 ETH | 0.000282438941 | ||||
Add Guild Admin | 115995882 | 300 days ago | IN | 0 ETH | 0.000315446399 | ||||
Add Emergency Ad... | 115995811 | 300 days ago | IN | 0 ETH | 0.000459428567 | ||||
Add Risk Admin | 115995807 | 300 days ago | IN | 0 ETH | 0.000462351045 | ||||
Add Guild Admin | 115995803 | 300 days ago | IN | 0 ETH | 0.000462381694 |
View more zero value Internal Transactions in Advanced View mode
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; import {AccessControl} from "../../dependencies/openzeppelin/contracts/AccessControl.sol"; import {IGuildAddressesProvider} from "../../interfaces/IGuildAddressesProvider.sol"; import {IACLManager} from "../../interfaces/IACLManager.sol"; import {Errors} from "../libraries/helpers/Errors.sol"; /** * @title ACLManager * @author Covenant Labs (cloned from AAVE core v3 commit d5fafce) * @notice Access Control List Manager. Main registry of system roles and permissions. */ contract ACLManager is AccessControl, IACLManager { bytes32 public constant override GUILD_ADMIN_ROLE = keccak256("GUILD_ADMIN"); bytes32 public constant override EMERGENCY_ADMIN_ROLE = keccak256("EMERGENCY_ADMIN"); bytes32 public constant override RISK_ADMIN_ROLE = keccak256("RISK_ADMIN"); IGuildAddressesProvider public immutable ADDRESSES_PROVIDER; /** * @dev Constructor * @dev The ACL admin should be initialized at the addressesProvider beforehand * @param provider The address of the GuildAddressesProvider */ constructor(IGuildAddressesProvider provider) { ADDRESSES_PROVIDER = provider; address aclAdmin = provider.getACLAdmin(); require(aclAdmin != address(0), Errors.ACL_ADMIN_CANNOT_BE_ZERO); _setupRole(DEFAULT_ADMIN_ROLE, aclAdmin); } /// @inheritdoc IACLManager function setRoleAdmin(bytes32 role, bytes32 adminRole) external override onlyRole(DEFAULT_ADMIN_ROLE) { _setRoleAdmin(role, adminRole); } /// @inheritdoc IACLManager function addGuildAdmin(address admin) external override { grantRole(GUILD_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function removeGuildAdmin(address admin) external override { revokeRole(GUILD_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function isGuildAdmin(address admin) external view override returns (bool) { return hasRole(GUILD_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function addEmergencyAdmin(address admin) external override { grantRole(EMERGENCY_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function removeEmergencyAdmin(address admin) external override { revokeRole(EMERGENCY_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function isEmergencyAdmin(address admin) external view override returns (bool) { return hasRole(EMERGENCY_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function addRiskAdmin(address admin) external override { grantRole(RISK_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function removeRiskAdmin(address admin) external override { revokeRole(RISK_ADMIN_ROLE, admin); } /// @inheritdoc IACLManager function isRiskAdmin(address admin) external view override returns (bool) { return hasRole(RISK_ADMIN_ROLE, admin); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import './IAccessControl.sol'; import './Context.sol'; import './Strings.sol'; import './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: * * ``` * 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 AccessControl is Context, IAccessControl, ERC165 { 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(IAccessControl).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 ', Strings.toHexString(uint160(account), 20), ' is missing role ', Strings.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 granted `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}. * ==== */ 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); } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* * @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 GSN 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 payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import './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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @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 pragma solidity 0.8.17; /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @dev String operations. */ library Strings { 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: AGPL-3.0 pragma solidity ^0.8.7; import {IGuildAddressesProvider} from "./IGuildAddressesProvider.sol"; /** * @title IACLManager * @author Amorphous (cloned from AAVE core v3 commit d5fafce) * @notice Defines the basic interface for the ACL Manager **/ interface IACLManager { /** * @notice Returns the contract address of the GuildAddressesProvider * @return The address of the GuildAddressesProvider */ function ADDRESSES_PROVIDER() external view returns (IGuildAddressesProvider); /** * @notice Returns the identifier of the GuildAdmin role * @return The id of the GuildAdmin role */ function GUILD_ADMIN_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the EmergencyAdmin role * @return The id of the EmergencyAdmin role */ function EMERGENCY_ADMIN_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the RiskAdmin role * @return The id of the RiskAdmin role */ function RISK_ADMIN_ROLE() external view returns (bytes32); /** * @notice Set the role as admin of a specific role. * @dev By default the admin role for all roles is `DEFAULT_ADMIN_ROLE`. * @param role The role to be managed by the admin role * @param adminRole The admin role */ function setRoleAdmin(bytes32 role, bytes32 adminRole) external; /** * @notice Adds a new admin as GuildAdmin * @param admin The address of the new admin */ function addGuildAdmin(address admin) external; /** * @notice Removes an admin as GuildAdmin * @param admin The address of the admin to remove */ function removeGuildAdmin(address admin) external; /** * @notice Returns true if the address is GuildAdmin, false otherwise * @param admin The address to check * @return True if the given address is GuildAdmin, false otherwise */ function isGuildAdmin(address admin) external view returns (bool); /** * @notice Adds a new admin as EmergencyAdmin * @param admin The address of the new admin */ function addEmergencyAdmin(address admin) external; /** * @notice Removes an admin as EmergencyAdmin * @param admin The address of the admin to remove */ function removeEmergencyAdmin(address admin) external; /** * @notice Returns true if the address is EmergencyAdmin, false otherwise * @param admin The address to check * @return True if the given address is EmergencyAdmin, false otherwise */ function isEmergencyAdmin(address admin) external view returns (bool); /** * @notice Adds a new admin as RiskAdmin * @param admin The address of the new admin */ function addRiskAdmin(address admin) external; /** * @notice Removes an admin as RiskAdmin * @param admin The address of the admin to remove */ function removeRiskAdmin(address admin) external; /** * @notice Returns true if the address is RiskAdmin, false otherwise * @param admin The address to check * @return True if the given address is RiskAdmin, false otherwise */ function isRiskAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.7; /** * @title IGuildAddressesProvider * @author Amorphous (cloned from AAVE core v3 commit d5fafce) * @notice Defines the basic interface for a Guild Addresses Provider. **/ interface IGuildAddressesProvider { /** * @dev Emitted when the market identifier is updated. * @param oldGuildId The old id of the market * @param newGuildId The new id of the market */ event GuildIdSet(string indexed oldGuildId, string indexed newGuildId); /** * @dev Emitted when the Guild is updated. * @param oldAddress The old address of the Guild * @param newAddress The new address of the Guild */ event GuildUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the Guild configurator is updated. * @param oldAddress The old address of the GuildConfigurator * @param newAddress The new address of the GuildConfigurator */ event GuildConfiguratorUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the price oracle is updated. * @param oldAddress The old address of the PriceOracle * @param newAddress The new address of the PriceOracle */ event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the price oracle is updated. * @param oldAddress The old address of the PriceOracleSentinel * @param newAddress The new address of the PriceOracleSentinel */ event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the ACL manager is updated. * @param oldAddress The old address of the ACLManager * @param newAddress The new address of the ACLManager */ event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the ACL admin is updated. * @param oldAddress The old address of the ACLAdmin * @param newAddress The new address of the ACLAdmin */ event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the Guild data provider is updated. * @param oldAddress The old address of the GuildDataProvider * @param newAddress The new address of the GuildDataProvider */ event GuildDataProviderUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the GuildRoleManager is updated. * @param oldAddress The old address of the GuildRoleManager * @param newAddress The new address of the GuildRoleManager */ event GuildRoleManagerUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when a new proxy is created. * @param id The identifier of the proxy * @param proxyAddress The address of the created proxy contract * @param implementationAddress The address of the implementation contract */ event ProxyCreated(bytes32 indexed id, address indexed proxyAddress, address indexed implementationAddress); /** * @dev Emitted when a new non-proxied contract address is registered. * @param id The identifier of the contract * @param oldAddress The address of the old contract * @param newAddress The address of the new contract */ event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the implementation of the proxy registered with id is updated * @param id The identifier of the contract * @param proxyAddress The address of the proxy contract * @param oldImplementationAddress The address of the old implementation contract * @param newImplementationAddress The address of the new implementation contract */ event AddressSetAsProxy( bytes32 indexed id, address indexed proxyAddress, address oldImplementationAddress, address indexed newImplementationAddress ); /** * @notice Returns the id of the Aave market to which this contract points to. * @return The market id **/ function getGuildId() external view returns (string memory); /** * @notice Associates an id with a specific GuildAddressesProvider. * @dev This can be used to create an onchain registry of GuildAddressesProviders to * identify and validate multiple Guilds. * @param newGuildId The market id */ function setGuildId(string calldata newGuildId) external; /** * @notice Returns an address by its identifier. * @dev The returned address might be an EOA or a contract, potentially proxied * @dev It returns ZERO if there is no registered address with the given id * @param id The id * @return The address of the registered for the specified id */ function getAddress(bytes32 id) external view returns (address); /** * @notice General function to update the implementation of a proxy registered with * certain `id`. If there is no proxy registered, it will instantiate one and * set as implementation the `newImplementationAddress`. * @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit * setter function, in order to avoid unexpected consequences * @param id The id * @param newImplementationAddress The address of the new implementation */ function setAddressAsProxy(bytes32 id, address newImplementationAddress) external; /** * @notice Sets an address for an id replacing the address saved in the addresses map. * @dev IMPORTANT Use this function carefully, as it will do a hard replacement * @param id The id * @param newAddress The address to set */ function setAddress(bytes32 id, address newAddress) external; /** * @notice Returns the address of the Guild proxy. * @return The Guild proxy address **/ function getGuild() external view returns (address); /** * @notice Updates the implementation of the Guild, or creates a proxy * setting the new `Guild` implementation when the function is called for the first time. * @param newGuildImpl The new Guild implementation **/ function setGuildImpl(address newGuildImpl) external; /** * @notice Returns the address of the GuildConfigurator proxy. * @return The GuildConfigurator proxy address **/ function getGuildConfigurator() external view returns (address); /** * @notice Updates the implementation of the GuildConfigurator, or creates a proxy * setting the new `GuildConfigurator` implementation when the function is called for the first time. * @param newGuildConfiguratorImpl The new GuildConfigurator implementation **/ function setGuildConfiguratorImpl(address newGuildConfiguratorImpl) external; /** * @notice Returns the address of the GuildRoleManager proxy. * @return The GuildRoleManager proxy address **/ function getGuildRoleManager() external view returns (address); /** * @notice Updates the implementation of the GuildRoleManager, or creates a proxy * setting the new `GuildRoleManager` implementation when the function is called for the first time. * @param newGuildRoleManagerImpl The new GuildRoleManager implementation **/ function setGuildRoleManagerImpl(address newGuildRoleManagerImpl) external; /** * @notice Returns the address of the price oracle. * @return The address of the PriceOracle */ function getPriceOracle() external view returns (address); /** * @notice Updates the address of the price oracle. * @param newPriceOracle The address of the new PriceOracle */ function setPriceOracle(address newPriceOracle) external; /** * @notice Returns the address of the price oracle sentinel. * @return The address of the PriceOracleSentinel */ function getPriceOracleSentinel() external view returns (address); /** * @notice Updates the address of the price oracle sentinel. * @param newPriceOracleSentinel The address of the new PriceOracleSentinel */ function setPriceOracleSentinel(address newPriceOracleSentinel) external; /** * @notice Returns the address of the ACL manager. * @return The address of the ACLManager */ function getACLManager() external view returns (address); /** * @notice Updates the address of the ACL manager. * @param newAclManager The address of the new ACLManager **/ function setACLManager(address newAclManager) external; /** * @notice Returns the address of the ACL admin. * @return The address of the ACL admin */ function getACLAdmin() external view returns (address); /** * @notice Updates the address of the ACL admin. * @param newAclAdmin The address of the new ACL admin */ function setACLAdmin(address newAclAdmin) external; /** * @notice Returns the address of the data provider. * @return The address of the DataProvider */ function getGuildDataProvider() external view returns (address); /** * @notice Updates the address of the data provider. * @param newDataProvider The address of the new DataProvider **/ function setGuildDataProvider(address newDataProvider) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; /** * @title Errors library * @author Covenant Labs * @notice Defines the error messages emitted by the different contracts of the Covenant protocol */ library Errors { string public constant LOCKED = "0"; // 'Guild is locked' string public constant NOT_CONTRACT = "1"; // 'Address is not a contract' string public constant AMOUNT_NEED_TO_BE_GREATER = "2"; // 'A greater amount needed for action' string public constant TRANSFER_FAIL = "3"; // 'Failed to transfer' string public constant NOT_APPROVED = "4"; // 'Not approved' string public constant NOT_ENOUGH_BALANCE = "5"; // 'Not enough balance' string public constant ASSET_NEEDS_TO_BE_APPROVED = "6"; // 'Asset needs to be whitelisted' string public constant OPERATION_NOT_SUPPORTED = "7"; // 'Operation not supported' string public constant OPERATION_NOT_AUTHORIZED = "8"; // 'Operation not authorized, not enough permissions for the operation' string public constant REFINANCE_INVALID_TIMESTAMP = "9"; // 'The current block has a timestamp that is older vs that last refinance' string public constant NOT_ENOUGH_COLLATERAL = "10"; // 'Not enough collateral' string public constant AMOUNT_NEED_TO_MORE_THAN_ZERO = "11"; // '"Your asset amount must be greater then you are trying to deposit"' string public constant CANNOT_BURN_MORE_THAN_CURRENT_DEBT = "12"; // "Amount exceeds current debt level" string public constant UNHEALTHY_POSITION = "13"; // Users position is currently higher than liquidation threshold string public constant CANNOT_LIQUIDATE_HEALTHY = "14"; // Cannot liqudate healthy users position string public constant WITHDRAWAL_AMOUNT_EXCEEDS_AVAILABLE = "15"; // Amount exceeds max withdrawable amount string public constant HELPER_INSUFFICIENT_FUNDS = "16"; // Internal error, insufficient funds to place on dex as requested string public constant AMOUNT_NEEDS_TO_EQUAL_COLLATERAL_VALUE = "17"; // Amount needs to be the same to exchange money for collateral string public constant AMOUNT_NEEDS_TO_LOWER_THAN_DEBT = "18"; // Amount needs to be lower than current debt level string public constant NOT_ENOUGH_Z_TOKENS = "19"; // "Not enough zTokens in account" string public constant PRICE_LIMIT_OUT_OF_BOUNDS = "20"; // "PerpetualDebt.sol - price limit initialization out of bounds" string public constant PRICE_LIMIT_ERROR = "21"; // "PerpetualDebt.sol - price limit min larger than max" string public constant ACL_ADMIN_CANNOT_BE_ZERO = "22"; // "ACLManager.sol - cannot set a 0x0 address as admin" string public constant INVALID_ADDRESSES_PROVIDER_ID = "23"; // "GuildAddressesProviderRegistry.sol - cannot set ID 0" string public constant ADDRESSES_PROVIDER_NOT_REGISTERED = "24"; // 'GuildAddressesProviderRegistry.sol - Guild addresses provider is not registered' string public constant INVALID_ADDRESSES_PROVIDER = "25"; // 'The address of the guild addresses provider is invalid' string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = "26"; // 'GuildAddressesProviderRegistry.sol - Reserve has already been added to collateral list' string public constant CALLER_NOT_GUILD_ADMIN = "27"; // 'The caller of the function is not a guild admin' string public constant CALLER_NOT_EMERGENCY_ADMIN = "28"; // 'The caller of the function is not an emergency admin' string public constant CALLER_NOT_GUILD_OR_EMERGENCY_ADMIN = "29"; // 'The caller of the function is not a guild or emergency admin' string public constant CALLER_NOT_RISK_OR_GUILD_ADMIN = "30"; // 'The caller of the function is not a risk or guild admin' string public constant TRANSFER_INVALID_SENDER = "31"; // 'ERC20: Cannot send from address 0' string public constant TRANSFER_INVALID_RECEIVER = "32"; // 'ERC20: Cannot send to address 0' string public constant CALLER_MUST_BE_GUILD = "33"; // 'The caller of the function must be the guild' string public constant GUILD_ADDRESSES_DO_NOT_MATCH = "34"; // 'Incorrect Guild address when initializing token' string public constant PERPETUAL_DEBT_ALREADY_INITIALIZED = "35"; // 'Perpetual Debt structure already initialized' string public constant DEX_ORACLE_ALREADY_INITIALIZED = "36"; // 'Dex Oracle structure already initialized' string public constant DEX_ORACLE_POOL_NOT_INITIALIZED = "37"; // 'Dex pool should be initialized before Dex oracle' string public constant CALLER_NOT_GUILD_CONFIGURATOR = "38"; // 'The caller of the function is not the guild configurator contract' string public constant COLLATERAL_ALREADY_ADDED = "39"; // 'Collateral has already been added to collateral list' string public constant NO_MORE_COLLATERALS_ALLOWED = "40"; // 'Maximum amount of collaterals in the guild reached' string public constant INVALID_LTV = "41"; // 'Invalid ltv parameter for the collateral' string public constant INVALID_LIQ_THRESHOLD = "42"; // 'Invalid liquidity threshold parameter for the collateral' string public constant INVALID_LIQ_BONUS = "43"; // 'Invalid liquidity bonus parameter for the collateral' string public constant INVALID_DECIMALS = "44"; // 'Invalid decimals parameter of the underlying asset of the collateral' string public constant INVALID_SUPPLY_CAP = "45"; // 'Invalid supply cap for the collateral' string public constant INVALID_PROTOCOL_DISTRIBUTION_FEE = "46"; // 'Invalid protocol distribution fee for the perpetual debt' string public constant ZERO_ADDRESS_NOT_VALID = "47"; // 'Zero address not valid' string public constant COLLATERAL_NOT_LISTED = "48"; // 'Collateral is not listed (not initialized or has been dropped)' string public constant COLLATERAL_BALANCE_IS_ZERO = "49"; // 'The collateral balance is 0' string public constant LTV_VALIDATION_FAILED = "50"; // 'Ltv validation failed' string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = "51"; // 'Health factor is lower than the liquidation threshold' string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = "52"; // 'There is not enough collateral to cover a new borrow' string public constant INVALID_COLLATERAL_PARAMS = "53"; //'Invalid risk parameters for the collateral' string public constant INVALID_AMOUNT = "54"; // 'Amount must be greater than 0' string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = "55"; //'User cannot withdraw more than the available balance' string public constant COLLATERAL_INACTIVE = "56"; //'Action requires an active collateral' string public constant SUPPLY_CAP_EXCEEDED = "57"; // 'Supply cap is exceeded' string public constant ACL_MANAGER_NOT_SET = "58"; // 'The ACL Manager has not been set for the addresses provider' string public constant ARRAY_SIZE_MISMATCH = "59"; // 'The arrays are of different sizes' string public constant DEX_POOL_DOES_NOT_CONTAIN_ASSET_PAIR = "60"; // 'The dex pool does not contain pricing info for token pair' string public constant ASSET_NOT_TRACKED_IN_ORACLE = "61"; // 'The asset is not tracked by the pricing oracle' string public constant INVALID_MINT_CAP = "62"; // 'Invalid mint cap for the perpetual debt' string public constant DEBT_PAUSED = "63"; // 'Action requires a non-paused debt' string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = "64"; // 'Action requires health factor to be below liquidation threshold' string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = "65"; // 'The collateral chosen cannot be liquidated' string public constant USER_HAS_NO_DEBT = "66"; // 'User has no debt to be liquidated' string public constant INSUFFICIENT_CREDIT_DELEGATION = "67"; // 'Insufficient credit delegation to 3rd party borrower' string public constant INSUFFICIENT_TOKENIN_FOR_TARGET_TOKENOUT = "68"; // 'Insufficient tokenIn to swap for target tokenOut value' string public constant COLLATERAL_FROZEN = "69"; // 'Action cannot be performed because the collateral is frozen' string public constant COLLATERAL_PAUSED = "70"; // 'Action cannot be performed because the collateral is paused' string public constant PERPETUAL_DEBT_FROZEN = "71"; // 'Action cannot be performed because the perpetual debt is frozen' string public constant PERPETUAL_DEBT_PAUSED = "72"; // 'Action cannot be performed because the perpetual debt is paused' string public constant TRANSFER_AMOUNT_EXCEEDS_ALLOWANCE = "73"; // 'Account does not have sufficient allowance to transfer on behalf of other account' string public constant NEGATIVE_ALLOWANCE_NOT_ALLOWED = "74"; // 'Cannot allocate negative value for allowances' string public constant INSUFFICIENT_BALANCE_TO_BURN = "75"; // 'Cannot burn more than amount in balance' string public constant TRANSFER_EXCEEDS_BALANCE = "76"; // 'ERC20: Transfer amount exceeds balance' string public constant PERPETUAL_DEBT_CAP_EXCEEDED = "77"; // 'Perpetual debt cap is exceeded' string public constant NEGATIVE_DELEGATION_NOT_ALLOWED = "78"; // 'Cannot allocate negative value for delegation allowances' string public constant ORACLE_LOOKBACKPERIOD_IS_ZERO = "79"; // 'Collateral oracle should have lookback period greater than 0' string public constant ORACLE_CARDINALITY_IS_ZERO = "80"; // 'Collateral oracle should have pool cardinality greater than 0' string public constant ORACLE_CARDINALITY_MONOTONICALLY_INCREASES = "81"; // The cardinality of the oracle is monotonically increasing and cannot bet lowered string public constant ORACLE_ASSET_MISMATCH = "82"; // Asset in oracle does not match proxy asset address string public constant ORACLE_BASE_CURRENCY_MISMATCH = "83"; // Base currency in oracle does not match proxy base currency address string public constant NO_ORACLE_PROXY_PRICE_SOURCE = "84"; // Oracle proxy does not have a price source string public constant CANNOT_BE_ZERO = "85"; // The value cannot be 0 string public constant REQUIRES_OVERRIDE = "86"; // Function requires override string public constant GUILD_MISMATCH = "87"; // Function requires override string public constant ORACLE_PROXY_TOKENS_NOT_SET_PROPERLY = "88"; // Function requires override string public constant POSITIVE_COLLATERAL_BALANCE = "89"; // Cannot only perform action if guild balance is positive string public constant INVALID_ROLE = "90"; // Role exceeds MAX_LIMIT string public constant MAX_NUM_ROLES_EXCEEDED = "91"; // Role can't exceed MAX_NUM_OF_ROLES string public constant INVALID_PROTOCOL_SERVICE_FEE = "92"; // Protocol service fee larger than max allowed string public constant INVALID_PROTOCOL_MINT_FEE = "93"; // Protocol mint fee larger than max allowed string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = "94"; // PriceOracleSentinel check failed string public constant LOOKBACK_PERIOD_IS_NOT_ZERO = "95"; // lookback period must be 0 string public constant LOOKBACK_PERIOD_END_LT_START = "96"; // lookbackPeriodEnd can't be less than lookbackPeriodStart string public constant PRICE_CANNOT_BE_ZERO = "97"; // Oracle price cannot be zero string public constant INVALID_PROTOCOL_SWAP_FEE = "98"; // Protocol swap fee larger than max allowed string public constant COLLATERAL_CANNOT_COVER_EXISTING_BORROW = "99"; // 'Collateral remaining after withdrawal would not cover existing borrow' string public constant CALLER_NOT_GUILD_OR_GUILD_ADMIN = "A0"; // 'The caller of the function is not the guild or guild admin' string public constant NOT_ENOUGH_MONEY_IN_GUILD_TO_SWAP = "A1"; // 'There is not enough money in the Guild treasury for a successfull swap and debt burn' string public constant MONEY_DOES_NOT_MATCH = "A2"; // 'Guild or Oracle cannot be initialized with a Money token that differs from the other. string public constant ORACLE_ADDRESS_CANNOT_BE_ZERO = "A3"; // 'A valid address needs to be used when updating the Oracle string public constant ORACLE_NOT_SET = "A4"; // 'An oracle has not been registered with guildAddressProvider string public constant OWNABLE_ONLY_OWNER = "Ownable: caller is not the owner"; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IGuildAddressesProvider","name":"provider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IGuildAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EMERGENCY_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GUILD_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RISK_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"addEmergencyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"addGuildAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"addRiskAdmin","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":[{"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":"admin","type":"address"}],"name":"isEmergencyAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isGuildAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isRiskAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"removeEmergencyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"removeGuildAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"removeRiskAdmin","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":"bytes32","name":"role","type":"bytes32"},{"internalType":"bytes32","name":"adminRole","type":"bytes32"}],"name":"setRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405162000d9638038062000d96833981016040819052610031916101d2565b806001600160a01b03166080816001600160a01b0316815250506000816001600160a01b0316630e67178c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100af91906101d2565b604080518082019091526002815261191960f11b60208201529091506001600160a01b0382166100fb5760405162461bcd60e51b81526004016100f291906101f6565b60405180910390fd5b5061010760008261010e565b5050610244565b610118828261011c565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610118576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556101763390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b03811681146101cf57600080fd5b50565b6000602082840312156101e457600080fd5b81516101ef816101ba565b9392505050565b600060208083528351808285015260005b8181101561022357858101830151858201604001528201610207565b506000604082860101526040601f19601f8301168501019250505092915050565b608051610b366200026060003960006101690152610b366000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80635b9a94e4116100b857806391d148541161007c57806391d14854146102be57806397ca5207146102d1578063a217fddf146102e4578063aa14cc7b146102ec578063d547741f14610301578063e1ab88881461031457600080fd5b80635b9a94e41461025d5780636389884e14610270578063674b5e4d146102835780636e76fc8f146102965780637a9a93f4146102ab57600080fd5b80632500f2b6116100ff5780632500f2b6146101fc5780632f2ff15d1461020f57806336568abe146102225780633c5a08e5146102355780634f16b4251461024857600080fd5b806301ffc9a71461013c5780630542975c14610164578063179efb09146101a35780631e4e0091146101b8578063248a9ca3146101cb575b600080fd5b61014f61014a366004610889565b610327565b60405190151581526020015b60405180910390f35b61018b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161015b565b6101b66101b13660046108cf565b61035e565b005b6101b66101c63660046108ea565b610379565b6101ee6101d936600461090c565b60009081526020819052604090206001015490565b60405190815260200161015b565b61014f61020a3660046108cf565b610394565b6101b661021d366004610925565b6103ae565b6101b6610230366004610925565b6103d4565b6101b66102433660046108cf565b610457565b6101ee600080516020610aa183398151915281565b6101b661026b3660046108cf565b61046f565b6101b661027e3660046108cf565b610487565b61014f6102913660046108cf565b61049f565b6101ee600080516020610ac183398151915281565b6101b66102b93660046108cf565b6104b9565b61014f6102cc366004610925565b6104d1565b6101b66102df3660046108cf565b6104fa565b6101ee600081565b6101ee600080516020610ae183398151915281565b6101b661030f366004610925565b61050e565b61014f6103223660046108cf565b610534565b60006001600160e01b03198216637965db0b60e01b148061035857506301ffc9a760e01b6001600160e01b03198316145b92915050565b610376600080516020610ac1833981519152826103ae565b50565b6000610385813361054e565b61038f83836105b2565b505050565b6000610358600080516020610ac1833981519152836104d1565b6000828152602081905260409020600101546103ca813361054e565b61038f83836105fd565b6001600160a01b03811633146104495760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104538282610681565b5050565b610376600080516020610aa18339815191528261050e565b610376600080516020610aa1833981519152826103ae565b610376600080516020610ae1833981519152826103ae565b6000610358600080516020610aa1833981519152836104d1565b610376600080516020610ac18339815191528261050e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610376600080516020610ae1833981519152825b60008281526020819052604090206001015461052a813361054e565b61038f8383610681565b6000610358600080516020610ae1833981519152836104d1565b61055882826104d1565b61045357610570816001600160a01b031660146106e6565b61057b8360206106e6565b60405160200161058c929190610975565b60408051601f198184030181529082905262461bcd60e51b8252610440916004016109ea565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61060782826104d1565b610453576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561063d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61068b82826104d1565b15610453576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006106f5836002610a33565b610700906002610a4a565b67ffffffffffffffff81111561071857610718610a5d565b6040519080825280601f01601f191660200182016040528015610742576020820181803683370190505b509050600360fc1b8160008151811061075d5761075d610a73565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061078c5761078c610a73565b60200101906001600160f81b031916908160001a90535060006107b0846002610a33565b6107bb906001610a4a565b90505b6001811115610833576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106107ef576107ef610a73565b1a60f81b82828151811061080557610805610a73565b60200101906001600160f81b031916908160001a90535060049490941c9361082c81610a89565b90506107be565b5083156108825760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610440565b9392505050565b60006020828403121561089b57600080fd5b81356001600160e01b03198116811461088257600080fd5b80356001600160a01b03811681146108ca57600080fd5b919050565b6000602082840312156108e157600080fd5b610882826108b3565b600080604083850312156108fd57600080fd5b50508035926020909101359150565b60006020828403121561091e57600080fd5b5035919050565b6000806040838503121561093857600080fd5b82359150610948602084016108b3565b90509250929050565b60005b8381101561096c578181015183820152602001610954565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516109ad816017850160208801610951565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516109de816028840160208801610951565b01602801949350505050565b6020815260008251806020840152610a09816040850160208701610951565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761035857610358610a1d565b8082018082111561035857610358610a1d565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081610a9857610a98610a1d565b50600019019056fe8aa855a911518ecfbe5bc3088c8f3dda7badf130faaf8ace33fdc33828e181675c91514091af31f62f596a314af7d5be40146b2f2355969392f055e12e0982fb072ca11096ec86417b0cbe0a56fb947d015b632f0909961ffcbb0256efc71c56a2646970667358221220e56ad1aee00d7f25a0210140c27a365949bfe8dbecf696b758e67a4d69491eac64736f6c63430008110033000000000000000000000000a254852f61e8c461f2b2f05909ba4cf9c89e7a2e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80635b9a94e4116100b857806391d148541161007c57806391d14854146102be57806397ca5207146102d1578063a217fddf146102e4578063aa14cc7b146102ec578063d547741f14610301578063e1ab88881461031457600080fd5b80635b9a94e41461025d5780636389884e14610270578063674b5e4d146102835780636e76fc8f146102965780637a9a93f4146102ab57600080fd5b80632500f2b6116100ff5780632500f2b6146101fc5780632f2ff15d1461020f57806336568abe146102225780633c5a08e5146102355780634f16b4251461024857600080fd5b806301ffc9a71461013c5780630542975c14610164578063179efb09146101a35780631e4e0091146101b8578063248a9ca3146101cb575b600080fd5b61014f61014a366004610889565b610327565b60405190151581526020015b60405180910390f35b61018b7f000000000000000000000000a254852f61e8c461f2b2f05909ba4cf9c89e7a2e81565b6040516001600160a01b03909116815260200161015b565b6101b66101b13660046108cf565b61035e565b005b6101b66101c63660046108ea565b610379565b6101ee6101d936600461090c565b60009081526020819052604090206001015490565b60405190815260200161015b565b61014f61020a3660046108cf565b610394565b6101b661021d366004610925565b6103ae565b6101b6610230366004610925565b6103d4565b6101b66102433660046108cf565b610457565b6101ee600080516020610aa183398151915281565b6101b661026b3660046108cf565b61046f565b6101b661027e3660046108cf565b610487565b61014f6102913660046108cf565b61049f565b6101ee600080516020610ac183398151915281565b6101b66102b93660046108cf565b6104b9565b61014f6102cc366004610925565b6104d1565b6101b66102df3660046108cf565b6104fa565b6101ee600081565b6101ee600080516020610ae183398151915281565b6101b661030f366004610925565b61050e565b61014f6103223660046108cf565b610534565b60006001600160e01b03198216637965db0b60e01b148061035857506301ffc9a760e01b6001600160e01b03198316145b92915050565b610376600080516020610ac1833981519152826103ae565b50565b6000610385813361054e565b61038f83836105b2565b505050565b6000610358600080516020610ac1833981519152836104d1565b6000828152602081905260409020600101546103ca813361054e565b61038f83836105fd565b6001600160a01b03811633146104495760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104538282610681565b5050565b610376600080516020610aa18339815191528261050e565b610376600080516020610aa1833981519152826103ae565b610376600080516020610ae1833981519152826103ae565b6000610358600080516020610aa1833981519152836104d1565b610376600080516020610ac18339815191528261050e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610376600080516020610ae1833981519152825b60008281526020819052604090206001015461052a813361054e565b61038f8383610681565b6000610358600080516020610ae1833981519152836104d1565b61055882826104d1565b61045357610570816001600160a01b031660146106e6565b61057b8360206106e6565b60405160200161058c929190610975565b60408051601f198184030181529082905262461bcd60e51b8252610440916004016109ea565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61060782826104d1565b610453576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561063d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61068b82826104d1565b15610453576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006106f5836002610a33565b610700906002610a4a565b67ffffffffffffffff81111561071857610718610a5d565b6040519080825280601f01601f191660200182016040528015610742576020820181803683370190505b509050600360fc1b8160008151811061075d5761075d610a73565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061078c5761078c610a73565b60200101906001600160f81b031916908160001a90535060006107b0846002610a33565b6107bb906001610a4a565b90505b6001811115610833576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106107ef576107ef610a73565b1a60f81b82828151811061080557610805610a73565b60200101906001600160f81b031916908160001a90535060049490941c9361082c81610a89565b90506107be565b5083156108825760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610440565b9392505050565b60006020828403121561089b57600080fd5b81356001600160e01b03198116811461088257600080fd5b80356001600160a01b03811681146108ca57600080fd5b919050565b6000602082840312156108e157600080fd5b610882826108b3565b600080604083850312156108fd57600080fd5b50508035926020909101359150565b60006020828403121561091e57600080fd5b5035919050565b6000806040838503121561093857600080fd5b82359150610948602084016108b3565b90509250929050565b60005b8381101561096c578181015183820152602001610954565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516109ad816017850160208801610951565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516109de816028840160208801610951565b01602801949350505050565b6020815260008251806020840152610a09816040850160208701610951565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761035857610358610a1d565b8082018082111561035857610358610a1d565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081610a9857610a98610a1d565b50600019019056fe8aa855a911518ecfbe5bc3088c8f3dda7badf130faaf8ace33fdc33828e181675c91514091af31f62f596a314af7d5be40146b2f2355969392f055e12e0982fb072ca11096ec86417b0cbe0a56fb947d015b632f0909961ffcbb0256efc71c56a2646970667358221220e56ad1aee00d7f25a0210140c27a365949bfe8dbecf696b758e67a4d69491eac64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a254852f61e8c461f2b2f05909ba4cf9c89e7a2e
-----Decoded View---------------
Arg [0] : provider (address): 0xA254852F61e8c461f2B2F05909Ba4CF9c89E7A2e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a254852f61e8c461f2b2f05909ba4cf9c89e7a2e
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.