ETH Price: $3,515.25 (+2.75%)

Contract

0xA642640cc5621EC73645Cd30d3F35Fa2b6bD1885
Transaction Hash
Method
Block
From
To
Deposit1229112612024-07-19 20:34:591 hr ago1721421299IN
0xA642640c...2b6bD1885
0 ETH0.0000134348890.0624031
Deposit1228925882024-07-19 10:12:3311 hrs ago1721383953IN
0xA642640c...2b6bD1885
0 ETH0.0000132142380.061337
Withdraw1228329912024-07-18 1:05:5944 hrs ago1721264759IN
0xA642640c...2b6bD1885
0 ETH0.0000176981540.0707925
Deposit1227872432024-07-16 23:41:032 days ago1721173263IN
0xA642640c...2b6bD1885
0 ETH0.000012253290.06088954
Withdraw1227793002024-07-16 19:16:173 days ago1721157377IN
0xA642640c...2b6bD1885
0 ETH0.000015055530.06104896
Withdraw1227416702024-07-15 22:21:573 days ago1721082117IN
0xA642640c...2b6bD1885
0 ETH0.0000154956950.06188031
Deposit1227041422024-07-15 1:31:014 days ago1721007061IN
0xA642640c...2b6bD1885
0 ETH0.0000001337280.00045223
Withdraw1226767792024-07-14 10:18:555 days ago1720952335IN
0xA642640c...2b6bD1885
0 ETH0.0000003436390.00133
Withdraw1222993302024-07-05 16:37:1714 days ago1720197437IN
0xA642640c...2b6bD1885
0 ETH0.0000137993860.06050022
Withdraw1222800312024-07-05 5:53:5914 days ago1720158839IN
0xA642640c...2b6bD1885
0 ETH0.0000151551550.061821
Withdraw1222254772024-07-03 23:35:3115 days ago1720049731IN
0xA642640c...2b6bD1885
0 ETH0.0000151304580.0617941
Deposit1220461322024-06-29 19:57:2120 days ago1719691041IN
0xA642640c...2b6bD1885
0 ETH0.000000027080.000109
Deposit1220460722024-06-29 19:55:2120 days ago1719690921IN
0xA642640c...2b6bD1885
0 ETH0.0000000453070.00019801
Withdraw1219461812024-06-27 12:25:3922 days ago1719491139IN
0xA642640c...2b6bD1885
0 ETH0.0000011432080.0046072
Withdraw1218011462024-06-24 3:51:0925 days ago1719201069IN
0xA642640c...2b6bD1885
0 ETH0.0000148830880.06079189
Withdraw1217670202024-06-23 8:53:3726 days ago1719132817IN
0xA642640c...2b6bD1885
0 ETH0.000014904150.0608682
Withdraw1217372542024-06-22 16:21:2527 days ago1719073285IN
0xA642640c...2b6bD1885
0 ETH0.000014951810.0610643
Withdraw1216254942024-06-20 2:16:0529 days ago1718849765IN
0xA642640c...2b6bD1885
0 ETH0.0000147245750.0601099
Withdraw1215725402024-06-18 20:50:5731 days ago1718743857IN
0xA642640c...2b6bD1885
0 ETH0.0000179649460.0733416
Withdraw1215618902024-06-18 14:55:5731 days ago1718722557IN
0xA642640c...2b6bD1885
0 ETH0.0000184816320.081032
Withdraw1215217592024-06-17 16:38:1532 days ago1718642295IN
0xA642640c...2b6bD1885
0 ETH0.000021394820.0871914
Withdraw1215214332024-06-17 16:27:2332 days ago1718641643IN
0xA642640c...2b6bD1885
0 ETH0.0000276903870.1128778
Withdraw1215137442024-06-17 12:11:0532 days ago1718626265IN
0xA642640c...2b6bD1885
0 ETH0.0000006262380.0020017
Withdraw1214840052024-06-16 19:39:4733 days ago1718566787IN
0xA642640c...2b6bD1885
0 ETH0.0000003586010.00142685
Withdraw1214656822024-06-16 9:29:0133 days ago1718530141IN
0xA642640c...2b6bD1885
0 ETH0.0000006383530.0025646
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
1138384622023-12-22 20:08:21210 days ago1703275701  Contract Creation0 ETH

Loading...
Loading

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

