ETH Price: $1,991.84 (+0.97%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Push220883822025-03-20 13:30:1140 hrs ago1742477411IN
0xe08cb5E2...2203C20D8
0 ETH0.00008310.99701069
Push220773622025-03-19 0:32:593 days ago1742344379IN
0xe08cb5E2...2203C20D8
0 ETH0.000087111.04514247
Push220469282025-03-14 18:32:477 days ago1741977167IN
0xe08cb5E2...2203C20D8
0 ETH0.000080990.97170015
Push220347162025-03-13 1:38:479 days ago1741829927IN
0xe08cb5E2...2203C20D8
0 ETH0.000102321.22754048
Push220341012025-03-12 23:35:239 days ago1741822523IN
0xe08cb5E2...2203C20D8
0 ETH0.000075531.01852007
Push220270762025-03-12 0:02:2310 days ago1741737743IN
0xe08cb5E2...2203C20D8
0 ETH0.000098491.1816201
Push219973982025-03-07 20:31:1114 days ago1741379471IN
0xe08cb5E2...2203C20D8
0 ETH0.000088731.0645518
Push219475592025-02-28 21:33:2321 days ago1740778403IN
0xe08cb5E2...2203C20D8
0 ETH0.000105671.26773494
Push213962282024-12-13 21:18:2398 days ago1734124703IN
0xe08cb5E2...2203C20D8
0 ETH0.0012047614.45309778
Push213824102024-12-11 23:01:23100 days ago1733958083IN
0xe08cb5E2...2203C20D8
0 ETH0.0016667819.99578497
Push213749352024-12-10 21:57:35101 days ago1733867855IN
0xe08cb5E2...2203C20D8
0 ETH0.0016231719.4726195
Push213455072024-12-06 19:20:35105 days ago1733512835IN
0xe08cb5E2...2203C20D8
0 ETH0.0023522128.21852236
Push213391142024-12-05 21:55:23106 days ago1733435723IN
0xe08cb5E2...2203C20D8
0 ETH0.0018865322.63203945
Push213244262024-12-03 20:40:47108 days ago1733258447IN
0xe08cb5E2...2203C20D8
0 ETH0.0023140327.76051178
Push212818502024-11-27 21:44:59114 days ago1732743899IN
0xe08cb5E2...2203C20D8
0 ETH0.0016522119.82099613
Push212757412024-11-27 1:15:11115 days ago1732670111IN
0xe08cb5E2...2203C20D8
0 ETH0.0008042710.84556244
Push212757332024-11-27 1:13:23115 days ago1732670003IN
0xe08cb5E2...2203C20D8
0 ETH0.000738679.96092157
Push212757282024-11-27 1:12:23115 days ago1732669943IN
0xe08cb5E2...2203C20D8
0 ETH0.000785149.41908296
Push212447562024-11-22 17:27:23119 days ago1732296443IN
0xe08cb5E2...2203C20D8
0 ETH0.0011648613.97435869
Push212243212024-11-19 20:58:35122 days ago1732049915IN
0xe08cb5E2...2203C20D8
0 ETH0.0018803822.55822253
Push212173942024-11-18 21:48:47123 days ago1731966527IN
0xe08cb5E2...2203C20D8
0 ETH0.0014540817.4441002
Push211963692024-11-15 23:27:23126 days ago1731713243IN
0xe08cb5E2...2203C20D8
0 ETH0.0014073516.88342267
Push211960582024-11-15 22:25:11126 days ago1731709511IN
0xe08cb5E2...2203C20D8
0 ETH0.0028507434.19922628
Push211817672024-11-13 22:30:35128 days ago1731537035IN
0xe08cb5E2...2203C20D8
0 ETH0.0036625643.93836077
Push211737612024-11-12 19:41:59129 days ago1731440519IN
0xe08cb5E2...2203C20D8
0 ETH0.0033312339.96350697
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x391470cD...59F800Dbc
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
RwaSwapInputConduit2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : RwaSwapInputConduit2.sol
// SPDX-FileCopyrightText: © 2021 Lev Livnev <[email protected]>
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
pragma solidity 0.6.12;

import {GemAbstract} from "dss-interfaces/ERC/GemAbstract.sol";
import {DaiAbstract} from "dss-interfaces/dss/DaiAbstract.sol";
import {PsmAbstract} from "dss-interfaces/dss/PsmAbstract.sol";
import {GemJoinAbstract} from "dss-interfaces/dss/GemJoinAbstract.sol";

/**
 * @author Lev Livnev <[email protected]>
 * @author Nazar Duchak <[email protected]>
 * @title An Input Conduit for real-world assets (RWA).
 * @dev This contract differs from the original [RwaInputConduit](https://github.com/makerdao/MIP21-RWA-Example/blob/fce06885ff89d10bf630710d4f6089c5bba94b4d/src/RwaConduit.sol#L20-L39):
 *  - Requires DAI, GEM and PSM addresses in the constructor.
 *      - DAI and GEM are immutable, PSM can be replaced as long as it uses the same DAI and GEM.
 *  - The caller of `push()` is not required to hold MakerDAO governance tokens.
 *  - The `push()` method is permissionless.
 *  - The `push()` method swaps entire GEM balance to DAI using PSM.
 *  - The `push(uint256)` method swaps specified amount of GEM to DAI using PSM.
 *  - The `quit()` method allows moving outstanding GEM balance to `quitTo`. It can be called only by `mate`d addresses.
 *  - The `quit(uint256)` method allows moving the specified amount of GEM balance to `quitTo`. It can be called only by `mate`d addresses.
 *  - The `file(bytes32, address)` method allows updating `quitTo`, `to`, `psm` addresses. It can be called only by the admin.
 */
contract RwaSwapInputConduit2 {
    /// @notice PSM GEM token contract address.
    GemAbstract public immutable gem;
    /// @notice DAI token contract address.
    DaiAbstract public immutable dai;
    /// @dev DAI/GEM resolution difference.
    uint256 private immutable to18ConversionFactor;

    /// @notice Addresses with admin access on this contract. `wards[usr]`
    mapping(address => uint256) public wards;
    /// @notice Addresses with quit access on this contract. `may[usr]`
    mapping(address => uint256) public may;

    /// @notice PSM contract address.
    PsmAbstract public psm;
    /// @notice Recipient address for DAI.
    address public to;
    /// @notice Destination address for GEM after calling `quit`.
    address public quitTo;

    /**
     * @notice `usr` was granted admin access.
     * @param usr The user address.
     */
    event Rely(address indexed usr);
    /**
     * @notice `usr` admin access was revoked.
     * @param usr The user address.
     */
    event Deny(address indexed usr);
    /**
     * @notice `usr` was granted push access.
     * @param usr The user address.
     */
    event Mate(address indexed usr);
    /**
     * @notice `usr` push access was revoked.
     * @param usr The user address.
     */
    event Hate(address indexed usr);
    /**
     * @notice `wad` amount of Dai was pushed to `to`.
     * @param to Recipient address for DAI.
     * @param wad The amount of DAI.
     */
    event Push(address indexed to, uint256 wad);
    /**
     * @notice A contract parameter was updated.
     * @param what The changed parameter name. Currently the supported values are: "quitTo", "to", "psm".
     * @param data The new value of the parameter.
     */
    event File(bytes32 indexed what, address data);
    /**
     * @notice The conduit outstanding GEM balance was flushed out to `quitTo`.
     * @param quitTo The quitTo address.
     * @param wad The amount of GEM flushed out.
     */
    event Quit(address indexed quitTo, uint256 wad);
    /**
     * @notice `amt` outstanding `token` balance was flushed out to `usr`.
     * @param token The token address.
     * @param usr The destination address.
     * @param amt The amount of `token` flushed out.
     */
    event Yank(address indexed token, address indexed usr, uint256 amt);

    modifier auth() {
        require(wards[msg.sender] == 1, "RwaSwapInputConduit2/not-authorized");
        _;
    }

    modifier onlyMate() {
        require(may[msg.sender] == 1, "RwaSwapInputConduit2/not-mate");
        _;
    }

    /**
     * @notice Defines addresses and gives `msg.sender` admin access.
     * @param _psm PSM contract address.
     * @param _dai DAI contract address.
     * @param _gem GEM contract address.
     * @param _to RwaUrn contract address.
     */
    constructor(
        address _dai,
        address _gem,
        address _psm,
        address _to
    ) public {
        require(_to != address(0), "RwaSwapInputConduit2/invalid-to-address");
        require(PsmAbstract(_psm).dai() == _dai, "RwaSwapInputConduit2/wrong-dai-for-psm");
        require(GemJoinAbstract(PsmAbstract(_psm).gemJoin()).gem() == _gem, "RwaSwapInputConduit2/wrong-gem-for-psm");

        // We assume that DAI will alway have 18 decimals
        to18ConversionFactor = 10**_sub(18, GemAbstract(_gem).decimals());

        psm = PsmAbstract(_psm);
        dai = DaiAbstract(_dai);
        gem = GemAbstract(_gem);

        to = _to;

        // Give unlimited approval to PSM gemjoin
        GemAbstract(_gem).approve(address(psm.gemJoin()), type(uint256).max);

        wards[msg.sender] = 1;
        emit Rely(msg.sender);
    }

    /*//////////////////////////////////
               Authorization
    //////////////////////////////////*/

    /**
     * @notice Grants `usr` admin access to this contract.
     * @param usr The user address.
     */
    function rely(address usr) external auth {
        wards[usr] = 1;
        emit Rely(usr);
    }

    /**
     * @notice Revokes `usr` admin access from this contract.
     * @param usr The user address.
     */
    function deny(address usr) external auth {
        wards[usr] = 0;
        emit Deny(usr);
    }

    /**
     * @notice Grants `usr` push access to this contract.
     * @param usr The user address.
     */
    function mate(address usr) external auth {
        may[usr] = 1;
        emit Mate(usr);
    }

    /**
     * @notice Revokes `usr` push access from this contract.
     * @param usr The user address.
     */
    function hate(address usr) external auth {
        may[usr] = 0;
        emit Hate(usr);
    }

    /*//////////////////////////////////
               Administration
    //////////////////////////////////*/

    /**
     * @notice Updates a contract parameter.
     * @dev `to` and `quitTo` can be set to `address(0)` to disable `push` and `quit` respectively.
     * @param what The changed parameter name. `"to", "quitTo", "psm"`
     * @param data The new value of the parameter.
     */
    function file(bytes32 what, address data) external auth {
        if (what == "quitTo") {
            quitTo = data;
        } else if (what == "to") {
            to = data;
        } else if (what == "psm") {
            require(PsmAbstract(data).dai() == address(dai), "RwaSwapInputConduit2/wrong-dai-for-psm");
            require(
                GemJoinAbstract(PsmAbstract(data).gemJoin()).gem() == address(gem),
                "RwaSwapInputConduit2/wrong-gem-for-psm"
            );

            // Revoke approval for the old PSM gemjoin
            gem.approve(address(psm.gemJoin()), 0);
            // Give unlimited approval to the new PSM gemjoin
            gem.approve(address(PsmAbstract(data).gemJoin()), type(uint256).max);

            psm = PsmAbstract(data);
        } else {
            revert("RwaSwapInputConduit2/unrecognised-param");
        }

        emit File(what, data);
    }

    /*//////////////////////////////////
               Operations
    //////////////////////////////////*/

    /**
     * @notice Swaps the GEM balance of this contract into DAI through the PSM and push it into the recipient address.
     */
    function push() external {
        _doPush(gem.balanceOf(address(this)));
    }

    /**
     * @notice Swaps the specified amount of GEM into DAI through the PSM and push it into the recipient address.
     * @param amt Gem amount.
     */
    function push(uint256 amt) external {
        _doPush(amt);
    }

    /**
     * @notice Flushes out any GEM balance to `quitTo` address.
     * @dev `msg.sender` must have received push access through `mate()`.
     */
    function quit() external onlyMate {
        _doQuit(gem.balanceOf(address(this)));
    }

    /**
     * @notice Flushes out the specified amount of GEM balance to `quitTo` address.
     * @dev `msg.sender` must have received push access through `mate()`.
     * @param amt Gem amount.
     */
    function quit(uint256 amt) external onlyMate {
        _doQuit(amt);
    }

    /**
     * @notice Flushes out `amt` of `token` sitting in this contract to `usr` address.
     * @dev Can only be called by the admin.
     * @param token Token address.
     * @param usr Destination address.
     * @param amt Token amount.
     */
    function yank(
        address token,
        address usr,
        uint256 amt
    ) external auth {
        GemAbstract(token).transfer(usr, amt);
        emit Yank(token, usr, amt);
    }

    /**
     * @notice Calculates the amount of DAI received for swapping `amt` of GEM.
     * @param amt GEM amount.
     * @return wad Expected DAI amount.
     */
    function expectedDaiWad(uint256 amt) public view returns (uint256 wad) {
        uint256 amt18 = _mul(amt, to18ConversionFactor);
        uint256 fee = _mul(amt18, psm.tin()) / WAD;
        return _sub(amt18, fee);
    }

    /**
     * @notice Calculates the required amount of GEM to get `wad` amount of DAI.
     * @param wad DAI amount.
     * @return amt Required GEM amount.
     */
    function requiredGemAmt(uint256 wad) external view returns (uint256 amt) {
        return _mul(wad, WAD) / _mul(_sub(WAD, psm.tin()), to18ConversionFactor);
    }

    /**
     * @notice Swaps the specified amount of GEM into DAI through the PSM and push it into the recipient address.
     * @dev If `to` is set to `address(0)`, if effectively means this methos is currently disabled.
     * @param amt GEM amount.
     */
    function _doPush(uint256 amt) internal {
        require(to != address(0), "RwaSwapInputConduit2/invalid-to-address");

        psm.sellGem(to, amt);
        emit Push(to, expectedDaiWad(amt));
    }

    /**
     * @notice Flushes out the specified amount of GEM to the `quitTo` address.
     * @dev If `quitTo` is set to `address(0)`, if effectively means this method is currently disabled.
     * @param amt GEM amount.
     */
    function _doQuit(uint256 amt) internal {
        require(quitTo != address(0), "RwaSwapInputConduit2/invalid-quit-to-address");

        gem.transfer(quitTo, amt);
        emit Quit(quitTo, amt);
    }

    /*//////////////////////////////////
                    Math
    //////////////////////////////////*/

    uint256 internal constant WAD = 10**18;

    function _sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x, "Math/sub-overflow");
    }

    function _mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(y == 0 || (z = x * y) / y == x, "Math/mul-overflow");
    }
}

