Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Sponsored
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Remove Governor | 13473326 | 707 days 6 hrs ago | IN | 0 ETH | 0.01654207 | ||||
Remove Governor | 13473325 | 707 days 6 hrs ago | IN | 0 ETH | 0.01738161 | ||||
Add Governor | 13473323 | 707 days 6 hrs ago | IN | 0 ETH | 0.035457 | ||||
Deploy Stable Ma... | 13473099 | 707 days 7 hrs ago | IN | 0 ETH | 0.01142142 | ||||
Add Governor | 13472784 | 707 days 8 hrs ago | IN | 0 ETH | 0.00422708 | ||||
0x60806040 | 13472782 | 707 days 8 hrs ago | IN | Create: Core | 0 ETH | 0.10781911 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Core
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "./CoreEvents.sol"; /// @title Core /// @author Angle Core Team /// @notice Keeps track of all the `StableMaster` contracts and facilitates governance by allowing the propagation /// of changes across most contracts of the protocol (does not include oracle contract, `RewardsDistributor`, and some /// other side contracts like `BondingCurve` or `CollateralSettler`) contract Core is CoreEvents, ICore { /// @notice Map to track the addresses with a `GOVERNOR_ROLE` within Angle protocol mapping(address => bool) public governorMap; /// @notice Map to track the addresses of the `stableMaster` contracts that have already been deployed /// This is used to avoid deploying a revoked `stableMaster` contract again and hence potentially creating /// inconsistencies in the `GOVERNOR_ROLE` and `GUARDIAN_ROLE` of this `stableMaster` mapping(address => bool) public deployedStableMasterMap; /// @notice Address of the guardian, it can be revoked by Angle's governance /// The protocol has only one guardian address address public override guardian; /// @notice List of the addresses of the `StableMaster` contracts accepted by the system address[] internal _stablecoinList; // List of all the governor addresses of Angle's protocol // Initially only the timelock will be appointed governor but new addresses can be added along the way address[] internal _governorList; /// @notice Checks to see if the caller is a `governor` /// The reason for having such modifiers rather than OpenZeppelin's Access Control logic is to make /// sure that governors cannot bypass the `addGovernor` or `revokeGovernor` functions modifier onlyGovernor() { require(governorMap[msg.sender], "1"); _; } /// @notice Checks to see if the caller is a `guardian` or a `governor` /// Same here, we do not use OpenZeppelin's Access Control logic to make sure that the `guardian` /// cannot bypass the functions defined on purpose in this contract modifier onlyGuardian() { require(governorMap[msg.sender] || msg.sender == guardian, "1"); _; } /// @notice Checks if the new address given is not null /// @param newAddress Address to check modifier zeroCheck(address newAddress) { require(newAddress != address(0), "0"); _; } // =============================== CONSTRUCTOR ================================= /// @notice Initializes the `Core` contract /// @param _governor Address of the governor /// @param _guardian Address of the guardian constructor(address _governor, address _guardian) { // Creating references require(_guardian != address(0) && _governor != address(0), "0"); require(_guardian != _governor, "39"); _governorList.push(_governor); guardian = _guardian; governorMap[_governor] = true; emit GovernorRoleGranted(_governor); emit GuardianRoleChanged(address(0), _guardian); } // ========================= GOVERNOR FUNCTIONS ================================ // ======================== Interactions with `StableMasters` ================== /// @notice Changes the `Core` contract of the protocol /// @param newCore Address of the new `Core` contract /// @dev To maintain consistency, checks are performed. The governance of the new `Core` /// contract should be exactly the same as this one, and the `_stablecoinList` should be /// identical function setCore(ICore newCore) external onlyGovernor zeroCheck(address(newCore)) { require(address(this) != address(newCore), "40"); require(guardian == newCore.guardian(), "41"); // The length of the lists are stored as cache variables to avoid duplicate reads in storage // Checking the consistency of the `_governorList` and of the `_stablecoinList` uint256 governorListLength = _governorList.length; address[] memory _newCoreGovernorList = newCore.governorList(); uint256 stablecoinListLength = _stablecoinList.length; address[] memory _newStablecoinList = newCore.stablecoinList(); require( governorListLength == _newCoreGovernorList.length && stablecoinListLength == _newStablecoinList.length, "42" ); uint256 indexMet; for (uint256 i = 0; i < governorListLength; i++) { if (!governorMap[_newCoreGovernorList[i]]) { indexMet = 1; break; } } for (uint256 i = 0; i < stablecoinListLength; i++) { // The stablecoin lists should preserve exactly the same order of elements if (_stablecoinList[i] != _newStablecoinList[i]) { indexMet = 1; break; } } // Only performing one require, hence making it cheaper for a governance with a correct initialization require(indexMet == 0, "43"); // Propagates the change for (uint256 i = 0; i < stablecoinListLength; i++) { IStableMaster(_stablecoinList[i]).setCore(address(newCore)); } emit CoreChanged(address(newCore)); } /// @notice Adds a new stablecoin to the system /// @param agToken Address of the new `AgToken` contract /// @dev To maintain consistency, the address of the `StableMaster` contract corresponding to the /// `AgToken` is automatically retrieved /// @dev The `StableMaster` receives the reference to the governor and guardian addresses of the protocol /// @dev The `AgToken` and `StableMaster` contracts should have previously been initialized with correct references /// in it, with for the `StableMaster` a reference to the `Core` contract and for the `AgToken` a reference to the /// `StableMaster` function deployStableMaster(address agToken) external onlyGovernor zeroCheck(agToken) { address stableMaster = IAgToken(agToken).stableMaster(); // Checking if `stableMaster` has not already been deployed require(!deployedStableMasterMap[stableMaster], "44"); // Storing and initializing information about the stablecoin _stablecoinList.push(stableMaster); // Adding this `stableMaster` in the `deployedStableMasterMap`: it is not going to be possible // to revoke and then redeploy this contract deployedStableMasterMap[stableMaster] = true; IStableMaster(stableMaster).deploy(_governorList, guardian, agToken); emit StableMasterDeployed(address(stableMaster), agToken); } /// @notice Revokes a `StableMaster` contract /// @param stableMaster Address of the `StableMaster` to revoke /// @dev This function just removes a `StableMaster` contract from the `_stablecoinList` /// @dev The consequence is that the `StableMaster` contract will no longer be affected by changes in /// governor or guardian occuring from the protocol /// @dev This function is mostly here to clean the mappings and save some storage space function revokeStableMaster(address stableMaster) external override onlyGovernor { uint256 stablecoinListLength = _stablecoinList.length; // Checking if `stableMaster` is correct and removing the stablecoin from the `_stablecoinList` require(stablecoinListLength >= 1, "45"); uint256 indexMet; for (uint256 i = 0; i < stablecoinListLength - 1; i++) { if (_stablecoinList[i] == stableMaster) { indexMet = 1; _stablecoinList[i] = _stablecoinList[stablecoinListLength - 1]; break; } } require(indexMet == 1 || _stablecoinList[stablecoinListLength - 1] == stableMaster, "45"); _stablecoinList.pop(); // Deleting the stablecoin from the list emit StableMasterRevoked(stableMaster); } // =============================== Access Control ============================== // The following functions do not propagate the changes they induce to some bricks of the protocol // like the `CollateralSettler`, the `BondingCurve`, the staking and rewards distribution contracts // and the oracle contracts using Uniswap. Governance should be wary when calling these functions and // make equivalent changes in these contracts to maintain consistency at the scale of the protocol /// @notice Adds a new governor address /// @param _governor New governor address /// @dev This function propagates the new governor role across most contracts of the protocol /// @dev Governor is also guardian everywhere in all contracts function addGovernor(address _governor) external override onlyGovernor zeroCheck(_governor) { require(!governorMap[_governor], "46"); governorMap[_governor] = true; _governorList.push(_governor); // Propagates the changes to maintain consistency across all the contracts that are attached to this // `Core` contract for (uint256 i = 0; i < _stablecoinList.length; i++) { // Since a zero address check has already been performed in this contract, there is no need // to repeat this check in underlying contracts IStableMaster(_stablecoinList[i]).addGovernor(_governor); } emit GovernorRoleGranted(_governor); } /// @notice Removes a governor address /// @param _governor Governor address to remove /// @dev There must always be one governor in the protocol function removeGovernor(address _governor) external override onlyGovernor { // Checking if removing the governor will leave with at least more than one governor uint256 governorListLength = _governorList.length; require(governorListLength > 1, "47"); // Removing the governor from the list of governors // We still need to check if the address provided was well in the list uint256 indexMet; for (uint256 i = 0; i < governorListLength - 1; i++) { if (_governorList[i] == _governor) { indexMet = 1; _governorList[i] = _governorList[governorListLength - 1]; break; } } require(indexMet == 1 || _governorList[governorListLength - 1] == _governor, "48"); _governorList.pop(); // Once it has been checked that the given address was a correct address, we can proceed to other changes delete governorMap[_governor]; // Maintaining consistency across all contracts for (uint256 i = 0; i < _stablecoinList.length; i++) { // We have checked in this contract that the mentionned `_governor` here was well a governor // There is no need to check this in the underlying contracts where this is going to be updated IStableMaster(_stablecoinList[i]).removeGovernor(_governor); } emit GovernorRoleRevoked(_governor); } // ============================== GUARDIAN FUNCTIONS =========================== /// @notice Changes the guardian address /// @param _newGuardian New guardian address /// @dev Guardian is able to change by itself the address corresponding to its role /// @dev There can only be one guardian address in the protocol /// @dev The guardian address cannot be a governor address function setGuardian(address _newGuardian) external override onlyGuardian zeroCheck(_newGuardian) { require(!governorMap[_newGuardian], "39"); require(guardian != _newGuardian, "49"); address oldGuardian = guardian; guardian = _newGuardian; for (uint256 i = 0; i < _stablecoinList.length; i++) { IStableMaster(_stablecoinList[i]).setGuardian(_newGuardian, oldGuardian); } emit GuardianRoleChanged(oldGuardian, _newGuardian); } /// @notice Revokes the guardian address /// @dev Guardian is able to auto-revoke itself /// @dev There can only be one `guardian` address in the protocol function revokeGuardian() external override onlyGuardian { address oldGuardian = guardian; guardian = address(0); for (uint256 i = 0; i < _stablecoinList.length; i++) { IStableMaster(_stablecoinList[i]).revokeGuardian(oldGuardian); } emit GuardianRoleChanged(oldGuardian, address(0)); } // ========================= VIEW FUNCTIONS ==================================== /// @notice Returns the list of all the governor addresses of the protocol /// @return `_governorList` /// @dev This getter is used by `StableMaster` contracts deploying new collateral types /// and initializing them with correct references function governorList() external view override returns (address[] memory) { return _governorList; } /// @notice Returns the list of all the `StableMaster` addresses of the protocol /// @return `_stablecoinList` /// @dev This getter is used by the `Core` contract when setting a new `Core` function stablecoinList() external view override returns (address[] memory) { return _stablecoinList; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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: MIT 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 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: GPL-3.0 pragma solidity ^0.8.7; import "../external/AccessControl.sol"; import "../interfaces/ICore.sol"; import "../interfaces/IAgToken.sol"; import "../interfaces/IStableMaster.sol"; /// @title CoreEvents /// @author Angle Core Team /// @notice All the events used in the `Core` contract contract CoreEvents { event StableMasterDeployed(address indexed _stableMaster, address indexed _agToken); event StableMasterRevoked(address indexed _stableMaster); event GovernorRoleGranted(address indexed governor); event GovernorRoleRevoked(address indexed governor); event GuardianRoleChanged(address indexed oldGuardian, address indexed newGuardian); event CoreChanged(address indexed newCore); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../interfaces/IAccessControl.sol"; /** * @dev This contract is fully forked from OpenZeppelin `AccessControl`. * The only difference is the removal of the ERC165 implementation as it's not * needed in Angle. * * 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 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @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 {_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 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]{20}) is missing role (0x[0-9a-f]{32})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @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]{20}) is missing role (0x[0-9a-f]{32})$/ */ 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) external 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) external 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) external override { require(account == _msgSender(), "71"); _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 { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) internal { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) internal { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; /// @title IAccessControl /// @author Forked from OpenZeppelin /// @notice Interface for `AccessControl` contracts interface IAccessControl { function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; /// @title IAgToken /// @author Angle Core Team /// @notice Interface for the stablecoins `AgToken` contracts /// @dev The only functions that are left in the interface are the functions which are used /// at another point in the protocol by a different contract interface IAgToken is IERC20Upgradeable { // ======================= `StableMaster` functions ============================ function mint(address account, uint256 amount) external; function burnFrom( uint256 amount, address burner, address sender ) external; function burnSelf(uint256 amount, address burner) external; // ========================= External function ================================= function stableMaster() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "./IStableMaster.sol"; /// @title ICore /// @author Angle Core Team /// @dev Interface for the functions of the `Core` contract interface ICore { function revokeStableMaster(address stableMaster) external; function addGovernor(address _governor) external; function removeGovernor(address _governor) external; function setGuardian(address _guardian) external; function revokeGuardian() external; function governorList() external view returns (address[] memory); function stablecoinList() external view returns (address[] memory); function guardian() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IERC721 is IERC165 { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "./IAccessControl.sol"; /// @title IFeeManagerFunctions /// @author Angle Core Team /// @dev Interface for the `FeeManager` contract interface IFeeManagerFunctions is IAccessControl { // ================================= Keepers =================================== function updateUsersSLP() external; function updateHA() external; // ================================= Governance ================================ function deployCollateral( address[] memory governorList, address guardian, address _perpetualManager ) external; function setFees( uint256[] memory xArray, uint64[] memory yArray, uint8 typeChange ) external; function setHAFees(uint64 _haFeeDeposit, uint64 _haFeeWithdraw) external; } /// @title IFeeManager /// @author Angle Core Team /// @notice Previous interface with additionnal getters for public variables and mappings /// @dev We need these getters as they are used in other contracts of the protocol interface IFeeManager is IFeeManagerFunctions { function stableMaster() external view returns (address); function perpetualManager() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; /// @title IOracle /// @author Angle Core Team /// @notice Interface for Angle's oracle contracts reading oracle rates from both UniswapV3 and Chainlink /// from just UniswapV3 or from just Chainlink interface IOracle { function read() external view returns (uint256); function readAll() external view returns (uint256 lowerRate, uint256 upperRate); function readLower() external view returns (uint256); function readUpper() external view returns (uint256); function readQuote(uint256 baseAmount) external view returns (uint256); function readQuoteLower(uint256 baseAmount) external view returns (uint256); function inBase() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "./IERC721.sol"; import "./IFeeManager.sol"; import "./IOracle.sol"; import "./IAccessControl.sol"; /// @title Interface of the contract managing perpetuals /// @author Angle Core Team /// @dev Front interface, meaning only user-facing functions interface IPerpetualManagerFront is IERC721Metadata { function openPerpetual( address owner, uint256 amountBrought, uint256 amountCommitted, uint256 maxOracleRate, uint256 minNetMargin ) external returns (uint256 perpetualID); function closePerpetual( uint256 perpetualID, address to, uint256 minCashOutAmount ) external; function addToPerpetual(uint256 perpetualID, uint256 amount) external; function removeFromPerpetual( uint256 perpetualID, uint256 amount, address to ) external; function liquidatePerpetuals(uint256[] memory perpetualIDs) external; function forceClosePerpetuals(uint256[] memory perpetualIDs) external; // ========================= External View Functions ============================= function getCashOutAmount(uint256 perpetualID, uint256 rate) external view returns (uint256, uint256); function isApprovedOrOwner(address spender, uint256 perpetualID) external view returns (bool); } /// @title Interface of the contract managing perpetuals /// @author Angle Core Team /// @dev This interface does not contain user facing functions, it just has functions that are /// interacted with in other parts of the protocol interface IPerpetualManagerFunctions is IAccessControl { // ================================= Governance ================================ function deployCollateral( address[] memory governorList, address guardian, IFeeManager feeManager, IOracle oracle_ ) external; function setFeeManager(IFeeManager feeManager_) external; function setHAFees( uint64[] memory _xHAFees, uint64[] memory _yHAFees, uint8 deposit ) external; function setTargetAndLimitHAHedge(uint64 _targetHAHedge, uint64 _limitHAHedge) external; function setKeeperFeesLiquidationRatio(uint64 _keeperFeesLiquidationRatio) external; function setKeeperFeesCap(uint256 _keeperFeesLiquidationCap, uint256 _keeperFeesClosingCap) external; function setKeeperFeesClosing(uint64[] memory _xKeeperFeesClosing, uint64[] memory _yKeeperFeesClosing) external; function setLockTime(uint64 _lockTime) external; function setBoundsPerpetual(uint64 _maxLeverage, uint64 _maintenanceMargin) external; function pause() external; function unpause() external; // ==================================== Keepers ================================ function setFeeKeeper(uint64 feeDeposit, uint64 feesWithdraw) external; // =============================== StableMaster ================================ function setOracle(IOracle _oracle) external; } /// @title IPerpetualManager /// @author Angle Core Team /// @notice Previous interface with additionnal getters for public variables interface IPerpetualManager is IPerpetualManagerFunctions { function poolManager() external view returns (address); function oracle() external view returns (address); function targetHAHedge() external view returns (uint64); function totalHedgeAmount() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "./IFeeManager.sol"; import "./IPerpetualManager.sol"; import "./IOracle.sol"; // Struct for the parameters associated to a strategy interacting with a collateral `PoolManager` // contract struct StrategyParams { // Timestamp of last report made by this strategy // It is also used to check if a strategy has been initialized uint256 lastReport; // Total amount the strategy is expected to have uint256 totalStrategyDebt; // The share of the total assets in the `PoolManager` contract that the `strategy` can access to. uint256 debtRatio; } /// @title IPoolManagerFunctions /// @author Angle Core Team /// @notice Interface for the collateral poolManager contracts handling each one type of collateral for /// a given stablecoin /// @dev Only the functions used in other contracts of the protocol are left here interface IPoolManagerFunctions { // ============================ Constructor ==================================== function deployCollateral( address[] memory governorList, address guardian, IPerpetualManager _perpetualManager, IFeeManager feeManager, IOracle oracle ) external; // ============================ Yield Farming ================================== function creditAvailable() external view returns (uint256); function debtOutstanding() external view returns (uint256); function report( uint256 _gain, uint256 _loss, uint256 _debtPayment ) external; // ============================ Governance ===================================== function addGovernor(address _governor) external; function removeGovernor(address _governor) external; function setGuardian(address _guardian, address guardian) external; function revokeGuardian(address guardian) external; function setFeeManager(IFeeManager _feeManager) external; // ============================= Getters ======================================= function getBalance() external view returns (uint256); function getTotalAsset() external view returns (uint256); } /// @title IPoolManager /// @author Angle Core Team /// @notice Previous interface with additionnal getters for public variables and mappings /// @dev Used in other contracts of the protocol interface IPoolManager is IPoolManagerFunctions { function stableMaster() external view returns (address); function perpetualManager() external view returns (address); function token() external view returns (address); function feeManager() external view returns (address); function totalDebt() external view returns (uint256); function strategies(address _strategy) external view returns (StrategyParams memory); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; /// @title ISanToken /// @author Angle Core Team /// @notice Interface for Angle's `SanToken` contract that handles sanTokens, tokens that are given to SLPs /// contributing to a collateral for a given stablecoin interface ISanToken is IERC20Upgradeable { // ================================== StableMaster ============================= function mint(address account, uint256 amount) external; function burnFrom( uint256 amount, address burner, address sender ) external; function burnSelf(uint256 amount, address burner) external; function stableMaster() external view returns (address); function poolManager() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // Normally just importing `IPoolManager` should be sufficient, but for clarity here // we prefer to import all concerned interfaces import "./IPoolManager.sol"; import "./IOracle.sol"; import "./IPerpetualManager.sol"; import "./ISanToken.sol"; // Struct to handle all the parameters to manage the fees // related to a given collateral pool (associated to the stablecoin) struct MintBurnData { // Values of the thresholds to compute the minting fees // depending on HA hedge (scaled by `BASE_PARAMS`) uint64[] xFeeMint; // Values of the fees at thresholds (scaled by `BASE_PARAMS`) uint64[] yFeeMint; // Values of the thresholds to compute the burning fees // depending on HA hedge (scaled by `BASE_PARAMS`) uint64[] xFeeBurn; // Values of the fees at thresholds (scaled by `BASE_PARAMS`) uint64[] yFeeBurn; // Max proportion of collateral from users that can be covered by HAs // It is exactly the same as the parameter of the same name in `PerpetualManager`, whenever one is updated // the other changes accordingly uint64 targetHAHedge; // Minting fees correction set by the `FeeManager` contract: they are going to be multiplied // to the value of the fees computed using the hedge curve // Scaled by `BASE_PARAMS` uint64 bonusMalusMint; // Burning fees correction set by the `FeeManager` contract: they are going to be multiplied // to the value of the fees computed using the hedge curve // Scaled by `BASE_PARAMS` uint64 bonusMalusBurn; // Parameter used to limit the number of stablecoins that can be issued using the concerned collateral uint256 capOnStableMinted; } // Struct to handle all the variables and parameters to handle SLPs in the protocol // including the fraction of interests they receive or the fees to be distributed to // them struct SLPData { // Last timestamp at which the `sanRate` has been updated for SLPs uint256 lastBlockUpdated; // Fees accumulated from previous blocks and to be distributed to SLPs uint256 lockedInterests; // Max interests used to update the `sanRate` in a single block // Should be in collateral token base uint256 maxInterestsDistributed; // Amount of fees left aside for SLPs and that will be distributed // when the protocol is collateralized back again uint256 feesAside; // Part of the fees normally going to SLPs that is left aside // before the protocol is collateralized back again (depends on collateral ratio) // Updated by keepers and scaled by `BASE_PARAMS` uint64 slippageFee; // Portion of the fees from users minting and burning // that goes to SLPs (the rest goes to surplus) uint64 feesForSLPs; // Slippage factor that's applied to SLPs exiting (depends on collateral ratio) // If `slippage = BASE_PARAMS`, SLPs can get nothing, if `slippage = 0` they get their full claim // Updated by keepers and scaled by `BASE_PARAMS` uint64 slippage; // Portion of the interests from lending // that goes to SLPs (the rest goes to surplus) uint64 interestsForSLPs; } /// @title IStableMasterFunctions /// @author Angle Core Team /// @notice Interface for the `StableMaster` contract interface IStableMasterFunctions { function deploy( address[] memory _governorList, address _guardian, address _agToken ) external; // ============================== Lending ====================================== function accumulateInterest(uint256 gain) external; function signalLoss(uint256 loss) external; // ============================== HAs ========================================== function getStocksUsers() external view returns (uint256 maxCAmountInStable); function convertToSLP(uint256 amount, address user) external; // ============================== Keepers ====================================== function getCollateralRatio() external returns (uint256); function setFeeKeeper( uint64 feeMint, uint64 feeBurn, uint64 _slippage, uint64 _slippageFee ) external; // ============================== AgToken ====================================== function updateStocksUsers(uint256 amount, address poolManager) external; // ============================= Governance ==================================== function setCore(address newCore) external; function addGovernor(address _governor) external; function removeGovernor(address _governor) external; function setGuardian(address newGuardian, address oldGuardian) external; function revokeGuardian(address oldGuardian) external; function setCapOnStableAndMaxInterests( uint256 _capOnStableMinted, uint256 _maxInterestsDistributed, IPoolManager poolManager ) external; function setIncentivesForSLPs( uint64 _feesForSLPs, uint64 _interestsForSLPs, IPoolManager poolManager ) external; function setUserFees( IPoolManager poolManager, uint64[] memory _xFee, uint64[] memory _yFee, uint8 _mint ) external; function setTargetHAHedge(uint64 _targetHAHedge) external; function pause(bytes32 agent, IPoolManager poolManager) external; function unpause(bytes32 agent, IPoolManager poolManager) external; } /// @title IStableMaster /// @author Angle Core Team /// @notice Previous interface with additionnal getters for public variables and mappings interface IStableMaster is IStableMasterFunctions { function agToken() external view returns (address); function collateralMap(IPoolManager poolManager) external view returns ( IERC20 token, ISanToken sanToken, IPerpetualManager perpetualManager, IOracle oracle, uint256 stocksUsers, uint256 sanRate, uint256 collatBase, SLPData memory slpData, MintBurnData memory feeData ); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1000000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_governor","type":"address"},{"internalType":"address","name":"_guardian","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newCore","type":"address"}],"name":"CoreChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"governor","type":"address"}],"name":"GovernorRoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"governor","type":"address"}],"name":"GovernorRoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldGuardian","type":"address"},{"indexed":true,"internalType":"address","name":"newGuardian","type":"address"}],"name":"GuardianRoleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_stableMaster","type":"address"},{"indexed":true,"internalType":"address","name":"_agToken","type":"address"}],"name":"StableMasterDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_stableMaster","type":"address"}],"name":"StableMasterRevoked","type":"event"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"addGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"agToken","type":"address"}],"name":"deployStableMaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deployedStableMasterMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governorList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"governorMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"removeGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stableMaster","type":"address"}],"name":"revokeStableMaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICore","name":"newCore","type":"address"}],"name":"setCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGuardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stablecoinList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200237a3803806200237a8339810160408190526200003491620001cb565b6001600160a01b038116158015906200005557506001600160a01b03821615155b6200008b5760405162461bcd60e51b81526020600482015260016024820152600360fc1b60448201526064015b60405180910390fd5b816001600160a01b0316816001600160a01b03161415620000d45760405162461bcd60e51b8152602060048201526002602482015261333960f01b604482015260640162000082565b6004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b038086166001600160a01b031992831681179093556002805491861691909216179055600081815260208190526040808220805460ff1916909417909355915190917f2386e153a9c192d61a939b6f27bd9462592d94dd5c438ce7a7d833a5d04c64e991a26040516001600160a01b038216906000907f37e32bed1d2d58ea58967d6af777c41290d30558fdc37252b6c7a9bac2b579e5908290a3505062000203565b80516001600160a01b0381168114620001c657600080fd5b919050565b60008060408385031215620001df57600080fd5b620001ea83620001ae565b9150620001fa60208401620001ae565b90509250929050565b61216780620002136000396000f3fe608060405234801561001057600080fd5b50600436106100d35760003560e01c80638a0dac4a11610081578063b13380341161005b578063b1338034146101ee578063b44be095146101f6578063eecdac88146101fe57600080fd5b80638a0dac4a146101b357806391b38582146101c6578063a6d7fe2d146101d957600080fd5b8063452a9320116100b2578063452a932014610138578063800096301461017d57806385ebdc271461019057600080fd5b8062a254d2146100d8578063134ce3b0146100ed5780633c4a25d014610125575b600080fd5b6100eb6100e6366004611df2565b610211565b005b6101106100fb366004611df2565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100eb610133366004611df2565b610595565b6002546101589073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011c565b6100eb61018b366004611df2565b6108c9565b61011061019e366004611df2565b60006020819052908152604090205460ff1681565b6100eb6101c1366004611df2565b610f8c565b6100eb6101d4366004611df2565b611327565b6101e161169b565b60405161011c9190611f1d565b6101e161170a565b6100eb611777565b6100eb61020c366004611df2565b61195a565b3360009081526020819052604090205460ff1661028f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60035460018110156102fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34350000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b61030c600184612000565b81101561041d578373ffffffffffffffffffffffffffffffffffffffff166003828154811061033d5761033d6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561040b576001915060036103758385612000565b81548110610385576103856120ae565b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff90921691839081106103be576103be6120ae565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061041d565b8061041581612017565b915050610301565b508060011480610480575073ffffffffffffffffffffffffffffffffffffffff8316600361044c600185612000565b8154811061045c5761045c6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b6104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34350000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60038054806104f7576104f761207f565b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff8516917f37dc4c063dd9531956283bafb4cd913962d4307a872d182d23773d41ecca6a9991a2505050565b3360009081526020819052604090205460ff1661060e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff811661068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205460ff161561071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34360000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260208190526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560048054918201815582527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169092179091555b60035481101561088357600381815481106107e2576107e26120ae565b6000918252602090912001546040517f3c4a25d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690633c4a25d090602401600060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b50505050808061087b90612017565b9150506107c5565b5060405173ffffffffffffffffffffffffffffffffffffffff8316907f2386e153a9c192d61a939b6f27bd9462592d94dd5c438ce7a7d833a5d04c64e990600090a25050565b3360009081526020819052604090205460ff16610942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff81166109c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b3073ffffffffffffffffffffffffffffffffffffffff83161415610a40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34300000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8173ffffffffffffffffffffffffffffffffffffffff1663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8657600080fd5b505afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e16565b60025473ffffffffffffffffffffffffffffffffffffffff908116911614610b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34310000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000600480549050905060008373ffffffffffffffffffffffffffffffffffffffff1663a6d7fe2d6040518163ffffffff1660e01b815260040160006040518083038186803b158015610b9457600080fd5b505afa158015610ba8573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610bee9190810190611e33565b90506000600380549050905060008573ffffffffffffffffffffffffffffffffffffffff1663b13380346040518163ffffffff1660e01b815260040160006040518083038186803b158015610c4257600080fd5b505afa158015610c56573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610c9c9190810190611e33565b9050825184148015610cae5750805182145b610d14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34320000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b85811015610d8857600080868381518110610d3557610d356120ae565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff16610d765760019150610d88565b80610d8081612017565b915050610d18565b5060005b83811015610e1957828181518110610da657610da66120ae565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1660038281548110610dd757610dd76120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610e075760019150610e19565b80610e1181612017565b915050610d8c565b508015610e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34330000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60005b83811015610f415760038181548110610ea057610ea06120ae565b6000918252602090912001546040517f8000963000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015290911690638000963090602401600060405180830381600087803b158015610f1657600080fd5b505af1158015610f2a573d6000803e3d6000fd5b505050508080610f3990612017565b915050610e85565b5060405173ffffffffffffffffffffffffffffffffffffffff8816907f09ea1a5c9c765f3dcca5237033980edb16f8f7e0c59cac416e39c8dbbfdcec6990600090a250505050505050565b3360009081526020819052604090205460ff1680610fc1575060025473ffffffffffffffffffffffffffffffffffffffff1633145b611027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff81166110a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205460ff1615611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f33390000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60025473ffffffffffffffffffffffffffffffffffffffff838116911614156111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34390000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6002805473ffffffffffffffffffffffffffffffffffffffff8481167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092551660005b6003548110156112c7576003818154811061121e5761121e6120ae565b6000918252602090912001546040517f33c509d100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528481166024830152909116906333c509d190604401600060405180830381600087803b15801561129c57600080fd5b505af11580156112b0573d6000803e3d6000fd5b5050505080806112bf90612017565b915050611201565b508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f37e32bed1d2d58ea58967d6af777c41290d30558fdc37252b6c7a9bac2b579e560405160405180910390a3505050565b3360009081526020819052604090205460ff166113a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff811661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60008273ffffffffffffffffffffffffffffffffffffffff16636ac5dc466040518163ffffffff1660e01b815260040160206040518083038186803b15801561146657600080fd5b505afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e9190611e16565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205490915060ff1615611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34340000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8481169182179092556000818152602084905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690941790935560025492517f050f53fe000000000000000000000000000000000000000000000000000000008152909263050f53fe9261161f926004929091169088908301611f77565b600060405180830381600087803b15801561163957600080fd5b505af115801561164d573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8087169350841691507fd6bbae6828feaab30ea370a21419ad38cea8e47e4d9b12dced9a0791a130bf8b90600090a3505050565b6060600480548060200260200160405190810160405280929190818152602001828054801561170057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116116d5575b5050505050905090565b606060038054806020026020016040519081016040528092919081815260200182805480156117005760200282019190600052602060002090815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116116d5575050505050905090565b3360009081526020819052604090205460ff16806117ac575060025473ffffffffffffffffffffffffffffffffffffffff1633145b611812576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000811690915573ffffffffffffffffffffffffffffffffffffffff1660005b6003548110156119135760038181548110611872576118726120ae565b6000918252602090912001546040517faf648c3d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063af648c3d90602401600060405180830381600087803b1580156118e857600080fd5b505af11580156118fc573d6000803e3d6000fd5b50505050808061190b90612017565b915050611855565b5060405160009073ffffffffffffffffffffffffffffffffffffffff8316907f37e32bed1d2d58ea58967d6af777c41290d30558fdc37252b6c7a9bac2b579e5908390a350565b3360009081526020819052604090205460ff166119d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60045460018111611a40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34370000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b611a4f600184612000565b811015611b60578373ffffffffffffffffffffffffffffffffffffffff1660048281548110611a8057611a806120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415611b4e57600191506004611ab88385612000565b81548110611ac857611ac86120ae565b6000918252602090912001546004805473ffffffffffffffffffffffffffffffffffffffff9092169183908110611b0157611b016120ae565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611b60565b80611b5881612017565b915050611a44565b508060011480611bc3575073ffffffffffffffffffffffffffffffffffffffff83166004611b8f600185612000565b81548110611b9f57611b9f6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b611c29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34380000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6004805480611c3a57611c3a61207f565b6000828152602080822083017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590920190925573ffffffffffffffffffffffffffffffffffffffff851682528190526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600354811015611d9b5760038181548110611cfa57611cfa6120ae565b6000918252602090912001546040517feecdac8800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529091169063eecdac8890602401600060405180830381600087803b158015611d7057600080fd5b505af1158015611d84573d6000803e3d6000fd5b505050508080611d9390612017565b915050611cdd565b5060405173ffffffffffffffffffffffffffffffffffffffff8416907ff7a594030415b54bfad82c88c970190258667dc73b28e19d277dbd28291c9b7e90600090a2505050565b8051611ded8161210c565b919050565b600060208284031215611e0457600080fd5b8135611e0f8161210c565b9392505050565b600060208284031215611e2857600080fd5b8151611e0f8161210c565b60006020808385031215611e4657600080fd5b825167ffffffffffffffff80821115611e5e57600080fd5b818501915085601f830112611e7257600080fd5b815181811115611e8457611e846120dd565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611ec757611ec76120dd565b604052828152858101935084860182860187018a1015611ee657600080fd5b600095505b83861015611f1057611efc81611de2565b855260019590950194938601938601611eeb565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6b57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611f39565b50909695505050505050565b6000606082016060835280865480835260808501915087600052602092508260002060005b82811015611fce57815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101611f9c565b50505073ffffffffffffffffffffffffffffffffffffffff958616918401919091529290931660409091015292915050565b60008282101561201257612012612050565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561204957612049612050565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461212e57600080fd5b5056fea2646970667358221220dff5260fa3cfe4c46710e8f91e23931392bd347256652735a93e7b1b63dc432e64736f6c63430008070033000000000000000000000000fda462548ce04282f4b6d6619823a7c64fdc01850000000000000000000000000c2553e4b9dfa9f83b1a6d3eab96c4baab42d430
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100d35760003560e01c80638a0dac4a11610081578063b13380341161005b578063b1338034146101ee578063b44be095146101f6578063eecdac88146101fe57600080fd5b80638a0dac4a146101b357806391b38582146101c6578063a6d7fe2d146101d957600080fd5b8063452a9320116100b2578063452a932014610138578063800096301461017d57806385ebdc271461019057600080fd5b8062a254d2146100d8578063134ce3b0146100ed5780633c4a25d014610125575b600080fd5b6100eb6100e6366004611df2565b610211565b005b6101106100fb366004611df2565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100eb610133366004611df2565b610595565b6002546101589073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011c565b6100eb61018b366004611df2565b6108c9565b61011061019e366004611df2565b60006020819052908152604090205460ff1681565b6100eb6101c1366004611df2565b610f8c565b6100eb6101d4366004611df2565b611327565b6101e161169b565b60405161011c9190611f1d565b6101e161170a565b6100eb611777565b6100eb61020c366004611df2565b61195a565b3360009081526020819052604090205460ff1661028f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60035460018110156102fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34350000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b61030c600184612000565b81101561041d578373ffffffffffffffffffffffffffffffffffffffff166003828154811061033d5761033d6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561040b576001915060036103758385612000565b81548110610385576103856120ae565b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff90921691839081106103be576103be6120ae565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061041d565b8061041581612017565b915050610301565b508060011480610480575073ffffffffffffffffffffffffffffffffffffffff8316600361044c600185612000565b8154811061045c5761045c6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b6104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34350000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60038054806104f7576104f761207f565b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff8516917f37dc4c063dd9531956283bafb4cd913962d4307a872d182d23773d41ecca6a9991a2505050565b3360009081526020819052604090205460ff1661060e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff811661068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205460ff161561071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34360000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260208190526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560048054918201815582527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169092179091555b60035481101561088357600381815481106107e2576107e26120ae565b6000918252602090912001546040517f3c4a25d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690633c4a25d090602401600060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b50505050808061087b90612017565b9150506107c5565b5060405173ffffffffffffffffffffffffffffffffffffffff8316907f2386e153a9c192d61a939b6f27bd9462592d94dd5c438ce7a7d833a5d04c64e990600090a25050565b3360009081526020819052604090205460ff16610942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff81166109c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b3073ffffffffffffffffffffffffffffffffffffffff83161415610a40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34300000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8173ffffffffffffffffffffffffffffffffffffffff1663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8657600080fd5b505afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611e16565b60025473ffffffffffffffffffffffffffffffffffffffff908116911614610b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34310000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000600480549050905060008373ffffffffffffffffffffffffffffffffffffffff1663a6d7fe2d6040518163ffffffff1660e01b815260040160006040518083038186803b158015610b9457600080fd5b505afa158015610ba8573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610bee9190810190611e33565b90506000600380549050905060008573ffffffffffffffffffffffffffffffffffffffff1663b13380346040518163ffffffff1660e01b815260040160006040518083038186803b158015610c4257600080fd5b505afa158015610c56573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610c9c9190810190611e33565b9050825184148015610cae5750805182145b610d14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34320000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b85811015610d8857600080868381518110610d3557610d356120ae565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff16610d765760019150610d88565b80610d8081612017565b915050610d18565b5060005b83811015610e1957828181518110610da657610da66120ae565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1660038281548110610dd757610dd76120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610e075760019150610e19565b80610e1181612017565b915050610d8c565b508015610e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34330000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60005b83811015610f415760038181548110610ea057610ea06120ae565b6000918252602090912001546040517f8000963000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015290911690638000963090602401600060405180830381600087803b158015610f1657600080fd5b505af1158015610f2a573d6000803e3d6000fd5b505050508080610f3990612017565b915050610e85565b5060405173ffffffffffffffffffffffffffffffffffffffff8816907f09ea1a5c9c765f3dcca5237033980edb16f8f7e0c59cac416e39c8dbbfdcec6990600090a250505050505050565b3360009081526020819052604090205460ff1680610fc1575060025473ffffffffffffffffffffffffffffffffffffffff1633145b611027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff81166110a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205460ff1615611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f33390000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60025473ffffffffffffffffffffffffffffffffffffffff838116911614156111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34390000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6002805473ffffffffffffffffffffffffffffffffffffffff8481167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092551660005b6003548110156112c7576003818154811061121e5761121e6120ae565b6000918252602090912001546040517f33c509d100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528481166024830152909116906333c509d190604401600060405180830381600087803b15801561129c57600080fd5b505af11580156112b0573d6000803e3d6000fd5b5050505080806112bf90612017565b915050611201565b508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f37e32bed1d2d58ea58967d6af777c41290d30558fdc37252b6c7a9bac2b579e560405160405180910390a3505050565b3360009081526020819052604090205460ff166113a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b8073ffffffffffffffffffffffffffffffffffffffff811661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f30000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60008273ffffffffffffffffffffffffffffffffffffffff16636ac5dc466040518163ffffffff1660e01b815260040160206040518083038186803b15801561146657600080fd5b505afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e9190611e16565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205490915060ff1615611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34340000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8481169182179092556000818152602084905260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690941790935560025492517f050f53fe000000000000000000000000000000000000000000000000000000008152909263050f53fe9261161f926004929091169088908301611f77565b600060405180830381600087803b15801561163957600080fd5b505af115801561164d573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8087169350841691507fd6bbae6828feaab30ea370a21419ad38cea8e47e4d9b12dced9a0791a130bf8b90600090a3505050565b6060600480548060200260200160405190810160405280929190818152602001828054801561170057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116116d5575b5050505050905090565b606060038054806020026020016040519081016040528092919081815260200182805480156117005760200282019190600052602060002090815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116116d5575050505050905090565b3360009081526020819052604090205460ff16806117ac575060025473ffffffffffffffffffffffffffffffffffffffff1633145b611812576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000811690915573ffffffffffffffffffffffffffffffffffffffff1660005b6003548110156119135760038181548110611872576118726120ae565b6000918252602090912001546040517faf648c3d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301529091169063af648c3d90602401600060405180830381600087803b1580156118e857600080fd5b505af11580156118fc573d6000803e3d6000fd5b50505050808061190b90612017565b915050611855565b5060405160009073ffffffffffffffffffffffffffffffffffffffff8316907f37e32bed1d2d58ea58967d6af777c41290d30558fdc37252b6c7a9bac2b579e5908390a350565b3360009081526020819052604090205460ff166119d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f31000000000000000000000000000000000000000000000000000000000000006044820152606401610286565b60045460018111611a40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34370000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6000805b611a4f600184612000565b811015611b60578373ffffffffffffffffffffffffffffffffffffffff1660048281548110611a8057611a806120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415611b4e57600191506004611ab88385612000565b81548110611ac857611ac86120ae565b6000918252602090912001546004805473ffffffffffffffffffffffffffffffffffffffff9092169183908110611b0157611b016120ae565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611b60565b80611b5881612017565b915050611a44565b508060011480611bc3575073ffffffffffffffffffffffffffffffffffffffff83166004611b8f600185612000565b81548110611b9f57611b9f6120ae565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b611c29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f34380000000000000000000000000000000000000000000000000000000000006044820152606401610286565b6004805480611c3a57611c3a61207f565b6000828152602080822083017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590920190925573ffffffffffffffffffffffffffffffffffffffff851682528190526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600354811015611d9b5760038181548110611cfa57611cfa6120ae565b6000918252602090912001546040517feecdac8800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529091169063eecdac8890602401600060405180830381600087803b158015611d7057600080fd5b505af1158015611d84573d6000803e3d6000fd5b505050508080611d9390612017565b915050611cdd565b5060405173ffffffffffffffffffffffffffffffffffffffff8416907ff7a594030415b54bfad82c88c970190258667dc73b28e19d277dbd28291c9b7e90600090a2505050565b8051611ded8161210c565b919050565b600060208284031215611e0457600080fd5b8135611e0f8161210c565b9392505050565b600060208284031215611e2857600080fd5b8151611e0f8161210c565b60006020808385031215611e4657600080fd5b825167ffffffffffffffff80821115611e5e57600080fd5b818501915085601f830112611e7257600080fd5b815181811115611e8457611e846120dd565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611ec757611ec76120dd565b604052828152858101935084860182860187018a1015611ee657600080fd5b600095505b83861015611f1057611efc81611de2565b855260019590950194938601938601611eeb565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6b57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611f39565b50909695505050505050565b6000606082016060835280865480835260808501915087600052602092508260002060005b82811015611fce57815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101611f9c565b50505073ffffffffffffffffffffffffffffffffffffffff958616918401919091529290931660409091015292915050565b60008282101561201257612012612050565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561204957612049612050565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461212e57600080fd5b5056fea2646970667358221220dff5260fa3cfe4c46710e8f91e23931392bd347256652735a93e7b1b63dc432e64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fda462548ce04282f4b6d6619823a7c64fdc01850000000000000000000000000c2553e4b9dfa9f83b1a6d3eab96c4baab42d430
-----Decoded View---------------
Arg [0] : _governor (address): 0xfdA462548Ce04282f4B6D6619823a7C64Fdc0185
Arg [1] : _guardian (address): 0x0C2553e4B9dFA9f83b1A6D3EAB96c4bAaB42d430
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fda462548ce04282f4b6d6619823a7c64fdc0185
Arg [1] : 0000000000000000000000000c2553e4b9dfa9f83b1a6d3eab96c4baab42d430
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ Download: CSV Export ]
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.