Contract Name:
TowerLongPool

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : TowerLongPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./interfaces/IERC20.sol";

interface ITowerLongPoolFactory {
    function emitDeposit(address account, uint256 amount) external;

    function emitWithdraw(address account, uint256 amount) external;
}

// TowerLongPools are used for rewards, they emit reward tokens over 42 days for staked tokens
contract TowerLongPool {
    address public stake; // the token that needs to be staked for rewards
    address public factory; // the TowerLongPoolFactory

    uint256 internal constant DURATION = 42 days; // rewards are released over 42 days
    uint256 internal constant PRECISION = 10 ** 18;

    mapping(address => uint256) public pendingRewardRate;
    mapping(address => bool) public isStarted;
    mapping(address => uint256) public rewardRate;
    mapping(address => uint256) public periodFinish;
    mapping(address => uint256) public lastUpdateTime;
    mapping(address => uint256) public rewardPerTokenStored;
    mapping(address => mapping(address => uint256)) public storedRewardsPerUser;

    mapping(address => mapping(address => uint256))
        public userRewardPerTokenStored;

    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;

    address[] public rewards;
    mapping(address => bool) public isReward;

    uint256 internal _unlocked;

    event Deposit(address indexed from, uint256 amount);
    event Withdraw(address indexed from, uint256 amount);
    event NotifyReward(
        address indexed from,
        address indexed reward,
        uint256 amount
    );
    event ClaimRewards(
        address indexed from,
        address indexed reward,
        uint256 amount
    );

    struct RewardInfo {
      address towerPool;
      address rewardTokenAddress;
      string rewardTokenSymbol;
      uint256 rewardTokenDecimals;
      uint256 periodFinish;
      uint256 rewardRate;
      uint256 lastUpdateTime;
      uint256 rewardPerTokenStored;
      uint256 pendingReward;
      uint256 reinvestBounty;
      bool isStarted;
    }

    function _initialize(
        address _stake,
        address[] memory _allowedRewardTokens
    ) external {
        require(factory == address(0), "TowerPool: FACTORY_ALREADY_SET");
        factory = msg.sender;
        stake = _stake;

        for (uint256 i; i < _allowedRewardTokens.length; ++i) {
            if (_allowedRewardTokens[i] != address(0)) {
                rewards.push(_allowedRewardTokens[i]);
                isReward[_allowedRewardTokens[i]] = true;
            }
        }

        _unlocked = 1;
    }

    // simple re-entrancy check
    modifier lock() {
        require(_unlocked == 1);
        _unlocked = 2;
        _;
        _unlocked = 1;
    }

    function rewardsListLength() external view returns (uint256) {
        return rewards.length;
    }

    // returns the last time the reward was modified or periodFinish if the reward has ended
    function lastTimeRewardApplicable(
        address token
    ) public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish[token]);
    }

    function earned(address account) external view returns (uint256[] memory earnedList) {
        uint256 len = rewards.length;
        earnedList = new uint256[](len);

        for (uint256 i = 0; i < len; i++) {
            earnedList[i] = earned(rewards[i], account);
        }
    }

    function earned(
        address token,
        address account
    ) public view returns (uint256) {
        return
            (balanceOf[account] *
                (rewardPerToken(token) -
                    userRewardPerTokenStored[account][token])) /
            PRECISION +
            storedRewardsPerUser[account][token];
    }

    // Only the tokens you claim will get updated.
    function getReward(address account, address[] memory tokens) public lock {
        require(msg.sender == account || msg.sender == factory);

        // update all user rewards regardless of tokens they are claiming
        address[] memory _rewards = rewards;
        uint256 len = _rewards.length;
        for (uint256 i; i < len; ++i) {
            if (isReward[_rewards[i]]) {
                if (!isStarted[_rewards[i]]) {
                    initializeRewardsDistribution(_rewards[i]);
                }
                updateRewardPerToken(_rewards[i], account);
            }
        }
        // transfer only the rewards they are claiming
        len = tokens.length;
        for (uint256 i; i < len; ++i){
            uint256 _reward = storedRewardsPerUser[account][tokens[i]];
            if (_reward > 0) {
                storedRewardsPerUser[account][tokens[i]] = 0;
                _safeTransfer(tokens[i], account, _reward);
                emit ClaimRewards(account, tokens[i], _reward);
            }        
        }
    }

    function rewardPerToken(address token) public view returns (uint256) {
        if (totalSupply == 0) {
            return rewardPerTokenStored[token];
        }
        return
            rewardPerTokenStored[token] +
            (((lastTimeRewardApplicable(token) -
                Math.min(lastUpdateTime[token], periodFinish[token])) *
                rewardRate[token] *
                PRECISION) / totalSupply);
    }

    function depositAll() external {
        deposit(IERC20(stake).balanceOf(msg.sender));
    }

    function deposit(uint256 amount) public lock {
        require(amount > 0);

        address[] memory _rewards = rewards;
        uint256 len = _rewards.length;

        for (uint256 i; i < len; ++i) {
            if (!isStarted[_rewards[i]]) {
                initializeRewardsDistribution(_rewards[i]);
            }
            updateRewardPerToken(_rewards[i], msg.sender);
        }

        _safeTransferFrom(stake, msg.sender, address(this), amount);
        totalSupply += amount;
        balanceOf[msg.sender] += amount;

        ITowerLongPoolFactory(factory).emitDeposit(msg.sender, amount);
        emit Deposit(msg.sender, amount);
    }

    function withdrawAll() external {
        withdraw(balanceOf[msg.sender]);
    }

    function withdraw(uint256 amount) public lock {
        require(amount > 0);

        address[] memory _rewards = rewards;
        uint256 len = _rewards.length;

        for (uint256 i; i < len; ++i) {
            updateRewardPerToken(_rewards[i], msg.sender);
        }

        totalSupply -= amount;
        balanceOf[msg.sender] -= amount;
        _safeTransfer(stake, msg.sender, amount);

        ITowerLongPoolFactory(factory).emitWithdraw(msg.sender, amount);
        emit Withdraw(msg.sender, amount);
    }

    function left(address token) public view returns (uint256) {
        if (block.timestamp >= periodFinish[token]) return 0;
        uint256 _remaining = periodFinish[token] - block.timestamp;
        return _remaining * rewardRate[token];
    }

    // @dev rewardRate and periodFinish is set on first deposit if totalSupply == 0 or first interaction after whitelisting.
    function notifyRewardAmount(address token, uint256 amount) external onlyFactoryOwner lock {
        require(token != stake);
        require(amount > 0);
        rewardPerTokenStored[token] = rewardPerToken(token);
        
        // Check actual amount transferred for compatibility with fee on transfer tokens.
        uint balanceBefore = IERC20(token).balanceOf(address(this));
        _safeTransferFrom(token, msg.sender, address(this), amount);
        uint balanceAfter = IERC20(token).balanceOf(address(this));
        amount = balanceAfter - balanceBefore;
        uint _rewardRate = amount / DURATION;

        if (isStarted[token]) {
            if (block.timestamp >= periodFinish[token]) {
                rewardRate[token] = _rewardRate;
            } else {
                uint256 _remaining = periodFinish[token] - block.timestamp;
                uint256 _left = _remaining * rewardRate[token];
                require(amount > _left);
                rewardRate[token] = (amount + _left) / DURATION;
            }
            periodFinish[token] = block.timestamp + DURATION;
            lastUpdateTime[token] = block.timestamp;
        } else {
            if (pendingRewardRate[token] > 0) {
                uint256 _left = DURATION * pendingRewardRate[token];
                pendingRewardRate[token] = (amount + _left) / DURATION;
            } else {
                pendingRewardRate[token] = _rewardRate;
            }
        }
        uint256 balance = IERC20(token).balanceOf(address(this));
        require(
            rewardRate[token] <= balance / DURATION,
            "Provided reward too high"
        );
        if (!isStarted[token]) {
            require(
                pendingRewardRate[token] <= balance / DURATION,
                "Provided reward too high"
            );
        }

        emit NotifyReward(msg.sender, token, amount);
    }

    function initializeRewardsDistribution(address token) internal {
        isStarted[token] = true;
        rewardRate[token] = pendingRewardRate[token];
        lastUpdateTime[token] = block.timestamp;
        periodFinish[token] = block.timestamp + DURATION;
        pendingRewardRate[token] = 0;
    }

    function whitelistNotifiedRewards(address token) external {
        require(msg.sender == factory);
        if (!isReward[token]) {
            isReward[token] = true;
            rewards.push(token);
        }
        if (!isStarted[token] && totalSupply > 0) {
            initializeRewardsDistribution(token);
        }
    }

    function getRewardTokenIndex(address token) public view returns (uint256) {
        address[] memory _rewards = rewards;
        uint256 len = _rewards.length;

        for (uint256 i; i < len; ++i) {
            if (_rewards[i] == token) {
                return i;
            }
        }
        return 0;
    }

    function removeRewardWhitelist(address token) external {
        require(msg.sender == factory);
        if (!isReward[token]) {
            return;
        }
        isReward[token] = false;
        uint256 idx = getRewardTokenIndex(token);
        uint256 len = rewards.length;
        for (uint256 i = idx; i < len - 1; ++i) {
            rewards[i] = rewards[i + 1];
        }
        rewards.pop();
    }

    function poke(address account) external {
        // Update reward rates and user rewards
        for (uint256 i; i < rewards.length; ++i) {
            updateRewardPerToken(rewards[i], account);
        }
    }

    function updateRewardPerToken(address token, address account) internal {
        rewardPerTokenStored[token] = rewardPerToken(token);
        lastUpdateTime[token] = lastTimeRewardApplicable(token);
        storedRewardsPerUser[account][token] = earned(token, account);
        userRewardPerTokenStored[account][token] = rewardPerTokenStored[token];
    }

    function _safeTransfer(address token, address to, uint256 value) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function _safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(
                IERC20.transferFrom.selector,
                from,
                to,
                value
            )
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function _safeApprove(
        address token,
        address spender,
        uint256 value
    ) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, spender, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function removeExtraRewardToken(
        uint256 index,
        uint256 duplicateIndex
    ) external onlyFactoryOwner {
        require(index < duplicateIndex);
        require(rewards[index] == rewards[duplicateIndex]);

        uint len = rewards.length;
        for (uint i = duplicateIndex; i < len - 1; ++i) {
            rewards[i] = rewards[i + 1];
        }
        rewards.pop();
    }

    function haltRewards(address token) external onlyFactoryOwner lock {
        require(token != stake);
        uint256 amountLeft = left(token);
        require(amountLeft > 0);
        _safeTransfer(token, msg.sender, amountLeft);
        rewardPerTokenStored[token] = rewardPerToken(token);
        lastUpdateTime[token] = block.timestamp;
        periodFinish[token] = block.timestamp;
        rewardRate[token] = 0;
    }

    function getRewardInfoList() external view returns (RewardInfo[] memory rewardInfoList) {
        uint256 len = rewards.length;
        rewardInfoList = new RewardInfo[](len);

        for (uint256 i = 0; i < len; i++) {
            address rewardToken = rewards[i];
            RewardInfo memory rewardInfo = rewardInfoList[i];
            rewardInfo.towerPool = address(this);
            rewardInfo.rewardTokenAddress = rewardToken;
            rewardInfo.rewardTokenSymbol = IERC20(rewardToken).symbol();
            rewardInfo.rewardTokenDecimals = IERC20(rewardToken).decimals();
            rewardInfo.isStarted = isStarted[rewardToken];
            rewardInfo.rewardRate = rewardRate[rewardToken];
            rewardInfo.lastUpdateTime = lastUpdateTime[rewardToken];
            rewardInfo.periodFinish = periodFinish[rewardToken];
            rewardInfo.rewardPerTokenStored = rewardPerTokenStored[rewardToken];
        }
    }

    modifier onlyFactoryOwner() {
        require(Ownable(factory).owner() == msg.sender, "NOT_AUTHORIZED");
        _;
    }
}

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

