POL Price: $0.694895 (-1.19%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim647209822024-11-25 16:40:0112 days ago1732552801IN
Tigris : TIG Staking
0 POL0.0029982691
Unstake601422632024-08-03 10:53:47126 days ago1722682427IN
Tigris : TIG Staking
0 POL0.0033499230.00000002
Unstake595986992024-07-20 17:18:44140 days ago1721495924IN
Tigris : TIG Staking
0 POL0.0036849133
Unstake587710202024-06-30 1:55:55161 days ago1719712555IN
Tigris : TIG Staking
0 POL0.0334992300
Unstake566853842024-05-07 13:56:13214 days ago1715090173IN
Tigris : TIG Staking
0 POL0.002316531
Claim566853632024-05-07 13:55:29214 days ago1715090129IN
Tigris : TIG Staking
0 POL0.0022538231
Claim561375322024-04-22 21:01:13229 days ago1713819673IN
Tigris : TIG Staking
0 POL0.0022538231
Stake554267792024-04-04 7:07:00247 days ago1712214420IN
Tigris : TIG Staking
0 POL0.01955202201.05324124
Stake551401932024-03-27 13:51:38255 days ago1711547498IN
Tigris : TIG Staking
0 POL0.05060278406.34361096
Stake544932702024-03-10 14:09:42272 days ago1710079782IN
Tigris : TIG Staking
0 POL0.01817069178.06029423
Unstake543624852024-03-07 6:24:34275 days ago1709792674IN
Tigris : TIG Staking
0 POL0.01214467144
Stake543624492024-03-07 6:23:18275 days ago1709792598IN
Tigris : TIG Staking
0 POL0.01469836144
Unstake543624112024-03-07 6:21:56275 days ago1709792516IN
Tigris : TIG Staking
0 POL0.00737612128
Stake543623992024-03-07 6:21:30275 days ago1709792490IN
Tigris : TIG Staking
0 POL0.01367808128
Unstake543458802024-03-06 20:13:42276 days ago1709756022IN
Tigris : TIG Staking
0 POL0.0069495193
Claim543458372024-03-06 20:12:10276 days ago1709755930IN
Tigris : TIG Staking
0 POL0.0051711793
Unstake527181842024-01-25 2:42:14318 days ago1706150534IN
Tigris : TIG Staking
0 POL0.0017553230.45433189
Claim527181772024-01-25 2:42:00318 days ago1706150520IN
Tigris : TIG Staking
0 POL0.0021951430.1929457
Stake523912122024-01-16 12:08:40326 days ago1705406920IN
Tigris : TIG Staking
0 POL0.0032054930.00055787
Unstake517814392023-12-31 14:13:34342 days ago1704032014IN
Tigris : TIG Staking
0 POL0.01854332178
Stake515925052023-12-26 21:02:30347 days ago1703624550IN
Tigris : TIG Staking
0 POL0.01358246109.08911029
Stake510638662023-12-13 0:09:49361 days ago1702426189IN
Tigris : TIG Staking
0 POL0.00723016115
Unstake510634772023-12-12 23:55:31361 days ago1702425331IN
Tigris : TIG Staking
0 POL0.01198024115
Claim491074652023-10-24 20:23:40410 days ago1698179020IN
Tigris : TIG Staking
0 POL0.002884987.55941857
Claim490242702023-10-22 15:53:22412 days ago1697990002IN
Tigris : TIG Staking
0 POL0.00737387101.42320723
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GovernanceStaking

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000000 runs

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

import "./utils/IterableMappingBool.sol";
import "./interfaces/IGovernanceStaking.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract GovernanceStaking is Ownable, IGovernanceStaking {

    using IterableMappingBool for IterableMappingBool.Map;

    uint256 public constant MAX_LOCK_PERIOD = 31_536_000; // 1 year

    IERC20 public token;

    uint256 public totalStaked;
    mapping(address => uint256) public userStaked;
    mapping(address => uint256) public lockEnd;
    mapping(address => mapping(address => uint256)) public userPaid; // user => token => amount
    mapping(address => uint256) public accRewardsPerToken;
    IterableMappingBool.Map private rewardTokens;

    event Staked(address indexed user, uint256 amount);
    event Unstaked(address indexed user, uint256 amount);
    event RewardClaimed(address indexed user, uint256 reward);
    event RewardDistributed(address token, uint256 amount);
    event TokenWhitelisted(address token);

    constructor(IERC20 _token) {
        token = _token;
    }

    /**
     *  @notice Allows a user to stake a specified amount of tokens
     *  @param _amount The amount of tokens to be staked
     *  @param _duration The duration for which tokens will be staked
     */
    function stake(uint256 _amount, uint256 _duration) external {
        token.transferFrom(msg.sender, address(this), _amount);
        _claim(msg.sender);
        userStaked[msg.sender] += _amount;
        totalStaked = totalStaked + _amount;
        if (_duration != 0) {
            uint256 oldLockEnd = lockEnd[msg.sender];
            uint256 newLockEnd = oldLockEnd <= block.timestamp ? block.timestamp + _duration : oldLockEnd += _duration;
            require(newLockEnd <= block.timestamp + MAX_LOCK_PERIOD, "Lock period too long");
            lockEnd[msg.sender] = newLockEnd;
        }
        _updateUserPaid(msg.sender);
        emit Staked(msg.sender, _amount);
    }

    /**
     *  @notice Allows a user to unstake a specified amount of tokens
     *  @param _amount The amount of tokens to be unstaked
     */
    function unstake(uint256 _amount) external {
        require(block.timestamp >= lockEnd[msg.sender], "Locked");
        _claim(msg.sender);
        userStaked[msg.sender] -= _amount;
        totalStaked = totalStaked - _amount;
        _updateUserPaid(msg.sender);
        token.transfer(msg.sender, _amount);
        emit Unstaked(msg.sender, _amount);
    }

    /**
     * @notice Allows a user to claim their rewards
     */
    function claim() external {
        _claim(msg.sender);
    }

    /**
     * @notice Distribute rewards to stakers
     * @param _token The address of the token to be distributed
     * @param _amount The amount of tokens to be distributed
     */
    function distribute(address _token, uint256 _amount) external {
        if (rewardTokens.size() == 0 || totalStaked == 0 || !rewardTokens.get(_token)) return;
        try IERC20(_token).transferFrom(msg.sender, address(this), _amount) {
            accRewardsPerToken[_token] += _amount*1e18/totalStaked;
            emit RewardDistributed(_token, _amount);
        } catch {
            return;
        }
    }

    /**
     * @notice Owner can whitelist a new token
     * @param _rewardToken The token address to be whitelisted
     */
    function whitelistReward(address _rewardToken) external onlyOwner {
        require(!rewardTokens.get(_rewardToken), "Already whitelisted");
        rewardTokens.set(_rewardToken);
        emit TokenWhitelisted(_rewardToken);
    }

    /**
     * @dev Logic for claiming rewards
     * @param _user The address that claims the rewards
     */
    function _claim(address _user) internal {
        address[] memory _tokens = rewardTokens.keys;
        uint256 _len = _tokens.length;
        for (uint256 i=0; i<_len; i++) {
            address _token = _tokens[i];
            uint256 _pending = pending(_user, _token);
            if (_pending != 0) {
                userPaid[_user][_token] += _pending;
                IERC20(_token).transfer(_user, _pending);
                emit RewardClaimed(_user, _pending);
            }
        }
    }

    /**
     * @dev Logic for updating userPaid variable for pending calculations
     * @param _user The address whose userPaid value is updated
     */
    function _updateUserPaid(address _user) internal {
        address[] memory _tokens = rewardTokens.keys;
        uint256 _len = _tokens.length;
        for (uint256 i=0; i<_len; i++) {
            address _token = _tokens[i];
            userPaid[_user][_token] = userStaked[_user] * accRewardsPerToken[_token] / 1e18;
        }
    }

    /**
     * @notice Check pending token rewards for an address
     * @param _user The address whose pending rewards are read
     * @param _token The address of the reward token
     * @return Pending token reward amount
     */
    function pending(address _user, address _token) public view returns (uint256) {
        return userStaked[_user]*accRewardsPerToken[_token]/1e18 - userPaid[_user][_token]; 
    }

    /**
     * @notice View the staked amount of an address increased by the lock duration for governance use
     * @param _user The address of whose stake is read
     * @return Weighted stake amount
     */
    function weightedStake(address _user) public view returns (uint256) {
        uint256 _compareTimestamp = block.timestamp > lockEnd[_user] ? block.timestamp : lockEnd[_user];
        return userStaked[_user] + userStaked[_user] * (_compareTimestamp - block.timestamp) / MAX_LOCK_PERIOD;
    }

}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 4 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 5 of 6 : IGovernanceStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IGovernanceStaking {
    function stake(uint256 _amount, uint256 _duration) external;
    function unstake(uint256 _amount) external;
    function claim() external;
    function distribute(address _token, uint256 _amount) external;
    function whitelistReward(address _rewardToken) external;
    function pending(address _user, address _token) external view returns (uint256);
    function userStaked(address _user) external view returns (uint256);
}