File 2 of 5 : GemAbstract.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.5.12;

// A base ERC-20 abstract class
// https://eips.ethereum.org/EIPS/eip-20
interface GemAbstract {
    function totalSupply() external view returns (uint256);
    function balanceOf(address) external view returns (uint256);
    function allowance(address, address) external view returns (uint256);
    function approve(address, uint256) external returns (bool);
    function transfer(address, uint256) external returns (bool);
    function transferFrom(address, address, uint256) external returns (bool);
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
}

File 3 of 5 : DaiAbstract.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.5.12;

// https://github.com/makerdao/dss/blob/master/src/dai.sol
interface DaiAbstract {
    function wards(address) external view returns (uint256);
    function rely(address) external;
    function deny(address) external;
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function version() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint256);
    function balanceOf(address) external view returns (uint256);
    function allowance(address, address) external view returns (uint256);
    function nonces(address) external view returns (uint256);
    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external view returns (bytes32);
    function transfer(address, uint256) external returns (bool);
    function transferFrom(address, address, uint256) external returns (bool);
    function mint(address, uint256) external;
    function burn(address, uint256) external;
    function approve(address, uint256) external returns (bool);
    function push(address, uint256) external;
    function pull(address, uint256) external;
    function move(address, address, uint256) external;
    function permit(address, address, uint256, uint256, bool, uint8, bytes32, bytes32) external;
}