File 4 of 5 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 5 of 5 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NotifyReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"_stake","type":"address"},{"internalType":"address[]","name":"_allowedRewardTokens","type":"address[]"}],"name":"_initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256[]","name":"earnedList","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardInfoList","outputs":[{"components":[{"internalType":"address","name":"towerPool","type":"address"},{"internalType":"address","name":"rewardTokenAddress","type":"address"},{"internalType":"string","name":"rewardTokenSymbol","type":"string"},{"internalType":"uint256","name":"rewardTokenDecimals","type":"uint256"},{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"},{"internalType":"uint256","name":"pendingReward","type":"uint256"},{"internalType":"uint256","name":"reinvestBounty","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"internalType":"struct TowerLongPool.RewardInfo[]","name":"rewardInfoList","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getRewardTokenIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"haltRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"left","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingRewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"poke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"duplicateIndex","type":"uint256"}],"name":"removeExtraRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"removeRewardWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stake","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"storedRewardsPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"whitelistNotifiedRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102055760003560e01c8063619913c21161011a578063b66503cf116100ad578063da09d19d1161007c578063da09d19d146104fd578063de5f62681461051d578063e688639614610525578063f12297771461052d578063f301af421461054057600080fd5b8063b66503cf146104af578063b6b55f25146104c2578063c2cd097f146104d5578063c45a0155146104ea57600080fd5b8063853828b6116100e9578063853828b61461046157806399bcc052146104695780639ce43f901461047c578063b1a997ac1461049c57600080fd5b8063619913c2146103fb578063638634ee1461041b57806370a082311461042e578063798e44fe1461044e57600080fd5b80632e1a7d4d1161019d5780633a4b66f11161016c5780633a4b66f11461035c5780633ca068b6146103875780634d5ce038146103b257806355421075146103d55780635aa2e87a146103e857600080fd5b80632e1a7d4d146102f857806331279d3d1461030b578063368812171461031e578063369252591461033157600080fd5b806318160ddd116101d957806318160ddd1461029c578063211dc32d146102a5578063221ca18c146102b85780632ce9aead146102d857600080fd5b80628cc2621461020a5780630279cb7d1461023357806303c698d2146102665780630c96238f14610287575b600080fd5b61021d6102183660046121e1565b610553565b60405161022a91906121fe565b60405180910390f35b6102566102413660046121e1565b60036020526000908152604090205460ff1681565b604051901515815260200161022a565b6102796102743660046121e1565b610610565b60405190815260200161022a565b61029a6102953660046121e1565b6106d4565b005b610279600a5481565b6102796102b3366004612242565b61080c565b6102796102c63660046121e1565b60046020526000908152604090205481565b6102796102e63660046121e1565b60066020526000908152604090205481565b61029a61030636600461227b565b6108a4565b61029a6103193660046122db565b610a5a565b61029a61032c3660046123a2565b610d51565b61027961033f366004612242565b600860209081526000928352604080842090915290825290205481565b60005461036f906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b610279610395366004612242565b600960209081526000928352604080842090915290825290205481565b6102566103c03660046121e1565b600d6020526000908152604090205460ff1681565b61029a6103e33660046121e1565b610ef0565b61029a6103f63660046122db565b611027565b6102796104093660046121e1565b60026020526000908152604090205481565b6102796104293660046121e1565b6111a8565b61027961043c3660046121e1565b600b6020526000908152604090205481565b61029a61045c3660046121e1565b6111d2565b61029a6112ab565b6102796104773660046121e1565b6112c6565b61027961048a3660046121e1565b60076020526000908152604090205481565b61029a6104aa3660046121e1565b611337565b61029a6104bd3660046123c4565b611389565b61029a6104d036600461227b565b6118ea565b6104dd611adb565b60405161022a919061244c565b60015461036f906001600160a01b031681565b61027961050b3660046121e1565b60056020526000908152604090205481565b61029a611d65565b600c54610279565b61027961053b3660046121e1565b611dd3565b61036f61054e36600461227b565b611e92565b600c546060908067ffffffffffffffff81111561057257610572612294565b60405190808252806020026020018201604052801561059b578160200160208202803683370190505b50915060005b81811015610609576105da600c82815481106105bf576105bf612537565b6000918252602090912001546001600160a01b03168561080c565b8382815181106105ec576105ec612537565b60209081029190910101528061060181612563565b9150506105a1565b5050919050565b600080600c80548060200260200160405190810160405280929190818152602001828054801561066957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161064b575b505083519394506000925050505b818110156106c957846001600160a01b031683828151811061069b5761069b612537565b60200260200101516001600160a01b0316036106b957949350505050565b6106c281612563565b9050610677565b506000949350505050565b6001546001600160a01b031633146106eb57600080fd5b6001600160a01b0381166000908152600d602052604090205460ff1661070e5750565b6001600160a01b0381166000908152600d60205260408120805460ff1916905561073782610610565b600c54909150815b61074a60018361257c565b8110156107d357600c61075e826001612593565b8154811061076e5761076e612537565b600091825260209091200154600c80546001600160a01b03909216918390811061079a5761079a612537565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556107cc81612563565b905061073f565b50600c8054806107e5576107e56125ab565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001600160a01b038082166000818152600860209081526040808320948716808452948252808320549383526009825280832094835293905291822054670de0b6b3a76400009061085c86611dd3565b610866919061257c565b6001600160a01b0385166000908152600b602052604090205461088991906125c1565b61089391906125e0565b61089d9190612593565b9392505050565b600e546001146108b357600080fd5b6002600e55806108c257600080fd5b6000600c80548060200260200160405190810160405280929190818152602001828054801561091a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116108fc575b505083519394506000925050505b818110156109635761095383828151811061094557610945612537565b602002602001015133611ebc565b61095c81612563565b9050610928565b5082600a6000828254610976919061257c565b9091555050336000908152600b60205260408120805485929061099a90849061257c565b90915550506000546109b6906001600160a01b03163385611f55565b60015460405163b014da2160e01b8152336004820152602481018590526001600160a01b039091169063b014da2190604401600060405180830381600087803b158015610a0257600080fd5b505af1158015610a16573d6000803e3d6000fd5b50506040518581523392507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436491506020015b60405180910390a250506001600e5550565b600e54600114610a6957600080fd5b6002600e55336001600160a01b0383161480610a8f57506001546001600160a01b031633145b610a9857600080fd5b6000600c805480602002602001604051908101604052809291908181526020018280548015610af057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ad2575b505083519394506000925050505b81811015610bde57600d6000848381518110610b1c57610b1c612537565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615610bce5760036000848381518110610b5e57610b5e612537565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16610bab57610bab838281518110610b9e57610b9e612537565b6020026020010151612044565b610bce838281518110610bc057610bc0612537565b602002602001015186611ebc565b610bd781612563565b9050610afe565b5050815160005b81811015610d45576001600160a01b038516600090815260086020526040812085518290879085908110610c1b57610c1b612537565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490506000811115610d34576001600160a01b038616600090815260086020526040812086518290889086908110610c7d57610c7d612537565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550610ccd858381518110610cbe57610cbe612537565b60200260200101518783611f55565b848281518110610cdf57610cdf612537565b60200260200101516001600160a01b0316866001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc983604051610d2b91815260200190565b60405180910390a35b50610d3e81612563565b9050610be5565b50506001600e55505050565b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181865afa158015610d9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbe9190612602565b6001600160a01b031614610ded5760405162461bcd60e51b8152600401610de49061261f565b60405180910390fd5b808210610df957600080fd5b600c8181548110610e0c57610e0c612537565b600091825260209091200154600c80546001600160a01b039092169184908110610e3857610e38612537565b6000918252602090912001546001600160a01b031614610e5757600080fd5b600c54815b610e6760018361257c565b8110156107d357600c610e7b826001612593565b81548110610e8b57610e8b612537565b600091825260209091200154600c80546001600160a01b039092169183908110610eb757610eb7612537565b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055610ee981612563565b9050610e5c565b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181865afa158015610f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d9190612602565b6001600160a01b031614610f835760405162461bcd60e51b8152600401610de49061261f565b600e54600114610f9257600080fd5b6002600e556000546001600160a01b0390811690821603610fb257600080fd5b6000610fbd826112c6565b905060008111610fcc57600080fd5b610fd7823383611f55565b610fe082611dd3565b6001600160a01b0390921660009081526007602090815260408083209490945560068152838220429081905560058252848320556004905291822091909155506001600e55565b6001546001600160a01b0316156110805760405162461bcd60e51b815260206004820152601e60248201527f546f776572506f6f6c3a20464143544f52595f414c52454144595f53455400006044820152606401610de4565b60018054336001600160a01b031991821617909155600080549091166001600160a01b0384161781555b815181101561119e5760006001600160a01b03168282815181106110d0576110d0612537565b60200260200101516001600160a01b03161461118e57600c8282815181106110fa576110fa612537565b60209081029190910181015182546001808201855560009485529284200180546001600160a01b0319166001600160a01b0390921691909117905583519091600d9185908590811061114e5761114e612537565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b61119781612563565b90506110aa565b50506001600e5550565b6001600160a01b0381166000908152600560205260408120546111cc9042906120be565b92915050565b6001546001600160a01b031633146111e957600080fd5b6001600160a01b0381166000908152600d602052604090205460ff1661126f576001600160a01b0381166000818152600d60205260408120805460ff19166001908117909155600c805491820181559091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b03191690911790555b6001600160a01b03811660009081526003602052604090205460ff1615801561129a57506000600a54115b156112a8576112a881612044565b50565b336000908152600b60205260409020546112c4906108a4565b565b6001600160a01b03811660009081526005602052604081205442106112ed57506000919050565b6001600160a01b03821660009081526005602052604081205461131190429061257c565b6001600160a01b03841660009081526004602052604090205490915061089d90826125c1565b60005b600c5481101561138557611375600c828154811061135a5761135a612537565b6000918252602090912001546001600160a01b031683611ebc565b61137e81612563565b905061133a565b5050565b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181865afa1580156113d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f69190612602565b6001600160a01b03161461141c5760405162461bcd60e51b8152600401610de49061261f565b600e5460011461142b57600080fd5b6002600e556000546001600160a01b039081169083160361144b57600080fd5b6000811161145857600080fd5b61146182611dd3565b6001600160a01b0383166000818152600760205260408082209390935591516370a0823160e01b81523060048201526370a0823190602401602060405180830381865afa1580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612647565b90506114e8833330856120d4565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561152f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115539190612647565b905061155f828261257c565b9250600061157062375f00856125e0565b6001600160a01b03861660009081526003602052604090205490915060ff1615611699576001600160a01b03851660009081526005602052604090205442106115d3576001600160a01b0385166000908152600460205260409020819055611660565b6001600160a01b0385166000908152600560205260408120546115f790429061257c565b6001600160a01b0387166000908152600460205260408120549192509061161e90836125c1565b905080861161162c57600080fd5b62375f0061163a8288612593565b61164491906125e0565b6001600160a01b03881660009081526004602052604090205550505b61166d62375f0042612593565b6001600160a01b0386166000908152600560209081526040808320939093556006905220429055611732565b6001600160a01b03851660009081526002602052604090205415611716576001600160a01b0385166000908152600260205260408120546116dd9062375f006125c1565b905062375f006116ed8287612593565b6116f791906125e0565b6001600160a01b03871660009081526002602052604090205550611732565b6001600160a01b03851660009081526002602052604090208190555b6040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015611779573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179d9190612647565b90506117ac62375f00826125e0565b6001600160a01b038716600090815260046020526040902054111561180e5760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610de4565b6001600160a01b03861660009081526003602052604090205460ff1661189d5761183b62375f00826125e0565b6001600160a01b038716600090815260026020526040902054111561189d5760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610de4565b6040518581526001600160a01b0387169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf508269060200160405180910390a350506001600e5550505050565b600e546001146118f957600080fd5b6002600e558061190857600080fd5b6000600c80548060200260200160405190810160405280929190818152602001828054801561196057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611942575b505083519394506000925050505b818110156119f1576003600084838151811061198c5761198c612537565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff166119cc576119cc838281518110610b9e57610b9e612537565b6119e183828151811061094557610945612537565b6119ea81612563565b905061196e565b50600054611a0a906001600160a01b03163330866120d4565b82600a6000828254611a1c9190612593565b9091555050336000908152600b602052604081208054859290611a40908490612593565b909155505060015460405163145d426560e11b8152336004820152602481018590526001600160a01b03909116906328ba84ca90604401600060405180830381600087803b158015611a9157600080fd5b505af1158015611aa5573d6000803e3d6000fd5b50506040518581523392507fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9150602001610a48565b600c546060908067ffffffffffffffff811115611afa57611afa612294565b604051908082528060200260200182016040528015611b9c57816020015b611b8960405180610160016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b815260200190600190039081611b185790505b50915060005b81811015611d60576000600c8281548110611bbf57611bbf612537565b600091825260208220015485516001600160a01b039091169250859084908110611beb57611beb612537565b6020908102919091018101513081526001600160a01b038416918101829052604080516395d89b4160e01b815290519193506395d89b419160048083019260009291908290030181865afa158015611c47573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c6f9190810190612660565b8160400181905250816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd991906126f4565b60ff90811660608301526001600160a01b039092166000818152600360209081526040808320549095161515610140850152828252600481528482205460a0850152828252600681528482205460c0850152828252600581528482205460808501529181526007909152919091205460e09091015280611d5881612563565b915050611ba2565b505090565b6000546040516370a0823160e01b81523360048201526112c4916001600160a01b0316906370a0823190602401602060405180830381865afa158015611daf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d09190612647565b6000600a54600003611dfb57506001600160a01b031660009081526007602052604090205490565b600a546001600160a01b03831660009081526004602090815260408083205460068352818420546005909352922054670de0b6b3a76400009291611e3e916120be565b611e47866111a8565b611e51919061257c565b611e5b91906125c1565b611e6591906125c1565b611e6f91906125e0565b6001600160a01b0383166000908152600760205260409020546111cc9190612593565b600c8181548110611ea257600080fd5b6000918252602090912001546001600160a01b0316905081565b611ec582611dd3565b6001600160a01b038316600090815260076020526040902055611ee7826111a8565b6001600160a01b038316600090815260066020526040902055611f0a828261080c565b6001600160a01b039182166000818152600860209081526040808320969095168083529581528482209390935560078352838120549181526009835283812094815293909152912055565b6000836001600160a01b03163b11611f6c57600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691611fc89190612717565b6000604051808303816000865af19150503d8060008114612005576040519150601f19603f3d011682016040523d82523d6000602084013e61200a565b606091505b50915091508180156120345750805115806120345750808060200190518101906120349190612733565b61203d57600080fd5b5050505050565b6001600160a01b0381166000908152600360209081526040808320805460ff19166001179055600282528083205460048352818420556006909152902042908190556120949062375f0090612593565b6001600160a01b039091166000908152600560209081526040808320939093556002905290812055565b60008183106120cd578161089d565b5090919050565b6000846001600160a01b03163b116120eb57600080fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161214f9190612717565b6000604051808303816000865af19150503d806000811461218c576040519150601f19603f3d011682016040523d82523d6000602084013e612191565b606091505b50915091508180156121bb5750805115806121bb5750808060200190518101906121bb9190612733565b6121c457600080fd5b505050505050565b6001600160a01b03811681146112a857600080fd5b6000602082840312156121f357600080fd5b813561089d816121cc565b6020808252825182820181905260009190848201906040850190845b818110156122365783518352928401929184019160010161221a565b50909695505050505050565b6000806040838503121561225557600080fd5b8235612260816121cc565b91506020830135612270816121cc565b809150509250929050565b60006020828403121561228d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156122d3576122d3612294565b604052919050565b600080604083850312156122ee57600080fd5b82356122f9816121cc565b915060208381013567ffffffffffffffff8082111561231757600080fd5b818601915086601f83011261232b57600080fd5b81358181111561233d5761233d612294565b8060051b915061234e8483016122aa565b818152918301840191848101908984111561236857600080fd5b938501935b838510156123925784359250612382836121cc565b828252938501939085019061236d565b8096505050505050509250929050565b600080604083850312156123b557600080fd5b50508035926020909101359150565b600080604083850312156123d757600080fd5b82356123e2816121cc565b946020939093013593505050565b60005b8381101561240b5781810151838201526020016123f3565b8381111561241a576000848401525b50505050565b600081518084526124388160208601602086016123f0565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561252957888303603f19018552815180516001600160a01b03168452610160818901516001600160a01b038116868b0152508782015181898701526124be82870182612420565b606084810151908801526080808501519088015260a0808501519088015260c0808501519088015260e0808501519088015261010080850151908801526101208085015190880152610140938401511515939096019290925250509386019390860190600101612473565b509098975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016125755761257561254d565b5060010190565b60008282101561258e5761258e61254d565b500390565b600082198211156125a6576125a661254d565b500190565b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156125db576125db61254d565b500290565b6000826125fd57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561261457600080fd5b815161089d816121cc565b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b60006020828403121561265957600080fd5b5051919050565b60006020828403121561267257600080fd5b815167ffffffffffffffff8082111561268a57600080fd5b818401915084601f83011261269e57600080fd5b8151818111156126b0576126b0612294565b6126c3601f8201601f19166020016122aa565b91508082528560208285010111156126da57600080fd5b6126eb8160208401602086016123f0565b50949350505050565b60006020828403121561270657600080fd5b815160ff8116811461089d57600080fd5b600082516127298184602087016123f0565b9190910192915050565b60006020828403121561274557600080fd5b8151801515811461089d57600080fdfea264697066735822122087502be0abadcfdd709063d0014b87920e0c6de30fd89f77b0de2b6f9f9cfb2064736f6c634300080d0033

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
[ Download: CSV Export  ]
[ 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.