Latest 18 txns

TxHash Age From To Value [TxFee]
0x3ca7aeb9b8733d0398b427c1e08e8deedab3e8ea3d74b458ef959bbb1d3cb1ca9 days 16 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.00028994
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd690527644394399 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70.1 Ether0.0018246816
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d9 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.002224125
0x4ca09d27c8026bb9a2847ec2ec4bd627d489e963156fa2a9a2161d254a5ba9f99 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.002597445
0x0f8b3b858dddca153c6719a76af28df4948e37c69aeeec0f1276bfeefaf2bc189 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.00033645
0x27dc828e63fb72ed76dcb1ba54f7fb263c817cac06a1472ea31c4b7f1ba95bf29 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.001914273
0x83418b0a0a71c2c7f1ecb9b6fd4b2fd26060acd661736fb0ec1650429bea86839 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70.5 Ether0.001207062
0xcca99b9ca01f9ee6e912d28a5e4fac88c0c0c5abb3a905867adce1008c828f2f9 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.00035142
0xef633b3f6b5132e1dc3d5808969e29ab9ff99dc89779513ba8786ff38d9e753411 days 13 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000143766
0xf55d657dec9be80cd4a608be7a58e67cda8352462363155f8473a172615e063f11 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000141042
0x557c2078b905ceb964d7e4b32b0d6dd093a5fe9c037b31edc8b4ea41efa41c9211 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000169983
0x6a33b5aecfa71cf79c406bb4a835a2c1f50106191b286266250409d9f3aa993511 days 18 hrs ago0xc03821bf5ebabc35384d5c3e6d9a2999248762ee  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70.1 Ether0.000244721
0xa755824013407bbdd1de72b56902e0edc9eb6a3c2dbfe6c70126c74ccc0e6c4412 days 21 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000299814
0xdb16cb33b641aa24412da6ec2caf600fc87079e970592f1830a7017fe6509d3c12 days 21 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000159895
0x0edd327a9ee5c8786e9c776a93daa3ae1bf5bd0e82c23d685ae0f6c6142e02b612 days 21 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70 Ether0.000022957
0x0c8bac4de9343eb20ab118e83d44925e2d62a364c34c501c683a1385edfaa8ba12 days 22 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70.01 Ether0.000382436
0x5de45598fb30228caf90e99a19b410781701330c37dba24c569ef5af0b44fd6012 days 22 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN   0x9e19fb25410ba1b1e03353e953aba474637249a70.01 Ether0.000300451
0xf8c0503bb18a3a99203104e1ef00ae37f81a3d69af7d2aa94983ab5e37e2219f12 days 22 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN    Contract Creation0 Ether0.04890666
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x3ca7aeb9b8733d0398b427c1e08e8deedab3e8ea3d74b458ef959bbb1d3cb1ca100671039 days 16 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xaaf64bfcc32d0f15873a02163e7e500671a4ffcd0 Ether
0x3ca7aeb9b8733d0398b427c1e08e8deedab3e8ea3d74b458ef959bbb1d3cb1ca100671039 days 16 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xc4375b7de8af5a38a93548eb8453a498222c4ff20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xf4d791139ce033ad35db2b2201435fad668b1b640 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xd0a1e359811322d97991e03f863a0c30c2cf029c0.1 Ether
0x0c8611013c5a2f0b06a02b45c49cb13554a9d423ae4698c8cd69052764439439100662899 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xf4d791139ce033ad35db2b2201435fad668b1b640 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x81b7b88dcbc2cbdacce659ab9e2a1404c7fa08645e28cec76a7ffef3e51bfe2d100662669 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
0x4ca09d27c8026bb9a2847ec2ec4bd627d489e963156fa2a9a2161d254a5ba9f9100662519 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xc03821bf5ebabc35384d5c3e6d9a2999248762ee0.2 Ether
0x4ca09d27c8026bb9a2847ec2ec4bd627d489e963156fa2a9a2161d254a5ba9f9100662519 days 18 hrs ago0xd0a1e359811322d97991e03f863a0c30c2cf029c0x9e19fb25410ba1b1e03353e953aba474637249a70.2 Ether
0x4ca09d27c8026bb9a2847ec2ec4bd627d489e963156fa2a9a2161d254a5ba9f9100662519 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x4ca09d27c8026bb9a2847ec2ec4bd627d489e963156fa2a9a2161d254a5ba9f9100662519 days 18 hrs ago0x9e19fb25410ba1b1e03353e953aba474637249a70xa71937147b55deb8a530c7229c442fd3f31b7db20 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: MakerDaoGateway
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.24;

