Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
DelegateApprovals
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at sepolia-optimism.etherscan.io on 2023-12-11 */ /* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: DelegateApprovals.sol * * Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/DelegateApprovals.sol * Docs: https://docs.synthetix.io/contracts/DelegateApprovals * * Contract Dependencies: * - IDelegateApprovals * - Owned * - State * Libraries: (none) * * MIT License * =========== * * Copyright (c) 2023 Synthetix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.16; // https://docs.synthetix.io/contracts/source/contracts/owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // https://docs.synthetix.io/contracts/source/interfaces/idelegateapprovals interface IDelegateApprovals { // Views function canBurnFor(address authoriser, address delegate) external view returns (bool); function canIssueFor(address authoriser, address delegate) external view returns (bool); function canClaimFor(address authoriser, address delegate) external view returns (bool); function canExchangeFor(address authoriser, address delegate) external view returns (bool); // Mutative function approveAllDelegatePowers(address delegate) external; function removeAllDelegatePowers(address delegate) external; function approveBurnOnBehalf(address delegate) external; function removeBurnOnBehalf(address delegate) external; function approveIssueOnBehalf(address delegate) external; function removeIssueOnBehalf(address delegate) external; function approveClaimOnBehalf(address delegate) external; function removeClaimOnBehalf(address delegate) external; function approveExchangeOnBehalf(address delegate) external; function removeExchangeOnBehalf(address delegate) external; } // Inheritance // https://docs.synthetix.io/contracts/source/contracts/state contract State is Owned { // the address of the contract that can modify variables // this can only be changed by the owner of this contract address public associatedContract; constructor(address _associatedContract) internal { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== SETTERS ========== */ // Change the associated contract to a new address function setAssociatedContract(address _associatedContract) external onlyOwner { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== MODIFIERS ========== */ modifier onlyAssociatedContract { require(msg.sender == associatedContract, "Only the associated contract can perform this action"); _; } /* ========== EVENTS ========== */ event AssociatedContractUpdated(address associatedContract); } // Inheritance // https://docs.synthetix.io/contracts/source/contracts/eternalstorage /** * @notice This contract is based on the code available from this blog * https://blog.colony.io/writing-upgradeable-contracts-in-solidity-6743f0eecc88/ * Implements support for storing a keccak256 key and value pairs. It is the more flexible * and extensible option. This ensures data schema changes can be implemented without * requiring upgrades to the storage contract. */ contract EternalStorage is Owned, State { constructor(address _owner, address _associatedContract) public Owned(_owner) State(_associatedContract) {} /* ========== DATA TYPES ========== */ mapping(bytes32 => uint) internal UIntStorage; mapping(bytes32 => string) internal StringStorage; mapping(bytes32 => address) internal AddressStorage; mapping(bytes32 => bytes) internal BytesStorage; mapping(bytes32 => bytes32) internal Bytes32Storage; mapping(bytes32 => bool) internal BooleanStorage; mapping(bytes32 => int) internal IntStorage; // UIntStorage; function getUIntValue(bytes32 record) external view returns (uint) { return UIntStorage[record]; } function setUIntValue(bytes32 record, uint value) external onlyAssociatedContract { UIntStorage[record] = value; } function deleteUIntValue(bytes32 record) external onlyAssociatedContract { delete UIntStorage[record]; } // StringStorage function getStringValue(bytes32 record) external view returns (string memory) { return StringStorage[record]; } function setStringValue(bytes32 record, string calldata value) external onlyAssociatedContract { StringStorage[record] = value; } function deleteStringValue(bytes32 record) external onlyAssociatedContract { delete StringStorage[record]; } // AddressStorage function getAddressValue(bytes32 record) external view returns (address) { return AddressStorage[record]; } function setAddressValue(bytes32 record, address value) external onlyAssociatedContract { AddressStorage[record] = value; } function deleteAddressValue(bytes32 record) external onlyAssociatedContract { delete AddressStorage[record]; } // BytesStorage function getBytesValue(bytes32 record) external view returns (bytes memory) { return BytesStorage[record]; } function setBytesValue(bytes32 record, bytes calldata value) external onlyAssociatedContract { BytesStorage[record] = value; } function deleteBytesValue(bytes32 record) external onlyAssociatedContract { delete BytesStorage[record]; } // Bytes32Storage function getBytes32Value(bytes32 record) external view returns (bytes32) { return Bytes32Storage[record]; } function setBytes32Value(bytes32 record, bytes32 value) external onlyAssociatedContract { Bytes32Storage[record] = value; } function deleteBytes32Value(bytes32 record) external onlyAssociatedContract { delete Bytes32Storage[record]; } // BooleanStorage function getBooleanValue(bytes32 record) external view returns (bool) { return BooleanStorage[record]; } function setBooleanValue(bytes32 record, bool value) external onlyAssociatedContract { BooleanStorage[record] = value; } function deleteBooleanValue(bytes32 record) external onlyAssociatedContract { delete BooleanStorage[record]; } // IntStorage function getIntValue(bytes32 record) external view returns (int) { return IntStorage[record]; } function setIntValue(bytes32 record, int value) external onlyAssociatedContract { IntStorage[record] = value; } function deleteIntValue(bytes32 record) external onlyAssociatedContract { delete IntStorage[record]; } } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/delegateapprovals contract DelegateApprovals is Owned, IDelegateApprovals { bytes32 public constant BURN_FOR_ADDRESS = "BurnForAddress"; bytes32 public constant ISSUE_FOR_ADDRESS = "IssueForAddress"; bytes32 public constant CLAIM_FOR_ADDRESS = "ClaimForAddress"; bytes32 public constant EXCHANGE_FOR_ADDRESS = "ExchangeForAddress"; bytes32 public constant APPROVE_ALL = "ApproveAll"; bytes32[5] private _delegatableFunctions = [ APPROVE_ALL, BURN_FOR_ADDRESS, ISSUE_FOR_ADDRESS, CLAIM_FOR_ADDRESS, EXCHANGE_FOR_ADDRESS ]; /* ========== STATE VARIABLES ========== */ EternalStorage public eternalStorage; constructor(address _owner, EternalStorage _eternalStorage) public Owned(_owner) { eternalStorage = _eternalStorage; } /* ========== VIEWS ========== */ // Move it to setter and associatedState // util to get key based on action name + address of authoriser + address for delegate function _getKey( bytes32 _action, address _authoriser, address _delegate ) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_action, _authoriser, _delegate)); } // hash of actionName + address of authoriser + address for the delegate function canBurnFor(address authoriser, address delegate) external view returns (bool) { return _checkApproval(BURN_FOR_ADDRESS, authoriser, delegate); } function canIssueFor(address authoriser, address delegate) external view returns (bool) { return _checkApproval(ISSUE_FOR_ADDRESS, authoriser, delegate); } function canClaimFor(address authoriser, address delegate) external view returns (bool) { return _checkApproval(CLAIM_FOR_ADDRESS, authoriser, delegate); } function canExchangeFor(address authoriser, address delegate) external view returns (bool) { return _checkApproval(EXCHANGE_FOR_ADDRESS, authoriser, delegate); } function approvedAll(address authoriser, address delegate) public view returns (bool) { return eternalStorage.getBooleanValue(_getKey(APPROVE_ALL, authoriser, delegate)); } // internal function to check approval based on action // if approved for all actions then will return true // before checking specific approvals function _checkApproval( bytes32 action, address authoriser, address delegate ) internal view returns (bool) { if (approvedAll(authoriser, delegate)) return true; return eternalStorage.getBooleanValue(_getKey(action, authoriser, delegate)); } /* ========== SETTERS ========== */ // Approve All function approveAllDelegatePowers(address delegate) external { _setApproval(APPROVE_ALL, msg.sender, delegate); } // Removes all delegate approvals function removeAllDelegatePowers(address delegate) external { for (uint i = 0; i < _delegatableFunctions.length; i++) { _withdrawApproval(_delegatableFunctions[i], msg.sender, delegate); } } // Burn on behalf function approveBurnOnBehalf(address delegate) external { _setApproval(BURN_FOR_ADDRESS, msg.sender, delegate); } function removeBurnOnBehalf(address delegate) external { _withdrawApproval(BURN_FOR_ADDRESS, msg.sender, delegate); } // Issue on behalf function approveIssueOnBehalf(address delegate) external { _setApproval(ISSUE_FOR_ADDRESS, msg.sender, delegate); } function removeIssueOnBehalf(address delegate) external { _withdrawApproval(ISSUE_FOR_ADDRESS, msg.sender, delegate); } // Claim on behalf function approveClaimOnBehalf(address delegate) external { _setApproval(CLAIM_FOR_ADDRESS, msg.sender, delegate); } function removeClaimOnBehalf(address delegate) external { _withdrawApproval(CLAIM_FOR_ADDRESS, msg.sender, delegate); } // Exchange on behalf function approveExchangeOnBehalf(address delegate) external { _setApproval(EXCHANGE_FOR_ADDRESS, msg.sender, delegate); } function removeExchangeOnBehalf(address delegate) external { _withdrawApproval(EXCHANGE_FOR_ADDRESS, msg.sender, delegate); } function _setApproval( bytes32 action, address authoriser, address delegate ) internal { require(delegate != address(0), "Can't delegate to address(0)"); eternalStorage.setBooleanValue(_getKey(action, authoriser, delegate), true); emit Approval(authoriser, delegate, action); } function _withdrawApproval( bytes32 action, address authoriser, address delegate ) internal { // Check approval is set otherwise skip deleting approval if (eternalStorage.getBooleanValue(_getKey(action, authoriser, delegate))) { eternalStorage.deleteBooleanValue(_getKey(action, authoriser, delegate)); emit WithdrawApproval(authoriser, delegate, action); } } function setEternalStorage(EternalStorage _eternalStorage) external onlyOwner { require(address(_eternalStorage) != address(0), "Can't set eternalStorage to address(0)"); eternalStorage = _eternalStorage; emit EternalStorageUpdated(address(eternalStorage)); } /* ========== EVENTS ========== */ event Approval(address indexed authoriser, address delegate, bytes32 action); event WithdrawApproval(address indexed authoriser, address delegate, bytes32 action); event EternalStorageUpdated(address newEternalStorage); }
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract EternalStorage","name":"_eternalStorage","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authoriser","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newEternalStorage","type":"address"}],"name":"EternalStorageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authoriser","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"WithdrawApproval","type":"event"},{"constant":true,"inputs":[],"name":"APPROVE_ALL","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BURN_FOR_ADDRESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CLAIM_FOR_ADDRESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EXCHANGE_FOR_ADDRESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ISSUE_FOR_ADDRESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"approveAllDelegatePowers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"approveBurnOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"approveClaimOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"approveExchangeOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"approveIssueOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"authoriser","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"approvedAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"authoriser","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"canBurnFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"authoriser","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"canClaimFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"authoriser","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"canExchangeFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"authoriser","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"canIssueFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eternalStorage","outputs":[{"internalType":"contract EternalStorage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"removeAllDelegatePowers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"removeBurnOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"removeClaimOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"removeExchangeOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"removeIssueOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract EternalStorage","name":"_eternalStorage","type":"address"}],"name":"setEternalStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61012060405269105c1c1c9bdd99505b1b60b21b60809081526d4275726e466f724164647265737360901b60a0526e4973737565466f724164647265737360881b60c0526e436c61696d466f724164647265737360881b60e0527145786368616e6765466f724164647265737360701b61010052610081906002906005610195565b5034801561008e57600080fd5b50604051610fbc380380610fbc833981810160405260408110156100b157600080fd5b508051602090910151816001600160a01b038116610116576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600780546001600160a01b0319166001600160a01b0392909216919091179055506101f0565b82600581019282156101c3579160200282015b828111156101c35782518255916020019190600101906101a8565b506101cf9291506101d3565b5090565b6101ed91905b808211156101cf57600081556001016101d9565b90565b610dbd806101ff6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063b5bb561911610097578063c5e17ab011610071578063c5e17ab014610487578063d8eeb7c11461048f578063e32b3f5214610497578063faf431bb1461049f5761018e565b8063b5bb561914610415578063b9156efa1461043b578063bc87acbf146104615761018e565b80638da5cb5b1461038357806398ff9c541461038b5780639c79ce35146103935780639cbc2ebe146103b95780639f61d336146103c1578063b42e0f15146103e75761018e565b8063447fbc631161014b5780636c8bc9fe116101255780636c8bc9fe146103015780636f95200b1461032757806379ba50971461034d5780637d3f0ba2146103555761018e565b8063447fbc631461029157806353a47bb7146102b757806359cec3d6146102db5761018e565b806304872617146101935780631627540c146101d557806321f4ae57146101fd5780632c70aecf1461022b5780634180e5b514610245578063431ce5401461026b575b600080fd5b6101c1600480360360408110156101a957600080fd5b506001600160a01b03813581169160200135166104cd565b604080519115158252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b03166104f3565b005b6101c16004803603604081101561021357600080fd5b506001600160a01b038135811691602001351661054f565b61023361056e565b60408051918252519081900360200190f35b6101fb6004803603602081101561025b57600080fd5b50356001600160a01b0316610584565b6101fb6004803603602081101561028157600080fd5b50356001600160a01b03166105a4565b6101fb600480360360208110156102a757600080fd5b50356001600160a01b03166105c1565b6102bf6105e1565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156102f157600080fd5b50356001600160a01b03166105f0565b6101fb6004803603602081101561031757600080fd5b50356001600160a01b031661060c565b6101fb6004803603602081101561033d57600080fd5b50356001600160a01b0316610629565b6101fb61065a565b6101c16004803603604081101561036b57600080fd5b506001600160a01b0381358116916020013516610716565b6102bf610734565b6102bf610743565b6101fb600480360360208110156103a957600080fd5b50356001600160a01b0316610752565b61023361076e565b6101fb600480360360208110156103d757600080fd5b50356001600160a01b031661077f565b6101c1600480360360408110156103fd57600080fd5b506001600160a01b038135811691602001351661079c565b6101fb6004803603602081101561042b57600080fd5b50356001600160a01b031661082f565b6101fb6004803603602081101561045157600080fd5b50356001600160a01b03166108d6565b6101fb6004803603602081101561047757600080fd5b50356001600160a01b03166108f6565b61023361090e565b610233610924565b61023361093d565b6101c1600480360360408110156104b557600080fd5b506001600160a01b0381358116916020013516610952565b60006104ec6e4973737565466f724164647265737360881b8484610970565b9392505050565b6104fb610a0d565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60006104ec6e436c61696d466f724164647265737360881b8484610970565b6e4973737565466f724164647265737360881b81565b6105a16e436c61696d466f724164647265737360881b3383610a58565b50565b6105a16e4973737565466f724164647265737360881b3383610b78565b6105a17145786368616e6765466f724164647265737360701b3383610a58565b6001546001600160a01b031681565b6105a16d4275726e466f724164647265737360901b3383610b78565b6105a16e436c61696d466f724164647265737360881b3383610b78565b60005b60058110156106565761064e6002826005811061064557fe5b01543384610b78565b60010161062c565b5050565b6001546001600160a01b031633146106a35760405162461bcd60e51b8152600401808060200182810382526035815260200180610d256035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006104ec6d4275726e466f724164647265737360901b8484610970565b6000546001600160a01b031681565b6007546001600160a01b031681565b6105a16d4275726e466f724164647265737360901b3383610a58565b69105c1c1c9bdd99505b1b60b21b81565b6105a16e4973737565466f724164647265737360881b3383610a58565b6007546000906001600160a01b03166317e7dd226107c869105c1c1c9bdd99505b1b60b21b8686610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156107fc57600080fd5b505afa158015610810573d6000803e3d6000fd5b505050506040513d602081101561082657600080fd5b50519392505050565b610837610a0d565b6001600160a01b03811661087c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cff6026913960400191505060405180910390fd5b600780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fe3ebe3d58e84fbd094152babb730cf99a14b47f65ed04f35a3bd6356f8161a17916020908290030190a150565b6105a17145786368616e6765466f724164647265737360701b3383610b78565b6105a169105c1c1c9bdd99505b1b60b21b3383610a58565b6e436c61696d466f724164647265737360881b81565b7145786368616e6765466f724164647265737360701b81565b6d4275726e466f724164647265737360901b81565b60006104ec7145786368616e6765466f724164647265737360701b84845b600061097c838361079c565b15610989575060016104ec565b6007546001600160a01b03166317e7dd226109a5868686610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109d957600080fd5b505afa1580156109ed573d6000803e3d6000fd5b505050506040513d6020811015610a0357600080fd5b5051949350505050565b6000546001600160a01b03163314610a565760405162461bcd60e51b815260040180806020018281038252602f815260200180610d5a602f913960400191505060405180910390fd5b565b6001600160a01b038116610ab3576040805162461bcd60e51b815260206004820152601c60248201527f43616e27742064656c656761746520746f206164647265737328302900000000604482015290519081900360640190fd5b6007546001600160a01b0316633eba9ed2610acf858585610cb2565b60016040518363ffffffff1660e01b8152600401808381526020018215151515815260200192505050600060405180830381600087803b158015610b1257600080fd5b505af1158015610b26573d6000803e3d6000fd5b5050604080516001600160a01b03858116825260208201889052825190871694507f36a9e0c1da9cdc6d8f4bd4cb261f9ad6a45eb1641a557ead7530fbeff9a2633693509081900390910190a2505050565b6007546001600160a01b03166317e7dd22610b94858585610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bc857600080fd5b505afa158015610bdc573d6000803e3d6000fd5b505050506040513d6020811015610bf257600080fd5b505115610cad576007546001600160a01b0316633cc1635c610c15858585610cb2565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610c4b57600080fd5b505af1158015610c5f573d6000803e3d6000fd5b5050604080516001600160a01b03858116825260208201889052825190871694507f7e8dc09322ac82342d9dbfd49eb6497fa7ab69ac444f3763a9b8e16530342f4193509081900390910190a25b505050565b6040805160208082018690526bffffffffffffffffffffffff19606086811b82168486015285901b1660548301528251604881840301815260689092019092528051910120939250505056fe43616e27742073657420657465726e616c53746f7261676520746f2061646472657373283029596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820769492428c425b94186683000badc269a3479a27b2ccff7795165b9300fb31c064736f6c6343000510003200000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9000000000000000000000000f75a0c6edfe01196d04c54a7e81c2234964d001e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063b5bb561911610097578063c5e17ab011610071578063c5e17ab014610487578063d8eeb7c11461048f578063e32b3f5214610497578063faf431bb1461049f5761018e565b8063b5bb561914610415578063b9156efa1461043b578063bc87acbf146104615761018e565b80638da5cb5b1461038357806398ff9c541461038b5780639c79ce35146103935780639cbc2ebe146103b95780639f61d336146103c1578063b42e0f15146103e75761018e565b8063447fbc631161014b5780636c8bc9fe116101255780636c8bc9fe146103015780636f95200b1461032757806379ba50971461034d5780637d3f0ba2146103555761018e565b8063447fbc631461029157806353a47bb7146102b757806359cec3d6146102db5761018e565b806304872617146101935780631627540c146101d557806321f4ae57146101fd5780632c70aecf1461022b5780634180e5b514610245578063431ce5401461026b575b600080fd5b6101c1600480360360408110156101a957600080fd5b506001600160a01b03813581169160200135166104cd565b604080519115158252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b03166104f3565b005b6101c16004803603604081101561021357600080fd5b506001600160a01b038135811691602001351661054f565b61023361056e565b60408051918252519081900360200190f35b6101fb6004803603602081101561025b57600080fd5b50356001600160a01b0316610584565b6101fb6004803603602081101561028157600080fd5b50356001600160a01b03166105a4565b6101fb600480360360208110156102a757600080fd5b50356001600160a01b03166105c1565b6102bf6105e1565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156102f157600080fd5b50356001600160a01b03166105f0565b6101fb6004803603602081101561031757600080fd5b50356001600160a01b031661060c565b6101fb6004803603602081101561033d57600080fd5b50356001600160a01b0316610629565b6101fb61065a565b6101c16004803603604081101561036b57600080fd5b506001600160a01b0381358116916020013516610716565b6102bf610734565b6102bf610743565b6101fb600480360360208110156103a957600080fd5b50356001600160a01b0316610752565b61023361076e565b6101fb600480360360208110156103d757600080fd5b50356001600160a01b031661077f565b6101c1600480360360408110156103fd57600080fd5b506001600160a01b038135811691602001351661079c565b6101fb6004803603602081101561042b57600080fd5b50356001600160a01b031661082f565b6101fb6004803603602081101561045157600080fd5b50356001600160a01b03166108d6565b6101fb6004803603602081101561047757600080fd5b50356001600160a01b03166108f6565b61023361090e565b610233610924565b61023361093d565b6101c1600480360360408110156104b557600080fd5b506001600160a01b0381358116916020013516610952565b60006104ec6e4973737565466f724164647265737360881b8484610970565b9392505050565b6104fb610a0d565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60006104ec6e436c61696d466f724164647265737360881b8484610970565b6e4973737565466f724164647265737360881b81565b6105a16e436c61696d466f724164647265737360881b3383610a58565b50565b6105a16e4973737565466f724164647265737360881b3383610b78565b6105a17145786368616e6765466f724164647265737360701b3383610a58565b6001546001600160a01b031681565b6105a16d4275726e466f724164647265737360901b3383610b78565b6105a16e436c61696d466f724164647265737360881b3383610b78565b60005b60058110156106565761064e6002826005811061064557fe5b01543384610b78565b60010161062c565b5050565b6001546001600160a01b031633146106a35760405162461bcd60e51b8152600401808060200182810382526035815260200180610d256035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006104ec6d4275726e466f724164647265737360901b8484610970565b6000546001600160a01b031681565b6007546001600160a01b031681565b6105a16d4275726e466f724164647265737360901b3383610a58565b69105c1c1c9bdd99505b1b60b21b81565b6105a16e4973737565466f724164647265737360881b3383610a58565b6007546000906001600160a01b03166317e7dd226107c869105c1c1c9bdd99505b1b60b21b8686610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156107fc57600080fd5b505afa158015610810573d6000803e3d6000fd5b505050506040513d602081101561082657600080fd5b50519392505050565b610837610a0d565b6001600160a01b03811661087c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cff6026913960400191505060405180910390fd5b600780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fe3ebe3d58e84fbd094152babb730cf99a14b47f65ed04f35a3bd6356f8161a17916020908290030190a150565b6105a17145786368616e6765466f724164647265737360701b3383610b78565b6105a169105c1c1c9bdd99505b1b60b21b3383610a58565b6e436c61696d466f724164647265737360881b81565b7145786368616e6765466f724164647265737360701b81565b6d4275726e466f724164647265737360901b81565b60006104ec7145786368616e6765466f724164647265737360701b84845b600061097c838361079c565b15610989575060016104ec565b6007546001600160a01b03166317e7dd226109a5868686610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109d957600080fd5b505afa1580156109ed573d6000803e3d6000fd5b505050506040513d6020811015610a0357600080fd5b5051949350505050565b6000546001600160a01b03163314610a565760405162461bcd60e51b815260040180806020018281038252602f815260200180610d5a602f913960400191505060405180910390fd5b565b6001600160a01b038116610ab3576040805162461bcd60e51b815260206004820152601c60248201527f43616e27742064656c656761746520746f206164647265737328302900000000604482015290519081900360640190fd5b6007546001600160a01b0316633eba9ed2610acf858585610cb2565b60016040518363ffffffff1660e01b8152600401808381526020018215151515815260200192505050600060405180830381600087803b158015610b1257600080fd5b505af1158015610b26573d6000803e3d6000fd5b5050604080516001600160a01b03858116825260208201889052825190871694507f36a9e0c1da9cdc6d8f4bd4cb261f9ad6a45eb1641a557ead7530fbeff9a2633693509081900390910190a2505050565b6007546001600160a01b03166317e7dd22610b94858585610cb2565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bc857600080fd5b505afa158015610bdc573d6000803e3d6000fd5b505050506040513d6020811015610bf257600080fd5b505115610cad576007546001600160a01b0316633cc1635c610c15858585610cb2565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610c4b57600080fd5b505af1158015610c5f573d6000803e3d6000fd5b5050604080516001600160a01b03858116825260208201889052825190871694507f7e8dc09322ac82342d9dbfd49eb6497fa7ab69ac444f3763a9b8e16530342f4193509081900390910190a25b505050565b6040805160208082018690526bffffffffffffffffffffffff19606086811b82168486015285901b1660548301528251604881840301815260689092019092528051910120939250505056fe43616e27742073657420657465726e616c53746f7261676520746f2061646472657373283029596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820769492428c425b94186683000badc269a3479a27b2ccff7795165b9300fb31c064736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9000000000000000000000000f75a0c6edfe01196d04c54a7e81c2234964d001e
-----Decoded View---------------
Arg [0] : _owner (address): 0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9
Arg [1] : _eternalStorage (address): 0xf75a0c6eDfE01196d04C54a7e81C2234964D001E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9
Arg [1] : 000000000000000000000000f75a0c6edfe01196d04c54a7e81c2234964d001e
Library Used
SafeDecimalMath : 0x2ad7ccaac0eeb396c3a5fc2b73a885435688c0d5SystemSettingsLib : 0x343b5efcbf331957d3f4236eb16c338d7256f62dSignedSafeDecimalMath : 0xc7dcc0929881530d3386de51d9ffdd35b8009c6eExchangeSettlementLib : 0x3f60ffaef1ebd84e3c2d0c9c0e12388365d5df12
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.