Contract 0xeD6034E27c8949635De58847Afca2769A12Fb663

Contract Overview

Balance:
0 Ether
Txn Hash Method
Block
From
To
Value
0x37b27c8dbd1e8d41b8ded3c6e2f8648fb0f464fcde89e0f80d4570d319e0294fApprove All Dele...99318972021-03-29 9:38:2717 days 4 hrs ago0xf1b815448d9b4880203a16ab24082818c0200369 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.005744025105
0xca590739128e53d8f95f197d984ef542afa7fdd20351402f9adba81f9c9f9ab2Approve All Dele...97430722021-02-27 12:12:0547 days 1 hr ago0x46225038c633536b3b23df3f0f3f347e0068fc34 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00485031498
0xc20a6fc8402b80231c8549e6fdf3bf3628fd587befe1cb7490d1d8c68076d91aApprove All Dele...94814682021-01-17 6:18:3888 days 7 hrs ago0x1f625d1c9ff119767713c2a3cb430e4a50e96590 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00123038340.6
0x42a904dcf1992993f5ee093790e6f5ab2e3e69307d704ca8dbe9fdfeb2f8e331Approve All Dele...94814672021-01-17 6:18:2988 days 7 hrs ago0x1f625d1c9ff119767713c2a3cb430e4a50e96590 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00200990340.6
0x391fcf9108310d9d1c87c71ec54e32630c40f0aa8851e666429d224f364c1f5bApprove All Dele...88704582020-10-13 19:23:39183 days 18 hrs ago0xf031e8724b6094e9431eb29a04c4e44c2c0c75b4 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0024752550
0x3b60f46d6a7f26f314330f261d3b2b11c3e9b33624b8529f7631536406d9902eApprove All Dele...88257772020-10-06 14:17:38190 days 23 hrs ago0x49f1b6b1497560c5cb6bd7ab8da0281d9bba923f IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00653466132
0x6022b5c496271bd2e830d5e01b3cc4c10a0f3425f55e13d5fb576e14ab2aea0eApprove All Dele...86445522020-09-08 14:39:26218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0027274590
0x3c7da4e172f681bb84b5b8077b31aff4ade0dc7fe55650ccffb097bc5bc18c4cApprove All Dele...86445492020-09-08 14:37:04218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0027274590
0xbd955913c2b368f722531bf0937ee558dde06e81a74b9f9b2ee293c182afa355Approve All Dele...86445482020-09-08 14:35:56218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0027274590
0xf3415b7a07de313e3c8602f7cfaca95e1d1a61e668b7ff2d7dd04e7d6182a9d6Approve All Dele...86445212020-09-08 14:26:14218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0027274590
0x1fd0c71f4497d50d60edb97e0459a47fdb73eb69c8176fb1c204027624f48bdaApprove All Dele...86445032020-09-08 14:21:22218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0027274590
0xf27d7f9c5466659274c2c2fb0316926e4850ed2f653847eda63485293742f561Approve All Dele...86445012020-09-08 14:20:48218 days 23 hrs ago0x63ddf566d4fc64b36b9dad4ac5c9b2f04d7242f6 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0044554590
0xa84bcfac4b7f6ef12f4306c8d5560accea3b213ede369c9f7cdc17e58df7b307Approve All Dele...86021392020-09-02 5:56:21225 days 8 hrs ago0xecd64e2085a564538fd2108045f4035d36acbe47 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.023316855471
0xf4f18251bb4d9641daf18d4a8f31606e696a864a73b14f95f36010e9c43d10ceApprove All Dele...85134712020-08-17 2:45:35241 days 11 hrs ago0x474f7783d9a01d8eaa6faee9de8bdb9453adf2cd IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0042574386
0xab34e51b4d3eb2f65b06275c73da6f2637d33806eda3b0e106585d904e3a2972Approve All Dele...85134102020-08-17 2:29:02241 days 11 hrs ago0xaf7909c6fb9bd29aad34ab1b658ce67bed0a04a7 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00245470581
0x67bf39a97d769d50c9d054b500a74c3c3a6165001fcbaaf42e64544486c6d41aRemove All Deleg...84636212020-08-09 15:19:09248 days 22 hrs ago0x7bb032d3641b28931a19eba38c702929102c78f9 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00426916593
0xb9fad6b286b52021d872f2476c62cee4938794d4d68293ceaa2baee626a5a264Approve All Dele...84636212020-08-09 15:19:09248 days 22 hrs ago0x7bb032d3641b28931a19eba38c702929102c78f9 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00460396593
0xc86bbecd30ccc062f4781cd267931816c1431a320f7eb1b41a6f1eb1721247fdApprove All Dele...84055432020-07-31 15:18:33257 days 22 hrs ago0x2f6966aa7001d4e5c46c0e8afb6848ecbd7a19de IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0046534794
0x1762cbf55f0263c48409f2bf778bce652025faa913d6c6f69e6194510a182108Approve All Dele...84055432020-07-31 15:18:33257 days 22 hrs ago0x7bb032d3641b28931a19eba38c702929102c78f9 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0046534794
0x9e7a81e84b12dbb9cadc7bb216736068b9583df5881a83736707f9afd4a82a7aRemove All Deleg...83938542020-07-29 20:42:03259 days 17 hrs ago0x4bbd2d5d925280ef90b8283d0e31be4e5b99f7be IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0000459051
0xe041908784cd21ea2b990ffa49fb2c156b5438f6f34170fba8ac0f2b97b37f82Approve All Dele...83938532020-07-29 20:41:50259 days 17 hrs ago0x4bbd2d5d925280ef90b8283d0e31be4e5b99f7be IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.0000495051
0x3626a25dcb5d605eec7bef709c62184513e1cdb42c2f08bdd90a066e4dd9abd5Approve All Dele...83873582020-07-28 21:17:55260 days 16 hrs ago0x4bbd2d5d925280ef90b8283d0e31be4e5b99f7be IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.001980240
0x63415463d16e040f38903f1903e610380e1dd2a7d51c777adb99ca09e6545123Approve All Dele...83836362020-07-28 5:34:28261 days 8 hrs ago0x26ffd0d2c4d2067906756522b987df29ddfd81b0 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.002970360
0x91675fd9ee7915f6933cbfc71ead63c918c172c129731ca9cf6f84b1641af18dRemove All Deleg...83793532020-07-27 14:55:15261 days 23 hrs ago0xeeec77ec538bcd752d56050c099bc55009a181a7 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00541679118
0xa219dcf3f8dbbd4aea8f2ff84d9270f70bb0188a7a26840d5ef88a5afe893d15Approve All Dele...83793492020-07-27 14:54:15261 days 23 hrs ago0xeeec77ec538bcd752d56050c099bc55009a181a7 IN  0xed6034e27c8949635de58847afca2769a12fb6630 Ether0.00584159118
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x37b27c8dbd1e8d41b8ded3c6e2f8648fb0f464fcde89e0f80d4570d319e0294f99318972021-03-29 9:38:2717 days 4 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0xca590739128e53d8f95f197d984ef542afa7fdd20351402f9adba81f9c9f9ab297430722021-02-27 12:12:0547 days 1 hr ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0xc20a6fc8402b80231c8549e6fdf3bf3628fd587befe1cb7490d1d8c68076d91a94814682021-01-17 6:18:3888 days 7 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x42a904dcf1992993f5ee093790e6f5ab2e3e69307d704ca8dbe9fdfeb2f8e33194814672021-01-17 6:18:2988 days 7 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x391fcf9108310d9d1c87c71ec54e32630c40f0aa8851e666429d224f364c1f5b88704582020-10-13 19:23:39183 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x3b60f46d6a7f26f314330f261d3b2b11c3e9b33624b8529f7631536406d9902e88257772020-10-06 14:17:38190 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x1954070e3850ef6872ef19bbeec40472076a10395fe282d44e0ecc7381ffabdf86456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x1954070e3850ef6872ef19bbeec40472076a10395fe282d44e0ecc7381ffabdf86456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x32bb812c2eec6a6843d30530b95dfd50c375b13cc9efaa86c0a780dc14a4bf5f86456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x32bb812c2eec6a6843d30530b95dfd50c375b13cc9efaa86c0a780dc14a4bf5f86456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x51d421695b33ba1895b946b4c8d23af0f988d5ba05bd1a3570a6172233cb4c0c86456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x51d421695b33ba1895b946b4c8d23af0f988d5ba05bd1a3570a6172233cb4c0c86456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0xd5973ad96259172bc881cd701859af66c0ea129143221d82ba3a198513cdcfd986456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0xd5973ad96259172bc881cd701859af66c0ea129143221d82ba3a198513cdcfd986456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x4c2d1571e3eda55435402f2fbc5f0939f32e5bf2c34ae0be7f03b91f0ea2cc7686456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x4c2d1571e3eda55435402f2fbc5f0939f32e5bf2c34ae0be7f03b91f0ea2cc7686456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x098f4616547bda6429714ff2a81647d3d9d68dae058fa9f88623c45de8a0569386456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x098f4616547bda6429714ff2a81647d3d9d68dae058fa9f88623c45de8a0569386456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x222506ac8b9c9032513bfbe23f93d94b9d389bff6cb19c6cc1723f2f44303e8b86456022020-09-08 19:55:54218 days 18 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x222506ac8b9c9032513bfbe23f93d94b9d389bff6cb19c6cc1723f2f44303e8b86456022020-09-08 19:55:54218 days 18 hrs ago 0xf973f1ab453a3fbf7fac2be80161a62c456c4350 0xed6034e27c8949635de58847afca2769a12fb6630 Ether
0x6022b5c496271bd2e830d5e01b3cc4c10a0f3425f55e13d5fb576e14ab2aea0e86445522020-09-08 14:39:26218 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x3c7da4e172f681bb84b5b8077b31aff4ade0dc7fe55650ccffb097bc5bc18c4c86445492020-09-08 14:37:04218 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0xbd955913c2b368f722531bf0937ee558dde06e81a74b9f9b2ee293c182afa35586445482020-09-08 14:35:56218 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0xf3415b7a07de313e3c8602f7cfaca95e1d1a61e668b7ff2d7dd04e7d6182a9d686445212020-09-08 14:26:14218 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
0x1fd0c71f4497d50d60edb97e0459a47fdb73eb69c8176fb1c204027624f48bda86445032020-09-08 14:21:22218 days 23 hrs ago 0xed6034e27c8949635de58847afca2769a12fb663 0x85c147292b25dd6bad87b579788b7d2e94852dda0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DelegateApprovals

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-03-30
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* 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: 
*	- Owned
*	- State
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2020 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
*/

