Contract 0xb6ce0973617bb745128ba7be77e208a12cdbd409

Contract Overview

Balance:
0 Ether
TxHash Block Age From To Value [TxFee]
0xa914bcedd4360cf56713e821ea1613670c2603c289f5b483a88a61cb41b088f71040764530 days 8 hrs ago0xa8b28c3363a1aca832889ed39f6b6bd1805719f3 IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000366552
0x2285a1120796b7246e7f056341130dae0706a920034ef0bd378e21357210c9ee1039710731 days 20 hrs ago0x34c1c3405cd216c10da49308fbacdb230cb2a824 IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000274914
0x57a3dfd57751461a79615760b0d21e743905a68f59f261701b92fd08c7d9691f1035332538 days 43 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000229095
0x0c4f0dce13049c8f6d156806768a5f8e7de76464662e66427238e8bdae259cb41035328438 days 51 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.001079868
0x073bbe8d8eb6916a04a71dcabb6921493cfe010af90cda92e6f0dd4c23fa46dd1035328238 days 51 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000366552
0x6a260c8b4d7c6eacb0ca59b7a7ecdc4e567a2fcc45491a1b93e36745dd3ce6e61035325738 days 57 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000809901
0xbc3bd8b7fd7a7516cb8bda889cb618b78db24d0bb0cf4b5d302e494cf22466d71035325538 days 57 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000274914
0x0028d504b25f5d8fb254157c7dc41f93a392d998c22a589e9acba23bf1f9f0fa1035316738 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.0017007921
0x1de30a1abb83f7b2c0f2f1f154ff0b122926536701d238df2c5e201ae4c1fe001035316538 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.0005773194
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.0078492834
0x2629c8acbf4c60eda383c203569fb7a2929f6afef0f8cbac65f100f9cb5df41a1035314638 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.0005773194
0x45e1136b24747ff467e5bce2cc1e70198b507c923d13ac7a857f8a920d6b28cf1035306238 days 1 hr ago0x1ba25b7de5a0cd678d8f29365463aa59b545b815 IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.00045819
0xd6306bd92b8aa9cc582ac9a6119d461040274c2ff151b848e973a070dd0de9921035147638 days 6 hrs ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.002218035
0x9d019367ebf3e96b876b310e5bfb881925e7db0050d4935d6ae9d509c01362541035145938 days 7 hrs ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.006260235
0xbf8573cda2ef4227948b0e050a612befde1c0337e2ddcd6aa4c25ac2ed72fd841034644638 days 23 hrs ago0xa90a55af4f5c76c9e6c3d22a8dec7d6de0fb1388 IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000229095
0x1bfe4a2730f4f0e98ae59bffbb2d9524d202034f3912f0570ce288a7b01a18bd1034615739 days 49 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000063127
0x08c64e4a41763a0655eb9848290cc429bc39b97c16a3a7796a3be9d3fed63c8c1034611039 days 58 mins ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000229095
0x742109a32b632efb957c863a53ddd45b9ebb872b76da6faecd8a3f713b71f0211034610239 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000089989
0xcd2a2958c92cf65d1feba87cab970cfe7897a8c253b3234b181498dd3b32dad81034609739 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000274914
0x57abe1ca52675d955e9ee7001deafbbe91722309835eccf9d560e831f3471ca81034605439 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000809901
0x3127f1ac2db803ee4e3f753b0efeda7360bc6eeb0e9952154e58176c52de12331034605139 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000274914
0x0eed891eed78776d857e3cee2a85aa4c1be3cbee639616213aca0f4d36b2e27e1034598539 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000089989
0x2113d3d51ca308130b6c1be22bd185b5236ee710dd0ab6f3045f33cd58a4badd1034596639 days 1 hr ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000229095
0x7253ba0019160250c2cee9b7e108728af6aff73b83e11a7041a43aa321ad6f8f1034576839 days 2 hrs ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000089989
0xe35eaca91bbc9688db1c3dd124fe4cf7d65d1ce51a36e75323d35ab7c1da5cb51034575339 days 2 hrs ago0x617926e22180b37c7a1fae5ec75e6aa72db45d8e IN  0xb6ce0973617bb745128ba7be77e208a12cdbd4090 Ether0.000091638
[ Download CSV Export 

Latest 25 internal transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xa914bcedd4360cf56713e821ea1613670c2603c289f5b483a88a61cb41b088f71040764530 days 8 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x2285a1120796b7246e7f056341130dae0706a920034ef0bd378e21357210c9ee1039710731 days 20 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x57a3dfd57751461a79615760b0d21e743905a68f59f261701b92fd08c7d9691f1035332538 days 43 mins ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c4f0dce13049c8f6d156806768a5f8e7de76464662e66427238e8bdae259cb41035328438 days 51 mins ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x073bbe8d8eb6916a04a71dcabb6921493cfe010af90cda92e6f0dd4c23fa46dd1035328238 days 51 mins ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x6a260c8b4d7c6eacb0ca59b7a7ecdc4e567a2fcc45491a1b93e36745dd3ce6e61035325738 days 57 mins ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0xbc3bd8b7fd7a7516cb8bda889cb618b78db24d0bb0cf4b5d302e494cf22466d71035325538 days 57 mins ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0028d504b25f5d8fb254157c7dc41f93a392d998c22a589e9acba23bf1f9f0fa1035316738 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x1de30a1abb83f7b2c0f2f1f154ff0b122926536701d238df2c5e201ae4c1fe001035316538 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xc4375b7de8af5a38a93548eb8453a498222c4ff20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xf4d791139ce033ad35db2b2201435fad668b1b640 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x742ed299262fd132fd1058af445d89c3b0e6fbf75a9b4da191a85ffdfbd6b9441035316238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x2629c8acbf4c60eda383c203569fb7a2929f6afef0f8cbac65f100f9cb5df41a1035314638 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x45e1136b24747ff467e5bce2cc1e70198b507c923d13ac7a857f8a920d6b28cf1035306238 days 1 hr ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0xd6306bd92b8aa9cc582ac9a6119d461040274c2ff151b848e973a070dd0de9921035147638 days 6 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xc4375b7de8af5a38a93548eb8453a498222c4ff20 Ether
0xd6306bd92b8aa9cc582ac9a6119d461040274c2ff151b848e973a070dd0de9921035147638 days 6 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x9d019367ebf3e96b876b310e5bfb881925e7db0050d4935d6ae9d509c01362541035145938 days 7 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xc4375b7de8af5a38a93548eb8453a498222c4ff20 Ether
0x9d019367ebf3e96b876b310e5bfb881925e7db0050d4935d6ae9d509c01362541035145938 days 7 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x9d019367ebf3e96b876b310e5bfb881925e7db0050d4935d6ae9d509c01362541035145938 days 7 hrs ago0xb6ce0973617bb745128ba7be77e208a12cdbd4090xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
[ Download CSV Export 

Contract Source Code Verified (Exact Match)

Contract Name:
MakerDaoGateway

Compiler Version
v0.5.0+commit.1d4f565a

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

pragma solidity 0.5.0;

// File: openzeppelin-solidity/contracts/access/Roles.sol

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev give an account access to this role
     */
    function add(Role storage role, address account) internal {
        require(account != address(0));
        require(!has(role, account));

        role.bearer[account] = true;
    }

    /**
     * @dev remove an account's access to this role
     */
    function remove(Role storage role, address account) internal {
        require(account != address(0));
        require(has(role, account));

        role.bearer[account] = false;
    }

    /**
     * @dev check if an account has this role
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0));
        return role.bearer[account];
    }
}

// File: openzeppelin-solidity/contracts/access/roles/PauserRole.sol

contract PauserRole {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    constructor () internal {
        _addPauser(msg.sender);
    }

    modifier onlyPauser() {
        require(isPauser(msg.sender));
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(msg.sender);
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }
}

// File: openzeppelin-solidity/contracts/lifecycle/Pausable.sol

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is PauserRole {
    event Paused(address account);
    event Unpaused(address account);

    bool private _paused;

    constructor () internal {
        _paused = false;
    }

    /**
     * @return true if the contract is paused, false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!_paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(_paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: lib/ds-math/src/math.sol

/// math.sol -- mixin for inline numerical wizardry

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity >0.4.13;

contract DSMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, "ds-math-add-overflow");
    }
    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, "ds-math-sub-underflow");
    }
    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow");
    }

    function min(uint x, uint y) internal pure returns (uint z) {
        return x <= y ? x : y;
    }
    function max(uint x, uint y) internal pure returns (uint z) {
        return x >= y ? x : y;
    }
    function imin(int x, int y) internal pure returns (int z) {
        return x <= y ? x : y;
    }
    function imax(int x, int y) internal pure returns (int z) {
        return x >= y ? x : y;
    }

    uint constant WAD = 10 ** 18;
    uint constant RAY = 10 ** 27;

    function wmul(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, y), WAD / 2) / WAD;
    }
    function rmul(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, y), RAY / 2) / RAY;
    }
    function wdiv(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, WAD), y / 2) / y;
    }
    function rdiv(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, RAY), y / 2) / y;
    }

    // This famous algorithm is called "exponentiation by squaring"
    // and calculates x^n with x as fixed-point and n as regular unsigned.
    //
    // It's O(log n), instead of O(n) for naive repeated multiplication.
    //
    // These facts are why it works:
    //
    //  If n is even, then x^n = (x^2)^(n/2).
    //  If n is odd,  then x^n = x * x^(n-1),
    //   and applying the equation for even x gives
    //    x^n = x * (x^2)^((n-1) / 2).
    //
    //  Also, EVM division is flooring and
    //    floor[(n-1) / 2] = floor[n / 2].
    //
    function rpow(uint x, uint n) internal pure returns (uint z) {
        z = n % 2 != 0 ? x : RAY;

        for (n /= 2; n != 0; n /= 2) {
            x = rmul(x, x);

            if (n % 2 != 0) {
                z = rmul(z, x);
            }
        }
    }
}

// File: contracts/interfaces/IWrappedEther.sol

contract IWrappedEther is IERC20 {
    function deposit() external payable;
    function withdraw(uint amount) external;
}

// File: contracts/interfaces/ISaiTub.sol

interface DSValue {
    function peek() external view returns (bytes32, bool);
}

interface ISaiTub {
    function sai() external view returns (IERC20);  // Stablecoin
    function sin() external view returns (IERC20);  // Debt (negative sai)
    function skr() external view returns (IERC20);  // Abstracted collateral
    function gem() external view returns (IWrappedEther);  // Underlying collateral
    function gov() external view returns (IERC20);  // Governance token

    function open() external returns (bytes32 cup);
    function join(uint wad) external;
    function exit(uint wad) external;
    function give(bytes32 cup, address guy) external;
    function lock(bytes32 cup, uint wad) external;
    function free(bytes32 cup, uint wad) external;
    function draw(bytes32 cup, uint wad) external;
    function wipe(bytes32 cup, uint wad) external;
    function shut(bytes32 cup) external;
    function per() external view returns (uint ray);
    function lad(bytes32 cup) external view returns (address);
    
    function tab(bytes32 cup) external returns (uint);
    function rap(bytes32 cup) external returns (uint);
    function ink(bytes32 cup) external view returns (uint);
    function mat() external view returns (uint);    // Liquidation ratio
    function fee() external view returns (uint);    // Governance fee
    function pep() external view returns (DSValue); // Governance price feed
    function cap() external view returns (uint); // Debt ceiling
    

    function cups(bytes32) external view returns (address, uint, uint, uint);
}

// File: contracts/interfaces/IDex.sol

interface IDex {
    function getPayAmount(IERC20 pay_gem, IERC20 buy_gem, uint buy_amt) external view returns (uint);
    function buyAllAmount(IERC20 buy_gem, uint buy_amt, IERC20 pay_gem, uint max_fill_amount) external returns (uint);
    function offer(
        uint pay_amt,    //maker (ask) sell how much
        IERC20 pay_gem,   //maker (ask) sell which token
        uint buy_amt,    //maker (ask) buy how much
        IERC20 buy_gem,   //maker (ask) buy which token
        uint pos         //position to insert offer, 0 should be used if unknown
    )
    external
    returns (uint);
}

// File: contracts/ArrayUtils.sol

library ArrayUtils {
    function removeElement(bytes32[] storage array, uint index) internal {
        if (index >= array.length) return;

        for (uint i = index; i < array.length - 1; i++) {
            array[i] = array[i + 1];
        }
        delete array[array.length - 1];
        array.length--;
    }

    function findElement(bytes32[] storage array, bytes32 element) internal view returns (uint index, bool ok) {
        for (uint i = 0; i < array.length; i++) {
            if (array[i] == element) {
                return (i, true);
            }
        }

        return (0, false);
    }
}

// File: contracts/MakerDaoGateway.sol

contract MakerDaoGateway is Pausable, DSMath {
    using ArrayUtils for bytes32[];

    ISaiTub public saiTub;
    IDex public dex;
    IWrappedEther public weth;
    IERC20 public peth;
    IERC20 public dai;
    IERC20 public mkr;

    mapping(bytes32 => address) public cdpOwner;
    mapping(address => bytes32[]) public cdpsByOwner;

    event CdpOpened(address indexed owner, bytes32 cdpId);
    event CdpClosed(address indexed owner, bytes32 cdpId);
    event CollateralSupplied(address indexed owner, bytes32 cdpId, uint wethAmount, uint pethAmount);
    event DaiBorrowed(address indexed owner, bytes32 cdpId, uint amount);
    event DaiRepaid(address indexed owner, bytes32 cdpId, uint amount);
    event CollateralReturned(address indexed owner, bytes32 cdpId, uint wethAmount, uint pethAmount);
    event CdpTransferred(address oldOwner, address newOwner, bytes32 cdpId);
    event CdpEjected(address newOwner, bytes32 cdpId);
    event CdpRegistered(address newOwner, bytes32 cdpId);

    modifier isCdpOwner(bytes32 cdpId) {
        require(cdpOwner[cdpId] == msg.sender || cdpId == 0, "CDP belongs to a different address");
        _;
    }

    constructor(ISaiTub _saiTub, IDex _dex) public {
        saiTub = _saiTub;
        dex = _dex;
        weth = saiTub.gem();
        peth = saiTub.skr();
        dai = saiTub.sai();
        mkr = saiTub.gov();
    }

    function cdpsByOwnerLength(address _owner) external view returns (uint) {
        return cdpsByOwner[_owner].length;
    }

    function systemParameters() external view returns (uint liquidationRatio, uint annualStabilityFee, uint daiAvailable) {
        liquidationRatio = saiTub.mat();
        annualStabilityFee = rpow(saiTub.fee(), 365 days);
        daiAvailable = sub(saiTub.cap(), dai.totalSupply());
    }
    
    function cdpInfo(bytes32 cdpId) external returns (uint borrowedDai, uint outstandingDai, uint suppliedPeth) {
        (, uint ink, uint art, ) = saiTub.cups(cdpId);
        borrowedDai = art;
        suppliedPeth = ink;
        outstandingDai = add(saiTub.rap(cdpId), saiTub.tab(cdpId));
    }
    
    function pethForWeth(uint wethAmount) public view returns (uint) {
        return rdiv(wethAmount, saiTub.per());
    }

    function wethForPeth(uint pethAmount) public view returns (uint) {
        return rmul(pethAmount, saiTub.per());
    }

    function() external payable {
        // For unwrapping WETH
    }

    // SUPPLY AND BORROW

    // specify cdpId if you want to use existing CDP, or pass 0 if you need to create a new one 
    function supplyEthAndBorrowDai(bytes32 cdpId, uint daiAmount) whenNotPaused isCdpOwner(cdpId) external payable {
        bytes32 id = supplyEth(cdpId);
        borrowDai(id, daiAmount);
    }

    // specify cdpId if you want to use existing CDP, or pass 0 if you need to create a new one 
    function supplyWethAndBorrowDai(bytes32 cdpId, uint wethAmount, uint daiAmount) whenNotPaused isCdpOwner(cdpId) external {
        bytes32 id = supplyWeth(cdpId, wethAmount);
        borrowDai(id, daiAmount);
    }

    // ETH amount should be > 0.005 for new CDPs
    // returns id of actual CDP (existing or a new one)
    function supplyEth(bytes32 cdpId) isCdpOwner(cdpId) whenNotPaused isCdpOwner(cdpId) public payable returns (bytes32 _cdpId) {
        if (msg.value > 0) {
            weth.deposit.value(msg.value)();
            return _supply(cdpId, msg.value);
        }

        return cdpId;
    }

    // WETH amount should be > 0.005 for new CDPs
    // don't forget to approve WETH before supplying
    // returns id of actual CDP (existing or a new one)
    function supplyWeth(bytes32 cdpId, uint wethAmount) whenNotPaused isCdpOwner(cdpId) public returns (bytes32 _cdpId) {
        if (wethAmount > 0) {
            require(weth.transferFrom(msg.sender, address(this), wethAmount));
            return _supply(cdpId, wethAmount);
        }

        return cdpId;
    }

    function borrowDai(bytes32 cdpId, uint daiAmount) whenNotPaused isCdpOwner(cdpId) public {
        if (daiAmount > 0) {
            saiTub.draw(cdpId, daiAmount);

            require(dai.transfer(msg.sender, daiAmount));

            emit DaiBorrowed(msg.sender, cdpId, daiAmount);
        }
    }

    // REPAY AND RETURN

    // don't forget to approve DAI before repaying
    function repayDaiAndReturnEth(bytes32 cdpId, uint daiAmount, uint ethAmount, bool payFeeInDai) whenNotPaused isCdpOwner(cdpId) external {
        repayDai(cdpId, daiAmount, payFeeInDai);
        returnEth(cdpId, ethAmount);
    }

    // don't forget to approve DAI before repaying
    // pass -1 to daiAmount to repay all outstanding debt
    // pass -1 to wethAmount to return all collateral
    function repayDaiAndReturnWeth(bytes32 cdpId, uint daiAmount, uint wethAmount, bool payFeeInDai) whenNotPaused isCdpOwner(cdpId) public {
        repayDai(cdpId, daiAmount, payFeeInDai);
        returnWeth(cdpId, wethAmount);
    }

    // don't forget to approve DAI before repaying
    // pass -1 to daiAmount to repay all outstanding debt
    function repayDai(bytes32 cdpId, uint daiAmount, bool payFeeInDai) whenNotPaused isCdpOwner(cdpId) public {
        if (daiAmount > 0) {
            uint _daiAmount = daiAmount;
            if (_daiAmount == uint(- 1)) {
                // repay all outstanding debt
                _daiAmount = saiTub.tab(cdpId);
            }

            _ensureApproval(dai, address(saiTub));
            _ensureApproval(mkr, address(saiTub));

            uint govFeeAmount = _calcGovernanceFee(cdpId, _daiAmount);
            _handleGovFee(govFeeAmount, payFeeInDai);

            require(dai.transferFrom(msg.sender, address(this), _daiAmount));

            saiTub.wipe(cdpId, _daiAmount);

            emit DaiRepaid(msg.sender, cdpId, _daiAmount);
        }
    }

    function returnEth(bytes32 cdpId, uint ethAmount) whenNotPaused isCdpOwner(cdpId) public {
        if (ethAmount > 0) {
            uint effectiveWethAmount = _return(cdpId, ethAmount);
            weth.withdraw(effectiveWethAmount);
            msg.sender.transfer(effectiveWethAmount);
        }
    }

    function returnWeth(bytes32 cdpId, uint wethAmount) whenNotPaused isCdpOwner(cdpId) public {
        if (wethAmount > 0) {
            uint effectiveWethAmount = _return(cdpId, wethAmount);
            require(weth.transfer(msg.sender, effectiveWethAmount));
        }
    }

    function closeCdp(bytes32 cdpId, bool payFeeInDai) whenNotPaused isCdpOwner(cdpId) external {
        repayDaiAndReturnWeth(cdpId, uint(-1), uint(-1), payFeeInDai);
        _removeCdp(cdpId, msg.sender);
        saiTub.shut(cdpId);
        
        emit CdpClosed(msg.sender, cdpId);
    }

    // TRANSFER AND ADOPT

    // You can migrate your CDP from MakerDaoGateway contract to another owner
    function transferCdp(bytes32 cdpId, address nextOwner) isCdpOwner(cdpId) external {
        address _owner = nextOwner;
        if (_owner == address(0x0)) {
            _owner = msg.sender;
        }
        
        saiTub.give(cdpId, _owner);

        _removeCdp(cdpId, msg.sender);

        emit CdpTransferred(msg.sender, _owner, cdpId);
    }
    
    function ejectCdp(bytes32 cdpId) onlyPauser external {
        address owner = cdpOwner[cdpId];
        saiTub.give(cdpId, owner);

        _removeCdp(cdpId, owner);

        emit CdpEjected(owner, cdpId);
    }

    // If you want to migrate existing CDP to MakerDaoGateway contract,
    // you need to register your cdp first with this function, and then execute `give` operation,
    // transferring CDP to the MakerDaoGateway contract
    function registerCdp(bytes32 cdpId, address owner) whenNotPaused external {
        require(saiTub.lad(cdpId) == msg.sender, "Can't register other's CDP");
        require(cdpOwner[cdpId] == address(0x0), "Can't register CDP twice");

        address _owner = owner;
        if (_owner == address(0x0)) {
            _owner = msg.sender;
        }

        cdpOwner[cdpId] = _owner;
        cdpsByOwner[_owner].push(cdpId);

        emit CdpRegistered(_owner, cdpId);
    }

    // INTERNAL FUNCTIONS

    function _supply(bytes32 cdpId, uint wethAmount) internal returns (bytes32 _cdpId) {
        _cdpId = cdpId;
        if (_cdpId == 0) {
            _cdpId = _createCdp();
        }

        _ensureApproval(weth, address(saiTub));

        uint pethAmount = pethForWeth(wethAmount);

        saiTub.join(pethAmount);

        _ensureApproval(peth, address(saiTub));

        saiTub.lock(_cdpId, pethAmount);
        emit CollateralSupplied(msg.sender, _cdpId, wethAmount, pethAmount);
    }

    function _return(bytes32 cdpId, uint wethAmount) internal returns (uint _wethAmount) {
        uint pethAmount;

        if (wethAmount == uint(- 1)) {
            // return all collateral
            pethAmount = saiTub.ink(cdpId);
        } else {
            pethAmount = pethForWeth(wethAmount);
        }

        saiTub.free(cdpId, pethAmount);

        _ensureApproval(peth, address(saiTub));

        saiTub.exit(pethAmount);

        _wethAmount = wethForPeth(pethAmount);

        emit CollateralReturned(msg.sender, cdpId, _wethAmount, pethAmount);
    }

    function _calcGovernanceFee(bytes32 cdpId, uint daiAmount) internal returns (uint mkrFeeAmount) {
        uint daiFeeAmount = rmul(daiAmount, rdiv(saiTub.rap(cdpId), saiTub.tab(cdpId)));
        (bytes32 val, bool ok) = saiTub.pep().peek();
        require(ok && val != 0, 'Unable to get mkr rate');

        return wdiv(daiFeeAmount, uint(val));
    }

    function _handleGovFee(uint govFeeAmount, bool payWithDai) internal {
        if (govFeeAmount > 0) {
            if (payWithDai) {
                uint saiGovAmt = dex.getPayAmount(dai, mkr, govFeeAmount);

                _ensureApproval(dai, address(dex));

                require(dai.transferFrom(msg.sender, address(this), saiGovAmt));
                dex.buyAllAmount(mkr, govFeeAmount, dai, saiGovAmt);
            } else {
                require(mkr.transferFrom(msg.sender, address(this), govFeeAmount));
            }
        }
    }

    function _ensureApproval(IERC20 token, address spender) internal {
        if (token.allowance(address(this), spender) != uint(- 1)) {
            require(token.approve(spender, uint(- 1)));
        }
    }

    function _createCdp() internal returns (bytes32 cdpId) {
        cdpId = saiTub.open();

        cdpOwner[cdpId] = msg.sender;
        cdpsByOwner[msg.sender].push(cdpId);

        emit CdpOpened(msg.sender, cdpId);
    }
    
    function _removeCdp(bytes32 cdpId, address owner) internal {
        (uint i, bool ok) = cdpsByOwner[owner].findElement(cdpId);
        require(ok, "Can't find cdp in owner's list");
        cdpsByOwner[owner].removeElement(i);

        delete cdpOwner[cdpId];
    }
}

Contract ABI

[{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"}],"name":"cdpInfo","outputs":[{"name":"borrowedDai","type":"uint256"},{"name":"outstandingDai","type":"uint256"},{"name":"suppliedPeth","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"pethAmount","type":"uint256"}],"name":"wethForPeth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"cdpsByOwner","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"},{"name":"ethAmount","type":"uint256"},{"name":"payFeeInDai","type":"bool"}],"name":"repayDaiAndReturnEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"nextOwner","type":"address"}],"name":"transferCdp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"wethAmount","type":"uint256"},{"name":"daiAmount","type":"uint256"}],"name":"supplyWethAndBorrowDai","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"}],"name":"supplyEth","outputs":[{"name":"_cdpId","type":"bytes32"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"cdpsByOwnerLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"ethAmount","type":"uint256"}],"name":"returnEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"owner","type":"address"}],"name":"registerCdp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"}],"name":"supplyEthAndBorrowDai","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dex","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"}],"name":"borrowDai","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"peth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"systemParameters","outputs":[{"name":"liquidationRatio","type":"uint256"},{"name":"annualStabilityFee","type":"uint256"},{"name":"daiAvailable","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mkr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"},{"name":"payFeeInDai","type":"bool"}],"name":"repayDai","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"saiTub","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"cdpOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"wethAmount","type":"uint256"}],"name":"supplyWeth","outputs":[{"name":"_cdpId","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"wethAmount","type":"uint256"}],"name":"returnWeth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"},{"name":"wethAmount","type":"uint256"},{"name":"payFeeInDai","type":"bool"}],"name":"repayDaiAndReturnWeth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"payFeeInDai","type":"bool"}],"name":"closeCdp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"wethAmount","type":"uint256"}],"name":"pethForWeth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"}],"name":"ejectCdp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_saiTub","type":"address"},{"name":"_dex","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"}],"name":"CdpOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"}],"name":"CdpClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"},{"indexed":false,"name":"wethAmount","type":"uint256"},{"indexed":false,"name":"pethAmount","type":"uint256"}],"name":"CollateralSupplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"DaiBorrowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"DaiRepaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"},{"indexed":false,"name":"wethAmount","type":"uint256"},{"indexed":false,"name":"pethAmount","type":"uint256"}],"name":"CollateralReturned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"}],"name":"CdpTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"}],"name":"CdpEjected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"},{"indexed":false,"name":"cdpId","type":"bytes32"}],"name":"CdpRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"}]

Contract Creation Code

60806040523480156200001157600080fd5b5060405160408062005b05833981018060405260408110156200003357600080fd5b810190808051906020019092919080519060200190929190505050620000683362000510640100000000026401000000009004565b6000600160006101000a81548160ff021916908315150217905550816001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bd2bea76040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200018857600080fd5b505afa1580156200019d573d6000803e3d6000fd5b505050506040513d6020811015620001b457600080fd5b8101908080519060200190929190505050600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f8a771e6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200028957600080fd5b505afa1580156200029e573d6000803e3d6000fd5b505050506040513d6020811015620002b557600080fd5b8101908080519060200190929190505050600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639166cba46040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200038a57600080fd5b505afa1580156200039f573d6000803e3d6000fd5b505050506040513d6020811015620003b657600080fd5b8101908080519060200190929190505050600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166312d43a516040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200048b57600080fd5b505afa158015620004a0573d6000803e3d6000fd5b505050506040513d6020811015620004b757600080fd5b8101908080519060200190929190505050600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620006d2565b620005348160006200057a64010000000002620052ba179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515620005b757600080fd5b620005d282826200063d640100000000026401000000009004565b151515620005df57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156200067b57600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61542380620006e26000396000f3fe6080604052600436106101a1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630f6afc43146101a35780631023e8f21461020057806311fdb0471461024f5780631459659e146102be57806318b2b7a01461031957806332d41d4f146103745780633f4ba83a146103c35780633fc8cef3146103da5780634176df321461043157806346fbf68e146104735780634a84ae33146104dc578063531adc1d146105415780635620742c146105865780635a7063e1146105e15780635c975abb14610619578063692058c2146106485780636ef8d66d1461069f5780637507df24146106b65780637d211c75146106fb5780637dcbf024146107525780637e992cb81461078b57806382dc1ec4146107e257806383671555146108335780638456cb591461088457806389dcd64f1461089b5780638cdf9f66146108f2578063936c2fff1461096d578063b9690380146109c6578063bd62c42514610a0b578063bfbda3fc14610a66578063c5f1375114610aad578063cba6891814610afc578063f4b9fa7514610b37575b005b3480156101af57600080fd5b506101dc600480360360208110156101c657600080fd5b8101908080359060200190929190505050610b8e565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561020c57600080fd5b506102396004803603602081101561022357600080fd5b8101908080359060200190929190505050610e32565b6040518082815260200191505060405180910390f35b34801561025b57600080fd5b506102a86004803603604081101561027257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f02565b6040518082815260200191505060405180910390f35b3480156102ca57600080fd5b50610317600480360360808110156102e157600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803515159060200190929190505050610f32565b005b34801561032557600080fd5b506103726004803603604081101561033c57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611075565b005b34801561038057600080fd5b506103c16004803603606081101561039757600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611349565b005b3480156103cf57600080fd5b506103d861148f565b005b3480156103e657600080fd5b506103ef61153e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045d6004803603602081101561044757600080fd5b8101908080359060200190929190505050611564565b6040518082815260200191505060405180910390f35b34801561047f57600080fd5b506104c26004803603602081101561049657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061185c565b604051808215151515815260200191505060405180910390f35b3480156104e857600080fd5b5061052b600480360360208110156104ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611879565b6040518082815260200191505060405180910390f35b34801561054d57600080fd5b506105846004803603604081101561056457600080fd5b8101908080359060200190929190803590602001909291905050506118c5565b005b34801561059257600080fd5b506105df600480360360408110156105a957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611afa565b005b610617600480360360408110156105f757600080fd5b810190808035906020019092919080359060200190929190505050611ec1565b005b34801561062557600080fd5b5061062e612005565b604051808215151515815260200191505060405180910390f35b34801561065457600080fd5b5061065d61201c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106ab57600080fd5b506106b4612042565b005b3480156106c257600080fd5b506106f9600480360360408110156106d957600080fd5b81019080803590602001909291908035906020019092919050505061204d565b005b34801561070757600080fd5b50610710612394565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561075e57600080fd5b506107676123ba565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561079757600080fd5b506107a06126d8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107ee57600080fd5b506108316004803603602081101561080557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126fe565b005b34801561083f57600080fd5b506108826004803603606081101561085657600080fd5b81019080803590602001909291908035906020019092919080351515906020019092919050505061271e565b005b34801561089057600080fd5b50610899612c49565b005b3480156108a757600080fd5b506108b0612cf8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108fe57600080fd5b5061092b6004803603602081101561091557600080fd5b8101908080359060200190929190505050612d1d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097957600080fd5b506109b06004803603604081101561099057600080fd5b810190808035906020019092919080359060200190929190505050612d50565b6040518082815260200191505060405180910390f35b3480156109d257600080fd5b50610a09600480360360408110156109e957600080fd5b810190808035906020019092919080359060200190929190505050612fdd565b005b348015610a1757600080fd5b50610a6460048036036080811015610a2e57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080351515906020019092919050505061322d565b005b348015610a7257600080fd5b50610aab60048036036040811015610a8957600080fd5b8101908080359060200190929190803515159060200190929190505050613370565b005b348015610ab957600080fd5b50610ae660048036036020811015610ad057600080fd5b81019080803590602001909291905050506135c8565b6040518082815260200191505060405180910390f35b348015610b0857600080fd5b50610b3560048036036020811015610b1f57600080fd5b8101908080359060200190929190505050613698565b005b348015610b4357600080fd5b50610b4c613839565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060008060006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fdac0025876040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060806040518083038186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d6080811015610c4e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190505050509250925050809450819250610e276001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636f78ee0d886040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015610d1c57600080fd5b505af1158015610d30573d6000803e3d6000fd5b505050506040513d6020811015610d4657600080fd5b81019080805190602001909291905050506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7c8d634896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050506040513d6020811015610e1157600080fd5b810190808051906020019092919050505061385f565b935050509193909250565b6000610efb826001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ec9c3b86040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015610ebb57600080fd5b505afa158015610ecf573d6000803e3d6000fd5b505050506040513d6020811015610ee557600080fd5b81019080805190602001909291905050506138e4565b9050919050565b600860205281600052604060002081815481101515610f1d57fe5b90600052602060002001600091509150505481565b600160009054906101000a900460ff16151515610f4e57600080fd5b833373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610fbf5750600060010281145b1515611059576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61106485858461271e565b61106e85846118c5565b5050505050565b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806110e65750600060010281145b1515611180576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000829050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111be573390505b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa8529c85836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050506112a48433613930565b7fae4f954cb5f51f7740e11994224de6aa60f423d54cb7b30ea41bae077a2776e5338286604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b600160009054906101000a900460ff1615151561136557600080fd5b823373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806113d65750600060010281145b1515611470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600061147c8585612d50565b9050611488818461204d565b5050505050565b6114983361185c565b15156114a357600080fd5b600160009054906101000a900460ff1615156114be57600080fd5b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806115d75750600060010281145b1515611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600160009054906101000a900460ff1615151561168d57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806116fe5750600060010281145b1515611798576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600034111561185157600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15801561182757600080fd5b505af115801561183b573d6000803e3d6000fd5b505050505061184a8434613a8a565b9250611855565b8392505b5050919050565b6000611872826000613d0a90919063ffffffff16565b9050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b600160009054906101000a900460ff161515156118e157600080fd5b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806119525750600060010281145b15156119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000821115611af5576000611a018484613d9e565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015611a9457600080fd5b505af1158015611aa8573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611af2573d6000803e3d6000fd5b50505b505050565b600160009054906101000a900460ff16151515611b1657600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663de5f5517846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060206040518083038186803b158015611bbb57600080fd5b505afa158015611bcf573d6000803e3d6000fd5b505050506040513d6020811015611be557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616e2774207265676973746572206f7468657227732043445000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166007600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611d58576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f43616e277420726567697374657220434450207477696365000000000000000081525060200191505060405180910390fd5b6000819050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d96573390505b806007600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208390806001815401808255809150509060018203906000526020600020016000909192909190915055507fb06e86a0c79c2fd37762dfe403753d23892f32dcfa5437d9225705e0c49bab698184604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050565b600160009054906101000a900460ff16151515611edd57600080fd5b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611f4e5750600060010281145b1515611fe8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000611ff384611564565b9050611fff818461204d565b50505050565b6000600160009054906101000a900460ff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61204b336140ba565b565b600160009054906101000a900460ff1615151561206957600080fd5b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806120da5750600060010281145b1515612174576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600082111561238f576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663440f19ba84846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b15801561221557600080fd5b505af1158015612229573d6000803e3d6000fd5b50505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156122f257600080fd5b505af1158015612306573d6000803e3d6000fd5b505050506040513d602081101561231c57600080fd5b8101908080519060200190929190505050151561233857600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f3412d0645ecdd0b97bd45dce6ca0514a592225911eefbb485b777a2c143a56ef8484604051808381526020018281526020019250505060405180910390a25b505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab0783da6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561244257600080fd5b505afa158015612456573d6000803e3d6000fd5b505050506040513d602081101561246c57600080fd5b8101908080519060200190929190505050925061254a6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561250557600080fd5b505afa158015612519573d6000803e3d6000fd5b505050506040513d602081101561252f57600080fd5b81019080805190602001909291905050506301e13380614114565b91506126d16001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663355274ea6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156125d257600080fd5b505afa1580156125e6573d6000803e3d6000fd5b505050506040513d60208110156125fc57600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561269157600080fd5b505afa1580156126a5573d6000803e3d6000fd5b505050506040513d60208110156126bb57600080fd5b81019080805190602001909291905050506141a3565b9050909192565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6127073361185c565b151561271257600080fd5b61271b81614228565b50565b600160009054906101000a900460ff1615151561273a57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806127ab5750600060010281145b1515612845576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000831115612c435760008390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811415612949576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7c8d634866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561290b57600080fd5b505af115801561291f573d6000803e3d6000fd5b505050506040513d602081101561293557600080fd5b810190808051906020019092919050505090505b612996600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b6129e3600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b60006129ef86836144c0565b90506129fb8185614874565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612af457600080fd5b505af1158015612b08573d6000803e3d6000fd5b505050506040513d6020811015612b1e57600080fd5b81019080805190602001909291905050501515612b3a57600080fd5b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373b3810187846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b158015612bd257600080fd5b505af1158015612be6573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fbe5581faf5bc8d0ab1f9d5855e33c6b04cc396e9d87624bc2900e32b853dde9a8784604051808381526020018281526020019250505060405180910390a250505b50505050565b612c523361185c565b1515612c5d57600080fd5b600160009054906101000a900460ff16151515612c7957600080fd5b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60076020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900460ff16151515612d6e57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612ddf5750600060010281145b1515612e79576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000831115612fd257600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612f7b57600080fd5b505af1158015612f8f573d6000803e3d6000fd5b505050506040513d6020811015612fa557600080fd5b81019080805190602001909291905050501515612fc157600080fd5b612fcb8484613a8a565b9150612fd6565b8391505b5092915050565b600160009054906101000a900460ff16151515612ff957600080fd5b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061306a5750600060010281145b1515613104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008211156132285760006131198484613d9e565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156131e057600080fd5b505af11580156131f4573d6000803e3d6000fd5b505050506040513d602081101561320a57600080fd5b8101908080519060200190929190505050151561322657600080fd5b505b505050565b600160009054906101000a900460ff1615151561324957600080fd5b833373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806132ba5750600060010281145b1515613354576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61335f85858461271e565b6133698584612fdd565b5050505050565b600160009054906101000a900460ff1615151561338c57600080fd5b813373ffffffffffffffffffffffffffffffffffffffff166007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806133fd5750600060010281145b1515613497576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4344502062656c6f6e677320746f206120646966666572656e7420616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6134c3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808561322d565b6134cd8333613930565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b84d2106846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561355d57600080fd5b505af1158015613571573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f7f701babb88447c2bd74b7ac66eabd86e9641dbcac3dd3072bd0a4b1659a3fd7846040518082815260200191505060405180910390a2505050565b6000613691826001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ec9c3b86040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561365157600080fd5b505afa158015613665573d6000803e3d6000fd5b505050506040513d602081101561367b57600080fd5b8101908080519060200190929190505050614e56565b9050919050565b6136a13361185c565b15156136ac57600080fd5b60006007600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa8529c83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156137a857600080fd5b505af11580156137bc573d6000803e3d6000fd5b505050506137ca8282613930565b7f70bfb225c90eca83db93eea7329dca2abd406215b7c9ac0038d7d47644c5a9508183604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600082828401915081101515156138de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60006b033b2e3c9fd0803ce800000061391e6139008585614e96565b60026b033b2e3c9fd0803ce800000081151561391857fe5b0461385f565b81151561392757fe5b04905092915050565b60008061398484600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020614f2f90919063ffffffff16565b915091508015156139fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f43616e27742066696e642063647020696e206f776e65722773206c697374000081525060200191505060405180910390fd5b613a4e82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020614f9190919063ffffffff16565b6007600085815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b60008290506000600102811415613aa657613aa361503b565b90505b613af3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b6000613afe836135c8565b90506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663049878f3826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015613b9057600080fd5b505af1158015613ba4573d6000803e3d6000fd5b50505050613bf5600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b3b77a5183836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b158015613c8d57600080fd5b505af1158015613ca1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fc3fc5150c1cb9274062f1f7a4836ce287eb592f32695e229820ef45dc904e0e483858460405180848152602001838152602001828152602001935050505060405180910390a25092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613d4757600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831415613e99576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631f3634ed856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060206040518083038186803b158015613e5757600080fd5b505afa158015613e6b573d6000803e3d6000fd5b505050506040513d6020811015613e8157600080fd5b81019080805190602001909291905050509050613ea5565b613ea2836135c8565b90505b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a5cd184e85836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b158015613f3d57600080fd5b505af1158015613f51573d6000803e3d6000fd5b50505050613fa2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637f8661a1826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561403257600080fd5b505af1158015614046573d6000803e3d6000fd5b5050505061405381610e32565b91503373ffffffffffffffffffffffffffffffffffffffff167f4a5290a74b6bc6c685525bc436bf2cba7d63ebce6343b2893b7fe5e67b4a166585848460405180848152602001838152602001828152602001935050505060405180910390a25092915050565b6140ce81600061520b90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b60008060028381151561412357fe5b06141561413c576b033b2e3c9fd0803ce800000061413e565b825b905060028281151561414c57fe5b0491505b60008214151561419d5761416483846138e4565b9250600060028381151561417457fe5b061415156141895761418681846138e4565b90505b60028281151561419557fe5b049150614150565b92915050565b60008282840391508111151515614222576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b61423c8160006152ba90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561437057600080fd5b505afa158015614384573d6000803e3d6000fd5b505050506040513d602081101561439a57600080fd5b81019080805190602001909291905050501415156144bc578173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561447557600080fd5b505af1158015614489573d6000803e3d6000fd5b505050506040513d602081101561449f57600080fd5b810190808051906020019092919050505015156144bb57600080fd5b5b5050565b60008061466a836146656001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636f78ee0d886040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561455a57600080fd5b505af115801561456e573d6000803e3d6000fd5b505050506040513d602081101561458457600080fd5b81019080805190602001909291905050506001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7c8d634896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561462557600080fd5b505af1158015614639573d6000803e3d6000fd5b505050506040513d602081101561464f57600080fd5b8101908080519060200190929190505050614e56565b6138e4565b90506000806001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ace237f56040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156146f257600080fd5b505afa158015614706573d6000803e3d6000fd5b505050506040513d602081101561471c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166359e02dd76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401604080518083038186803b15801561478d57600080fd5b505afa1580156147a1573d6000803e3d6000fd5b505050506040513d60408110156147b757600080fd5b810190808051906020019092919080519060200190929190505050915091508080156147e7575060006001028214155b151561485b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f556e61626c6520746f20676574206d6b7220726174650000000000000000000081525060200191505060405180910390fd5b61486983836001900461536a565b935050505092915050565b6000821115614e52578015614d11576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ff1fd974600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060206040518083038186803b1580156149c057600080fd5b505afa1580156149d4573d6000803e3d6000fd5b505050506040513d60208110156149ea57600080fd5b81019080805190602001909291905050509050614a4b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614282565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015614b4457600080fd5b505af1158015614b58573d6000803e3d6000fd5b505050506040513d6020811015614b6e57600080fd5b81019080805190602001909291905050501515614b8a57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638185402b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b158015614ccf57600080fd5b505af1158015614ce3573d6000803e3d6000fd5b505050506040513d6020811015614cf957600080fd5b81019080805190602001909291905050505050614e51565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015614e0a57600080fd5b505af1158015614e1e573d6000803e3d6000fd5b505050506040513d6020811015614e3457600080fd5b81019080805190602001909291905050501515614e5057600080fd5b5b5b5050565b600081614e84614e72856b033b2e3c9fd0803ce8000000614e96565b600285811515614e7e57fe5b0461385f565b811515614e8d57fe5b04905092915050565b600080821480614eb557508282838502925082811515614eb257fe5b04145b1515614f29576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b60008060008090505b8480549050811015614f7e57838582815481101515614f5357fe5b90600052602060002001541415614f71578060019250925050614f8a565b8080600101915050614f38565b50600080819150915091505b9250929050565b818054905081101515614fa357615037565b60008190505b6001838054905003811015614ffd578260018201815481101515614fc957fe5b90600052602060002001548382815481101515614fe257fe5b90600052602060002001819055508080600101915050614fa9565b5081600183805490500381548110151561501357fe5b90600052602060002001600090558180548091906001900361503591906153a6565b505b5050565b60006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcfff16f6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156150c257600080fd5b505af11580156150d6573d6000803e3d6000fd5b505050506040513d60208110156150ec57600080fd5b81019080805190602001909291905050509050336007600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190915055503373ffffffffffffffffffffffffffffffffffffffff167f8adf09526ccd2c8e7615e9260445cad955b0942d9691aeb5318de0b94cf38678826040518082815260200191505060405180910390a290565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561524757600080fd5b6152518282613d0a565b151561525c57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156152f657600080fd5b6153008282613d0a565b15151561530c57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60008161539461538285670de0b6b3a7640000614e96565b60028581151561538e57fe5b0461385f565b81151561539d57fe5b04905092915050565b8154818355818111156153cd578183600052602060002091820191016153cc91906153d2565b5b505050565b6153f491905b808211156153f05760008160009055506001016153d8565b5090565b9056fea165627a7a72305820470a70a1b11cce45254f4daa3eb0570c8f581bbef2cd4916ee8088fdeb0bcec50029000000000000000000000000a71937147b55deb8a530c7229c442fd3f31b7db2000000000000000000000000db3b642ebc6ff85a3ab335cff9af2954f9215994

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

000000000000000000000000a71937147b55deb8a530c7229c442fd3f31b7db2000000000000000000000000db3b642ebc6ff85a3ab335cff9af2954f9215994

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a71937147b55deb8a530c7229c442fd3f31b7db2
Arg [1] : 000000000000000000000000db3b642ebc6ff85a3ab335cff9af2954f9215994

Swarm Source

bzzr://470a70a1b11cce45254f4daa3eb0570c8f581bbef2cd4916ee8088fdeb0bcec5
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward