{"file_path":".sol","creation_status":"success","source_code":"pragma solidity ^0.4.21;\r\n\r\n/** @title  A contract for generating unique identifiers\r\n  *\r\n  * @notice  A contract that provides a identifier generation scheme,\r\n  * guaranteeing uniqueness across all contracts that inherit from it,\r\n  * as well as unpredictability of future identifiers.\r\n  *\r\n  * @dev  This contract is intended to be inherited by any contract that\r\n  * implements the callback software pattern for cooperative custodianship.\r\n  *\r\n  * @author  Gemini Trust Company, LLC\r\n  */\r\ncontract LockRequestable {\r\n\r\n    // MEMBERS\r\n    /// @notice  the count of all invocations of `generateLockId`.\r\n    uint256 public lockRequestCount;\r\n\r\n    // CONSTRUCTOR\r\n    function LockRequestable() public {\r\n        lockRequestCount = 0;\r\n    }\r\n\r\n    // FUNCTIONS\r\n    /** @notice  Returns a fresh unique identifier.\r\n      *\r\n      * @dev the generation scheme uses three components.\r\n      * First, the blockhash of the previous block.\r\n      * Second, the deployed address.\r\n      * Third, the next value of the counter.\r\n      * This ensure that identifiers are unique across all contracts\r\n      * following this scheme, and that future identifiers are\r\n      * unpredictable.\r\n      *\r\n      * @return a 32-byte unique identifier.\r\n      */\r\n    function generateLockId() internal returns (bytes32 lockId) {\r\n        return keccak256(block.blockhash(block.number - 1), address(this), ++lockRequestCount);\r\n    }\r\n}\r\n\r\n\r\n/** @title  A contract to inherit upgradeable custodianship.\r\n  *\r\n  * @notice  A contract that provides re-usable code for upgradeable\r\n  * custodianship. That custodian may be an account or another contract.\r\n  *\r\n  * @dev  This contract is intended to be inherited by any contract\r\n  * requiring a custodian to control some aspect of its functionality.\r\n  * This contract provides the mechanism for that custodianship to be\r\n  * passed from one custodian to the next.\r\n  *\r\n  * @author  Gemini Trust Company, LLC\r\n  */\r\ncontract CustodianUpgradeable is LockRequestable {\r\n\r\n    // TYPES\r\n    /// @dev  The struct type for pending custodian changes.\r\n    struct CustodianChangeRequest {\r\n        address proposedNew;\r\n    }\r\n\r\n    // MEMBERS\r\n    /// @dev  The address of the account or contract that acts as the custodian.\r\n    address public custodian;\r\n\r\n    /// @dev  The map of lock ids to pending custodian changes.\r\n    mapping (bytes32 => CustodianChangeRequest) public custodianChangeReqs;\r\n\r\n    // CONSTRUCTOR\r\n    function CustodianUpgradeable(\r\n        address _custodian\r\n    )\r\n      LockRequestable()\r\n      public\r\n    {\r\n        custodian = _custodian;\r\n    }\r\n\r\n    // MODIFIERS\r\n    modifier onlyCustodian {\r\n        require(msg.sender == custodian);\r\n        _;\r\n    }\r\n\r\n    // PUBLIC FUNCTIONS\r\n    // (UPGRADE)\r\n\r\n    /** @notice  Requests a change of the custodian associated with this contract.\r\n      *\r\n      * @dev  Returns a unique lock id associated with the request.\r\n      * Anyone can call this function, but confirming the request is authorized\r\n      * by the custodian.\r\n      *\r\n      * @param  _proposedCustodian  The address of the new custodian.\r\n      * @return  lockId  A unique identifier for this request.\r\n      */\r\n    function requestCustodianChange(address _proposedCustodian) public returns (bytes32 lockId) {\r\n        require(_proposedCustodian != address(0));\r\n\r\n        lockId = generateLockId();\r\n\r\n        custodianChangeReqs[lockId] = CustodianChangeRequest({\r\n            proposedNew: _proposedCustodian\r\n        });\r\n\r\n        emit CustodianChangeRequested(lockId, msg.sender, _proposedCustodian);\r\n    }\r\n\r\n    /** @notice  Confirms a pending change of the custodian associated with this contract.\r\n      *\r\n      * @dev  When called by the current custodian with a lock id associated with a\r\n      * pending custodian change, the `address custodian` member will be updated with the\r\n      * requested address.\r\n      *\r\n      * @param  _lockId  The identifier of a pending change request.\r\n      */\r\n    function confirmCustodianChange(bytes32 _lockId) public onlyCustodian {\r\n        custodian = getCustodianChangeReq(_lockId);\r\n\r\n        delete custodianChangeReqs[_lockId];\r\n\r\n        emit CustodianChangeConfirmed(_lockId, custodian);\r\n    }\r\n\r\n    // PRIVATE FUNCTIONS\r\n    function getCustodianChangeReq(bytes32 _lockId) private view returns (address _proposedNew) {\r\n        CustodianChangeRequest storage changeRequest = custodianChangeReqs[_lockId];\r\n\r\n        // reject ‘null’ results from the map lookup\r\n        // this can only be the case if an unknown `_lockId` is received\r\n        require(changeRequest.proposedNew != 0);\r\n\r\n        return changeRequest.proposedNew;\r\n    }\r\n\r\n    /// @dev  Emitted by successful `requestCustodianChange` calls.\r\n    event CustodianChangeRequested(\r\n        bytes32 _lockId,\r\n        address _msgSender,\r\n        address _proposedCustodian\r\n    );\r\n\r\n    /// @dev Emitted by successful `confirmCustodianChange` calls.\r\n    event CustodianChangeConfirmed(bytes32 _lockId, address _newCustodian);\r\n}\r\n\r\n\r\n/** @title  A contract to inherit upgradeable token implementations.\r\n  *\r\n  * @notice  A contract that provides re-usable code for upgradeable\r\n  * token implementations. It itself inherits from `CustodianUpgradable`\r\n  * as the upgrade process is controlled by the custodian.\r\n  *\r\n  * @dev  This contract is intended to be inherited by any contract\r\n  * requiring a reference to the active token implementation, either\r\n  * to delegate calls to it, or authorize calls from it. This contract\r\n  * provides the mechanism for that implementation to be be replaced,\r\n  * which constitutes an implementation upgrade.\r\n  *\r\n  * @author Gemini Trust Company, LLC\r\n  */\r\ncontract ERC20ImplUpgradeable is CustodianUpgradeable  {\r\n\r\n    // TYPES\r\n    /// @dev  The struct type for pending implementation changes.\r\n    struct ImplChangeRequest {\r\n        address proposedNew;\r\n    }\r\n\r\n    // MEMBERS\r\n    // @dev  The reference to the active token implementation.\r\n    ERC20Impl public erc20Impl;\r\n\r\n    /// @dev  The map of lock ids to pending implementation changes.\r\n    mapping (bytes32 => ImplChangeRequest) public implChangeReqs;\r\n\r\n    // CONSTRUCTOR\r\n    function ERC20ImplUpgradeable(address _custodian) CustodianUpgradeable(_custodian) public {\r\n        erc20Impl = ERC20Impl(0x0);\r\n    }\r\n\r\n    // MODIFIERS\r\n    modifier onlyImpl {\r\n        require(msg.sender == address(erc20Impl));\r\n        _;\r\n    }\r\n\r\n    // PUBLIC FUNCTIONS\r\n    // (UPGRADE)\r\n    /** @notice  Requests a change of the active implementation associated\r\n      * with this contract.\r\n      *\r\n      * @dev  Returns a unique lock id associated with the request.\r\n      * Anyone can call this function, but confirming the request is authorized\r\n      * by the custodian.\r\n      *\r\n      * @param  _proposedImpl  The address of the new active implementation.\r\n      * @return  lockId  A unique identifier for this request.\r\n      */\r\n    function requestImplChange(address _proposedImpl) public returns (bytes32 lockId) {\r\n        require(_proposedImpl != address(0));\r\n\r\n        lockId = generateLockId();\r\n\r\n        implChangeReqs[lockId] = ImplChangeRequest({\r\n            proposedNew: _proposedImpl\r\n        });\r\n\r\n        emit ImplChangeRequested(lockId, msg.sender, _proposedImpl);\r\n    }\r\n\r\n    /** @notice  Confirms a pending change of the active implementation\r\n      * associated with this contract.\r\n      *\r\n      * @dev  When called by the custodian with a lock id associated with a\r\n      * pending change, the `ERC20Impl erc20Impl` member will be updated\r\n      * with the requested address.\r\n      *\r\n      * @param  _lockId  The identifier of a pending change request.\r\n      */\r\n    function confirmImplChange(bytes32 _lockId) public onlyCustodian {\r\n        erc20Impl = getImplChangeReq(_lockId);\r\n\r\n        delete implChangeReqs[_lockId];\r\n\r\n        emit ImplChangeConfirmed(_lockId, address(erc20Impl));\r\n    }\r\n\r\n    // PRIVATE FUNCTIONS\r\n    function getImplChangeReq(bytes32 _lockId) private view returns (ERC20Impl _proposedNew) {\r\n        ImplChangeRequest storage changeRequest = implChangeReqs[_lockId];\r\n\r\n        // reject ‘null’ results from the map lookup\r\n        // this can only be the case if an unknown `_lockId` is received\r\n        require(changeRequest.proposedNew != address(0));\r\n\r\n        return ERC20Impl(changeRequest.proposedNew);\r\n    }\r\n\r\n    /// @dev  Emitted by successful `requestImplChange` calls.\r\n    event ImplChangeRequested(\r\n        bytes32 _lockId,\r\n        address _msgSender,\r\n        address _proposedImpl\r\n    );\r\n\r\n    /// @dev Emitted by successful `confirmImplChange` calls.\r\n    event ImplChangeConfirmed(bytes32 _lockId, address _newImpl);\r\n}\r\n\r\n\r\ncontract ERC20Interface {\r\n  // METHODS\r\n\r\n  // NOTE:\r\n  //   public getter functions are not currently recognised as an\r\n  //   implementation of the matching abstract function by the compiler.\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#name\r\n  // function name() public view returns (string);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#symbol\r\n  // function symbol() public view returns (string);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#totalsupply\r\n  // function decimals() public view returns (uint8);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#totalsupply\r\n  function totalSupply() public view returns (uint256);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#balanceof\r\n  function balanceOf(address _owner) public view returns (uint256 balance);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transfer\r\n  function transfer(address _to, uint256 _value) public returns (bool success);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transferfrom\r\n  function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#approve\r\n  function approve(address _spender, uint256 _value) public returns (bool success);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#allowance\r\n  function allowance(address _owner, address _spender) public view returns (uint256 remaining);\r\n\r\n  // EVENTS\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transfer-1\r\n  event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n\r\n  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#approval\r\n  event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}\r\n\r\n\r\n/** @title  Public interface to ERC20 compliant token.\r\n  *\r\n  * @notice  This contract is a permanent entry point to an ERC20 compliant\r\n  * system of contracts.\r\n  *\r\n  * @dev  This contract contains no business logic and instead\r\n  * delegates to an instance of ERC20Impl. This contract also has no storage\r\n  * that constitutes the operational state of the token. This contract is\r\n  * upgradeable in the sense that the `custodian` can update the\r\n  * `erc20Impl` address, thus redirecting the delegation of business logic.\r\n  * The `custodian` is also authorized to pass custodianship.\r\n  *\r\n  * @author  Gemini Trust Company, LLC\r\n  */\r\ncontract ERC20Proxy is ERC20Interface, ERC20ImplUpgradeable {\r\n\r\n    // MEMBERS\r\n    /// @notice  Returns the name of the token.\r\n    string public name;\r\n\r\n    /// @notice  Returns the symbol of the token.\r\n    string public symbol;\r\n\r\n    /// @notice  Returns the number of decimals the token uses.\r\n    uint8 public decimals;\r\n\r\n    // CONSTRUCTOR\r\n    function ERC20Proxy(\r\n        string _name,\r\n        string _symbol,\r\n        uint8 _decimals,\r\n        address _custodian\r\n    )\r\n        ERC20ImplUpgradeable(_custodian)\r\n        public\r\n    {\r\n        name = _name;\r\n        symbol = _symbol;\r\n        decimals = _decimals;\r\n    }\r\n\r\n    // PUBLIC FUNCTIONS\r\n    // (ERC20Interface)\r\n    /** @notice  Returns the total token supply.\r\n      *\r\n      * @return  the total token supply.\r\n      */\r\n    function totalSupply() public view returns (uint256) {\r\n        return erc20Impl.totalSupply();\r\n    }\r\n\r\n    /** @notice  Returns the account balance of another account with address\r\n      * `_owner`.\r\n      *\r\n      * @return  balance  the balance of account with address `_owner`.\r\n      */\r\n    function balanceOf(address _owner) public view returns (uint256 balance) {\r\n        return erc20Impl.balanceOf(_owner);\r\n    }\r\n\r\n    /** @dev Internal use only.\r\n      */\r\n    function emitTransfer(address _from, address _to, uint256 _value) public onlyImpl {\r\n        emit Transfer(_from, _to, _value);\r\n    }\r\n\r\n    /** @notice  Transfers `_value` amount of tokens to address `_to`.\r\n      *\r\n      * @dev Will fire the `Transfer` event. Will revert if the `_from`\r\n      * account balance does not have enough tokens to spend.\r\n      *\r\n      * @return  success  true if transfer completes.\r\n      */\r\n    function transfer(address _to, uint256 _value) public returns (bool success) {\r\n        return erc20Impl.transferWithSender(msg.sender, _to, _value);\r\n    }\r\n\r\n    /** @notice  Transfers `_value` amount of tokens from address `_from`\r\n      * to address `_to`.\r\n      *\r\n      * @dev  Will fire the `Transfer` event. Will revert unless the `_from`\r\n      * account has deliberately authorized the sender of the message\r\n      * via some mechanism.\r\n      *\r\n      * @return  success  true if transfer completes.\r\n      */\r\n    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\r\n        return erc20Impl.transferFromWithSender(msg.sender, _from, _to, _value);\r\n    }\r\n\r\n    /** @dev Internal use only.\r\n      */\r\n    function emitApproval(address _owner, address _spender, uint256 _value) public onlyImpl {\r\n        emit Approval(_owner, _spender, _value);\r\n    }\r\n\r\n    /** @notice  Allows `_spender` to withdraw from your account multiple times,\r\n      * up to the `_value` amount. If this function is called again it\r\n      * overwrites the current allowance with _value.\r\n      *\r\n      * @dev  Will fire the `Approval` event.\r\n      *\r\n      * @return  success  true if approval completes.\r\n      */\r\n    function approve(address _spender, uint256 _value) public returns (bool success) {\r\n        return erc20Impl.approveWithSender(msg.sender, _spender, _value);\r\n    }\r\n\r\n    /** @notice Increases the amount `_spender` is allowed to withdraw from\r\n      * your account.\r\n      * This function is implemented to avoid the race condition in standard\r\n      * ERC20 contracts surrounding the `approve` method.\r\n      *\r\n      * @dev  Will fire the `Approval` event. This function should be used instead of\r\n      * `approve`.\r\n      *\r\n      * @return  success  true if approval completes.\r\n      */\r\n    function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) {\r\n        return erc20Impl.increaseApprovalWithSender(msg.sender, _spender, _addedValue);\r\n    }\r\n\r\n    /** @notice  Decreases the amount `_spender` is allowed to withdraw from\r\n      * your account. This function is implemented to avoid the race\r\n      * condition in standard ERC20 contracts surrounding the `approve` method.\r\n      *\r\n      * @dev  Will fire the `Approval` event. This function should be used\r\n      * instead of `approve`.\r\n      *\r\n      * @return  success  true if approval completes.\r\n      */\r\n    function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) {\r\n        return erc20Impl.decreaseApprovalWithSender(msg.sender, _spender, _subtractedValue);\r\n    }\r\n\r\n    /** @notice  Returns how much `_spender` is currently allowed to spend from\r\n      * `_owner`'s balance.\r\n      *\r\n      * @return  remaining  the remaining allowance.\r\n      */\r\n    function allowance(address _owner, address _spender) public view returns (uint256 remaining) {\r\n        return erc20Impl.allowance(_owner, _spender);\r\n    }\r\n}\r\n\r\n\r\n/** @title  ERC20 compliant token intermediary contract holding core logic.\r\n  *\r\n  * @notice  This contract serves as an intermediary between the exposed ERC20\r\n  * interface in ERC20Proxy and the store of balances in ERC20Store. This\r\n  * contract contains core logic that the proxy can delegate to\r\n  * and that the store is called by.\r\n  *\r\n  * @dev  This contract contains the core logic to implement the\r\n  * ERC20 specification as well as several extensions.\r\n  * 1. Changes to the token supply.\r\n  * 2. Batched transfers.\r\n  * 3. Relative changes to spending approvals.\r\n  * 4. Delegated transfer control ('sweeping').\r\n  *\r\n  * @author  Gemini Trust Company, LLC\r\n  */\r\ncontract ERC20Impl is CustodianUpgradeable {\r\n\r\n    // TYPES\r\n    /// @dev  The struct type for pending increases to the token supply (print).\r\n    struct PendingPrint {\r\n        address receiver;\r\n        uint256 value;\r\n    }\r\n\r\n    // MEMBERS\r\n    /// @dev  The reference to the proxy.\r\n    ERC20Proxy public erc20Proxy;\r\n\r\n    /// @dev  The reference to the store.\r\n    ERC20Store public erc20Store;\r\n\r\n    /// @dev  The sole authorized caller of delegated transfer control ('sweeping').\r\n    address public sweeper;\r\n\r\n    /** @dev  The static message to be signed by an external account that\r\n      * signifies their permission to forward their balance to any arbitrary\r\n      * address. This is used to consolidate the control of all accounts\r\n      * backed by a shared keychain into the control of a single key.\r\n      * Initialized as the concatenation of the address of this contract\r\n      * and the word \"sweep\". This concatenation is done to prevent a replay\r\n      * attack in a subsequent contract, where the sweep message could\r\n      * potentially be replayed to re-enable sweeping ability.\r\n      */\r\n    bytes32 public sweepMsg;\r\n\r\n    /** @dev  The mapping that stores whether the address in question has\r\n      * enabled sweeping its contents to another account or not.\r\n      * If an address maps to \"true\", it has already enabled sweeping,\r\n      * and thus does not need to re-sign the `sweepMsg` to enact the sweep.\r\n      */\r\n    mapping (address => bool) public sweptSet;\r\n\r\n    /// @dev  The map of lock ids to pending token increases.\r\n    mapping (bytes32 => PendingPrint) public pendingPrintMap;\r\n\r\n    // CONSTRUCTOR\r\n    function ERC20Impl(\r\n          address _erc20Proxy,\r\n          address _erc20Store,\r\n          address _custodian,\r\n          address _sweeper\r\n    )\r\n        CustodianUpgradeable(_custodian)\r\n        public\r\n    {\r\n        require(_sweeper != 0);\r\n        erc20Proxy = ERC20Proxy(_erc20Proxy);\r\n        erc20Store = ERC20Store(_erc20Store);\r\n\r\n        sweeper = _sweeper;\r\n        sweepMsg = keccak256(address(this), \"sweep\");\r\n    }\r\n\r\n    // MODIFIERS\r\n    modifier onlyProxy {\r\n        require(msg.sender == address(erc20Proxy));\r\n        _;\r\n    }\r\n    modifier onlySweeper {\r\n        require(msg.sender == sweeper);\r\n        _;\r\n    }\r\n\r\n\r\n    /** @notice  Core logic of the ERC20 `approve` function.\r\n      *\r\n      * @dev  This function can only be called by the referenced proxy,\r\n      * which has an `approve` function.\r\n      * Every argument passed to that function as well as the original\r\n      * `msg.sender` gets passed to this function.\r\n      * NOTE: approvals for the zero address (unspendable) are disallowed.\r\n      *\r\n      * @param  _sender  The address initiating the approval in proxy.\r\n      */\r\n    function approveWithSender(\r\n        address _sender,\r\n        address _spender,\r\n        uint256 _value\r\n    )\r\n        public\r\n        onlyProxy\r\n        returns (bool success)\r\n    {\r\n        require(_spender != address(0)); // disallow unspendable approvals\r\n        erc20Store.setAllowance(_sender, _spender, _value);\r\n        erc20Proxy.emitApproval(_sender, _spender, _value);\r\n        return true;\r\n    }\r\n\r\n    /** @notice  Core logic of the `increaseApproval` function.\r\n      *\r\n      * @dev  This function can only be called by the referenced proxy,\r\n      * which has an `increaseApproval` function.\r\n      * Every argument passed to that function as well as the original\r\n      * `msg.sender` gets passed to this function.\r\n      * NOTE: approvals for the zero address (unspendable) are disallowed.\r\n      *\r\n      * @param  _sender  The address initiating the approval.\r\n      */\r\n    function increaseApprovalWithSender(\r\n        address _sender,\r\n        address _spender,\r\n        uint256 _addedValue\r\n    )\r\n        public\r\n        onlyProxy\r\n        returns (bool success)\r\n    {\r\n        require(_spender != address(0)); // disallow unspendable approvals\r\n        uint256 currentAllowance = erc20Store.allowed(_sender, _spender);\r\n        uint256 newAllowance = currentAllowance + _addedValue;\r\n\r\n        require(newAllowance >= currentAllowance);\r\n\r\n        erc20Store.setAllowance(_sender, _spender, newAllowance);\r\n        erc20Proxy.emitApproval(_sender, _spender, newAllowance);\r\n        return true;\r\n    }\r\n\r\n    /** @notice  Core logic of the `decreaseApproval` function.\r\n      *\r\n      * @dev  This function can only be called by the referenced proxy,\r\n      * which has a `decreaseApproval` function.\r\n      * Every argument passed to that function as well as the original\r\n      * `msg.sender` gets passed to this function.\r\n      * NOTE: approvals for the zero address (unspendable) are disallowed.\r\n      *\r\n      * @param  _sender  The address initiating the approval.\r\n      */\r\n    function decreaseApprovalWithSender(\r\n        address _sender,\r\n        address _spender,\r\n        uint256 _subtractedValue\r\n    )\r\n        public\r\n        onlyProxy\r\n        returns (bool success)\r\n    {\r\n        require(_spender != address(0)); // disallow unspendable approvals\r\n        uint256 currentAllowance = erc20Store.allowed(_sender, _spender);\r\n        uint256 newAllowance = currentAllowance - _subtractedValue;\r\n\r\n        require(newAllowance <= currentAllowance);\r\n\r\n        erc20Store.setAllowance(_sender, _spender, newAllowance);\r\n        erc20Proxy.emitApproval(_sender, _spender, newAllowance);\r\n        return true;\r\n    }\r\n\r\n    /** @notice  Requests an increase in the token supply, with the newly created\r\n      * tokens to be added to the balance of the specified account.\r\n      *\r\n      * @dev  Returns a unique lock id associated with the request.\r\n      * Anyone can call this function, but confirming the request is authorized\r\n      * by the custodian.\r\n      * NOTE: printing to the zero address is disallowed.\r\n      *\r\n      * @param  _receiver  The receiving address of the print, if confirmed.\r\n      * @param  _value  The number of tokens to add to the total supply and the\r\n      * balance of the receiving address, if confirmed.\r\n      *\r\n      * @return  lockId  A unique identifier for this request.\r\n      */\r\n    function requestPrint(address _receiver, uint256 _value) public returns (bytes32 lockId) {\r\n        require(_receiver != address(0));\r\n\r\n        lockId = generateLockId();\r\n\r\n        pendingPrintMap[lockId] = PendingPrint({\r\n            receiver: _receiver,\r\n            value: _value\r\n        });\r\n\r\n        emit PrintingLocked(lockId, _receiver, _value);\r\n    }\r\n\r\n    /** @notice  Confirms a pending increase in the token supply.\r\n      *\r\n      * @dev  When called by the custodian with a lock id associated with a\r\n      * pending increase, the amount requested to be printed in the print request\r\n      * is printed to the receiving address specified in that same request.\r\n      * NOTE: this function will not execute any print that would overflow the\r\n      * total supply, but it will not revert either.\r\n      *\r\n      * @param  _lockId  The identifier of a pending print request.\r\n      */\r\n    function confirmPrint(bytes32 _lockId) public onlyCustodian {\r\n        PendingPrint storage print = pendingPrintMap[_lockId];\r\n\r\n        // reject ‘null’ results from the map lookup\r\n        // this can only be the case if an unknown `_lockId` is received\r\n        address receiver = print.receiver;\r\n        require (receiver != address(0));\r\n        uint256 value = print.value;\r\n\r\n        delete pendingPrintMap[_lockId];\r\n\r\n        uint256 supply = erc20Store.totalSupply();\r\n        uint256 newSupply = supply + value;\r\n        if (newSupply >= supply) {\r\n          erc20Store.setTotalSupply(newSupply);\r\n          erc20Store.addBalance(receiver, value);\r\n\r\n          emit PrintingConfirmed(_lockId, receiver, value);\r\n          erc20Proxy.emitTransfer(address(0), receiver, value);\r\n        }\r\n    }\r\n\r\n    /** @notice  Burns the specified value from the sender's balance.\r\n      *\r\n      * @dev  Sender's balanced is subtracted by the amount they wish to burn.\r\n      *\r\n      * @param  _value  The amount to burn.\r\n      *\r\n      * @return  success  true if the burn succeeded.\r\n      */\r\n    function burn(uint256 _value) public returns (bool success) {\r\n        uint256 balanceOfSender = erc20Store.balances(msg.sender);\r\n        require(_value <= balanceOfSender);\r\n\r\n        erc20Store.setBalance(msg.sender, balanceOfSender - _value);\r\n        erc20Store.setTotalSupply(erc20Store.totalSupply() - _value);\r\n\r\n        erc20Proxy.emitTransfer(msg.sender, address(0), _value);\r\n\r\n        return true;\r\n    }\r\n\r\n    /** @notice  A function for a sender to issue multiple transfers to multiple\r\n      * different addresses at once. This function is implemented for gas\r\n      * considerations when someone wishes to transfer, as one transaction is\r\n      * cheaper than issuing several distinct individual `transfer` transactions.\r\n      *\r\n      * @dev  By specifying a set of destination addresses and values, the\r\n      * sender can issue one transaction to transfer multiple amounts to\r\n      * distinct addresses, rather than issuing each as a separate\r\n      * transaction. The `_tos` and `_values` arrays must be equal length, and\r\n      * an index in one array corresponds to the same index in the other array\r\n      * (e.g. `_tos[0]` will receive `_values[0]`, `_tos[1]` will receive\r\n      * `_values[1]`, and so on.)\r\n      * NOTE: transfers to the zero address are disallowed.\r\n      *\r\n      * @param  _tos  The destination addresses to receive the transfers.\r\n      * @param  _values  The values for each destination address.\r\n      * @return  success  If transfers succeeded.\r\n      */\r\n    function batchTransfer(address[] _tos, uint256[] _values) public returns (bool success) {\r\n        require(_tos.length == _values.length);\r\n\r\n        uint256 numTransfers = _tos.length;\r\n        uint256 senderBalance = erc20Store.balances(msg.sender);\r\n\r\n        for (uint256 i = 0; i < numTransfers; i++) {\r\n          address to = _tos[i];\r\n          require(to != address(0));\r\n          uint256 v = _values[i];\r\n          require(senderBalance >= v);\r\n\r\n          if (msg.sender != to) {\r\n            senderBalance -= v;\r\n            erc20Store.addBalance(to, v);\r\n          }\r\n          erc20Proxy.emitTransfer(msg.sender, to, v);\r\n        }\r\n\r\n        erc20Store.setBalance(msg.sender, senderBalance);\r\n\r\n        return true;\r\n    }\r\n\r\n    /** @notice  Enables the delegation of transfer control for many\r\n      * accounts to the sweeper account, transferring any balances\r\n      * as well to the given destination.\r\n      *\r\n      * @dev  An account delegates transfer control by signing the\r\n      * value of `sweepMsg`. The sweeper account is the only authorized\r\n      * caller of this function, so it must relay signatures on behalf\r\n      * of accounts that delegate transfer control to it. Enabling\r\n      * delegation is idempotent and permanent. If the account has a\r\n      * balance at the time of enabling delegation, its balance is\r\n      * also transfered to the given destination account `_to`.\r\n      * NOTE: transfers to the zero address are disallowed.\r\n      *\r\n      * @param  _vs  The array of recovery byte components of the ECDSA signatures.\r\n      * @param  _rs  The array of 'R' components of the ECDSA signatures.\r\n      * @param  _ss  The array of 'S' components of the ECDSA signatures.\r\n      * @param  _to  The destination for swept balances.\r\n      */\r\n    function enableSweep(uint8[] _vs, bytes32[] _rs, bytes32[] _ss, address _to) public onlySweeper {\r\n        require(_to != address(0));\r\n        require((_vs.length == _rs.length) && (_vs.length == _ss.length));\r\n\r\n        uint256 numSignatures = _vs.length;\r\n        uint256 sweptBalance = 0;\r\n\r\n        for (uint256 i=0; i<numSignatures; ++i) {\r\n          address from = ecrecover(sweepMsg, _vs[i], _rs[i], _ss[i]);\r\n\r\n          // ecrecover returns 0 on malformed input\r\n          if (from != address(0)) {\r\n            sweptSet[from] = true;\r\n\r\n            uint256 fromBalance = erc20Store.balances(from);\r\n\r\n            if (fromBalance > 0) {\r\n              sweptBalance += fromBalance;\r\n\r\n              erc20Store.setBalance(from, 0);\r\n\r\n              erc20Proxy.emitTransfer(from, _to, fromBalance);\r\n            }\r\n          }\r\n        }\r\n\r\n        if (sweptBalance > 0) {\r\n          erc20Store.addBalance(_to, sweptBalance);\r\n        }\r\n    }\r\n\r\n    /** @notice  For accounts that have delegated, transfer control\r\n      * to the sweeper, this function transfers their balances to the given\r\n      * destination.\r\n      *\r\n      * @dev The sweeper account is the only authorized caller of\r\n      * this function. This function accepts an array of addresses to have their\r\n      * balances transferred for gas efficiency purposes.\r\n      * NOTE: any address for an account that has not been previously enabled\r\n      * will be ignored.\r\n      * NOTE: transfers to the zero address are disallowed.\r\n      *\r\n      * @param  _froms  The addresses to have their balances swept.\r\n      * @param  _to  The destination address of all these transfers.\r\n      */\r\n    function replaySweep(address[] _froms, address _to) public onlySweeper {\r\n        require(_to != address(0));\r\n        uint256 lenFroms = _froms.length;\r\n        uint256 sweptBalance = 0;\r\n\r\n        for (uint256 i=0; i<lenFroms; ++i) {\r\n            address from = _froms[i];\r\n\r\n            if (sweptSet[from]) {\r\n                uint256 fromBalance = erc20Store.balances(from);\r\n\r\n                if (fromBalance > 0) {\r\n                    sweptBalance += fromBalance;\r\n\r\n                    erc20Store.setBalance(from, 0);\r\n\r\n                    erc20Proxy.emitTransfer(from, _to, fromBalance);\r\n                }\r\n            }\r\n        }\r\n\r\n        if (sweptBalance > 0) {\r\n            erc20Store.addBalance(_to, sweptBalance);\r\n        }\r\n    }\r\n\r\n    /** @notice  Core logic of the ERC20 `transferFrom` function.\r\n      *\r\n      * @dev  This function can only be called by the referenced proxy,\r\n      * which has a `transferFrom` function.\r\n      * Every argument passed to that function as well as the original\r\n      * `msg.sender` gets passed to this function.\r\n      * NOTE: transfers to the zero address are disallowed.\r\n      *\r\n      * @param  _sender  The address initiating the transfer in proxy.\r\n      */\r\n    function transferFromWithSender(\r\n        address _sender,\r\n        address _from,\r\n        address _to,\r\n        uint256 _value\r\n    )\r\n        public\r\n        onlyProxy\r\n        returns (bool success)\r\n    {\r\n        require(_to != address(0)); // ensure burn is the cannonical transfer to 0x0\r\n\r\n        uint256 balanceOfFrom = erc20Store.balances(_from);\r\n        require(_value <= balanceOfFrom);\r\n\r\n        uint256 senderAllowance = erc20Store.allowed(_from, _sender);\r\n        require(_value <= senderAllowance);\r\n\r\n        erc20Store.setBalance(_from, balanceOfFrom - _value);\r\n        erc20Store.addBalance(_to, _value);\r\n\r\n        erc20Store.setAllowance(_from, _sender, senderAllowance - _value);\r\n\r\n        erc20Proxy.emitTransfer(_from, _to, _value);\r\n\r\n        return true;\r\n    }\r\n\r\n    /** @notice  Core logic of the ERC20 `transfer` function.\r\n      *\r\n      * @dev  This function can only be called by the referenced proxy,\r\n      * which has a `transfer` function.\r\n      * Every argument passed to that function as well as the original\r\n      * `msg.sender` gets passed to this function.\r\n      * NOTE: transfers to the zero address are disallowed.\r\n      *\r\n      * @param  _sender  The address initiating the transfer in proxy.\r\n      */\r\n    function transferWithSender(\r\n        address _sender,\r\n        address _to,\r\n        uint256 _value\r\n    )\r\n        public\r\n        onlyProxy\r\n        returns (bool success)\r\n    {\r\n        require(_to != address(0)); // ensure burn is the cannonical transfer to 0x0\r\n\r\n        uint256 balanceOfSender = erc20Store.balances(_sender);\r\n        require(_value <= balanceOfSender);\r\n\r\n        erc20Store.setBalance(_sender, balanceOfSender - _value);\r\n        erc20Store.addBalance(_to, _value);\r\n\r\n        erc20Proxy.emitTransfer(_sender, _to, _value);\r\n\r\n        return true;\r\n    }\r\n\r\n    // METHODS (ERC20 sub interface impl.)\r\n    /// @notice  Core logic of the ERC20 `totalSupply` function.\r\n    function totalSupply() public view returns (uint256) {\r\n        return erc20Store.totalSupply();\r\n    }\r\n\r\n    /// @notice  Core logic of the ERC20 `balanceOf` function.\r\n    function balanceOf(address _owner) public view returns (uint256 balance) {\r\n        return erc20Store.balances(_owner);\r\n    }\r\n\r\n    /// @notice  Core logic of the ERC20 `allowance` function.\r\n    function allowance(address _owner, address _spender) public view returns (uint256 remaining) {\r\n        return erc20Store.allowed(_owner, _spender);\r\n    }\r\n\r\n    // EVENTS\r\n    /// @dev  Emitted by successful `requestPrint` calls.\r\n    event PrintingLocked(bytes32 _lockId, address _receiver, uint256 _value);\r\n    /// @dev Emitted by successful `confirmPrint` calls.\r\n    event PrintingConfirmed(bytes32 _lockId, address _receiver, uint256 _value);\r\n}\r\n\r\n\r\n/** @title  ERC20 compliant token balance store.\r\n  *\r\n  * @notice  This contract serves as the store of balances, allowances, and\r\n  * supply for the ERC20 compliant token. No business logic exists here.\r\n  *\r\n  * @dev  This contract contains no business logic and instead\r\n  * is the final destination for any change in balances, allowances, or token\r\n  * supply. This contract is upgradeable in the sense that its custodian can\r\n  * update the `erc20Impl` address, thus redirecting the source of logic that\r\n  * determines how the balances will be updated.\r\n  *\r\n  * @author  Gemini Trust Company, LLC\r\n  */\r\ncontract ERC20Store is ERC20ImplUpgradeable {\r\n\r\n    // MEMBERS\r\n    /// @dev  The total token supply.\r\n    uint256 public totalSupply;\r\n\r\n    /// @dev  The mapping of balances.\r\n    mapping (address => uint256) public balances;\r\n\r\n    /// @dev  The mapping of allowances.\r\n    mapping (address => mapping (address => uint256)) public allowed;\r\n\r\n    // CONSTRUCTOR\r\n    function ERC20Store(address _custodian) ERC20ImplUpgradeable(_custodian) public {\r\n        totalSupply = 0;\r\n    }\r\n\r\n\r\n    // PUBLIC FUNCTIONS\r\n    // (ERC20 Ledger)\r\n\r\n    /** @notice  The function to set the total supply of tokens.\r\n      *\r\n      * @dev  Intended for use by token implementation functions\r\n      * that update the total supply. The only authorized caller\r\n      * is the active implementation.\r\n      *\r\n      * @param _newTotalSupply the value to set as the new total supply\r\n      */\r\n    function setTotalSupply(\r\n        uint256 _newTotalSupply\r\n    )\r\n        public\r\n        onlyImpl\r\n    {\r\n        totalSupply = _newTotalSupply;\r\n    }\r\n\r\n    /** @notice  Sets how much `_owner` allows `_spender` to transfer on behalf\r\n      * of `_owner`.\r\n      *\r\n      * @dev  Intended for use by token implementation functions\r\n      * that update spending allowances. The only authorized caller\r\n      * is the active implementation.\r\n      *\r\n      * @param  _owner  The account that will allow an on-behalf-of spend.\r\n      * @param  _spender  The account that will spend on behalf of the owner.\r\n      * @param  _value  The limit of what can be spent.\r\n      */\r\n    function setAllowance(\r\n        address _owner,\r\n        address _spender,\r\n        uint256 _value\r\n    )\r\n        public\r\n        onlyImpl\r\n    {\r\n        allowed[_owner][_spender] = _value;\r\n    }\r\n\r\n    /** @notice  Sets the balance of `_owner` to `_newBalance`.\r\n      *\r\n      * @dev  Intended for use by token implementation functions\r\n      * that update balances. The only authorized caller\r\n      * is the active implementation.\r\n      *\r\n      * @param  _owner  The account that will hold a new balance.\r\n      * @param  _newBalance  The balance to set.\r\n      */\r\n    function setBalance(\r\n        address _owner,\r\n        uint256 _newBalance\r\n    )\r\n        public\r\n        onlyImpl\r\n    {\r\n        balances[_owner] = _newBalance;\r\n    }\r\n\r\n    /** @notice Adds `_balanceIncrease` to `_owner`'s balance.\r\n      *\r\n      * @dev  Intended for use by token implementation functions\r\n      * that update balances. The only authorized caller\r\n      * is the active implementation.\r\n      * WARNING: the caller is responsible for preventing overflow.\r\n      *\r\n      * @param  _owner  The account that will hold a new balance.\r\n      * @param  _balanceIncrease  The balance to add.\r\n      */\r\n    function addBalance(\r\n        address _owner,\r\n        uint256 _balanceIncrease\r\n    )\r\n        public\r\n        onlyImpl\r\n    {\r\n        balances[_owner] = balances[_owner] + _balanceIncrease;\r\n    }\r\n}","deployed_bytecode":"0x60606040526004361061012f5763ffffffff60e060020a60003504166304ff7d3f811461013457806315b210821461016c57806318160ddd1461019d5780632e0179b5146101b0578063375b74c3146101ec578063380ba30c1461021b5780633a8343ee1461023357806342966c68146102495780635d5e22cd1461025f57806361e1077d1461028d57806370a08231146102b55780637f555b03146102d457806388d695b2146102e757806389064fd2146103765780639189a59e1461039e578063b7279ca6146103b1578063be23d2911461048b578063cb81fecf146104ad578063cf6e4488146104c0578063dd62ed3e146104d6578063de5007ff146104fb578063dfe0f0ca1461050e578063ea5fbfd514610536578063eb55b2a314610555578063f602c312146105af575b600080fd5b341561013f57600080fd5b61014a6004356105c2565b604051600160a060020a03909216825260208201526040908101905180910390f35b341561017757600080fd5b61018b600160a060020a03600435166105e7565b60405190815260200160405180910390f35b34156101a857600080fd5b61018b6106ac565b34156101bb57600080fd5b6101d8600160a060020a0360043581169060243516604435610709565b604051901515815260200160405180910390f35b34156101f757600080fd5b6101ff6108b4565b604051600160a060020a03909116815260200160405180910390f35b341561022657600080fd5b6102316004356108c3565b005b341561023e57600080fd5b610231600435610b37565b341561025457600080fd5b6101d8600435610be8565b341561026a57600080fd5b6101d8600160a060020a0360043581169060243581169060443516606435610ded565b341561029857600080fd5b6101d8600160a060020a03600435811690602435166044356110dc565b34156102c057600080fd5b61018b600160a060020a0360043516611194565b34156102df57600080fd5b6101ff611203565b34156102f257600080fd5b6101d860046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061121295505050505050565b341561038157600080fd5b6101d8600160a060020a036004358116906024351660443561146e565b34156103a957600080fd5b6101ff611592565b34156103bc57600080fd5b6102316004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965050509235600160a060020a031692506115a1915050565b341561049657600080fd5b61018b600160a060020a03600435166024356118b8565b34156104b857600080fd5b61018b61198f565b34156104cb57600080fd5b6101ff600435611995565b34156104e157600080fd5b61018b600160a060020a03600435811690602435166119b0565b341561050657600080fd5b61018b611a28565b341561051957600080fd5b6101d8600160a060020a0360043581169060243516604435611a2e565b341561054157600080fd5b6101d8600160a060020a0360043516611c26565b341561056057600080fd5b610231600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965050509235600160a060020a03169250611c3b915050565b34156105ba57600080fd5b6101ff611e9a565b60086020526000908152604090208054600190910154600160a060020a039091169082565b6000600160a060020a03821615156105fe57600080fd5b610606611ea9565b905060206040519081016040908152600160a060020a038416825260008381526002602052208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116179055507fd76fc900a7e1a6fcf11d54b7ba943918df6c53a3128140658c389b3da1e997ba813384604051928352600160a060020a039182166020840152166040808301919091526060909101905180910390a1919050565b600454600090600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156106ee57600080fd5b5af115156106fb57600080fd5b505050604051805191505090565b6003546000908190819033600160a060020a0390811691161461072b57600080fd5b600160a060020a038516151561074057600080fd5b600454600160a060020a0316635c658165878760405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561079857600080fd5b5af115156107a557600080fd5b505050604051805192505050828101818110156107c157600080fd5b600454600160a060020a031663da46098c87878460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561082457600080fd5b5af1151561083157600080fd5b5050600354600160a060020a03169050635687f2b887878460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561089857600080fd5b5af115156108a557600080fd5b50600198975050505050505050565b600154600160a060020a031681565b600154600090819081908190819033600160a060020a039081169116146108e957600080fd5b60008681526008602052604090208054909550600160a060020a0316935083151561091357600080fd5b600180860154600088815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916815590930155600454909450600160a060020a0316906318160ddd90518163ffffffff1660e060020a028152600401602060405180830381600087803b151561098957600080fd5b5af1151561099657600080fd5b505050604051805192505050818101818110610b2f57600454600160a060020a031663f7ea7a3d8260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156109f457600080fd5b5af11515610a0157600080fd5b5050600454600160a060020a031690506321e5383a858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610a5b57600080fd5b5af11515610a6857600080fd5b5050507f1445852a2ef41b86fd81f90a02261a68635ceb02cdbc73f9c5f690af8288f360868585604051928352600160a060020a0390911660208301526040808301919091526060909101905180910390a1600354600160a060020a03166323de66516000868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515610b1e57600080fd5b5af11515610b2b57600080fd5b5050505b505050505050565b60015433600160a060020a03908116911614610b5257600080fd5b610b5b81611ef7565b60018054600160a060020a0392831673ffffffffffffffffffffffffffffffffffffffff1991821617825560008481526002602052604090819020805490921690915590547f9a99272c0f6b7a30ef9e76e684a7cd408bfd4f11a72f36a8e276253c920e442d92849291169051918252600160a060020a031660208201526040908101905180910390a150565b6004546000908190600160a060020a03166327e235e33360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610c3d57600080fd5b5af11515610c4a57600080fd5b505050604051805191505080831115610c6257600080fd5b600454600160a060020a031663e30443bc3385840360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610cba57600080fd5b5af11515610cc757600080fd5b5050600454600160a060020a0316905063f7ea7a3d84826318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d1157600080fd5b5af11515610d1e57600080fd5b505050604051805190500360405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610d5f57600080fd5b5af11515610d6c57600080fd5b5050600354600160a060020a031690506323de66513360008660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515610dd457600080fd5b5af11515610de157600080fd5b50600195945050505050565b6003546000908190819033600160a060020a03908116911614610e0f57600080fd5b600160a060020a0385161515610e2457600080fd5b600454600160a060020a03166327e235e38760405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610e7457600080fd5b5af11515610e8157600080fd5b505050604051805192505081841115610e9957600080fd5b600454600160a060020a0316635c658165878960405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515610ef157600080fd5b5af11515610efe57600080fd5b505050604051805191505080841115610f1657600080fd5b600454600160a060020a031663e30443bc8786850360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610f6e57600080fd5b5af11515610f7b57600080fd5b5050600454600160a060020a031690506321e5383a868660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610fd557600080fd5b5af11515610fe257600080fd5b5050600454600160a060020a0316905063da46098c878987850360405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561104b57600080fd5b5af1151561105857600080fd5b5050600354600160a060020a031690506323de665187878760405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156110bf57600080fd5b5af115156110cc57600080fd5b5060019998505050505050505050565b6003546000908190819033600160a060020a039081169116146110fe57600080fd5b600160a060020a038516151561111357600080fd5b600454600160a060020a0316635c658165878760405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561116b57600080fd5b5af1151561117857600080fd5b505050604051805192505050828103818111156107c157600080fd5b600454600090600160a060020a03166327e235e38360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156111e757600080fd5b5af115156111f457600080fd5b50505060405180519392505050565b600354600160a060020a031681565b600080600080600080865188511461122957600080fd5b8751600454909550600160a060020a03166327e235e33360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561127e57600080fd5b5af1151561128b57600080fd5b5050506040518051945060009350505b848310156113fa578783815181106112af57fe5b906020019060200201519150600160a060020a03821615156112d057600080fd5b8683815181106112dc57fe5b906020019060200201519050808410156112f557600080fd5b81600160a060020a031633600160a060020a031614151561137c576004549381900393600160a060020a03166321e5383a838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561136b57600080fd5b5af1151561137857600080fd5b5050505b600354600160a060020a03166323de665133848460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156113df57600080fd5b5af115156113ec57600080fd5b50506001909301925061129b565b600454600160a060020a031663e30443bc338660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561145057600080fd5b5af1151561145d57600080fd5b5060019a9950505050505050505050565b60035460009033600160a060020a0390811691161461148c57600080fd5b600160a060020a03831615156114a157600080fd5b600454600160a060020a031663da46098c85858560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561150457600080fd5b5af1151561151157600080fd5b5050600354600160a060020a03169050635687f2b885858560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561157857600080fd5b5af1151561158557600080fd5b5060019695505050505050565b600554600160a060020a031681565b600554600090819081908190819033600160a060020a039081169116146115c757600080fd5b600160a060020a03861615156115dc57600080fd5b875189511480156115ee575086518951145b15156115f957600080fd5b8851945060009350600092505b8483101561183e5760016006548a858151811061161f57fe5b906020019060200201518a868151811061163557fe5b906020019060200201518a878151811061164b57fe5b906020019060200201516040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af115156116a757600080fd5b5050602060405103519150600160a060020a0382161561183357600160a060020a0380831660009081526007602052604090819020805460ff19166001179055600454909116906327e235e39084905160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561173257600080fd5b5af1151561173f57600080fd5b505050604051805191505060008111156118335760045493810193600160a060020a031663e30443bc83600060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156117ae57600080fd5b5af115156117bb57600080fd5b5050600354600160a060020a031690506323de665183888460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561182257600080fd5b5af1151561182f57600080fd5b5050505b826001019250611606565b6000841115610b2b57600454600160a060020a03166321e5383a878660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561189d57600080fd5b5af115156118aa57600080fd5b505050505050505050505050565b6000600160a060020a03831615156118cf57600080fd5b6118d7611ea9565b9050604080519081016040908152600160a060020a0385168252602080830185905260008481526008909152208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151600190910155507f021724c3943709b5b29b9cdcfb21e18e7355b036e07d869b4a69bd8a13ec45e8818484604051928352600160a060020a0390911660208301526040808301919091526060909101905180910390a192915050565b60005481565b600260205260009081526040902054600160a060020a031681565b600454600090600160a060020a0316635c658165848460405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515611a0b57600080fd5b5af11515611a1857600080fd5b5050506040518051949350505050565b60065481565b600354600090819033600160a060020a03908116911614611a4e57600080fd5b600160a060020a0384161515611a6357600080fd5b600454600160a060020a03166327e235e38660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611ab357600080fd5b5af11515611ac057600080fd5b505050604051805191505080831115611ad857600080fd5b600454600160a060020a031663e30443bc8685840360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611b3057600080fd5b5af11515611b3d57600080fd5b5050600454600160a060020a031690506321e5383a858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611b9757600080fd5b5af11515611ba457600080fd5b5050600354600160a060020a031690506323de665186868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515611c0b57600080fd5b5af11515611c1857600080fd5b506001979650505050505050565b60076020526000908152604090205460ff1681565b600554600090819081908190819033600160a060020a03908116911614611c6157600080fd5b600160a060020a0386161515611c7657600080fd5b8651945060009350600092505b84831015611e2157868381518110611c9757fe5b90602001906020020151600160a060020a03811660009081526007602052604090205490925060ff1615611e1657600454600160a060020a03166327e235e38360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611d1557600080fd5b5af11515611d2257600080fd5b50505060405180519150506000811115611e165760045493810193600160a060020a031663e30443bc83600060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611d9157600080fd5b5af11515611d9e57600080fd5b5050600354600160a060020a031690506323de665183888460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515611e0557600080fd5b5af11515611e1257600080fd5b5050505b826001019250611c83565b6000841115611e9157600454600160a060020a03166321e5383a878660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611e8057600080fd5b5af11515611e8d57600080fd5b5050505b50505050505050565b600454600160a060020a031681565b60008054600101808255600019430140903090604051928352600160a060020a03919091166c0100000000000000000000000002602083015260348201526054016040518091039020905090565b60008181526002602052604081208054600160a060020a03161515611f1b57600080fd5b54600160a060020a0316929150505600a165627a7a72305820bb3d79ad80497ce403b23be2406a462aecf8911032b9bc5d433691332b9b2e810029","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"libraries":{},"optimizer":{"enabled":true},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"optimization_runs":null,"sourcify_repo_url":null,"decoded_constructor_args":[["0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd",{"name":"_erc20Proxy","type":"address"}],["0xc42B14e49744538e3C239f8ae48A1Eaaf35e68a0",{"name":"_erc20Store","type":"address"}],["0xdFfC66191bAf5047866033d2Fe400907Af4038a8",{"name":"_custodian","type":"address"}],["0xd24400ae8BfEBb18cA49Be86258a3C749cf46853",{"name":"_sweeper","type":"address"}]],"compiler_version":"v0.4.21+commit.dfe3193c","is_verified_via_verifier_alliance":false,"verified_at":"2019-04-19T04:08:34.896565Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6060604052341561000f57600080fd5b60405160808061206a833981016040528080519190602001805191906020018051919060200180516000805560018054600160a060020a031916600160a060020a038681169190911790915590925082161515905061006d57600080fd5b60038054600160a060020a03808716600160a060020a03199283161790925560048054868416908316179055600580549284169290911691909117905530604051600160a060020a03919091166c010000000000000000000000000281527f7377656570000000000000000000000000000000000000000000000000000000601482015260190160405190819003902060065550505050611f57806101136000396000f30060606040526004361061012f5763ffffffff60e060020a60003504166304ff7d3f811461013457806315b210821461016c57806318160ddd1461019d5780632e0179b5146101b0578063375b74c3146101ec578063380ba30c1461021b5780633a8343ee1461023357806342966c68146102495780635d5e22cd1461025f57806361e1077d1461028d57806370a08231146102b55780637f555b03146102d457806388d695b2146102e757806389064fd2146103765780639189a59e1461039e578063b7279ca6146103b1578063be23d2911461048b578063cb81fecf146104ad578063cf6e4488146104c0578063dd62ed3e146104d6578063de5007ff146104fb578063dfe0f0ca1461050e578063ea5fbfd514610536578063eb55b2a314610555578063f602c312146105af575b600080fd5b341561013f57600080fd5b61014a6004356105c2565b604051600160a060020a03909216825260208201526040908101905180910390f35b341561017757600080fd5b61018b600160a060020a03600435166105e7565b60405190815260200160405180910390f35b34156101a857600080fd5b61018b6106ac565b34156101bb57600080fd5b6101d8600160a060020a0360043581169060243516604435610709565b604051901515815260200160405180910390f35b34156101f757600080fd5b6101ff6108b4565b604051600160a060020a03909116815260200160405180910390f35b341561022657600080fd5b6102316004356108c3565b005b341561023e57600080fd5b610231600435610b37565b341561025457600080fd5b6101d8600435610be8565b341561026a57600080fd5b6101d8600160a060020a0360043581169060243581169060443516606435610ded565b341561029857600080fd5b6101d8600160a060020a03600435811690602435166044356110dc565b34156102c057600080fd5b61018b600160a060020a0360043516611194565b34156102df57600080fd5b6101ff611203565b34156102f257600080fd5b6101d860046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061121295505050505050565b341561038157600080fd5b6101d8600160a060020a036004358116906024351660443561146e565b34156103a957600080fd5b6101ff611592565b34156103bc57600080fd5b6102316004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965050509235600160a060020a031692506115a1915050565b341561049657600080fd5b61018b600160a060020a03600435166024356118b8565b34156104b857600080fd5b61018b61198f565b34156104cb57600080fd5b6101ff600435611995565b34156104e157600080fd5b61018b600160a060020a03600435811690602435166119b0565b341561050657600080fd5b61018b611a28565b341561051957600080fd5b6101d8600160a060020a0360043581169060243516604435611a2e565b341561054157600080fd5b6101d8600160a060020a0360043516611c26565b341561056057600080fd5b610231600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965050509235600160a060020a03169250611c3b915050565b34156105ba57600080fd5b6101ff611e9a565b60086020526000908152604090208054600190910154600160a060020a039091169082565b6000600160a060020a03821615156105fe57600080fd5b610606611ea9565b905060206040519081016040908152600160a060020a038416825260008381526002602052208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116179055507fd76fc900a7e1a6fcf11d54b7ba943918df6c53a3128140658c389b3da1e997ba813384604051928352600160a060020a039182166020840152166040808301919091526060909101905180910390a1919050565b600454600090600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156106ee57600080fd5b5af115156106fb57600080fd5b505050604051805191505090565b6003546000908190819033600160a060020a0390811691161461072b57600080fd5b600160a060020a038516151561074057600080fd5b600454600160a060020a0316635c658165878760405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561079857600080fd5b5af115156107a557600080fd5b505050604051805192505050828101818110156107c157600080fd5b600454600160a060020a031663da46098c87878460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561082457600080fd5b5af1151561083157600080fd5b5050600354600160a060020a03169050635687f2b887878460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561089857600080fd5b5af115156108a557600080fd5b50600198975050505050505050565b600154600160a060020a031681565b600154600090819081908190819033600160a060020a039081169116146108e957600080fd5b60008681526008602052604090208054909550600160a060020a0316935083151561091357600080fd5b600180860154600088815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916815590930155600454909450600160a060020a0316906318160ddd90518163ffffffff1660e060020a028152600401602060405180830381600087803b151561098957600080fd5b5af1151561099657600080fd5b505050604051805192505050818101818110610b2f57600454600160a060020a031663f7ea7a3d8260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156109f457600080fd5b5af11515610a0157600080fd5b5050600454600160a060020a031690506321e5383a858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610a5b57600080fd5b5af11515610a6857600080fd5b5050507f1445852a2ef41b86fd81f90a02261a68635ceb02cdbc73f9c5f690af8288f360868585604051928352600160a060020a0390911660208301526040808301919091526060909101905180910390a1600354600160a060020a03166323de66516000868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515610b1e57600080fd5b5af11515610b2b57600080fd5b5050505b505050505050565b60015433600160a060020a03908116911614610b5257600080fd5b610b5b81611ef7565b60018054600160a060020a0392831673ffffffffffffffffffffffffffffffffffffffff1991821617825560008481526002602052604090819020805490921690915590547f9a99272c0f6b7a30ef9e76e684a7cd408bfd4f11a72f36a8e276253c920e442d92849291169051918252600160a060020a031660208201526040908101905180910390a150565b6004546000908190600160a060020a03166327e235e33360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610c3d57600080fd5b5af11515610c4a57600080fd5b505050604051805191505080831115610c6257600080fd5b600454600160a060020a031663e30443bc3385840360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610cba57600080fd5b5af11515610cc757600080fd5b5050600454600160a060020a0316905063f7ea7a3d84826318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d1157600080fd5b5af11515610d1e57600080fd5b505050604051805190500360405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610d5f57600080fd5b5af11515610d6c57600080fd5b5050600354600160a060020a031690506323de66513360008660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515610dd457600080fd5b5af11515610de157600080fd5b50600195945050505050565b6003546000908190819033600160a060020a03908116911614610e0f57600080fd5b600160a060020a0385161515610e2457600080fd5b600454600160a060020a03166327e235e38760405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610e7457600080fd5b5af11515610e8157600080fd5b505050604051805192505081841115610e9957600080fd5b600454600160a060020a0316635c658165878960405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515610ef157600080fd5b5af11515610efe57600080fd5b505050604051805191505080841115610f1657600080fd5b600454600160a060020a031663e30443bc8786850360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610f6e57600080fd5b5af11515610f7b57600080fd5b5050600454600160a060020a031690506321e5383a868660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610fd557600080fd5b5af11515610fe257600080fd5b5050600454600160a060020a0316905063da46098c878987850360405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561104b57600080fd5b5af1151561105857600080fd5b5050600354600160a060020a031690506323de665187878760405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156110bf57600080fd5b5af115156110cc57600080fd5b5060019998505050505050505050565b6003546000908190819033600160a060020a039081169116146110fe57600080fd5b600160a060020a038516151561111357600080fd5b600454600160a060020a0316635c658165878760405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561116b57600080fd5b5af1151561117857600080fd5b505050604051805192505050828103818111156107c157600080fd5b600454600090600160a060020a03166327e235e38360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156111e757600080fd5b5af115156111f457600080fd5b50505060405180519392505050565b600354600160a060020a031681565b600080600080600080865188511461122957600080fd5b8751600454909550600160a060020a03166327e235e33360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561127e57600080fd5b5af1151561128b57600080fd5b5050506040518051945060009350505b848310156113fa578783815181106112af57fe5b906020019060200201519150600160a060020a03821615156112d057600080fd5b8683815181106112dc57fe5b906020019060200201519050808410156112f557600080fd5b81600160a060020a031633600160a060020a031614151561137c576004549381900393600160a060020a03166321e5383a838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561136b57600080fd5b5af1151561137857600080fd5b5050505b600354600160a060020a03166323de665133848460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156113df57600080fd5b5af115156113ec57600080fd5b50506001909301925061129b565b600454600160a060020a031663e30443bc338660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561145057600080fd5b5af1151561145d57600080fd5b5060019a9950505050505050505050565b60035460009033600160a060020a0390811691161461148c57600080fd5b600160a060020a03831615156114a157600080fd5b600454600160a060020a031663da46098c85858560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561150457600080fd5b5af1151561151157600080fd5b5050600354600160a060020a03169050635687f2b885858560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561157857600080fd5b5af1151561158557600080fd5b5060019695505050505050565b600554600160a060020a031681565b600554600090819081908190819033600160a060020a039081169116146115c757600080fd5b600160a060020a03861615156115dc57600080fd5b875189511480156115ee575086518951145b15156115f957600080fd5b8851945060009350600092505b8483101561183e5760016006548a858151811061161f57fe5b906020019060200201518a868151811061163557fe5b906020019060200201518a878151811061164b57fe5b906020019060200201516040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af115156116a757600080fd5b5050602060405103519150600160a060020a0382161561183357600160a060020a0380831660009081526007602052604090819020805460ff19166001179055600454909116906327e235e39084905160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561173257600080fd5b5af1151561173f57600080fd5b505050604051805191505060008111156118335760045493810193600160a060020a031663e30443bc83600060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156117ae57600080fd5b5af115156117bb57600080fd5b5050600354600160a060020a031690506323de665183888460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561182257600080fd5b5af1151561182f57600080fd5b5050505b826001019250611606565b6000841115610b2b57600454600160a060020a03166321e5383a878660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561189d57600080fd5b5af115156118aa57600080fd5b505050505050505050505050565b6000600160a060020a03831615156118cf57600080fd5b6118d7611ea9565b9050604080519081016040908152600160a060020a0385168252602080830185905260008481526008909152208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151600190910155507f021724c3943709b5b29b9cdcfb21e18e7355b036e07d869b4a69bd8a13ec45e8818484604051928352600160a060020a0390911660208301526040808301919091526060909101905180910390a192915050565b60005481565b600260205260009081526040902054600160a060020a031681565b600454600090600160a060020a0316635c658165848460405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515611a0b57600080fd5b5af11515611a1857600080fd5b5050506040518051949350505050565b60065481565b600354600090819033600160a060020a03908116911614611a4e57600080fd5b600160a060020a0384161515611a6357600080fd5b600454600160a060020a03166327e235e38660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611ab357600080fd5b5af11515611ac057600080fd5b505050604051805191505080831115611ad857600080fd5b600454600160a060020a031663e30443bc8685840360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611b3057600080fd5b5af11515611b3d57600080fd5b5050600454600160a060020a031690506321e5383a858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611b9757600080fd5b5af11515611ba457600080fd5b5050600354600160a060020a031690506323de665186868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515611c0b57600080fd5b5af11515611c1857600080fd5b506001979650505050505050565b60076020526000908152604090205460ff1681565b600554600090819081908190819033600160a060020a03908116911614611c6157600080fd5b600160a060020a0386161515611c7657600080fd5b8651945060009350600092505b84831015611e2157868381518110611c9757fe5b90602001906020020151600160a060020a03811660009081526007602052604090205490925060ff1615611e1657600454600160a060020a03166327e235e38360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611d1557600080fd5b5af11515611d2257600080fd5b50505060405180519150506000811115611e165760045493810193600160a060020a031663e30443bc83600060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611d9157600080fd5b5af11515611d9e57600080fd5b5050600354600160a060020a031690506323de665183888460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515611e0557600080fd5b5af11515611e1257600080fd5b5050505b826001019250611c83565b6000841115611e9157600454600160a060020a03166321e5383a878660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515611e8057600080fd5b5af11515611e8d57600080fd5b5050505b50505050505050565b600454600160a060020a031681565b60008054600101808255600019430140903090604051928352600160a060020a03919091166c0100000000000000000000000002602083015260348201526054016040518091039020905090565b60008181526002602052604081208054600160a060020a03161515611f1b57600080fd5b54600160a060020a0316929150505600a165627a7a72305820bb3d79ad80497ce403b23be2406a462aecf8911032b9bc5d433691332b9b2e810029000000000000000000000000056fd409e1d7a124bd7017459dfea2f387b6d5cd000000000000000000000000c42b14e49744538e3c239f8ae48a1eaaf35e68a0000000000000000000000000dffc66191baf5047866033d2fe400907af4038a8000000000000000000000000d24400ae8bfebb18ca49be86258a3c749cf46853","name":"ERC20Impl","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"default","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[],"certified":false,"conflicting_implementations":null,"abi":[{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"pendingPrintMap","outputs":[{"name":"receiver","type":"address"},{"name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposedCustodian","type":"address"}],"name":"requestCustodianChange","outputs":[{"name":"lockId","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApprovalWithSender","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"custodian","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lockId","type":"bytes32"}],"name":"confirmPrint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_lockId","type":"bytes32"}],"name":"confirmCustodianChange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFromWithSender","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApprovalWithSender","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"erc20Proxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tos","type":"address[]"},{"name":"_values","type":"uint256[]"}],"name":"batchTransfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approveWithSender","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sweeper","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_vs","type":"uint8[]"},{"name":"_rs","type":"bytes32[]"},{"name":"_ss","type":"bytes32[]"},{"name":"_to","type":"address"}],"name":"enableSweep","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_value","type":"uint256"}],"name":"requestPrint","outputs":[{"name":"lockId","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lockRequestCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"custodianChangeReqs","outputs":[{"name":"proposedNew","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sweepMsg","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferWithSender","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"sweptSet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_froms","type":"address[]"},{"name":"_to","type":"address"}],"name":"replaySweep","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"erc20Store","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_erc20Proxy","type":"address"},{"name":"_erc20Store","type":"address"},{"name":"_custodian","type":"address"},{"name":"_sweeper","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_lockId","type":"bytes32"},{"indexed":false,"name":"_receiver","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"PrintingLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_lockId","type":"bytes32"},{"indexed":false,"name":"_receiver","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"PrintingConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_lockId","type":"bytes32"},{"indexed":false,"name":"_msgSender","type":"address"},{"indexed":false,"name":"_proposedCustodian","type":"address"}],"name":"CustodianChangeRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_lockId","type":"bytes32"},{"indexed":false,"name":"_newCustodian","type":"address"}],"name":"CustodianChangeConfirmed","type":"event"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"000000000000000000000000056fd409e1d7a124bd7017459dfea2f387b6d5cd000000000000000000000000c42b14e49744538e3c239f8ae48a1eaaf35e68a0000000000000000000000000dffc66191baf5047866033d2fe400907af4038a8000000000000000000000000d24400ae8bfebb18ca49be86258a3c749cf46853"}