/* ===============================================
* Flattened with Solidifier by Coinage
* 
* https://solidifier.coina.ge
* ===============================================
*/


pragma solidity 0.4.25;


// https://docs.synthetix.io/contracts/Owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    /**
     * @dev Owned Constructor
     */
    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    /**
     * @notice Nominate a new owner of this contract.
     * @dev Only the current owner may nominate a new owner.
     */
    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    /**
     * @notice Accept the nomination to be 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 {
        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/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 _owner, address _associatedContract) public Owned(_owner) {
        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);
}


/**
 * @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.
 */
// https://docs.synthetix.io/contracts/EternalStorage
contract EternalStorage is State {
    constructor(address _owner, address _associatedContract) public State(_owner, _associatedContract) {}

    /* ========== DATA TYPES ========== */
    mapping(bytes32 => uint) UIntStorage;
    mapping(bytes32 => string) StringStorage;
    mapping(bytes32 => address) AddressStorage;
    mapping(bytes32 => bytes) BytesStorage;
    mapping(bytes32 => bytes32) Bytes32Storage;
    mapping(bytes32 => bool) BooleanStorage;
    mapping(bytes32 => int) 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 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 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];
    }
}


// https://docs.synthetix.io/contracts/DelegateApprovals
contract DelegateApprovals is Owned {
    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;

    /**
     * @dev Constructor
     * @param _owner The address which controls this contract.
     * @param _eternalStorage The eternalStorage address.
     */
    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(_eternalStorage != address(0), "Can't set eternalStorage to address(0)");
        eternalStorage = _eternalStorage;
        emit EternalStorageUpdated(eternalStorage);
    }

    /* ========== EVENTS ========== */
    event Approval(address indexed authoriser, address delegate, bytes32 action);
    event WithdrawApproval(address indexed authoriser, address delegate, bytes32 action);
    event EternalStorageUpdated(address newEternalStorage);
}

