ETH Price: $3,393.36 (-1.25%)
Gas: 2 Gwei

Contract

0xEE9Bf5aAdBfb8E7E7dD4098915043edd36cE26f7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Distribute201450152024-06-22 4:59:117 days ago1719032351IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000063552
Unstake200656252024-06-11 2:32:4718 days ago1718073167IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0015217618.7017737
Unstake200119492024-06-03 14:40:1125 days ago1717425611IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0009794920.81428025
Unstake200057792024-06-02 17:58:4726 days ago1717351127IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000649413.80326463
Claim Rewards200057762024-06-02 17:58:1126 days ago1717351091IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0009287314.20753431
Unstake199848332024-05-30 19:47:2329 days ago1717098443IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0007799912.15720892
Unstake199839422024-05-30 16:47:3529 days ago1717087655IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0007336915.59502323
Unstake199558452024-05-26 18:28:4733 days ago1716748127IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000675878.30738884
Unstake199178642024-05-21 11:04:1139 days ago1716289451IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000552498.59642841
Unstake198912412024-05-17 17:40:3542 days ago1715967635IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000405066.30371591
Unstake198295572024-05-09 2:38:1151 days ago1715222291IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.00017783.77841903
Claim Rewards198295522024-05-09 2:37:1151 days ago1715222231IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000250533.83269269
Unstake198197482024-05-07 17:42:1152 days ago1715103731IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000406116.31891099
Unstake197712212024-04-30 22:51:5959 days ago1714517519IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000348297.40123014
Claim Rewards197712132024-04-30 22:50:2359 days ago1714517423IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000366157.58564996
Unstake197571592024-04-28 23:41:3561 days ago1714347695IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000637816.47880817
Unstake197380342024-04-26 7:25:2364 days ago1714116323IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000509687.93041273
Unstake197130452024-04-22 19:32:2367 days ago1713814343IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000785879.65801963
Unstake197042032024-04-21 13:53:5968 days ago1713707639IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.00078029.58839099
Unstake197032922024-04-21 10:50:1169 days ago1713696611IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.000570447.01056315
Unstake197032522024-04-21 10:42:1169 days ago1713696131IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.00054856.74085142
Unstake196969192024-04-20 13:27:4769 days ago1713619667IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.00037637.99651642
Unstake196840012024-04-18 18:02:5971 days ago1713463379IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0011745314.43237102
Unstake196748632024-04-17 11:21:5973 days ago1713352919IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0023588936.70979592
Unstake196738042024-04-17 7:49:1173 days ago1713340151IN
0xEE9Bf5aA...d36cE26f7
0 ETH0.0006327413.4457617
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Staking

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 3 : Staking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {IERC20} from "@openzeppelin/interfaces/IERC20.sol";

error NotStaked();
error NoStakers();
error CannotStakeZeroTokens();

contract Staking {
    event UserStaked(address indexed who, uint256 amount);
    event UserUnstaked(address indexed who, uint256 amount);

    event RewardsPayout(address indexed to, uint256 amount);
    event CapturedRewards(address indexed from, uint256 amount);

    event RewardsToTreasury(uint256 amount);

    struct StakingRecord {
        uint256 stakedAmount;
        uint256 rewardsPerStakedTokenSnapshot; // Scaled by a WAD
    }

    uint256 private constant WAD = 1e18;

    /// @notice Address of the treasury where 50% of the profits
    /// will be sent.
    address public immutable treasury;

    IERC20 public immutable weth;
    IERC20 public immutable prtc;

    /// @notice Amount of `WETH` rewards per staked token.
    /// @dev Scaled by a WAD.
    uint256 public rewardsPerStakedToken;
    /// @notice Total amount of `prtc` staked.
    uint256 public totalStaked;

    mapping(address => StakingRecord) public stakingRecords;

    constructor(IERC20 _prtc, IERC20 _weth, address _treasury) {
        prtc = _prtc;
        weth = _weth;
        treasury = _treasury;
    }

    /// @notice Method to claim `WETH` rewards accumulated in the
    /// contract.
    function claimRewards() public {
        StakingRecord storage userRecord = stakingRecords[msg.sender];

        if (userRecord.stakedAmount == 0) revert NotStaked();

        uint256 userReward = userRecord.stakedAmount
            * (rewardsPerStakedToken - userRecord.rewardsPerStakedTokenSnapshot) / WAD;

        userRecord.rewardsPerStakedTokenSnapshot = rewardsPerStakedToken;

        if (userReward != 0) {
            weth.transfer(msg.sender, userReward);
            emit RewardsPayout(msg.sender, userReward);
        }
    }

    /// @notice Retrieve any users' `WETH` rewards.
    function previewRewards(address user) public view returns (uint256) {
        StakingRecord storage userRecord = stakingRecords[user];

        uint256 totalStake = userRecord.stakedAmount;

        if (totalStake == 0) return 0;

        uint256 userReward =
            totalStake * (rewardsPerStakedToken - userRecord.rewardsPerStakedTokenSnapshot) / WAD;

        return userReward;
    }

    /// @notice Retrieve users' staked amount.
    function balanceOf(address user) public view returns (uint256) {
        return stakingRecords[user].stakedAmount;
    }

    /// @notice Staking method that accepts `prtc`. Profits from the
    /// vault will be distributed to this contract and staking users
    /// will be rewarded with `WETH`.
    /// @param amount Amount of `prtc` to be staked.
    function stake(uint256 amount) external {
        if (amount == 0) revert CannotStakeZeroTokens();

        StakingRecord storage userPosition = stakingRecords[msg.sender];

        if (userPosition.stakedAmount != 0) claimRewards();

        prtc.transferFrom(msg.sender, address(this), amount);

        totalStaked += amount;

        userPosition.stakedAmount += amount;
        userPosition.rewardsPerStakedTokenSnapshot = rewardsPerStakedToken;

        emit UserStaked(msg.sender, amount);
    }

    /// @notice Method to unstake all `prtc`.
    function unstake() external {
        unstake(type(uint256).max);
    }

    /// @notice Method to unstake `prtc`. It will calculate the portion
    /// of `WETH` rewards for the user and send them.
    function unstake(uint256 _amount) public {
        if (_amount == 0) _amount = type(uint256).max;

        StakingRecord storage userRecord = stakingRecords[msg.sender];

        uint256 userStakedAmount = userRecord.stakedAmount;

        if (userStakedAmount == 0) revert NotStaked();

        uint256 userReward = previewRewards(msg.sender);

        if (_amount >= userStakedAmount) {
            totalStaked -= userStakedAmount;
            delete stakingRecords[msg.sender];

            prtc.transfer(msg.sender, userStakedAmount);
            emit UserUnstaked(msg.sender, userStakedAmount);
        } else {
            totalStaked -= _amount;
            userRecord.stakedAmount -= _amount;
            userRecord.rewardsPerStakedTokenSnapshot = rewardsPerStakedToken;

            prtc.transfer(msg.sender, _amount);
            emit UserUnstaked(msg.sender, _amount);
        }

        if (userReward != 0) {
            weth.transfer(msg.sender, userReward);
            emit RewardsPayout(msg.sender, userReward);
        }
    }

    /// @notice Method to distribute `WETH` rewards.
    /// @dev Anyone that wants to distribute `WETH` can call this.
    /// @param amount The amount of `WETH` to be distributed to the contract.
    function distribute(uint256 amount) external {
        if (totalStaked == 0) revert NoStakers();

        uint256 amountForTreasury = amount / 2;
        uint256 amountForStakers = amount - amountForTreasury;

        weth.transferFrom(msg.sender, treasury, amountForTreasury);
        weth.transferFrom(msg.sender, address(this), amountForStakers);

        // Distribute the other 50% to the stakers.
        rewardsPerStakedToken += amountForStakers * WAD / totalStaked;

        emit RewardsToTreasury(amountForTreasury);
        emit CapturedRewards(msg.sender, amountForStakers);
    }
}

File 2 of 3 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 3 of 3 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_prtc","type":"address"},{"internalType":"contract IERC20","name":"_weth","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotStakeZeroTokens","type":"error"},{"inputs":[],"name":"NoStakers","type":"error"},{"inputs":[],"name":"NotStaked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CapturedRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsPayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsToTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UserStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UserUnstaked","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"previewRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prtc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerStakedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingRecords","outputs":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"rewardsPerStakedTokenSnapshot","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b50604051610cca380380610cca83398101604081905261002f91610064565b6001600160a01b0392831660c05290821660a052166080526100b1565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83516100848161004c565b60208501519093506100958161004c565b60408501519092506100a68161004c565b809150509250925092565b60805160a05160c051610bb261011860003960008181610214015281816102fe015281816103fa015261095101526000818161013f015281816104c8015281816106090152818161074701526107d901526000818161017e01526107150152610bb26000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c578063a694fc3a11610066578063a694fc3a146101f3578063c29b0c3114610206578063cdde89ba1461020f578063f166e9201461023657600080fd5b806370a08231146101a0578063817b1cd2146101d757806391c05b0b146101e057600080fd5b8063021417cf146100d45780632def6620146101155780632e17de781461011f578063372500ab146101325780633fc8cef31461013a57806361d027b314610179575b600080fd5b6100fb6100e2366004610a96565b6002602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b61011d610249565b005b61011d61012d366004610ac6565b610256565b61011d61057a565b6101617f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010c565b6101617f000000000000000000000000000000000000000000000000000000000000000081565b6101c96101ae366004610a96565b6001600160a01b031660009081526002602052604090205490565b60405190815260200161010c565b6101c960015481565b61011d6101ee366004610ac6565b6106ba565b61011d610201366004610ac6565b6108f0565b6101c960005481565b6101617f000000000000000000000000000000000000000000000000000000000000000081565b6101c9610244366004610a96565b610a31565b610254600019610256565b565b8060000361026357506000195b33600090815260026020526040812080549091819003610295576040516273e5c360e31b815260040160405180910390fd5b60006102a033610a31565b90508184106103a65781600160008282546102bb9190610af5565b909155505033600081815260026020526040808220828155600101919091555163a9059cbb60e01b81526004810191909152602481018390526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036b9190610b0e565b5060405182815233907f668647a3bf871c3ff8779af5157eda0c0d6de3f7af4a3468d3ecc571fc413adb9060200160405180910390a26104a6565b83600160008282546103b89190610af5565b90915550508254849084906000906103d1908490610af5565b9091555050600054600184015560405163a9059cbb60e01b8152336004820152602481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f9190610b0e565b5060405184815233907f668647a3bf871c3ff8779af5157eda0c0d6de3f7af4a3468d3ecc571fc413adb9060200160405180910390a25b80156105745760405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053d9190610b0e565b5060405181815233907f41f65a7f97c30e01e7536b57c58e5875b46a2d428032c8990754d2f7ac142ff59060200160405180910390a25b50505050565b33600090815260026020526040812080549091036105aa576040516273e5c360e31b815260040160405180910390fd5b6000670de0b6b3a764000082600101546000546105c79190610af5565b83546105d39190610b30565b6105dd9190610b47565b6000546001840155905080156106b65760405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190610b0e565b5060405181815233907f41f65a7f97c30e01e7536b57c58e5875b46a2d428032c8990754d2f7ac142ff5906020015b60405180910390a25b5050565b6001546000036106dd576040516321311aa360e01b815260040160405180910390fd5b60006106ea600283610b47565b905060006106f88284610af5565b6040516323b872dd60e01b81523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af1158015610792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b69190610b0e565b506040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190610b0e565b50600154610864670de0b6b3a764000083610b30565b61086e9190610b47565b60008082825461087e9190610b69565b90915550506040518281527fb95243771503d0dd1766359d6d43e2cb66046113234073fdcf1f466fba623acb9060200160405180910390a160405181815233907f92209e8b44b9db41583844798e98c06a8bf7e9fcf15e50743f052606e0aecfa49060200160405180910390a2505050565b80600003610911576040516361db553160e11b815260040160405180910390fd5b33600090815260026020526040902080541561092f5761092f61057a565b6040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c69190610b0e565b5081600160008282546109d99190610b69565b90915550508054829082906000906109f2908490610b69565b9091555050600054600182015560405182815233907f8c265adcfa641899d6632b86254dda7a76f27701f1d21a732621d51f2328c460906020016106ad565b6001600160a01b03811660009081526002602052604081208054808303610a5c575060009392505050565b6000670de0b6b3a76400008360010154600054610a799190610af5565b610a839084610b30565b610a8d9190610b47565b95945050505050565b600060208284031215610aa857600080fd5b81356001600160a01b0381168114610abf57600080fd5b9392505050565b600060208284031215610ad857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b0857610b08610adf565b92915050565b600060208284031215610b2057600080fd5b81518015158114610abf57600080fd5b8082028115828204841417610b0857610b08610adf565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610b0857610b08610adf56fea2646970667358221220ca39c9fe92c4b9199166747abb4d24049ebfa873ca0459375dfb4aafa4cfe26164736f6c63430008130033000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da31000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002a1aa732fe04494be2a24e90b120ba1864da3b17

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c578063a694fc3a11610066578063a694fc3a146101f3578063c29b0c3114610206578063cdde89ba1461020f578063f166e9201461023657600080fd5b806370a08231146101a0578063817b1cd2146101d757806391c05b0b146101e057600080fd5b8063021417cf146100d45780632def6620146101155780632e17de781461011f578063372500ab146101325780633fc8cef31461013a57806361d027b314610179575b600080fd5b6100fb6100e2366004610a96565b6002602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b61011d610249565b005b61011d61012d366004610ac6565b610256565b61011d61057a565b6101617f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b03909116815260200161010c565b6101617f0000000000000000000000002a1aa732fe04494be2a24e90b120ba1864da3b1781565b6101c96101ae366004610a96565b6001600160a01b031660009081526002602052604090205490565b60405190815260200161010c565b6101c960015481565b61011d6101ee366004610ac6565b6106ba565b61011d610201366004610ac6565b6108f0565b6101c960005481565b6101617f000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da3181565b6101c9610244366004610a96565b610a31565b610254600019610256565b565b8060000361026357506000195b33600090815260026020526040812080549091819003610295576040516273e5c360e31b815260040160405180910390fd5b60006102a033610a31565b90508184106103a65781600160008282546102bb9190610af5565b909155505033600081815260026020526040808220828155600101919091555163a9059cbb60e01b81526004810191909152602481018390526001600160a01b037f000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da31169063a9059cbb906044016020604051808303816000875af1158015610347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036b9190610b0e565b5060405182815233907f668647a3bf871c3ff8779af5157eda0c0d6de3f7af4a3468d3ecc571fc413adb9060200160405180910390a26104a6565b83600160008282546103b89190610af5565b90915550508254849084906000906103d1908490610af5565b9091555050600054600184015560405163a9059cbb60e01b8152336004820152602481018590527f000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da316001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f9190610b0e565b5060405184815233907f668647a3bf871c3ff8779af5157eda0c0d6de3f7af4a3468d3ecc571fc413adb9060200160405180910390a25b80156105745760405163a9059cbb60e01b8152336004820152602481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053d9190610b0e565b5060405181815233907f41f65a7f97c30e01e7536b57c58e5875b46a2d428032c8990754d2f7ac142ff59060200160405180910390a25b50505050565b33600090815260026020526040812080549091036105aa576040516273e5c360e31b815260040160405180910390fd5b6000670de0b6b3a764000082600101546000546105c79190610af5565b83546105d39190610b30565b6105dd9190610b47565b6000546001840155905080156106b65760405163a9059cbb60e01b8152336004820152602481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190610b0e565b5060405181815233907f41f65a7f97c30e01e7536b57c58e5875b46a2d428032c8990754d2f7ac142ff5906020015b60405180910390a25b5050565b6001546000036106dd576040516321311aa360e01b815260040160405180910390fd5b60006106ea600283610b47565b905060006106f88284610af5565b6040516323b872dd60e01b81523360048201526001600160a01b037f0000000000000000000000002a1aa732fe04494be2a24e90b120ba1864da3b1781166024830152604482018590529192507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2909116906323b872dd906064016020604051808303816000875af1158015610792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b69190610b0e565b506040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906323b872dd906064016020604051808303816000875af115801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190610b0e565b50600154610864670de0b6b3a764000083610b30565b61086e9190610b47565b60008082825461087e9190610b69565b90915550506040518281527fb95243771503d0dd1766359d6d43e2cb66046113234073fdcf1f466fba623acb9060200160405180910390a160405181815233907f92209e8b44b9db41583844798e98c06a8bf7e9fcf15e50743f052606e0aecfa49060200160405180910390a2505050565b80600003610911576040516361db553160e11b815260040160405180910390fd5b33600090815260026020526040902080541561092f5761092f61057a565b6040516323b872dd60e01b8152336004820152306024820152604481018390527f000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da316001600160a01b0316906323b872dd906064016020604051808303816000875af11580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c69190610b0e565b5081600160008282546109d99190610b69565b90915550508054829082906000906109f2908490610b69565b9091555050600054600182015560405182815233907f8c265adcfa641899d6632b86254dda7a76f27701f1d21a732621d51f2328c460906020016106ad565b6001600160a01b03811660009081526002602052604081208054808303610a5c575060009392505050565b6000670de0b6b3a76400008360010154600054610a799190610af5565b610a839084610b30565b610a8d9190610b47565b95945050505050565b600060208284031215610aa857600080fd5b81356001600160a01b0381168114610abf57600080fd5b9392505050565b600060208284031215610ad857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b0857610b08610adf565b92915050565b600060208284031215610b2057600080fd5b81518015158114610abf57600080fd5b8082028115828204841417610b0857610b08610adf565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610b0857610b08610adf56fea2646970667358221220ca39c9fe92c4b9199166747abb4d24049ebfa873ca0459375dfb4aafa4cfe26164736f6c63430008130033

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

000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da31000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002a1aa732fe04494be2a24e90b120ba1864da3b17

-----Decoded View---------------
Arg [0] : _prtc (address): 0xb9098D3669A78e9AfE8b94a97290407400D9dA31
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _treasury (address): 0x2A1Aa732Fe04494bE2A24E90b120Ba1864Da3b17

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b9098d3669a78e9afe8b94a97290407400d9da31
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000002a1aa732fe04494be2a24e90b120ba1864da3b17


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.