// 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/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
  * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    uint256 c = a - b;

    return c;
  }

  /**
  * @dev Adds two numbers, reverts on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a);

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}

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

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
  function totalSupply() external view returns (uint256);

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

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

  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);

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

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

// File: contracts/interfaces/IWrappedEther.sol

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

// File: contracts/interfaces/ISaiTub.sol

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 per() external view returns (uint ray);
    function lad(bytes32 cup) external view returns (address);
}

// File: contracts/MakerDaoGateway.sol

contract MakerDaoGateway is Pausable {
    using SafeMath for uint;

    ISaiTub public saiTub;

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

    // TODO: check indexed fields
    event CdpOpened(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);


    constructor(ISaiTub _saiTub) public {
        saiTub = _saiTub;
    }

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

    function () public payable {
        // For unwrapping WETH only
    }
    
    // SUPPLY AND BORROW
    
    // specify cdpId if you want to use existing CDP, or pass 0 if you need to create a new one 
    function supplyAndBorrow(bytes32 cdpId, uint daiAmount) external payable {
        bytes32 id = supplyEth(cdpId);
        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) public payable returns (bytes32) {
        if (msg.value > 0) {
            saiTub.gem().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) public returns (bytes32) {
        if (wethAmount > 0) {
            saiTub.gem().transferFrom(msg.sender, this, wethAmount);
            return _supply(cdpId, wethAmount);
        }

        return cdpId;
    }


    function _supply(bytes32 cdpId, uint wethAmount) internal returns (bytes32 id) {
        id = cdpId;
        if (id == 0) {
            id = createCdp();
        } else {
            require(cdpOwner[id] == msg.sender, "CDP belongs to a different address");
        }

        if (saiTub.gem().allowance(this, saiTub) != uint(-1)) {
            saiTub.gem().approve(saiTub, uint(-1));
        }

        uint pethAmount = pethForWeth(wethAmount);
        
        saiTub.join(pethAmount);

        if (saiTub.skr().allowance(this, saiTub) != uint(-1)) {
            saiTub.skr().approve(saiTub, uint(-1));
        }

        saiTub.lock(id, pethAmount);
        emit CollateralSupplied(msg.sender, id, wethAmount, pethAmount);
    }
    
    function createCdp() internal returns (bytes32 cdpId) {
        cdpId = saiTub.open();
        
        cdpOwner[cdpId] = msg.sender;
        cdpsByOwner[msg.sender].push(cdpId);
        
        emit CdpOpened(msg.sender, cdpId);
    }

    function borrowDai(bytes32 cdpId, uint daiAmount) public {
        require(cdpOwner[cdpId] == msg.sender, "CDP belongs to a different address");
        if (daiAmount > 0) {
            saiTub.draw(cdpId, daiAmount);
            
            saiTub.sai().transfer(msg.sender, daiAmount);
            
            emit DaiBorrowed(msg.sender, cdpId, daiAmount);
        }
    }

    // REPAY AND RETURN

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

    // don't forget to approve DAI before repaying
    function repayDai(bytes32 cdpId, uint daiAmount) public {
        require(cdpOwner[cdpId] == msg.sender, "CDP belongs to a different address");
        if (daiAmount > 0) {
            //TODO: handle gov fee
            saiTub.sai().transferFrom(msg.sender, this, daiAmount);

            if (saiTub.sai().allowance(this, saiTub) != uint(-1)) {
                saiTub.sai().approve(saiTub, uint(-1));
            }
            if (saiTub.gov().allowance(this, saiTub) != uint(-1)) {
                saiTub.gov().approve(saiTub, uint(-1));
            }
            
            saiTub.wipe(cdpId, daiAmount);

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

    function returnEth(bytes32 cdpId, uint ethAmount) public {
        require(cdpOwner[cdpId] == msg.sender, "CDP belongs to a different address");
        if (ethAmount > 0) {
            _return(cdpId, ethAmount);
            saiTub.gem().withdraw(ethAmount);
            msg.sender.transfer(ethAmount);
        }
    }

    function returnWeth(bytes32 cdpId, uint wethAmount) public {
        require(cdpOwner[cdpId] == msg.sender, "CDP belongs to a different address");
        if (wethAmount > 0){
            _return(cdpId, wethAmount);
            saiTub.gem().transfer(msg.sender, wethAmount);
        }
    }
    
    function _return(bytes32 cdpId, uint wethAmount) internal {
        require(cdpOwner[cdpId] == msg.sender, "CDP belongs to a different address");

        uint pethAmount = pethForWeth(wethAmount);
        saiTub.free(cdpId, pethAmount);

        if (saiTub.skr().allowance(this, saiTub) != uint(-1)) {
            saiTub.skr().approve(saiTub, uint(-1));
        }
        
        saiTub.exit(pethAmount);

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

    function transferCdp(bytes32 cdpId, address nextOwner) external {

    }

    function migrateCdp(bytes32 cdpId) external {

    }
    
    // Just for testing purpuses
    function withdrawMkr(uint mkrAmount) external onlyPauser {
        saiTub.gov().transfer(msg.sender, mkrAmount);
    }

    function pethForWeth(uint wethAmount) public view returns (uint) {
        return rdiv(wethAmount, saiTub.per());

    }

    uint constant internal RAY = 10 ** 27;
    
    // more info: https://github.com/dapphub/ds-math#rdiv
    function rdiv(uint x, uint y) internal pure returns (uint z) {
        z = x.mul(RAY).add(y / 2) / y;
    }
}

    Contract ABI  
[{"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":"repayDai","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":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"}],"name":"supplyEth","outputs":[{"name":"","type":"bytes32"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"},{"name":"ethAmount","type":"uint256"}],"name":"repayAndReturn","outputs":[],"payable":false,"stateMutability":"nonpayable","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":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"mkrAmount","type":"uint256"}],"name":"withdrawMkr","outputs":[],"payable":false,"stateMutability":"nonpayable","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":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"},{"name":"daiAmount","type":"uint256"}],"name":"supplyAndBorrow","outputs":[],"payable":true,"stateMutability":"payable","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":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"cdpId","type":"bytes32"}],"name":"migrateCdp","outputs":[],"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":true,"inputs":[{"name":"wethAmount","type":"uint256"}],"name":"pethForWeth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_saiTub","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"},{"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":"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 Switch To Opcodes View
60806040523480156200001157600080fd5b50604051602080620023e08339810160405251620000383364010000000062000063810204565b60018054600160a060020a0390921661010002600160a860020a031990921691909117905562000148565b6200007e600082640100000000620021a3620000b582021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a0381161515620000cb57600080fd5b620000e0828264010000000062000110810204565b15620000eb57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200012857600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61228880620001586000396000f30060806040526004361061010e5763ffffffff60e060020a60003504166311fdb04781146101105780631290f5031461014657806318b2b7a0146101615780633f4ba83a146101855780634176df321461019a57806346cfb6c6146101a557806346fbf68e146101c35780634a84ae33146101f8578063531adc1d146102195780635c975abb14610234578063694016f1146102495780636ef8d66d146102615780637507df241461027657806382dc1ec4146102915780638456cb59146102b257806388a20236146102c757806389dcd64f146102d55780638cdf9f6614610306578063936c2fff1461031e5780639b3fa7b914610339578063b969038014610351578063c5f137511461036c575b005b34801561011c57600080fd5b50610134600160a060020a0360043516602435610384565b60408051918252519081900360200190f35b34801561015257600080fd5b5061010e6004356024356103b4565b34801561016d57600080fd5b5061010e600435600160a060020a0360243516610a4b565b34801561019157600080fd5b5061010e610a4f565b610134600435610ab3565b3480156101b157600080fd5b5061010e600435602435604435610bca565b3480156101cf57600080fd5b506101e4600160a060020a0360043516610be3565b604080519115158252519081900360200190f35b34801561020457600080fd5b50610134600160a060020a0360043516610bfb565b34801561022557600080fd5b5061010e600435602435610c16565b34801561024057600080fd5b506101e4610db9565b34801561025557600080fd5b5061010e600435610dc2565b34801561026d57600080fd5b5061010e610ee8565b34801561028257600080fd5b5061010e600435602435610ef3565b34801561029d57600080fd5b5061010e600160a060020a0360043516611141565b3480156102be57600080fd5b5061010e611161565b61010e6004356024356111c6565b3480156102e157600080fd5b506102ea6111dd565b60408051600160a060020a039092168252519081900360200190f35b34801561031257600080fd5b506102ea6004356111f1565b34801561032a57600080fd5b5061013460043560243561120c565b34801561034557600080fd5b5061010e60043561115e565b34801561035d57600080fd5b5061010e600435602435611349565b34801561037857600080fd5b506101346004356114de565b60036020528160005260406000208181548110151561039f57fe5b90600052602060002001600091509150505481565b600082815260026020526040902054600160a060020a0316331461041e576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b6000811115610a4b576001809054906101000a9004600160a060020a0316600160a060020a0316639166cba46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561047957600080fd5b505af115801561048d573d6000803e3d6000fd5b505050506040513d60208110156104a357600080fd5b5051604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561051557600080fd5b505af1158015610529573d6000803e3d6000fd5b505050506040513d602081101561053f57600080fd5b5050600154604080517f9166cba40000000000000000000000000000000000000000000000000000000081529051600019926101009004600160a060020a031691639166cba49160048083019260209291908290030181600087803b1580156105a757600080fd5b505af11580156105bb573d6000803e3d6000fd5b505050506040513d60208110156105d157600080fd5b50516001546040805160e160020a636eb1769f028152306004820152610100909204600160a060020a039081166024840152905192169163dd62ed3e916044808201926020929091908290030181600087803b15801561063057600080fd5b505af1158015610644573d6000803e3d6000fd5b505050506040513d602081101561065a57600080fd5b50511461076b576001809054906101000a9004600160a060020a0316600160a060020a0316639166cba46040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156106b357600080fd5b505af11580156106c7573d6000803e3d6000fd5b505050506040513d60208110156106dd57600080fd5b50516001546040805160e060020a63095ea7b3028152610100909204600160a060020a0390811660048401526000196024840152905192169163095ea7b3916044808201926020929091908290030181600087803b15801561073e57600080fd5b505af1158015610752573d6000803e3d6000fd5b505050506040513d602081101561076857600080fd5b50505b6000196001809054906101000a9004600160a060020a0316600160a060020a03166312d43a516040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156107c057600080fd5b505af11580156107d4573d6000803e3d6000fd5b505050506040513d60208110156107ea57600080fd5b50516001546040805160e160020a636eb1769f028152306004820152610100909204600160a060020a039081166024840152905192169163dd62ed3e916044808201926020929091908290030181600087803b15801561084957600080fd5b505af115801561085d573d6000803e3d6000fd5b505050506040513d602081101561087357600080fd5b505114610984576001809054906101000a9004600160a060020a0316600160a060020a03166312d43a516040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108cc57600080fd5b505af11580156108e0573d6000803e3d6000fd5b505050506040513d60208110156108f657600080fd5b50516001546040805160e060020a63095ea7b3028152610100909204600160a060020a0390811660048401526000196024840152905192169163095ea7b3916044808201926020929091908290030181600087803b15801561095757600080fd5b505af115801561096b573d6000803e3d6000fd5b505050506040513d602081101561098157600080fd5b50505b600154604080517f73b3810100000000000000000000000000000000000000000000000000000000815260048101859052602481018490529051610100909204600160a060020a0316916373b381019160448082019260009290919082900301818387803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b5050604080518581526020810185905281513394507fbe5581faf5bc8d0ab1f9d5855e33c6b04cc396e9d87624bc2900e32b853dde9a93509081900390910190a25b5050565b610a5833610be3565b1515610a6357600080fd5b60015460ff161515610a7457600080fd5b6001805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600080341115610bc2576001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610b0f57600080fd5b505af1158015610b23573d6000803e3d6000fd5b505050506040513d6020811015610b3957600080fd5b5051604080517fd0e30db00000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169163d0e30db0913491600480830192600092919082900301818588803b158015610b9857600080fd5b505af1158015610bac573d6000803e3d6000fd5b5050505050610bbb8234611567565b9050610bc5565b50805b919050565b610bd483836103b4565b610bde8382610c16565b505050565b6000610bf5818363ffffffff611b6f16565b92915050565b600160a060020a031660009081526003602052604090205490565b600082815260026020526040902054600160a060020a03163314610c80576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b6000811115610a4b57610c938282611ba6565b6001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610ce557600080fd5b505af1158015610cf9573d6000803e3d6000fd5b505050506040513d6020811015610d0f57600080fd5b5051604080517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f19350505050158015610bde573d6000803e3d6000fd5b60015460ff1690565b610dcb33610be3565b1515610dd657600080fd5b6001809054906101000a9004600160a060020a0316600160a060020a03166312d43a516040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610e2857600080fd5b505af1158015610e3c573d6000803e3d6000fd5b505050506040513d6020811015610e5257600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610ebe57600080fd5b505af1158015610ed2573d6000803e3d6000fd5b505050506040513d6020811015610bde57600080fd5b610ef133611f7b565b565b600082815260026020526040902054600160a060020a03163314610f5d576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b6000811115610a4b57600154604080517f440f19ba00000000000000000000000000000000000000000000000000000000815260048101859052602481018490529051610100909204600160a060020a03169163440f19ba9160448082019260009290919082900301818387803b158015610fd757600080fd5b505af1158015610feb573d6000803e3d6000fd5b505050506001809054906101000a9004600160a060020a0316600160a060020a0316639166cba46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561104157600080fd5b505af1158015611055573d6000803e3d6000fd5b505050506040513d602081101561106b57600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b1580156110d757600080fd5b505af11580156110eb573d6000803e3d6000fd5b505050506040513d602081101561110157600080fd5b50506040805183815260208101839052815133927f3412d0645ecdd0b97bd45dce6ca0514a592225911eefbb485b777a2c143a56ef928290030190a25050565b61114a33610be3565b151561115557600080fd5b61115e81611fc3565b50565b61116a33610be3565b151561117557600080fd5b60015460ff161561118557600080fd5b6001805460ff1916811790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60006111d183610ab3565b9050610bde8183610ef3565b6001546101009004600160a060020a031681565b600260205260009081526040902054600160a060020a031681565b600080821115611342576001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561126857600080fd5b505af115801561127c573d6000803e3d6000fd5b505050506040513d602081101561129257600080fd5b5051604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018590529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561130457600080fd5b505af1158015611318573d6000803e3d6000fd5b505050506040513d602081101561132e57600080fd5b5061133b90508383611567565b9050610bf5565b5090919050565b600082815260026020526040902054600160a060020a031633146113b3576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b6000811115610a4b576113c68282611ba6565b6001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561141857600080fd5b505af115801561142c573d6000803e3d6000fd5b505050506040513d602081101561144257600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b1580156114ae57600080fd5b505af11580156114c2573d6000803e3d6000fd5b505050506040513d60208110156114d857600080fd5b50505050565b6000610bf5826001809054906101000a9004600160a060020a0316600160a060020a0316637ec9c3b86040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561153657600080fd5b505af115801561154a573d6000803e3d6000fd5b505050506040513d602081101561156057600080fd5b505161200b565b8160008115156115805761157961204e565b91506115ea565b600082815260026020526040902054600160a060020a031633146115ea576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b6000196001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561163f57600080fd5b505af1158015611653573d6000803e3d6000fd5b505050506040513d602081101561166957600080fd5b50516001546040805160e160020a636eb1769f028152306004820152610100909204600160a060020a039081166024840152905192169163dd62ed3e916044808201926020929091908290030181600087803b1580156116c857600080fd5b505af11580156116dc573d6000803e3d6000fd5b505050506040513d60208110156116f257600080fd5b505114611803576001809054906101000a9004600160a060020a0316600160a060020a0316637bd2bea76040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b505050506040513d602081101561177557600080fd5b50516001546040805160e060020a63095ea7b3028152610100909204600160a060020a0390811660048401526000196024840152905192169163095ea7b3916044808201926020929091908290030181600087803b1580156117d657600080fd5b505af11580156117ea573d6000803e3d6000fd5b505050506040513d602081101561180057600080fd5b50505b61180c836114de565b90506001809054906101000a9004600160a060020a0316600160a060020a031663049878f3826040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b15801561186b57600080fd5b505af115801561187f573d6000803e3d6000fd5b505050506000196001809054906101000a9004600160a060020a0316600160a060020a0316630f8a771e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156118d857600080fd5b505af11580156118ec573d6000803e3d6000fd5b505050506040513d602081101561190257600080fd5b50516001546040805160e160020a636eb1769f028152306004820152610100909204600160a060020a039081166024840152905192169163dd62ed3e916044808201926020929091908290030181600087803b15801561196157600080fd5b505af1158015611975573d6000803e3d6000fd5b505050506040513d602081101561198b57600080fd5b505114611a9c576001809054906101000a9004600160a060020a0316600160a060020a0316630f8a771e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156119e457600080fd5b505af11580156119f8573d6000803e3d6000fd5b505050506040513d6020811015611a0e57600080fd5b50516001546040805160e060020a63095ea7b3028152610100909204600160a060020a0390811660048401526000196024840152905192169163095ea7b3916044808201926020929091908290030181600087803b158015611a6f57600080fd5b505af1158015611a83573d6000803e3d6000fd5b505050506040513d6020811015611a9957600080fd5b50505b600154604080517fb3b77a5100000000000000000000000000000000000000000000000000000000815260048101859052602481018490529051610100909204600160a060020a03169163b3b77a519160448082019260009290919082900301818387803b158015611b0d57600080fd5b505af1158015611b21573d6000803e3d6000fd5b5050604080518581526020810187905280820185905290513393507fc3fc5150c1cb9274062f1f7a4836ce287eb592f32695e229820ef45dc904e0e492509081900360600190a25092915050565b6000600160a060020a0382161515611b8657600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b600082815260026020526040812054600160a060020a03163314611c10576040805160e560020a62461bcd028152602060048201526022602482015260008051602061223d833981519152604482015260f060020a61737302606482015290519081900360840190fd5b611c19826114de565b600154604080517fa5cd184e00000000000000000000000000000000000000000000000000000000815260048101879052602481018490529051929350610100909104600160a060020a03169163a5cd184e9160448082019260009290919082900301818387803b158015611c8d57600080fd5b505af1158015611ca1573d6000803e3d6000fd5b505050506000196001809054906101000a9004600160a060020a0316600160a060020a0316630f8a771e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611cfa57600080fd5b505af1158015611d0e573d6000803e3d6000fd5b505050506040513d6020811015611d2457600080fd5b50516001546040805160e160020a636eb1769f028152306004820152610100909204600160a060020a039081166024840152905192169163dd62ed3e916044808201926020929091908290030181600087803b158015611d8357600080fd5b505af1158015611d97573d6000803e3d6000fd5b505050506040513d6020811015611dad57600080fd5b505114611ebe576001809054906101000a9004600160a060020a0316600160a060020a0316630f8a771e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611e0657600080fd5b505af1158015611e1a573d6000803e3d6000fd5b505050506040513d6020811015611e3057600080fd5b50516001546040805160e060020a63095ea7b3028152610100909204600160a060020a0390811660048401526000196024840152905192169163095ea7b3916044808201926020929091908290030181600087803b158015611e9157600080fd5b505af1158015611ea5573d6000803e3d6000fd5b505050506040513d6020811015611ebb57600080fd5b50505b6001809054906101000a9004600160a060020a0316600160a060020a0316637f8661a1826040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b158015611f1b57600080fd5b505af1158015611f2f573d6000803e3d6000fd5b5050604080518681526020810186905280820185905290513393507f4a5290a74b6bc6c685525bc436bf2cba7d63ebce6343b2893b7fe5e67b4a166592509081900360600190a2505050565b611f8c60008263ffffffff61215716565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b611fd460008263ffffffff6121a316565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b60008161203d60028204612031866b033b2e3c9fd0803ce800000063ffffffff6121f116565b9063ffffffff61222a16565b81151561204657fe5b049392505050565b60006001809054906101000a9004600160a060020a0316600160a060020a031663fcfff16f6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b505050506040513d60208110156120cc57600080fd5b50516000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191633908117909155808452600383528184208054600181018255908552938390209093018490558051848152905193945091927f8adf09526ccd2c8e7615e9260445cad955b0942d9691aeb5318de0b94cf386789281900390910190a290565b600160a060020a038116151561216c57600080fd5b6121768282611b6f565b151561218157600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a03811615156121b857600080fd5b6121c28282611b6f565b156121cc57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000808315156122045760009150612223565b5082820282848281151561221457fe5b041461221f57600080fd5b8091505b5092915050565b60008282018381101561221f57600080fd004344502062656c6f6e677320746f206120646966666572656e74206164647265a165627a7a72305820d8f93c2f4775d9e68fc7216feb1557cbdb7947e49ffef883cfb9193cc4aede3f0029000000000000000000000000a71937147b55deb8a530c7229c442fd3f31b7db2

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

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


   Swarm Source:
bzzr://d8f93c2f4775d9e68fc7216feb1557cbdb7947e49ffef883cfb9193cc4aede3f

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward