ETH Price: $2,934.83 (-0.80%)

Contract

0xE115A86dFBc4FA1523E3Cce68905b94fcD2B4010

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Token Transfers found.

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Referral

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

interface IMintableERC20 {
    function mint(address to, uint256 amount) external;
    function transfer(address to, uint256 amount) external;
    function totalSupply() external view returns(uint256);
}

interface IAddressBook {
    function addressVerifiedUntil(
        address account
    ) external view returns (uint256 timestamp);
}

interface IStaking {
    function getStakedBalance(address wallet) external view returns (uint256);
}

contract Referral is ReentrancyGuard, Pausable, Ownable {
    // -------------------------
    // Errors (cheaper than strings)
    // -------------------------
    error IndexOutOfBounds();
    error InviterNotRegistered();
    error AlreadyRegistered();
    error NoPendingReward();
    error NotVerifiedAccount();
    error ZeroAddressToken();
    error SelfRegisterDetected();

    // -------------------------
    // Events
    // -------------------------
    event Registered(
        address indexed user,
        address indexed inviter,
        uint256 userId,
        uint256 inviterId,
        uint256 userReward,
        uint256 inviterRewardAccrued
    );

    event RewardClaimed(address indexed user, uint256 amount);
    event RewardAccrued(
        address indexed inviter,
        uint256 amount,
        uint256 totalUnclaimed
    );

    // -------------------------
    // Config
    // -------------------------
    IMintableERC20 public immutable rewardToken;
    IStaking public immutable staking;

    address public constant ADDRESS_BOOK =
        0x57b930D551e677CC36e2fA036Ae2fe8FdaE0330D;
    uint256 public constant REGISTER_REWARD = 5 ether; // 5 tokens (assumes 18 decimals)
    uint256 public constant INVITER_REWARD = 2.5 ether;

    // -------------------------
    // Storage
    // -------------------------
    struct InviterStats {
        uint128 inviteCount; // packs well
        uint256 unclaimedRewards; // keep as uint256
    }

    address[] private _users; // userId => address
    mapping(address => bool) public isUser; // address => registered?
    mapping(address => uint256) public userId; // address => id
    mapping(address => InviterStats) public inviterStats;

    constructor(
        address _initialOwner,
        address _token,
        address _staking
    ) Ownable(_initialOwner) {
        if (_token == address(0)) revert ZeroAddressToken();
        rewardToken = IMintableERC20(_token);
        staking = IStaking(_staking);

        // Register owner as user #0
        _users.push(_initialOwner);
        isUser[_initialOwner] = true;
        userId[_initialOwner] = 0;
    }

    // -------------------------
    // Views
    // -------------------------
    function usersCount() external view returns (uint256) {
        return _users.length;
    }

    function userAt(uint256 id) external view returns (address) {
        if (id >= _users.length) revert IndexOutOfBounds();
        return _users[id];
    }

    function getInviteId(
        address account
    ) external view returns (bool registered, uint256 id) {
        registered = isUser[account];
        if (registered) id = userId[account];
    }

    // reward halves every 2,500,000 tokens minted
    function getRewardDivisor() public view returns(uint256) {
        return (rewardToken.totalSupply() / 2_500_000 ether) + 1;
    }

    // -------------------------
    // Core
    // -------------------------
    function register(uint256 inviterId) external whenNotPaused nonReentrant {
        if (IAddressBook(ADDRESS_BOOK).addressVerifiedUntil(msg.sender) <= 0)
            revert NotVerifiedAccount();
        if (inviterId >= _users.length) revert IndexOutOfBounds();

        address inviter = _users[inviterId];
        if (msg.sender == inviter) revert SelfRegisterDetected();
        if (!isUser[inviter]) revert InviterNotRegistered();
        if (isUser[msg.sender]) revert AlreadyRegistered();

        // Effects: register user first
        uint256 newUserId = _users.length;
        _users.push(msg.sender);
        isUser[msg.sender] = true;
        userId[msg.sender] = newUserId;

        // Accrue inviter reward
        InviterStats storage stats = inviterStats[inviter];
        stats.inviteCount += 1;
        // if inviter is an owner, the reward token will not be minted
        uint256 accrued = 0;
        if (staking.getStakedBalance(inviter) >= 1 ether && inviterId != 0) {
            accrued = INVITER_REWARD / getRewardDivisor();
            stats.unclaimedRewards += accrued;
        }

        emit RewardAccrued(inviter, accrued, stats.unclaimedRewards);

        // Interactions: mint rewards
        uint256 registerReward = REGISTER_REWARD / getRewardDivisor();
        rewardToken.mint(address(this), registerReward);
        rewardToken.transfer(msg.sender, registerReward);

        emit Registered(
            msg.sender,
            inviter,
            newUserId,
            inviterId,
            registerReward,
            accrued
        );
    }

    function claim() external whenNotPaused nonReentrant {
        uint256 amount = inviterStats[msg.sender].unclaimedRewards;
        if (amount == 0) revert NoPendingReward();

        // Effects
        inviterStats[msg.sender].unclaimedRewards = 0;

        // Interactions
        rewardToken.mint(address(this), amount);
        rewardToken.transfer(msg.sender, amount);

        emit RewardClaimed(msg.sender, amount);
    }

    // -------------------------
    // Admin
    // -------------------------
    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

Settings
{
  "evmVersion": "cancun",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/",
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/",
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/"
  ]
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_staking","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyRegistered","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"IndexOutOfBounds","type":"error"},{"inputs":[],"name":"InviterNotRegistered","type":"error"},{"inputs":[],"name":"NoPendingReward","type":"error"},{"inputs":[],"name":"NotVerifiedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SelfRegisterDetected","type":"error"},{"inputs":[],"name":"ZeroAddressToken","type":"error"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"inviter","type":"address"},{"indexed":false,"internalType":"uint256","name":"userId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inviterId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"userReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inviterRewardAccrued","type":"uint256"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"inviter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalUnclaimed","type":"uint256"}],"name":"RewardAccrued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADDRESS_BOOK","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INVITER_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REGISTER_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getInviteId","outputs":[{"internalType":"bool","name":"registered","type":"bool"},{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardDivisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"inviterStats","outputs":[{"internalType":"uint128","name":"inviteCount","type":"uint128"},{"internalType":"uint256","name":"unclaimedRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"inviterId","type":"uint256"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IMintableERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"userAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60c060405234801561000f575f5ffd5b50604051610fe8380380610fe883398101604081905261002e91610184565b60015f55826001600160a01b03811661006057604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61006981610110565b506001600160a01b038216610091576040516314f28f2b60e01b815260040160405180910390fd5b6001600160a01b03918216608052811660a0526002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b031916939092169283179091555f918252600360209081526040808420805460ff1916909317909255600490528120556101c4565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80516001600160a01b038116811461017f575f5ffd5b919050565b5f5f5f60608486031215610196575f5ffd5b61019f84610169565b92506101ad60208501610169565b91506101bb60408501610169565b90509250925092565b60805160a051610dd961020f5f395f81816101d1015261088801525f8181610313015281816103c20152818161043301528181610595015281816109c20152610a3b0152610dd95ff3fe608060405234801561000f575f5ffd5b5060043610610127575f3560e01c80638456cb59116100a9578063e95403951161006e578063e9540395146102d1578063f207564e146102d9578063f26042ec146102ec578063f2fde38b146102fb578063f7c618c11461030e575f5ffd5b80638456cb59146102295780638da5cb5b14610231578063949587c114610247578063a4d7977514610256578063e4888f5b146102a7575f5ffd5b80634e71d92d116100ef5780634e71d92d146101f3578063598a96bf146101fb5780635c975abb1461020e5780636ba13a8214610219578063715018a614610221575f5ffd5b80630ccfe3e21461012b578063376fe102146101635780633f4ba83a146101905780634209fff11461019a5780634cf088d9146101cc575b5f5ffd5b6101467357b930d551e677cc36e2fa036ae2fe8fdae0330d81565b6040516001600160a01b0390911681526020015b60405180910390f35b610182610171366004610cc9565b60046020525f908152604090205481565b60405190815260200161015a565b610198610335565b005b6101bc6101a8366004610cc9565b60036020525f908152604090205460ff1681565b604051901515815260200161015a565b6101467f000000000000000000000000000000000000000000000000000000000000000081565b610198610347565b610146610209366004610cf6565b6104d3565b60015460ff166101bc565b600254610182565b610198610524565b610198610535565b60015461010090046001600160a01b0316610146565b610182674563918244f4000081565b610288610264366004610cc9565b60056020525f9081526040902080546001909101546001600160801b039091169082565b604080516001600160801b03909316835260208301919091520161015a565b6102ba6102b5366004610cc9565b610545565b60408051921515835260208301919091520161015a565b610182610586565b6101986102e7366004610cf6565b61062d565b6101826722b1c8c1227a000081565b610198610309366004610cc9565b610b02565b6101467f000000000000000000000000000000000000000000000000000000000000000081565b61033d610b41565b610345610b74565b565b61034f610bc6565b610357610bea565b335f908152600560205260408120600101549081900361038a57604051637bcde10b60e01b815260040160405180910390fd5b335f9081526005602052604080822060010191909155516340c10f1960e01b8152306004820152602481018290526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044015f604051808303815f87803b158015610403575f5ffd5b505af1158015610415573d5f5f3e3d5ffd5b505060405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063a9059cbb91506044015f604051808303815f87803b15801561047e575f5ffd5b505af1158015610490573d5f5f3e3d5ffd5b50506040518381523392507f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f7241915060200160405180910390a25061034560015f55565b6002545f9082106104f757604051634e23d03560e01b815260040160405180910390fd5b6002828154811061050a5761050a610d0d565b5f918252602090912001546001600160a01b031692915050565b61052c610b41565b6103455f610c12565b61053d610b41565b610345610c6b565b6001600160a01b0381165f9081526003602052604081205460ff1690811561058157506001600160a01b0382165f908152600460205260409020545b915091565b5f6a02116545850052128000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106139190610d21565b61061d9190610d4c565b610628906001610d6b565b905090565b610635610bc6565b61063d610bea565b604051632bc91fed60e01b81523360048201525f907357b930d551e677cc36e2fa036ae2fe8fdae0330d90632bc91fed90602401602060405180830381865afa15801561068c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b09190610d21565b116106ce5760405163af80975160e01b815260040160405180910390fd5b60025481106106f057604051634e23d03560e01b815260040160405180910390fd5b5f6002828154811061070457610704610d0d565b5f918252602090912001546001600160a01b031690503381900361073b5760405163793e9f9360e11b815260040160405180910390fd5b6001600160a01b0381165f9081526003602052604090205460ff166107735760405163da9942b960e01b815260040160405180910390fd5b335f9081526003602052604090205460ff16156107a357604051630ea075bf60e21b815260040160405180910390fd5b6002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180546001600160a01b031916339081179091555f908152600360209081526040808320805460ff191686179055600482528083208490556001600160a01b0386168352600590915281208054929390929091839161083a9084906001600160801b0316610d84565b82546001600160801b039182166101009390930a928302919092021990911617905550604051633a02a42d60e01b81526001600160a01b0384811660048301525f91670de0b6b3a7640000917f00000000000000000000000000000000000000000000000000000000000000001690633a02a42d90602401602060405180830381865afa1580156108cd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f19190610d21565b101580156108fe57508415155b156109385761090b610586565b61091d906722b1c8c1227a0000610d4c565b905080826001015f8282546109329190610d6b565b90915550505b836001600160a01b03167f5cfc0db0dadcda3ffeb594bd4216deeac8002fd7c1362f0c524fd097eaa1f465828460010154604051610980929190918252602082015260400190565b60405180910390a25f610991610586565b6109a390674563918244f40000610d4c565b6040516340c10f1960e01b8152306004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f19906044015f604051808303815f87803b158015610a0b575f5ffd5b505af1158015610a1d573d5f5f3e3d5ffd5b505060405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063a9059cbb91506044015f604051808303815f87803b158015610a86575f5ffd5b505af1158015610a98573d5f5f3e3d5ffd5b505060408051878152602081018a9052908101849052606081018590526001600160a01b03881692503391507f0a60de7373bb0efca74543e0136c16b902ca5ef928ba93eb99539d56c05084f19060800160405180910390a35050505050610aff60015f55565b50565b610b0a610b41565b6001600160a01b038116610b3857604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b610aff81610c12565b6001546001600160a01b036101009091041633146103455760405163118cdaa760e01b8152336004820152602401610b2f565b610b7c610ca6565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16156103455760405163d93c066560e01b815260040160405180910390fd5b60025f5403610c0c57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610c73610bc6565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610ba9565b60015460ff1661034557604051638dfc202b60e01b815260040160405180910390fd5b5f60208284031215610cd9575f5ffd5b81356001600160a01b0381168114610cef575f5ffd5b9392505050565b5f60208284031215610d06575f5ffd5b5035919050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d31575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b5f82610d6657634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610d7e57610d7e610d38565b92915050565b6001600160801b038181168382160190811115610d7e57610d7e610d3856fea26469706673582212205393d92f56f0858db55d754fd0d891c8408579275d14cdffd58a47571de8025464736f6c634300081c0033000000000000000000000000c5ea3469ce591ffb8ed55e45f101e02e456ef468000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef94000000000000000000000000aff0998b23ea8239b658531ee96093dc371aaea8

Deployed Bytecode

0x608060405234801561000f575f5ffd5b5060043610610127575f3560e01c80638456cb59116100a9578063e95403951161006e578063e9540395146102d1578063f207564e146102d9578063f26042ec146102ec578063f2fde38b146102fb578063f7c618c11461030e575f5ffd5b80638456cb59146102295780638da5cb5b14610231578063949587c114610247578063a4d7977514610256578063e4888f5b146102a7575f5ffd5b80634e71d92d116100ef5780634e71d92d146101f3578063598a96bf146101fb5780635c975abb1461020e5780636ba13a8214610219578063715018a614610221575f5ffd5b80630ccfe3e21461012b578063376fe102146101635780633f4ba83a146101905780634209fff11461019a5780634cf088d9146101cc575b5f5ffd5b6101467357b930d551e677cc36e2fa036ae2fe8fdae0330d81565b6040516001600160a01b0390911681526020015b60405180910390f35b610182610171366004610cc9565b60046020525f908152604090205481565b60405190815260200161015a565b610198610335565b005b6101bc6101a8366004610cc9565b60036020525f908152604090205460ff1681565b604051901515815260200161015a565b6101467f000000000000000000000000aff0998b23ea8239b658531ee96093dc371aaea881565b610198610347565b610146610209366004610cf6565b6104d3565b60015460ff166101bc565b600254610182565b610198610524565b610198610535565b60015461010090046001600160a01b0316610146565b610182674563918244f4000081565b610288610264366004610cc9565b60056020525f9081526040902080546001909101546001600160801b039091169082565b604080516001600160801b03909316835260208301919091520161015a565b6102ba6102b5366004610cc9565b610545565b60408051921515835260208301919091520161015a565b610182610586565b6101986102e7366004610cf6565b61062d565b6101826722b1c8c1227a000081565b610198610309366004610cc9565b610b02565b6101467f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef9481565b61033d610b41565b610345610b74565b565b61034f610bc6565b610357610bea565b335f908152600560205260408120600101549081900361038a57604051637bcde10b60e01b815260040160405180910390fd5b335f9081526005602052604080822060010191909155516340c10f1960e01b8152306004820152602481018290526001600160a01b037f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef9416906340c10f19906044015f604051808303815f87803b158015610403575f5ffd5b505af1158015610415573d5f5f3e3d5ffd5b505060405163a9059cbb60e01b8152336004820152602481018490527f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef946001600160a01b0316925063a9059cbb91506044015f604051808303815f87803b15801561047e575f5ffd5b505af1158015610490573d5f5f3e3d5ffd5b50506040518381523392507f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f7241915060200160405180910390a25061034560015f55565b6002545f9082106104f757604051634e23d03560e01b815260040160405180910390fd5b6002828154811061050a5761050a610d0d565b5f918252602090912001546001600160a01b031692915050565b61052c610b41565b6103455f610c12565b61053d610b41565b610345610c6b565b6001600160a01b0381165f9081526003602052604081205460ff1690811561058157506001600160a01b0382165f908152600460205260409020545b915091565b5f6a02116545850052128000007f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef946001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106139190610d21565b61061d9190610d4c565b610628906001610d6b565b905090565b610635610bc6565b61063d610bea565b604051632bc91fed60e01b81523360048201525f907357b930d551e677cc36e2fa036ae2fe8fdae0330d90632bc91fed90602401602060405180830381865afa15801561068c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b09190610d21565b116106ce5760405163af80975160e01b815260040160405180910390fd5b60025481106106f057604051634e23d03560e01b815260040160405180910390fd5b5f6002828154811061070457610704610d0d565b5f918252602090912001546001600160a01b031690503381900361073b5760405163793e9f9360e11b815260040160405180910390fd5b6001600160a01b0381165f9081526003602052604090205460ff166107735760405163da9942b960e01b815260040160405180910390fd5b335f9081526003602052604090205460ff16156107a357604051630ea075bf60e21b815260040160405180910390fd5b6002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180546001600160a01b031916339081179091555f908152600360209081526040808320805460ff191686179055600482528083208490556001600160a01b0386168352600590915281208054929390929091839161083a9084906001600160801b0316610d84565b82546001600160801b039182166101009390930a928302919092021990911617905550604051633a02a42d60e01b81526001600160a01b0384811660048301525f91670de0b6b3a7640000917f000000000000000000000000aff0998b23ea8239b658531ee96093dc371aaea81690633a02a42d90602401602060405180830381865afa1580156108cd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f19190610d21565b101580156108fe57508415155b156109385761090b610586565b61091d906722b1c8c1227a0000610d4c565b905080826001015f8282546109329190610d6b565b90915550505b836001600160a01b03167f5cfc0db0dadcda3ffeb594bd4216deeac8002fd7c1362f0c524fd097eaa1f465828460010154604051610980929190918252602082015260400190565b60405180910390a25f610991610586565b6109a390674563918244f40000610d4c565b6040516340c10f1960e01b8152306004820152602481018290529091507f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef946001600160a01b0316906340c10f19906044015f604051808303815f87803b158015610a0b575f5ffd5b505af1158015610a1d573d5f5f3e3d5ffd5b505060405163a9059cbb60e01b8152336004820152602481018490527f000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef946001600160a01b0316925063a9059cbb91506044015f604051808303815f87803b158015610a86575f5ffd5b505af1158015610a98573d5f5f3e3d5ffd5b505060408051878152602081018a9052908101849052606081018590526001600160a01b03881692503391507f0a60de7373bb0efca74543e0136c16b902ca5ef928ba93eb99539d56c05084f19060800160405180910390a35050505050610aff60015f55565b50565b610b0a610b41565b6001600160a01b038116610b3857604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b610aff81610c12565b6001546001600160a01b036101009091041633146103455760405163118cdaa760e01b8152336004820152602401610b2f565b610b7c610ca6565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16156103455760405163d93c066560e01b815260040160405180910390fd5b60025f5403610c0c57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610c73610bc6565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610ba9565b60015460ff1661034557604051638dfc202b60e01b815260040160405180910390fd5b5f60208284031215610cd9575f5ffd5b81356001600160a01b0381168114610cef575f5ffd5b9392505050565b5f60208284031215610d06575f5ffd5b5035919050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d31575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b5f82610d6657634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610d7e57610d7e610d38565b92915050565b6001600160801b038181168382160190811115610d7e57610d7e610d3856fea26469706673582212205393d92f56f0858db55d754fd0d891c8408579275d14cdffd58a47571de8025464736f6c634300081c0033

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

000000000000000000000000c5ea3469ce591ffb8ed55e45f101e02e456ef468000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef94000000000000000000000000aff0998b23ea8239b658531ee96093dc371aaea8

-----Decoded View---------------
Arg [0] : _initialOwner (address): 0xC5EA3469ce591Ffb8ed55E45f101E02e456ef468
Arg [1] : _token (address): 0xf4C7A3Fc2459bAE125593482f04307ff92e9Ef94
Arg [2] : _staking (address): 0xaFf0998b23ea8239B658531ee96093dc371aaea8

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c5ea3469ce591ffb8ed55e45f101e02e456ef468
Arg [1] : 000000000000000000000000f4c7a3fc2459bae125593482f04307ff92e9ef94
Arg [2] : 000000000000000000000000aff0998b23ea8239b658531ee96093dc371aaea8


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

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.