File 4 of 5 : PsmAbstract.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.5.12;

// https://github.com/makerdao/dss-psm/blob/master/src/psm.sol
interface PsmAbstract {
    function wards(address) external view returns (uint256);
    function rely(address) external;
    function deny(address) external;
    function vat() external view returns (address);
    function gemJoin() external view returns (address);
    function dai() external view returns (address);
    function daiJoin() external view returns (address);
    function ilk() external view returns (bytes32);
    function vow() external view returns (address);
    function tin() external view returns (uint256);
    function tout() external view returns (uint256);
    function file(bytes32 what, uint256 data) external;
    function hope(address) external;
    function nope(address) external;
    function sellGem(address usr, uint256 gemAmt) external;
    function buyGem(address usr, uint256 gemAmt) external;
}

File 5 of 5 : GemJoinAbstract.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.5.12;

// https://github.com/makerdao/dss/blob/master/src/join.sol
interface GemJoinAbstract {
    function wards(address) external view returns (uint256);
    function rely(address) external;
    function deny(address) external;
    function vat() external view returns (address);
    function ilk() external view returns (bytes32);
    function gem() external view returns (address);
    function dec() external view returns (uint256);
    function live() external view returns (uint256);
    function cage() external;
    function join(address, uint256) external;
    function exit(address, uint256) external;
}