Contract ABI

[{"constant":true,"inputs":[{"name":"authoriser","type":"address"},{"name":"delegate","type":"address"}],"name":"canIssueFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"authoriser","type":"address"},{"name":"delegate","type":"address"}],"name":"canClaimFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ISSUE_FOR_ADDRESS","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveClaimOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"removeIssueOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveExchangeOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"removeBurnOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"removeClaimOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"removeAllDelegatePowers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"authoriser","type":"address"},{"name":"delegate","type":"address"}],"name":"canBurnFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eternalStorage","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveBurnOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"APPROVE_ALL","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveIssueOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"authoriser","type":"address"},{"name":"delegate","type":"address"}],"name":"approvedAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_eternalStorage","type":"address"}],"name":"setEternalStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"removeExchangeOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveAllDelegatePowers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CLAIM_FOR_ADDRESS","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EXCHANGE_FOR_ADDRESS","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BURN_FOR_ADDRESS","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"authoriser","type":"address"},{"name":"delegate","type":"address"}],"name":"canExchangeFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_eternalStorage","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authoriser","type":"address"},{"indexed":false,"name":"delegate","type":"address"},{"indexed":false,"name":"action","type":"bytes32"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authoriser","type":"address"},{"indexed":false,"name":"delegate","type":"address"},{"indexed":false,"name":"action","type":"bytes32"}],"name":"WithdrawApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newEternalStorage","type":"address"}],"name":"EternalStorageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]