File 6 of 6 : IterableMappingBool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library IterableMappingBool {
    // Iterable mapping from address to bool;
    struct Map {
        address[] keys;
        mapping(address => bool) values;
        mapping(address => uint) indexOf;
    }

    function get(Map storage map, address key) internal view returns (bool) {
        return map.values[key];
    }

    function getKeyAtIndex(Map storage map, uint index) internal view returns (address) {
        return map.keys[index];
    }

    function size(Map storage map) internal view returns (uint) {
        return map.keys.length;
    }

    function set(Map storage map, address key) internal {
        if (!map.values[key]) {
            map.values[key] = true;
            map.indexOf[key] = map.keys.length;
            map.keys.push(key);
        }
    }

    function remove(Map storage map, address key) internal {
        if (map.values[key]) {
            delete map.values[key];

            uint index = map.indexOf[key];
            address lastKey = map.keys[map.keys.length - 1];

            map.indexOf[lastKey] = index;
            delete map.indexOf[key];

            map.keys[index] = lastKey;
            map.keys.pop();
        }
    }

}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"MAX_LOCK_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accRewardsPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lockEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"pending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"weightedStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"whitelistReward","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161134038038061134083398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b611254806100ec6000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80638da5cb5b116100b2578063f2fde38b11610081578063fb93210811610066578063fb9321081461026a578063fc0c546a1461027d578063ff05db801461029d57600080fd5b8063f2fde38b1461024c578063f55401621461025f57600080fd5b80638da5cb5b146101c7578063aadcef8614610206578063acc3a93914610219578063db89461b1461023957600080fd5b80634e71d92d116100ee5780634e71d92d1461019b578063715018a6146101a35780637b0472f0146101ab578063817b1cd2146101be57600080fd5b806319bc9ae81461012057806323792279146101465780632e17de7814610166578063388d89421461017b575b600080fd5b61013361012e36600461103b565b6102c8565b6040519081526020015b60405180910390f35b61013361015436600461106e565b60046020526000908152604090205481565b610179610174366004611089565b610345565b005b61013361018936600461106e565b60066020526000908152604090205481565b6101796104de565b6101796104e9565b6101796101b93660046110a2565b6104fb565b61013360025481565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013d565b61013361021436600461106e565b6106e3565b61013361022736600461106e565b60036020526000908152604090205481565b61017961024736600461106e565b6107c0565b61017961025a36600461106e565b6108af565b6101336301e1338081565b6101796102783660046110c4565b610966565b6001546101e19073ffffffffffffffffffffffffffffffffffffffff1681565b6101336102ab36600461103b565b600560209081526000928352604080842090915290825290205481565b73ffffffffffffffffffffffffffffffffffffffff80831660008181526005602090815260408083209486168352938152838220546006825284832054938352600390915292812054909291670de0b6b3a764000091610328919061111d565b6103329190611134565b61033c919061116f565b90505b92915050565b336000908152600460205260409020544210156103c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4c6f636b6564000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6103cc33610b18565b33600090815260036020526040812080548392906103eb90849061116f565b90915550506002546103fe90829061116f565b60025561040a33610d17565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303816000875af1158015610481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a59190611182565b5060405181815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759060200160405180910390a250565b6104e733610b18565b565b6104f1610e54565b6104e76000610ed5565b6001546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810184905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af1158015610578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059c9190611182565b506105a633610b18565b33600090815260036020526040812080548492906105c59084906111a4565b90915550506002546105d89083906111a4565b60025580156106a15733600090815260046020526040812054904282111561060c5761060483836111a4565b915081610616565b61061683426111a4565b90506106266301e13380426111a4565b81111561068f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4c6f636b20706572696f6420746f6f206c6f6e6700000000000000000000000060448201526064016103ba565b33600090815260046020526040902055505b6106aa33610d17565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600460205260408120548190421161073c5773ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205461073e565b425b90506301e1338061074f428361116f565b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604090205461077f919061111d565b6107899190611134565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260409020546107b991906111a4565b9392505050565b6107c8610e54565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602052604090205460ff1615610858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c72656164792077686974656c69737465640000000000000000000000000060448201526064016103ba565b610863600782610f4a565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d2629060200160405180910390a150565b6108b7610e54565b73ffffffffffffffffffffffffffffffffffffffff811661095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103ba565b61096381610ed5565b50565b60075415806109755750600254155b806109a6575073ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16155b156109af575050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810182905273ffffffffffffffffffffffffffffffffffffffff8316906323b872dd906064016020604051808303816000875af1925050508015610a62575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a5f91810190611182565b60015b610a6a575050565b50600254610a8082670de0b6b3a764000061111d565b610a8a9190611134565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604081208054909190610abf9084906111a4565b90915550506040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527fe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea6910160405180910390a15b5050565b60006007600001805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610b55575b505083519394506000925050505b81811015610d11576000838281518110610baa57610baa6111b7565b602002602001015190506000610bc086836102c8565b90508015610cfc5773ffffffffffffffffffffffffffffffffffffffff808716600090815260056020908152604080832093861683529290529081208054839290610c0c9084906111a4565b90915550506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610c86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610caa9190611182565b508573ffffffffffffffffffffffffffffffffffffffff167f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f724182604051610cf391815260200190565b60405180910390a25b50508080610d09906111e6565b915050610b8e565b50505050565b60006007600001805480602002602001604051908101604052809291908181526020018280548015610d7f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d54575b505083519394506000925050505b81811015610d11576000838281518110610da957610da96111b7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff808216600090815260068452604080822054928a16825260039094529290922054909250670de0b6b3a764000091610e019161111d565b610e0b9190611134565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600560209081526040808320959093168252939093529091205580610e4c816111e6565b915050610d8d565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ba565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604090205460ff16610b145773ffffffffffffffffffffffffffffffffffffffff16600081815260018381016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841790558554600287018352908420819055918201855593825292902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461103657600080fd5b919050565b6000806040838503121561104e57600080fd5b61105783611012565b915061106560208401611012565b90509250929050565b60006020828403121561108057600080fd5b61033c82611012565b60006020828403121561109b57600080fd5b5035919050565b600080604083850312156110b557600080fd5b50508035926020909101359150565b600080604083850312156110d757600080fd5b6110e083611012565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761033f5761033f6110ee565b60008261116a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561033f5761033f6110ee565b60006020828403121561119457600080fd5b815180151581146107b957600080fd5b8082018082111561033f5761033f6110ee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611217576112176110ee565b506001019056fea26469706673582212205dcca453076af4f88d32d16cee5ab224efee5736b727d1445e048ef3a163fba664736f6c634300081300330000000000000000000000007157fe7533f2fc77498755cc253d79046c746560

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061011b5760003560e01c80638da5cb5b116100b2578063f2fde38b11610081578063fb93210811610066578063fb9321081461026a578063fc0c546a1461027d578063ff05db801461029d57600080fd5b8063f2fde38b1461024c578063f55401621461025f57600080fd5b80638da5cb5b146101c7578063aadcef8614610206578063acc3a93914610219578063db89461b1461023957600080fd5b80634e71d92d116100ee5780634e71d92d1461019b578063715018a6146101a35780637b0472f0146101ab578063817b1cd2146101be57600080fd5b806319bc9ae81461012057806323792279146101465780632e17de7814610166578063388d89421461017b575b600080fd5b61013361012e36600461103b565b6102c8565b6040519081526020015b60405180910390f35b61013361015436600461106e565b60046020526000908152604090205481565b610179610174366004611089565b610345565b005b61013361018936600461106e565b60066020526000908152604090205481565b6101796104de565b6101796104e9565b6101796101b93660046110a2565b6104fb565b61013360025481565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013d565b61013361021436600461106e565b6106e3565b61013361022736600461106e565b60036020526000908152604090205481565b61017961024736600461106e565b6107c0565b61017961025a36600461106e565b6108af565b6101336301e1338081565b6101796102783660046110c4565b610966565b6001546101e19073ffffffffffffffffffffffffffffffffffffffff1681565b6101336102ab36600461103b565b600560209081526000928352604080842090915290825290205481565b73ffffffffffffffffffffffffffffffffffffffff80831660008181526005602090815260408083209486168352938152838220546006825284832054938352600390915292812054909291670de0b6b3a764000091610328919061111d565b6103329190611134565b61033c919061116f565b90505b92915050565b336000908152600460205260409020544210156103c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4c6f636b6564000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6103cc33610b18565b33600090815260036020526040812080548392906103eb90849061116f565b90915550506002546103fe90829061116f565b60025561040a33610d17565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303816000875af1158015610481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a59190611182565b5060405181815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f759060200160405180910390a250565b6104e733610b18565b565b6104f1610e54565b6104e76000610ed5565b6001546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810184905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af1158015610578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059c9190611182565b506105a633610b18565b33600090815260036020526040812080548492906105c59084906111a4565b90915550506002546105d89083906111a4565b60025580156106a15733600090815260046020526040812054904282111561060c5761060483836111a4565b915081610616565b61061683426111a4565b90506106266301e13380426111a4565b81111561068f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4c6f636b20706572696f6420746f6f206c6f6e6700000000000000000000000060448201526064016103ba565b33600090815260046020526040902055505b6106aa33610d17565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600460205260408120548190421161073c5773ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205461073e565b425b90506301e1338061074f428361116f565b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604090205461077f919061111d565b6107899190611134565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260409020546107b991906111a4565b9392505050565b6107c8610e54565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602052604090205460ff1615610858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c72656164792077686974656c69737465640000000000000000000000000060448201526064016103ba565b610863600782610f4a565b60405173ffffffffffffffffffffffffffffffffffffffff821681527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d2629060200160405180910390a150565b6108b7610e54565b73ffffffffffffffffffffffffffffffffffffffff811661095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103ba565b61096381610ed5565b50565b60075415806109755750600254155b806109a6575073ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16155b156109af575050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810182905273ffffffffffffffffffffffffffffffffffffffff8316906323b872dd906064016020604051808303816000875af1925050508015610a62575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a5f91810190611182565b60015b610a6a575050565b50600254610a8082670de0b6b3a764000061111d565b610a8a9190611134565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604081208054909190610abf9084906111a4565b90915550506040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527fe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea6910160405180910390a15b5050565b60006007600001805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610b55575b505083519394506000925050505b81811015610d11576000838281518110610baa57610baa6111b7565b602002602001015190506000610bc086836102c8565b90508015610cfc5773ffffffffffffffffffffffffffffffffffffffff808716600090815260056020908152604080832093861683529290529081208054839290610c0c9084906111a4565b90915550506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610c86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610caa9190611182565b508573ffffffffffffffffffffffffffffffffffffffff167f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f724182604051610cf391815260200190565b60405180910390a25b50508080610d09906111e6565b915050610b8e565b50505050565b60006007600001805480602002602001604051908101604052809291908181526020018280548015610d7f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610d54575b505083519394506000925050505b81811015610d11576000838281518110610da957610da96111b7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff808216600090815260068452604080822054928a16825260039094529290922054909250670de0b6b3a764000091610e019161111d565b610e0b9190611134565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600560209081526040808320959093168252939093529091205580610e4c816111e6565b915050610d8d565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ba565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604090205460ff16610b145773ffffffffffffffffffffffffffffffffffffffff16600081815260018381016020908152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841790558554600287018352908420819055918201855593825292902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461103657600080fd5b919050565b6000806040838503121561104e57600080fd5b61105783611012565b915061106560208401611012565b90509250929050565b60006020828403121561108057600080fd5b61033c82611012565b60006020828403121561109b57600080fd5b5035919050565b600080604083850312156110b557600080fd5b50508035926020909101359150565b600080604083850312156110d757600080fd5b6110e083611012565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761033f5761033f6110ee565b60008261116a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561033f5761033f6110ee565b60006020828403121561119457600080fd5b815180151581146107b957600080fd5b8082018082111561033f5761033f6110ee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611217576112176110ee565b506001019056fea26469706673582212205dcca453076af4f88d32d16cee5ab224efee5736b727d1445e048ef3a163fba664736f6c63430008130033

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

0000000000000000000000007157fe7533f2fc77498755cc253d79046c746560

-----Decoded View---------------
Arg [0] : _token (address): 0x7157Fe7533f2fc77498755Cc253d79046c746560

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007157fe7533f2fc77498755cc253d79046c746560


Block Transaction 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
[ 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.