Settings
{
  "remappings": [
    "clipper-mom/=lib/dss-exec-lib/lib/clipper-mom/src/",
    "ds-auth/=lib/ds-token/lib/ds-auth/src/",
    "ds-math/=lib/ds-math/src/",
    "ds-note/=lib/ds-value/lib/ds-thing/lib/ds-note/src/",
    "ds-pause/=lib/dss-gem-joins/lib/dss-deploy/lib/ds-pause/src/",
    "ds-proxy/=lib/dss-exec-lib/lib/ds-proxy/src/",
    "ds-stop/=lib/dss-exec-lib/lib/osm-mom/lib/osm/lib/ds-stop/src/",
    "ds-test/=lib/ds-test/src/",
    "ds-thing/=lib/ds-value/lib/ds-thing/src/",
    "ds-token/=lib/ds-token/src/",
    "ds-value/=lib/ds-value/src/",
    "dss-auto-line/=lib/dss-exec-lib/lib/dss-auto-line/src/",
    "dss-chain-log/=lib/mip21-toolkit/lib/dss-chain-log/src/",
    "dss-deploy/=lib/dss-gem-joins/lib/dss-deploy/src/",
    "dss-direct-deposit/=lib/dss-exec-lib/lib/dss-direct-deposit/src/",
    "dss-exec-lib/=lib/dss-exec-lib/src/",
    "dss-gem-joins/=lib/dss-gem-joins/src/",
    "dss-interfaces/=lib/dss-interfaces/src/",
    "dss-lerp/=lib/dss-exec-lib/lib/dss-lerp/src/",
    "dss-psm/=lib/mip21-toolkit/lib/dss-psm/src/",
    "dss/=lib/dss/src/",
    "esm/=lib/dss-gem-joins/lib/dss-deploy/lib/esm/src/",
    "flipper-mom/=lib/dss-exec-lib/lib/flipper-mom/src/",
    "forge-std/=lib/forge-std/src/",
    "forward-proxy/=lib/forward-proxy/src/",
    "ilk-registry/=lib/mip21-toolkit/lib/ilk-registry/src/",
    "median/=lib/dss-exec-lib/lib/median/src/",
    "mip21-toolkit/=lib/mip21-toolkit/src/",
    "mkr-authority/=lib/dss-exec-lib/lib/mkr-authority/src/",
    "osm-mom/=lib/dss-exec-lib/lib/osm-mom/src/",
    "osm/=lib/dss-exec-lib/lib/osm-mom/lib/osm/src/",
    "univ2-lp-oracle/=lib/dss-exec-lib/lib/univ2-lp-oracle/src/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "istanbul",
  "libraries": {
    "src/shared/ChecksummedAddress.sol": {
      "ChecksummedAddress": "0xf880b93f25d9c528703adc403a56c1fdfb2e5900"
    },
    "src/shared/SolidityTypeConversions.sol": {
      "SolidityTypeConversions": "0xf9e6d5084f70f814f1f03514e75c37a6b40f4936"
    },
    "src/shared/Strings.sol": {
      "Strings": "0x93688e1fa99e80d65dc3c07f69ff07198321056d"
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_dai","type":"address"},{"internalType":"address","name":"_gem","type":"address"},{"internalType":"address","name":"_psm","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Deny","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"what","type":"bytes32"},{"indexed":false,"internalType":"address","name":"data","type":"address"}],"name":"File","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Hate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Mate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Push","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"quitTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Quit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Rely","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"}],"name":"Yank","type":"event"},{"inputs":[],"name":"dai","outputs":[{"internalType":"contract DaiAbstract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"expectedDaiWad","outputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"what","type":"bytes32"},{"internalType":"address","name":"data","type":"address"}],"name":"file","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gem","outputs":[{"internalType":"contract GemAbstract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"hate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"mate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"may","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"psm","outputs":[{"internalType":"contract PsmAbstract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"push","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"push","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"quit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quitTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"requiredGemAmt","outputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"to","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"yank","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063959ac484116100ad578063d663159411610071578063d663159414610478578063daddce52146104ac578063e11746391461051a578063f4b9fa751461055c578063fc2b8cc31461059057610121565b8063959ac4841461031c5780639c52a7f11461034a578063a81de4f81461038e578063bf353dbb146103d2578063d4e8be831461042a57610121565b806359ac371b116100f457806359ac371b1461021457806361e86cad1461025857806365fae35e1461029a5780637bd2bea7146102de5780638035f0ce1461031257610121565b806304bda26214610126578063131519811461015a578063344cbc681461018e578063453638ce146101bc575b600080fd5b61012e61059a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101626105c0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101ba600480360360208110156101a457600080fd5b81019080803590602001909291905050506105e6565b005b6101fe600480360360208110156101d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106a6565b6040518082815260200191505060405180910390f35b6102566004803603602081101561022a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106be565b005b6102846004803603602081101561026e57600080fd5b81019080803590602001909291905050506107e0565b6040518082815260200191505060405180910390f35b6102dc600480360360208110156102b057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108e3565b005b6102e6610a04565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031a610a28565b005b6103486004803603602081101561033257600080fd5b8101908080359060200190929190505050610af4565b005b61038c6004803603602081101561036057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b00565b005b6103d0600480360360208110156103a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c21565b005b610414600480360360208110156103e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d42565b6040518082815260200191505060405180910390f35b6104766004803603604081101561044057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b005b610480611585565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610518600480360360608110156104c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115ab565b005b6105466004803603602081101561053057600080fd5b8101908080359060200190929190505050611759565b6040518082815260200191505060405180910390f35b610564611859565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61059861187d565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461069a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f52776153776170496e707574436f6e64756974322f6e6f742d6d61746500000081525060200191505060405180910390fd5b6106a3816119fd565b50565b60016020528060005260406000206000915090505481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610755576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f04942e12b9e2310f85c952df158815306377bb9f797dc3677d03be357427c53b60405160405180910390a250565b60008061080d837f000000000000000000000000000000000000000000000000000000e8d4a51000611c07565b90506000670de0b6b3a76400006108c683600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663568d4b6f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088657600080fd5b505afa15801561089a573d6000803e3d6000fd5b505050506040513d60208110156108b057600080fd5b8101908080519060200190929190505050611c07565b816108cd57fe5b0490506108da8282611c9c565b92505050919050565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461097a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a6060405160405180910390a250565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b610af27f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ab257600080fd5b505afa158015610ac6573d6000803e3d6000fd5b505050506040513d6020811015610adc57600080fd5b8101908080519060200190929190505050611d1f565b565b610afd81611d1f565b50565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610b97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b60405160405180910390a250565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167fe25de3b40ce055247fe4ef6c00f96c8c3b6530536701ba1c48296b30b4bb0d9560405160405180910390a250565b60006020528060005260406000206000915090505481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610df1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b7f71756974546f0000000000000000000000000000000000000000000000000000821415610e5f5780600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611533565b7f746f000000000000000000000000000000000000000000000000000000000000821415610ecd5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611532565b7f70736d00000000000000000000000000000000000000000000000000000000008214156114e0577f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663f4b9fa756040518163ffffffff1660e01b815260040160206040518083038186803b158015610f7257600080fd5b505afa158015610f86573d6000803e3d6000fd5b505050506040513d6020811015610f9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611019576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611f856026913960400191505060405180910390fd5b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b815260040160206040518083038186803b15801561109657600080fd5b505afa1580156110aa573d6000803e3d6000fd5b505050506040513d60208110156110c057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16637bd2bea76040518163ffffffff1660e01b815260040160206040518083038186803b15801561111657600080fd5b505afa15801561112a573d6000803e3d6000fd5b505050506040513d602081101561114057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146111bd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611f336026913960400191505060405180910390fd5b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b815260040160206040518083038186803b15801561126157600080fd5b505afa158015611275573d6000803e3d6000fd5b505050506040513d602081101561128b57600080fd5b810190808051906020019092919050505060006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112f157600080fd5b505af1158015611305573d6000803e3d6000fd5b505050506040513d602081101561131b57600080fd5b8101908080519060200190929190505050507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1663095ea7b38273ffffffffffffffffffffffffffffffffffffffff166301664f666040518163ffffffff1660e01b815260040160206040518083038186803b1580156113af57600080fd5b505afa1580156113c3573d6000803e3d6000fd5b505050506040513d60208110156113d957600080fd5b81019080805190602001909291905050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561145e57600080fd5b505af1158015611472573d6000803e3d6000fd5b505050506040513d602081101561148857600080fd5b81019080805190602001909291905050505080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611531565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611fd26027913960400191505060405180910390fd5b5b5b817f8fef588b5fc1afbf5b2f06c1a435d513f208da2e6704c3d8f0e0ec91167066ba82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414611642576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f106023913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156116b357600080fd5b505af11580156116c7573d6000803e3d6000fd5b505050506040513d60208110156116dd57600080fd5b8101908080519060200190929190505050508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f3336d8973868f7727fbbf287f4fd9fb0237fe2696b301f8a46c563cb46d7b419836040518082815260200191505060405180910390a3505050565b6000611838611812670de0b6b3a7640000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663568d4b6f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117d257600080fd5b505afa1580156117e6573d6000803e3d6000fd5b505050506040513d60208110156117fc57600080fd5b8101908080519060200190929190505050611c9c565b7f000000000000000000000000000000000000000000000000000000e8d4a51000611c07565b61184a83670de0b6b3a7640000611c07565b8161185157fe5b049050919050565b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b60018060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414611931576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f52776153776170496e707574436f6e64756974322f6e6f742d6d61746500000081525060200191505060405180910390fd5b6119fb7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156119bb57600080fd5b505afa1580156119cf573d6000803e3d6000fd5b505050506040513d60208110156119e557600080fd5b81019080805190602001909291905050506119fd565b565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611f59602c913960400191505060405180910390fd5b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611b5857600080fd5b505af1158015611b6c573d6000803e3d6000fd5b505050506040513d6020811015611b8257600080fd5b810190808051906020019092919050505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fc81bfec1ac9d038698c3b15fc900dafbff3af4b9f26062f895dd08a676ec78ae826040518082815260200191505060405180910390a250565b600080821480611c245750828283850292508281611c2157fe5b04145b611c96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4d6174682f6d756c2d6f766572666c6f7700000000000000000000000000000081525060200191505060405180910390fd5b92915050565b6000828284039150811115611d19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4d6174682f7375622d6f766572666c6f7700000000000000000000000000000081525060200191505060405180910390fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611fab6027913960400191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166395991276600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611e7c57600080fd5b505af1158015611e90573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fdf8180823cf670d41db21fa54ef9909b0bd724c931fbd55fe1fcbdc655ea2fb0611ef7836107e0565b6040518082815260200191505060405180910390a25056fe52776153776170496e707574436f6e64756974322f6e6f742d617574686f72697a656452776153776170496e707574436f6e64756974322f77726f6e672d67656d2d666f722d70736d52776153776170496e707574436f6e64756974322f696e76616c69642d717569742d746f2d6164647265737352776153776170496e707574436f6e64756974322f77726f6e672d6461692d666f722d70736d52776153776170496e707574436f6e64756974322f696e76616c69642d746f2d6164647265737352776153776170496e707574436f6e64756974322f756e7265636f676e697365642d706172616da2646970667358221220f3b1194106e9b11810dcdc7fa00415a0e250bc8c0cd56a58204c3b6ca9fccf7164736f6c634300060c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.