6101206040527f417070726f7665416c6c0000000000000000000000000000000000000000000060809081527f4275726e466f724164647265737300000000000000000000000000000000000060a0527f4973737565466f7241646472657373000000000000000000000000000000000060c0527f436c61696d466f7241646472657373000000000000000000000000000000000060e0527f45786368616e6765466f72416464726573730000000000000000000000000000610100526100ca9060029060056101e7565b503480156100d757600080fd5b5060405160408061118f83398101604052805160209091015181600160a060020a038116151561016857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a15060078054600160a060020a031916600160a060020a039290921691909117905550610244565b8260058101928215610217579160200282015b8281111561021757825182556020909201916001909101906101fa565b50610223929150610227565b5090565b61024191905b80821115610223576000815560010161022d565b90565b610f3c806102536000396000f30060806040526004361061013a5763ffffffff60e060020a60003504166304872617811461013f5780631627540c1461017a57806321f4ae571461019d5780632c70aecf146101c45780634180e5b5146101eb578063431ce5401461020c578063447fbc631461022d57806353a47bb71461024e57806359cec3d61461027f5780636c8bc9fe146102a05780636f95200b146102c157806379ba5097146102e25780637d3f0ba2146102f75780638da5cb5b1461031e57806398ff9c54146103335780639c79ce35146103485780639cbc2ebe146103695780639f61d3361461037e578063b42e0f151461039f578063b5bb5619146103c6578063b9156efa146103e7578063bc87acbf14610408578063c5e17ab014610429578063d8eeb7c11461043e578063e32b3f5214610453578063faf431bb14610468575b600080fd5b34801561014b57600080fd5b50610166600160a060020a036004358116906024351661048f565b604080519115158252519081900360200190f35b34801561018657600080fd5b5061019b600160a060020a03600435166104b1565b005b3480156101a957600080fd5b50610166600160a060020a036004358116906024351661059a565b3480156101d057600080fd5b506101d96105b5565b60408051918252519081900360200190f35b3480156101f757600080fd5b5061019b600160a060020a03600435166105c7565b34801561021857600080fd5b5061019b600160a060020a03600435166105e3565b34801561023957600080fd5b5061019b600160a060020a03600435166105fc565b34801561025a57600080fd5b50610263610615565b60408051600160a060020a039092168252519081900360200190f35b34801561028b57600080fd5b5061019b600160a060020a0360043516610624565b3480156102ac57600080fd5b5061019b600160a060020a036004351661063d565b3480156102cd57600080fd5b5061019b600160a060020a0360043516610656565b3480156102ee57600080fd5b5061019b610687565b34801561030357600080fd5b50610166600160a060020a036004358116906024351661078f565b34801561032a57600080fd5b506102636107aa565b34801561033f57600080fd5b506102636107b9565b34801561035457600080fd5b5061019b600160a060020a03600435166107c8565b34801561037557600080fd5b506101d96107e1565b34801561038a57600080fd5b5061019b600160a060020a0360043516610805565b3480156103ab57600080fd5b50610166600160a060020a036004358116906024351661081e565b3480156103d257600080fd5b5061019b600160a060020a03600435166108cd565b3480156103f357600080fd5b5061019b600160a060020a0360043516610a42565b34801561041457600080fd5b5061019b600160a060020a0360043516610a5b565b34801561043557600080fd5b506101d9610a86565b34801561044a57600080fd5b506101d9610a98565b34801561045f57600080fd5b506101d9610aaa565b34801561047457600080fd5b50610166600160a060020a0360043581169060243516610abc565b60006104aa600080516020610eb18339815191528484610ad3565b9392505050565b600054600160a060020a03163314610539576040805160e560020a62461bcd02815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60006104aa600080516020610e918339815191528484610ad3565b600080516020610eb183398151915281565b6105e0600080516020610e918339815191523383610b79565b50565b6105e0600080516020610eb18339815191523383610c9e565b6105e0600080516020610ed18339815191523383610b79565b600154600160a060020a031681565b6105e0600080516020610ef18339815191523383610c9e565b6105e0600080516020610e918339815191523383610c9e565b60005b60058110156106835761067b6002826005811061067257fe5b01543384610c9e565b600101610659565b5050565b600154600160a060020a0316331461070f576040805160e560020a62461bcd02815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b60006104aa600080516020610ef18339815191528484610ad3565b600054600160a060020a031681565b600754600160a060020a031681565b6105e0600080516020610ef18339815191523383610b79565b7f417070726f7665416c6c0000000000000000000000000000000000000000000081565b6105e0600080516020610eb18339815191523383610b79565b600754600090600160a060020a03166317e7dd2261085d7f417070726f7665416c6c000000000000000000000000000000000000000000008686610de7565b6040805160e060020a63ffffffff851602815260048101929092525160248083019260209291908290030181600087803b15801561089a57600080fd5b505af11580156108ae573d6000803e3d6000fd5b505050506040513d60208110156108c457600080fd5b50519392505050565b600054600160a060020a03163314610955576040805160e560020a62461bcd02815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811615156109db576040805160e560020a62461bcd02815260206004820152602660248201527f43616e27742073657420657465726e616c53746f7261676520746f206164647260448201527f6573732830290000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517fe3ebe3d58e84fbd094152babb730cf99a14b47f65ed04f35a3bd6356f8161a17916020908290030190a150565b6105e0600080516020610ed18339815191523383610c9e565b6105e07f417070726f7665416c6c000000000000000000000000000000000000000000003383610b79565b600080516020610e9183398151915281565b600080516020610ed183398151915281565b600080516020610ef183398151915281565b60006104aa600080516020610ed183398151915284845b6000610adf838361081e565b15610aec575060016104aa565b600754600160a060020a03166317e7dd22610b08868686610de7565b6040805160e060020a63ffffffff851602815260048101929092525160248083019260209291908290030181600087803b158015610b4557600080fd5b505af1158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051949350505050565b600160a060020a0381161515610bd9576040805160e560020a62461bcd02815260206004820152601c60248201527f43616e27742064656c656761746520746f206164647265737328302900000000604482015290519081900360640190fd5b600754600160a060020a0316633eba9ed2610bf5858585610de7565b6040805160e060020a63ffffffff851602815260048101929092526001602483015251604480830192600092919082900301818387803b158015610c3857600080fd5b505af1158015610c4c573d6000803e3d6000fd5b505060408051600160a060020a03858116825260208201889052825190871694507f36a9e0c1da9cdc6d8f4bd4cb261f9ad6a45eb1641a557ead7530fbeff9a2633693509081900390910190a2505050565b600754600160a060020a03166317e7dd22610cba858585610de7565b6040805160e060020a63ffffffff851602815260048101929092525160248083019260209291908290030181600087803b158015610cf757600080fd5b505af1158015610d0b573d6000803e3d6000fd5b505050506040513d6020811015610d2157600080fd5b505115610de257600754600160a060020a0316633cc1635c610d44858585610de7565b6040805160e060020a63ffffffff8516028152600481019290925251602480830192600092919082900301818387803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b505060408051600160a060020a03858116825260208201889052825190871694507f7e8dc09322ac82342d9dbfd49eb6497fa7ab69ac444f3763a9b8e16530342f4193509081900390910190a25b505050565b6040805160208082018690526c01000000000000000000000000600160a060020a038087168202848601528516026054830152825160488184030181526068909201928390528151600093918291908401908083835b60208310610e5c5780518252601f199092019160209182019101610e3d565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209796505050505050505600436c61696d466f724164647265737300000000000000000000000000000000004973737565466f7241646472657373000000000000000000000000000000000045786368616e6765466f724164647265737300000000000000000000000000004275726e466f7241646472657373000000000000000000000000000000000000a165627a7a72305820581990c732fa6daed223bbf7136c10417506b8d8c6fef5bb8e107f27eea2d77b0029000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f617688200000000000000000000000085c147292b25dd6bad87b579788b7d2e94852dda

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f617688200000000000000000000000085c147292b25dd6bad87b579788b7d2e94852dda

-----Decoded View---------------
Arg [0] : _owner (address): 0xb64ff7a4a33acdf48d97dab0d764afd0f6176882
Arg [1] : _eternalStorage (address): 0x85c147292b25dd6bad87b579788b7d2e94852dda

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
Arg [1] : 00000000000000000000000085c147292b25dd6bad87b579788b7d2e94852dda


Library Used

SafeDecimalMath : 0x34a5ef81d18f3a305ae9c2d7df42beef4c79031c

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading