ETH Price: $2,521.31 (-0.45%)

Contract

0x3cDA57818cF6aeAb28f518a469550379609a2a4A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Rescue Tokens198977172024-05-18 15:26:59103 days ago1716046019IN
0x3cDA5781...9609a2a4A
0 ETH0.000398975.49267487
Withdraw198723342024-05-15 2:16:47106 days ago1715739407IN
0x3cDA5781...9609a2a4A
0 ETH0.00045994.67328998
Withdraw197482272024-04-27 17:42:23124 days ago1714239743IN
0x3cDA5781...9609a2a4A
0 ETH0.000747339.19092243
Withdraw196679452024-04-16 12:08:59135 days ago1713269339IN
0x3cDA5781...9609a2a4A
0 ETH0.0012118314.90352142
Withdraw196569792024-04-14 23:14:47136 days ago1713136487IN
0x3cDA5781...9609a2a4A
0 ETH0.0008898510.94373514
Withdraw196286352024-04-10 23:53:11140 days ago1712793191IN
0x3cDA5781...9609a2a4A
0 ETH0.0012489315.35977486
Withdraw196139512024-04-08 22:33:59143 days ago1712615639IN
0x3cDA5781...9609a2a4A
0 ETH0.0022598227.79202523
Withdraw196083622024-04-08 3:46:11143 days ago1712547971IN
0x3cDA5781...9609a2a4A
0 ETH0.0009345711.49372265
Withdraw196054202024-04-07 17:52:11144 days ago1712512331IN
0x3cDA5781...9609a2a4A
0 ETH0.0018640722.92496058
Withdraw196052112024-04-07 17:09:59144 days ago1712509799IN
0x3cDA5781...9609a2a4A
0 ETH0.003145838.68809596
Withdraw195898912024-04-05 13:39:11146 days ago1712324351IN
0x3cDA5781...9609a2a4A
0 ETH0.0023477323.85617016
Withdraw195797272024-04-04 3:29:35147 days ago1712201375IN
0x3cDA5781...9609a2a4A
0 ETH0.0019407823.86835296
Withdraw195646342024-04-02 0:45:47149 days ago1712018747IN
0x3cDA5781...9609a2a4A
0 ETH0.0020764725.53718211
Withdraw195622812024-04-01 16:51:23150 days ago1711990283IN
0x3cDA5781...9609a2a4A
0 ETH0.003774438.35309475
Withdraw194663422024-03-19 4:12:59163 days ago1710821579IN
0x3cDA5781...9609a2a4A
0 ETH0.0030037430.5221032
Withdraw194619722024-03-18 13:27:47164 days ago1710768467IN
0x3cDA5781...9609a2a4A
0 ETH0.0051677663.55472371
Withdraw194411122024-03-15 15:02:23167 days ago1710514943IN
0x3cDA5781...9609a2a4A
0 ETH0.0039158148.15783891
Withdraw194410722024-03-15 14:54:11167 days ago1710514451IN
0x3cDA5781...9609a2a4A
0 ETH0.0039609548.71308732
Deposit191107762024-01-29 7:44:47213 days ago1706514287IN
0x3cDA5781...9609a2a4A
0 ETH0.0024945511.00446996
Deposit191063082024-01-28 16:45:35214 days ago1706460335IN
0x3cDA5781...9609a2a4A
0 ETH0.003239514.2907354
Deposit190205002024-01-16 15:58:59226 days ago1705420739IN
0x3cDA5781...9609a2a4A
0 ETH0.0105466146.52277014
Deposit189984482024-01-13 14:04:35229 days ago1705154675IN
0x3cDA5781...9609a2a4A
0 ETH0.0055139624.32296321
Deposit189851192024-01-11 17:18:59231 days ago1704993539IN
0x3cDA5781...9609a2a4A
0 ETH0.0096291542.47793029
Deposit189637112024-01-08 17:15:35234 days ago1704734135IN
0x3cDA5781...9609a2a4A
0 ETH0.0064160928.30387022
Deposit189411652024-01-05 12:47:11237 days ago1704458831IN
0x3cDA5781...9609a2a4A
0 ETH0.004439519.58437746
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:
StakingContract

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
File 1 of 5 : StakingContract.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.11;

import "./Ownable.sol";
import "./IERC20.sol";
import "./SafeMath.sol";

contract StakingContract is Ownable {
    using SafeMath for uint256;

    struct Bracket {
        uint256 lockedDays;
        uint256 dailyRewards;
        bool enabled;
    }

    struct DepositInfo {
        uint256 amount;
        uint256 timestamp;
    }

    struct Deposit {
        DepositInfo info;
        Bracket bracket;
        bool active;
    }

    uint256 private PRECISION_FACTOR = 10000;
    IERC20 public depositToken;
    IERC20 public rewardsToken;

    address[] public depositAddresses;
    mapping (uint256 => Bracket) public brackets;
    mapping (address => Deposit) public deposits;

    event UserDeposit(address wallet, uint256 amount);
    event UserWithdraw(address wallet, uint256 depositAmount, uint256 rewardsAmount);

    function mapProportionalHoldingsToRewardsSupply(uint256 proportion, IERC20 token) private view returns (uint256) {
        uint256 totalSupply = token.totalSupply();
        uint256 rewardsSupply = proportion.mul(totalSupply).div(PRECISION_FACTOR.mul(100));
        return rewardsSupply;
    }

    function getProportionalSupplyHoldings(uint256 balance, IERC20 token) private view returns (uint256) {
        uint256 totalSupply = token.totalSupply();
        uint256 proportion = balance.mul(PRECISION_FACTOR).mul(100).div(totalSupply);
        return proportion;
    }

    function calculateRewards(address wallet) public view returns (uint256) {
        uint256 rewards = 0;
        Deposit memory userDeposit = deposits[wallet];
        if (userDeposit.active) {
            uint256 depositDays = block.timestamp.sub(userDeposit.info.timestamp).div(86400);
            uint256 depositTokenHoldings = getProportionalSupplyHoldings(userDeposit.info.amount, depositToken);
            uint256 proportionalRewardsSupply = mapProportionalHoldingsToRewardsSupply(depositTokenHoldings, rewardsToken);

            uint256 rewardsPercent = depositDays.mul(userDeposit.bracket.dailyRewards);
            rewards = proportionalRewardsSupply.mul(rewardsPercent).div(PRECISION_FACTOR.mul(100));
        }
        return rewards;
    }

    function deposit(uint256 tokenAmount, uint256 bracket) external {
        require(!deposits[_msgSender()].active, "user has already deposited");
        require(brackets[bracket].enabled, "bracket is not enabled");

        // transfer tokens
        uint256 previousBalance = depositToken.balanceOf(address(this));
        depositToken.transferFrom(_msgSender(), address(this), tokenAmount);
        uint256 deposited = depositToken.balanceOf(address(this)).sub(previousBalance);

        // deposit logic
        DepositInfo memory info = DepositInfo(deposited, block.timestamp);
        deposits[_msgSender()] = Deposit(info, brackets[bracket], true);
        depositAddresses.push(_msgSender());
        emit UserDeposit(_msgSender(), deposited);
    }

    function withdraw() external {
        Deposit memory userDeposit = deposits[_msgSender()];
        require(userDeposit.active, "user has no active deposits");
        require(block.timestamp >= userDeposit.info.timestamp + userDeposit.bracket.lockedDays * 1 days, "Can't withdraw yet");
        uint256 depositedAmount = userDeposit.info.amount;
        uint256 rewardsAmount = calculateRewards(_msgSender());

        require (rewardsToken.balanceOf(address(this)) >= rewardsAmount, "insufficient rewards balance");

        deposits[_msgSender()].info.amount = 0;
        deposits[_msgSender()].active = false;
        rewardsToken.transfer(_msgSender(), rewardsAmount);
        depositToken.transfer(_msgSender(), depositedAmount);

        emit UserWithdraw(_msgSender(), depositedAmount, rewardsAmount);
    }

    function addBracket(uint256 id, uint256 lockedDays, uint256 dailyRewards) external onlyOwner {
        brackets[id] = Bracket(lockedDays, dailyRewards, true);
    }

    function setDepositToken(address tokenAddress) external onlyOwner {
        depositToken = IERC20(tokenAddress);
    }

    function setRewardsToken(address tokenAddress) external onlyOwner {
        rewardsToken = IERC20(tokenAddress);
    }

    function rescueTokens() external onlyOwner {
        if (rewardsToken.balanceOf(address(this)) > 0) {
            rewardsToken.transfer(_msgSender(), rewardsToken.balanceOf(address(this)));
        }

        if (depositToken.balanceOf(address(this)) > 0) {
            depositToken.transfer(_msgSender(), depositToken.balanceOf(address(this)));
        }
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "./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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 5 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) 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 the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);
}

File 4 of 5 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 5 : 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;
    }
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"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":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UserDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardsAmount","type":"uint256"}],"name":"UserWithdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"lockedDays","type":"uint256"},{"internalType":"uint256","name":"dailyRewards","type":"uint256"}],"name":"addBracket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"brackets","outputs":[{"internalType":"uint256","name":"lockedDays","type":"uint256"},{"internalType":"uint256","name":"dailyRewards","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"bracket","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposits","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct StakingContract.DepositInfo","name":"info","type":"tuple"},{"components":[{"internalType":"uint256","name":"lockedDays","type":"uint256"},{"internalType":"uint256","name":"dailyRewards","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"internalType":"struct StakingContract.Bracket","name":"bracket","type":"tuple"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setDepositToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setRewardsToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405261271060015534801561001657600080fd5b5061002033610025565b610075565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61133a806100846000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063c89039c511610097578063e2bbb15811610066578063e2bbb158146101d5578063ee1b0953146101e8578063f2fde38b14610237578063fc7e286d1461024a57600080fd5b8063c89039c514610194578063d1af0c7d146101a7578063dd8c2e0f146101ba578063de320cc1146101c257600080fd5b80633ccfd60b116100d35780633ccfd60b1461015257806364ab86751461015a578063715018a61461017b5780638da5cb5b1461018357600080fd5b80630c4ed799146100fa5780631535ab641461010f5780632591ef8914610122575b600080fd5b61010d61010836600461117e565b6102f4565b005b61010d61011d3660046111a7565b610349565b6101356101303660046111d3565b6103c0565b6040516001600160a01b0390911681526020015b60405180910390f35b61010d6103ea565b61016d61016836600461117e565b61073c565b604051908152602001610149565b61010d610873565b6000546001600160a01b0316610135565b600254610135906001600160a01b031681565b600354610135906001600160a01b031681565b61010d6108a9565b61010d6101d036600461117e565b610b98565b61010d6101e33660046111ec565b610be4565b61021a6101f63660046111d3565b60056020526000908152604090208054600182015460029092015490919060ff1683565b604080519384526020840192909252151590820152606001610149565b61010d61024536600461117e565b610f4d565b6102b861025836600461117e565b6006602090815260009182526040918290208251808401845281548152600182015481840152835160608101855260028301548152600383015493810193909352600482015460ff90811615159484019490945260059091015490921683565b604080518451815260209485015185820152835181830152938301516060850152919091015115156080830152151560a082015260c001610149565b6000546001600160a01b031633146103275760405162461bcd60e51b815260040161031e9061120e565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103735760405162461bcd60e51b815260040161031e9061120e565b604080516060810182529283526020808401928352600184830181815260009687526005909252919094209251835590519082015590516002909101805460ff1916911515919091179055565b600481815481106103d057600080fd5b6000918252602090912001546001600160a01b0316905081565b33600090815260066020908152604091829020825160a08101845281546060808301918252600184015460808401529082528451908101855260028301548152600383015481850152600483015460ff908116151582870152938201526005909101549091161515918101829052906104a55760405162461bcd60e51b815260206004820152601b60248201527f7573657220686173206e6f20616374697665206465706f736974730000000000604482015260640161031e565b6020810151516104b89062015180611259565b8151602001516104c89190611278565b42101561050c5760405162461bcd60e51b815260206004820152601260248201527110d85b89dd081dda5d1a191c985dc81e595d60721b604482015260640161031e565b805151600061051a3361073c565b6003546040516370a0823160e01b815230600482015291925082916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610567573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058b9190611290565b10156105d95760405162461bcd60e51b815260206004820152601c60248201527f696e73756666696369656e7420726577617264732062616c616e636500000000604482015260640161031e565b336000818152600660209081526040808320838155600501805460ff19169055600354815163a9059cbb60e01b815260048101959095526024850186905290516001600160a01b039091169363a9059cbb93604480830194939283900301908290875af115801561064e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067291906112a9565b506002546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af11580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f691906112a9565b50604080513381526020810184905280820183905290517fd2263e970e3552b8e14c013f4d6af030894ef3ae6f025607042368db047a44189181900360600190a1505050565b6001600160a01b0381166000908152600660209081526040808320815160a08101835281546060808301918252600184015460808401529082528351908101845260028301548152600383015481860152600483015460ff908116151582860152948201526005909101549092161580159183019190915282919061086c5760006107e5620151806107df84600001516020015142610fe590919063ffffffff16565b90610ff8565b82515160025491925060009161080491906001600160a01b0316611004565b6003549091506000906108219083906001600160a01b031661109a565b905060006108408560200151602001518561112290919063ffffffff16565b905061086561085b606460015461112290919063ffffffff16565b6107df8484611122565b9550505050505b5092915050565b6000546001600160a01b0316331461089d5760405162461bcd60e51b815260040161031e9061120e565b6108a7600061112e565b565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260040161031e9061120e565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109409190611290565b1115610a35576003546001600160a01b031663a9059cbb336003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c49190611290565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3391906112a9565b505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611290565b11156108a7576002546001600160a01b031663a9059cbb336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b269190611290565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9591906112a9565b50565b6000546001600160a01b03163314610bc25760405162461bcd60e51b815260040161031e9061120e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526006602052604090206005015460ff1615610c475760405162461bcd60e51b815260206004820152601a60248201527f757365722068617320616c7265616479206465706f7369746564000000000000604482015260640161031e565b60008181526005602052604090206002015460ff16610ca15760405162461bcd60e51b8152602060048201526016602482015275189c9858dad95d081a5cc81b9bdd08195b98589b195960521b604482015260640161031e565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190611290565b6002549091506001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af1158015610d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9a91906112a9565b506002546040516370a0823160e01b8152306004820152600091610e149184916001600160a01b0316906370a0823190602401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e9190611290565b90610fe5565b604080518082018252828152426020808301919091528251606080820185528382526000898152600580855286822087519384018852805484526001808201548588015260029182015460ff161515858a015285870194855285890181815233808652600689528a8620975180518955890151888401559551805193880193909355828801516003880155918901516004808801805492151560ff19938416179055925196909301805496151596909316959095179091558054938401815590527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910180546001600160a01b031916821790558351908152908101849052825193945090927f35db3d768e685509e031bae369804ca7dc6656af739e079f1d3312cadc7b19d8929181900390910190a15050505050565b6000546001600160a01b03163314610f775760405162461bcd60e51b815260040161031e9061120e565b6001600160a01b038116610fdc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031e565b610b958161112e565b6000610ff182846112cb565b9392505050565b6000610ff182846112e2565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611045573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110699190611290565b90506000611091826107df606461108b6001548a61112290919063ffffffff16565b90611122565b95945050505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ff9190611290565b9050600061109161111c606460015461112290919063ffffffff16565b6107df87855b6000610ff18284611259565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561119057600080fd5b81356001600160a01b0381168114610ff157600080fd5b6000806000606084860312156111bc57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156111e557600080fd5b5035919050565b600080604083850312156111ff57600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561127357611273611243565b500290565b6000821982111561128b5761128b611243565b500190565b6000602082840312156112a257600080fd5b5051919050565b6000602082840312156112bb57600080fd5b81518015158114610ff157600080fd5b6000828210156112dd576112dd611243565b500390565b6000826112ff57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122022945951812d42b8ba0bceeacf34393c197cf303f2abc92e2cac128fd76674c564736f6c634300080b0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063c89039c511610097578063e2bbb15811610066578063e2bbb158146101d5578063ee1b0953146101e8578063f2fde38b14610237578063fc7e286d1461024a57600080fd5b8063c89039c514610194578063d1af0c7d146101a7578063dd8c2e0f146101ba578063de320cc1146101c257600080fd5b80633ccfd60b116100d35780633ccfd60b1461015257806364ab86751461015a578063715018a61461017b5780638da5cb5b1461018357600080fd5b80630c4ed799146100fa5780631535ab641461010f5780632591ef8914610122575b600080fd5b61010d61010836600461117e565b6102f4565b005b61010d61011d3660046111a7565b610349565b6101356101303660046111d3565b6103c0565b6040516001600160a01b0390911681526020015b60405180910390f35b61010d6103ea565b61016d61016836600461117e565b61073c565b604051908152602001610149565b61010d610873565b6000546001600160a01b0316610135565b600254610135906001600160a01b031681565b600354610135906001600160a01b031681565b61010d6108a9565b61010d6101d036600461117e565b610b98565b61010d6101e33660046111ec565b610be4565b61021a6101f63660046111d3565b60056020526000908152604090208054600182015460029092015490919060ff1683565b604080519384526020840192909252151590820152606001610149565b61010d61024536600461117e565b610f4d565b6102b861025836600461117e565b6006602090815260009182526040918290208251808401845281548152600182015481840152835160608101855260028301548152600383015493810193909352600482015460ff90811615159484019490945260059091015490921683565b604080518451815260209485015185820152835181830152938301516060850152919091015115156080830152151560a082015260c001610149565b6000546001600160a01b031633146103275760405162461bcd60e51b815260040161031e9061120e565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103735760405162461bcd60e51b815260040161031e9061120e565b604080516060810182529283526020808401928352600184830181815260009687526005909252919094209251835590519082015590516002909101805460ff1916911515919091179055565b600481815481106103d057600080fd5b6000918252602090912001546001600160a01b0316905081565b33600090815260066020908152604091829020825160a08101845281546060808301918252600184015460808401529082528451908101855260028301548152600383015481850152600483015460ff908116151582870152938201526005909101549091161515918101829052906104a55760405162461bcd60e51b815260206004820152601b60248201527f7573657220686173206e6f20616374697665206465706f736974730000000000604482015260640161031e565b6020810151516104b89062015180611259565b8151602001516104c89190611278565b42101561050c5760405162461bcd60e51b815260206004820152601260248201527110d85b89dd081dda5d1a191c985dc81e595d60721b604482015260640161031e565b805151600061051a3361073c565b6003546040516370a0823160e01b815230600482015291925082916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610567573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058b9190611290565b10156105d95760405162461bcd60e51b815260206004820152601c60248201527f696e73756666696369656e7420726577617264732062616c616e636500000000604482015260640161031e565b336000818152600660209081526040808320838155600501805460ff19169055600354815163a9059cbb60e01b815260048101959095526024850186905290516001600160a01b039091169363a9059cbb93604480830194939283900301908290875af115801561064e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067291906112a9565b506002546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af11580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f691906112a9565b50604080513381526020810184905280820183905290517fd2263e970e3552b8e14c013f4d6af030894ef3ae6f025607042368db047a44189181900360600190a1505050565b6001600160a01b0381166000908152600660209081526040808320815160a08101835281546060808301918252600184015460808401529082528351908101845260028301548152600383015481860152600483015460ff908116151582860152948201526005909101549092161580159183019190915282919061086c5760006107e5620151806107df84600001516020015142610fe590919063ffffffff16565b90610ff8565b82515160025491925060009161080491906001600160a01b0316611004565b6003549091506000906108219083906001600160a01b031661109a565b905060006108408560200151602001518561112290919063ffffffff16565b905061086561085b606460015461112290919063ffffffff16565b6107df8484611122565b9550505050505b5092915050565b6000546001600160a01b0316331461089d5760405162461bcd60e51b815260040161031e9061120e565b6108a7600061112e565b565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260040161031e9061120e565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109409190611290565b1115610a35576003546001600160a01b031663a9059cbb336003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c49190611290565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3391906112a9565b505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611290565b11156108a7576002546001600160a01b031663a9059cbb336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b269190611290565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9591906112a9565b50565b6000546001600160a01b03163314610bc25760405162461bcd60e51b815260040161031e9061120e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526006602052604090206005015460ff1615610c475760405162461bcd60e51b815260206004820152601a60248201527f757365722068617320616c7265616479206465706f7369746564000000000000604482015260640161031e565b60008181526005602052604090206002015460ff16610ca15760405162461bcd60e51b8152602060048201526016602482015275189c9858dad95d081a5cc81b9bdd08195b98589b195960521b604482015260640161031e565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190611290565b6002549091506001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af1158015610d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9a91906112a9565b506002546040516370a0823160e01b8152306004820152600091610e149184916001600160a01b0316906370a0823190602401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e9190611290565b90610fe5565b604080518082018252828152426020808301919091528251606080820185528382526000898152600580855286822087519384018852805484526001808201548588015260029182015460ff161515858a015285870194855285890181815233808652600689528a8620975180518955890151888401559551805193880193909355828801516003880155918901516004808801805492151560ff19938416179055925196909301805496151596909316959095179091558054938401815590527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910180546001600160a01b031916821790558351908152908101849052825193945090927f35db3d768e685509e031bae369804ca7dc6656af739e079f1d3312cadc7b19d8929181900390910190a15050505050565b6000546001600160a01b03163314610f775760405162461bcd60e51b815260040161031e9061120e565b6001600160a01b038116610fdc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161031e565b610b958161112e565b6000610ff182846112cb565b9392505050565b6000610ff182846112e2565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611045573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110699190611290565b90506000611091826107df606461108b6001548a61112290919063ffffffff16565b90611122565b95945050505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ff9190611290565b9050600061109161111c606460015461112290919063ffffffff16565b6107df87855b6000610ff18284611259565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561119057600080fd5b81356001600160a01b0381168114610ff157600080fd5b6000806000606084860312156111bc57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156111e557600080fd5b5035919050565b600080604083850312156111ff57600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561127357611273611243565b500290565b6000821982111561128b5761128b611243565b500190565b6000602082840312156112a257600080fd5b5051919050565b6000602082840312156112bb57600080fd5b81518015158114610ff157600080fd5b6000828210156112dd576112dd611243565b500390565b6000826112ff57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122022945951812d42b8ba0bceeacf34393c197cf303f2abc92e2cac128fd76674c564736f6c634300080b0033

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.