FTM Price: $1.00 (+0.37%)
Gas: 154 GWei

Contract

0xF504e99599670029be53D5a6E3Deb37bA016548E
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040485310902022-10-06 6:06:50539 days ago1665036410IN
 Create: FeeTransmitterTask
0 FTM0.001887371.56029583

Latest 25 internal transactions (View All)

Parent Txn Hash Block From To Value
783837662024-03-28 19:10:496 hrs ago1711653049
0xF504e995...bA016548E
0.26958443 FTM
783105982024-03-27 19:10:0130 hrs ago1711566601
0xF504e995...bA016548E
0.17075091 FTM
782394832024-03-26 19:09:362 days ago1711480176
0xF504e995...bA016548E
0.08720326 FTM
781643402024-03-25 19:09:233 days ago1711393763
0xF504e995...bA016548E
0.1704586 FTM
777984612024-03-20 13:43:218 days ago1710942201
0xF504e995...bA016548E
0.14794664 FTM
776832222024-03-19 7:23:179 days ago1710832997
0xF504e995...bA016548E
0.21629991 FTM
775994242024-03-18 7:23:0310 days ago1710746583
0xF504e995...bA016548E
0.13758346 FTM
775380912024-03-17 7:22:5111 days ago1710660171
0xF504e995...bA016548E
0.17664801 FTM
774583042024-03-16 7:22:3812 days ago1710573758
0xF504e995...bA016548E
0.19029131 FTM
773761452024-03-15 7:22:2613 days ago1710487346
0xF504e995...bA016548E
0.06666359 FTM
773092702024-03-14 7:22:1414 days ago1710400934
0xF504e995...bA016548E
0.04821245 FTM
772441762024-03-13 7:21:5815 days ago1710314518
0xF504e995...bA016548E
0.04711892 FTM
771850332024-03-12 7:21:1516 days ago1710228075
0xF504e995...bA016548E
0.03835466 FTM
771200102024-03-11 7:21:0317 days ago1710141663
0xF504e995...bA016548E
0.03159016 FTM
770615562024-03-10 7:20:5018 days ago1710055250
0xF504e995...bA016548E
0.03469026 FTM
770200132024-03-09 7:20:3619 days ago1709968836
0xF504e995...bA016548E
0.05927699 FTM
769802812024-03-08 7:20:1020 days ago1709882410
0xF504e995...bA016548E
0.07698366 FTM
769024002024-03-07 7:19:3721 days ago1709795977
0xF504e995...bA016548E
0.10231466 FTM
768395102024-03-06 7:19:2422 days ago1709709564
0xF504e995...bA016548E
0.11150415 FTM
767751612024-03-05 7:19:1423 days ago1709623154
0xF504e995...bA016548E
0.10177512 FTM
767043142024-03-04 7:19:0424 days ago1709536744
0xF504e995...bA016548E
0.32812476 FTM
766509732024-03-03 7:19:0025 days ago1709450340
0xF504e995...bA016548E
0.82047716 FTM
766255922024-03-02 7:17:1326 days ago1709363833
0xF504e995...bA016548E
0.17292661 FTM
765870042024-03-01 7:16:4127 days ago1709277401
0xF504e995...bA016548E
0.32609925 FTM
765086142024-02-29 7:16:1728 days ago1709190977
0xF504e995...bA016548E
0.15029291 FTM
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeTransmitterTask

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : FeeTransmitterTask.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import "./abstract/OpsReadyUpgradeable.sol";
import "./interfaces/IFeeTransmitter.sol";

/**
 @dev Implementation of a OpsReadyUpgradeable contract to automate the distribution of
 fees and rewards from the FeeTransmitter to the FeeDistributor.

 @custom:security-contact [email protected]
 */
contract FeeTransmitterTask is OpsReadyUpgradeable, OwnableUpgradeable {
    /** ==== EVENTS ===== */

    event NewReleasePortion(uint256 portion);
    event NewRewardAmount(uint256 amount);
    event NewFeeTransmitter(address transmitter);

    /** ==== CONSTANTS ===== */

    uint256 public constant MAX_REWARD_AMOUNT = 40 ether;

    uint256 public constant MAX_RELEASE_PORTION = 5000;

    /** ==== GENERAL ===== */

    /** @dev Responsible for releasing additional tokens to the FeeDistributor */
    address public rewardtoken;
    uint256 public rewardAmount;

    /** @dev Responsible for releasing fees to the FeeDistributor */
    address public feeTransmitter;
    uint256 public releasePortion;

    /** @dev Responsible for not over-executing releases */
    uint256 public lastExecuted;
    uint256 public requiredTimeElapsed;

    /** ==== CONSTRUCTOR ===== */

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    receive() external payable {}

    /**
     @dev Initializes all the variables of the contract with the exception of
     {rewardAmount} which will default to {40 ether}.

     @param _ops the Gelato contract that will be executing the tasks
     @param _feeTransmitter the contract responsible for directing the fees.
     @param _releasePortion the portion of fees that should be distributed at any given time.
     @param _rewardToken the additional token to be distributed with the fees.
     */
    function initialize(
        address _ops,
        address _feeTransmitter,
        uint256 _releasePortion,
        address _rewardToken
    ) public initializer {
        __OpsReady_init(_ops);
        __Ownable_init();

        rewardtoken = _rewardToken;
        rewardAmount = 40 ether;

        feeTransmitter = _feeTransmitter;
        releasePortion = _releasePortion;

        lastExecuted = block.timestamp;
        requiredTimeElapsed = 24 hours;
    }

    /** ==== VIEWABLE ===== */

    /**
    @dev Returns whether the contract can release to the FeeDistributor.
     */
    function canRelease() external view returns (bool) {
        return ((block.timestamp - lastExecuted) > requiredTimeElapsed);
    }

    /** ==== FUNCTIONALITY ===== */

    /**
    @dev Send the reward token to the {feeTransmitter} and releases a
    portion of the fees to the FeeDistributor.

    Requirements: 
    - Timestamp SHOULD have elapsed to properly execute
    - {_rewardAmount} SHOULD NOT be transferred if none was specified.
     */
    function release() external onlyOps requireTimeElapsed {
        // Release reward token to the fee transmitter for distribution
        uint256 _amount = rewardAmount;
        if (_amount > 0) {
            SafeERC20Upgradeable.safeTransfer(
                IERC20Upgradeable(rewardtoken),
                feeTransmitter,
                _amount
            );
        }

        // Release a portion of the rewards to the voting escrow's feeDistributor
        IFeeTransmitter(feeTransmitter).release(releasePortion);

        lastExecuted = block.timestamp;

        _payFee();
    }

    /**
     * @dev Manual task sent by the owner to release the reward token to the
     * fee transmitter.
     *
     * Requirements:
     * - {_rewardAmount} SHOULD NOT be transferred if none was specified.
     */
    function forceRelease() external onlyOwner {
        // Release reward token to the fee transmitter for distribution
        uint256 _amount = rewardAmount;
        if (_amount > 0) {
            SafeERC20Upgradeable.safeTransfer(
                IERC20Upgradeable(rewardtoken),
                feeTransmitter,
                _amount
            );
        }

        // Release a portion of the rewards to the voting escrow's feeDistributor
        IFeeTransmitter(feeTransmitter).release(releasePortion);
    }

    /** ==== MUTATIVE ===== */

    /**
     * @dev Changes the timestamp of the last execution
     */
    function setLastExecuted(uint256 _timestamp) external onlyOwner {
        lastExecuted = _timestamp;
    }

    /**
    @dev Changes the release portion for the task.
     */
    function setReleasePortion(uint256 _releasePortion) external onlyOwner {
        require(
            _releasePortion <= MAX_RELEASE_PORTION,
            "FeeTransmitterTasks: invalid portion"
        );

        releasePortion = _releasePortion;
        emit NewReleasePortion(_releasePortion);
    }

    /**
    @dev Changes the reward amount for the task.
     */
    function setRewardAmount(uint256 _rewardAmount) external onlyOwner {
        require(
            _rewardAmount <= MAX_REWARD_AMOUNT,
            "FeeTransmitterTasks: invalid amount"
        );

        rewardAmount = _rewardAmount;
        emit NewRewardAmount(_rewardAmount);
    }

    /**
    @dev Changes the fee transmitter for the task.
     */
    function setFeeTransmitter(address _feeTransmitter) external onlyOwner {
        require(
            _feeTransmitter != address(0),
            "FeeTransmitterTasks: invalid address"
        );

        feeTransmitter = _feeTransmitter;
        emit NewFeeTransmitter(_feeTransmitter);
    }

    /** ==== MODIFIERS ==== */

    modifier requireTimeElapsed() {
        require(
            ((block.timestamp - lastExecuted) > requiredTimeElapsed),
            "FeeTransmitterTasks: time not elapsed"
        );
        _;
    }
}

File 2 of 11 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 11 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 11 : OpsReadyUpgradeable.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;

import {SafeERC20Upgradeable, IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "../interfaces/IOps.sol";

abstract contract OpsReadyUpgradeable is Initializable {
    address public ops;
    address payable public gelato;
    address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    function __OpsReady_init(address _ops) internal onlyInitializing {
        __OpsReady_init_unchained(_ops);
    }

    function __OpsReady_init_unchained(address _ops) internal {
        ops = _ops;
        gelato = IOps(_ops).gelato();
    }

    /**
    @dev Retrieves the fee details from the {ops} and uses the internal function 
    {_transfer} to pay out the fee.
     */
    function _payFee() internal {
        (uint256 fee, address feeToken) = IOps(ops).getFeeDetails();
        _transfer(fee, feeToken);
    }

    function _transfer(uint256 _amount, address _paymentToken) internal {
        if (_paymentToken == ETH) {
            (bool success, ) = gelato.call{value: _amount}("");
            require(success, "_transfer: ETH transfer failed");
        } else {
            SafeERC20Upgradeable.safeTransfer(
                IERC20Upgradeable(_paymentToken),
                gelato,
                _amount
            );
        }
    }

    modifier onlyOps() {
        require(msg.sender == ops, "OpsReady: onlyOps");
        _;
    }
}

File 6 of 11 : IFeeTransmitter.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;

interface IFeeTransmitter {
    function release(uint256 _portion) external;
}

File 7 of 11 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 11 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 9 of 11 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 11 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 11 of 11 : IOps.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;

interface IOps {
    function gelato() external view returns (address payable);

    function getFeeDetails() external view returns (uint256, address);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"transmitter","type":"address"}],"name":"NewFeeTransmitter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"portion","type":"uint256"}],"name":"NewReleasePortion","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewRewardAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RELEASE_PORTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REWARD_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canRelease","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTransmitter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forceRelease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gelato","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_ops","type":"address"},{"internalType":"address","name":"_feeTransmitter","type":"address"},{"internalType":"uint256","name":"_releasePortion","type":"uint256"},{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastExecuted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ops","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releasePortion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requiredTimeElapsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardtoken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTransmitter","type":"address"}],"name":"setFeeTransmitter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setLastExecuted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_releasePortion","type":"uint256"}],"name":"setReleasePortion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardAmount","type":"uint256"}],"name":"setRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506200001c62000022565b62000112565b600054610100900460ff1615620000565760405162461bcd60e51b81526004016200004d90620000b0565b60405180910390fd5b60005460ff9081161015620000ae576000805460ff191660ff9081179091556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249891620000a59162000102565b60405180910390a15b565b60208082528101620000fc81602781527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469602082015266616c697a696e6760c81b604082015260600190565b92915050565b60ff8216815260208101620000fc565b61146d80620001226000396000f3fe6080604052600436106101395760003560e01c806386d1a69f116100ab578063e4df30ec1161006f578063e4df30ec1461033a578063e70abe9214610350578063ee66d29714610376578063f2fde38b1461038c578063f5531f93146103ac578063f7b2a7be146103cc57600080fd5b806386d1a69f146102aa5780638da5cb5b146102bf578063a04f6b4b146102dd578063a8a65a78146102fa578063be2030941461031a57600080fd5b806354524328116100fd57806354524328146101e0578063573ea575146102005780636dff132e1461022d578063715018a61461024d5780637517314e146102625780638322fff21461028257600080fd5b80630885ec37146101455780630a1bb969146101675780631c15ff771461017c57806333eb2878146101a85780633705f69e146101be57600080fd5b3661014057005b600080fd5b34801561015157600080fd5b50610165610160366004610d7e565b6103e2565b005b34801561017357600080fd5b5061016561046f565b34801561018857600080fd5b50610192606a5481565b60405161019f9190610daf565b60405180910390f35b3480156101b457600080fd5b5061019260695481565b3480156101ca57600080fd5b506101d3610503565b60405161019f9190610dc5565b3480156101ec57600080fd5b506101656101fb366004610de4565b61051c565b34801561020c57600080fd5b50600154610220906001600160a01b031681565b60405161019f9190610e0e565b34801561023957600080fd5b50606654610220906001600160a01b031681565b34801561025957600080fd5b5061016561057b565b34801561026e57600080fd5b50606854610220906001600160a01b031681565b34801561028e57600080fd5b5061022073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b3480156102b657600080fd5b5061016561058f565b3480156102cb57600080fd5b506034546001600160a01b0316610220565b3480156102e957600080fd5b5061019268022b1c8c1227a0000081565b34801561030657600080fd5b50610165610315366004610de4565b610685565b34801561032657600080fd5b50610165610335366004610e1c565b6106eb565b34801561034657600080fd5b50610192606b5481565b34801561035c57600080fd5b50600054610220906201000090046001600160a01b031681565b34801561038257600080fd5b5061019261138881565b34801561039857600080fd5b506101656103a7366004610d7e565b610813565b3480156103b857600080fd5b506101656103c7366004610de4565b61084a565b3480156103d857600080fd5b5061019260675481565b6103ea610857565b6001600160a01b0381166104195760405162461bcd60e51b815260040161041090610ec4565b60405180910390fd5b606880546001600160a01b0319166001600160a01b0383161790556040517f5a4d7b4f079d73d0d2e1a3ac3b52732edcc6cdf98a5259a23079db5777c1ab0c90610464908390610e0e565b60405180910390a150565b610477610857565b606754801561049d5760665460685461049d916001600160a01b03908116911683610881565b6068546069546040516337bdc99b60e01b81526001600160a01b03909216916337bdc99b916104ce91600401610daf565b600060405180830381600087803b1580156104e857600080fd5b505af11580156104fc573d6000803e3d6000fd5b5050505050565b6000606b54606a54426105169190610eea565b11905090565b610524610857565b6113888111156105465760405162461bcd60e51b815260040161041090610f42565b60698190556040517f5ce12d8752b48bfa2500ea68100bf93ee9ab6d34e54a7ab5c07b8abd6d7048d490610464908390610daf565b610583610857565b61058d60006108dc565b565b6000546201000090046001600160a01b031633146105bf5760405162461bcd60e51b815260040161041090610f7d565b606b54606a546105cf9042610eea565b116105ec5760405162461bcd60e51b815260040161041090610fcf565b606754801561061257606654606854610612916001600160a01b03908116911683610881565b6068546069546040516337bdc99b60e01b81526001600160a01b03909216916337bdc99b9161064391600401610daf565b600060405180830381600087803b15801561065d57600080fd5b505af1158015610671573d6000803e3d6000fd5b505042606a5550610682905061092e565b50565b61068d610857565b68022b1c8c1227a000008111156106b65760405162461bcd60e51b81526004016104109061101f565b60678190556040517f615887b5cbbcbf6b5e1bd6c02f0de1cf413945e42a6733e9ec675ae8dd3e91ad90610464908390610daf565b600054610100900460ff161580801561070b5750600054600160ff909116105b806107255750303b158015610725575060005460ff166001145b6107415760405162461bcd60e51b81526004016104109061107a565b6000805460ff191660011790558015610764576000805461ff0019166101001790555b61076d856109b0565b6107756109e0565b606680546001600160a01b038085166001600160a01b03199283161790925568022b1c8c1227a000006067556068805492871692909116919091179055606983905542606a5562015180606b5580156104fc576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906108049060019061109e565b60405180910390a15050505050565b61081b610857565b6001600160a01b0381166108415760405162461bcd60e51b8152600401610410906110ef565b610682816108dc565b610852610857565b606a55565b6034546001600160a01b0316331461058d5760405162461bcd60e51b815260040161041090611131565b6108d78363a9059cbb60e01b84846040516024016108a0929190611141565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610a0f565b505050565b603480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805460408051635c08631b60e11b8152815184936201000090046001600160a01b03169263b810c63692600480820193918290030181865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190611172565b915091506109ac8282610a9e565b5050565b600054610100900460ff166109d75760405162461bcd60e51b8152600401610410906111f7565b61068281610b5c565b600054610100900460ff16610a075760405162461bcd60e51b8152600401610410906111f7565b61058d610c08565b6000610a64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c389092919063ffffffff16565b8051909150156108d75780806020019051810190610a82919061121a565b6108d75760405162461bcd60e51b815260040161041090611282565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610b44576001546040516000916001600160a01b0316908490610ae190611292565b60006040518083038185875af1925050503d8060008114610b1e576040519150601f19603f3d011682016040523d82523d6000602084013e610b23565b606091505b50509050806108d75760405162461bcd60e51b8152600401610410906112ce565b6001546109ac9082906001600160a01b031684610881565b80600060026101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b031663573ea5756040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be591906112de565b600180546001600160a01b0319166001600160a01b039290921691909117905550565b600054610100900460ff16610c2f5760405162461bcd60e51b8152600401610410906111f7565b61058d336108dc565b6060610c478484600085610c51565b90505b9392505050565b606082471015610c735760405162461bcd60e51b815260040161041090611342565b6001600160a01b0385163b610c9a5760405162461bcd60e51b815260040161041090611386565b600080866001600160a01b03168587604051610cb691906113e8565b60006040518083038185875af1925050503d8060008114610cf3576040519150601f19603f3d011682016040523d82523d6000602084013e610cf8565b606091505b5091509150610d08828286610d13565b979650505050505050565b60608315610d22575081610c4a565b825115610d325782518084602001fd5b8160405162461bcd60e51b81526004016104109190611426565b60006001600160a01b0382165b92915050565b610d6881610d4c565b811461068257600080fd5b8035610d5981610d5f565b600060208284031215610d9357610d93600080fd5b6000610d9f8484610d73565b949350505050565b805b82525050565b60208101610d598284610da7565b801515610da9565b60208101610d598284610dbd565b80610d68565b8035610d5981610dd3565b600060208284031215610df957610df9600080fd5b6000610d9f8484610dd9565b610da981610d4c565b60208101610d598284610e05565b60008060008060808587031215610e3557610e35600080fd5b6000610e418787610d73565b9450506020610e5287828801610d73565b9350506040610e6387828801610dd9565b9250506060610e7487828801610d73565b91505092959194509250565b602481526000602082017f4665655472616e736d69747465725461736b733a20696e76616c6964206164648152637265737360e01b602082015291505b5060400190565b60208082528101610d5981610e80565b634e487b7160e01b600052601160045260246000fd5b600082821015610efc57610efc610ed4565b500390565b602481526000602082017f4665655472616e736d69747465725461736b733a20696e76616c696420706f728152633a34b7b760e11b60208201529150610ebd565b60208082528101610d5981610f01565b60118152600060208201704f707352656164793a206f6e6c794f707360781b815291505b5060200190565b60208082528101610d5981610f52565b602581526000602082017f4665655472616e736d69747465725461736b733a2074696d65206e6f7420656c815264185c1cd95960da1b60208201529150610ebd565b60208082528101610d5981610f8d565b602381526000602082017f4665655472616e736d69747465725461736b733a20696e76616c696420616d6f8152621d5b9d60ea1b60208201529150610ebd565b60208082528101610d5981610fdf565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b60208201529150610ebd565b60208082528101610d598161102f565b600060ff8216610d59565b610da98161108a565b60208101610d598284611095565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150610ebd565b60208082528101610d59816110ac565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000610f76565b60208082528101610d59816110ff565b6040810161114f8285610e05565b610c4a6020830184610da7565b8051610d5981610dd3565b8051610d5981610d5f565b6000806040838503121561118857611188600080fd5b6000611194858561115c565b92505060206111a585828601611167565b9150509250929050565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b60208201529150610ebd565b60208082528101610d59816111af565b801515610d68565b8051610d5981611207565b60006020828403121561122f5761122f600080fd5b6000610d9f848461120f565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b60208201529150610ebd565b60208082528101610d598161123b565b600081610d59565b601e81526000602082017f5f7472616e736665723a20455448207472616e73666572206661696c6564000081529150610f76565b60208082528101610d598161129a565b6000602082840312156112f3576112f3600080fd5b6000610d9f8484611167565b602681526000602082017f416464726573733a20696e73756666696369656e742062616c616e636520666f8152651c8818d85b1b60d21b60208201529150610ebd565b60208082528101610d59816112ff565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081529150610f76565b60208082528101610d5981611352565b60005b838110156113b1578181015183820152602001611399565b838111156113c0576000848401525b50505050565b60006113d0825190565b6113de818560208601611396565b9290920192915050565b6000610c4a82846113c6565b60006113fe825190565b808452602084019350611415818560208601611396565b601f01601f19169290920192915050565b60208082528101610c4a81846113f456fea2646970667358221220be4fec6a0f1e3b264a96f41613d33e5bea49d5cf21eacbaa2d905f8eaa18ce5064736f6c634300080b0033

Deployed Bytecode

0x6080604052600436106101395760003560e01c806386d1a69f116100ab578063e4df30ec1161006f578063e4df30ec1461033a578063e70abe9214610350578063ee66d29714610376578063f2fde38b1461038c578063f5531f93146103ac578063f7b2a7be146103cc57600080fd5b806386d1a69f146102aa5780638da5cb5b146102bf578063a04f6b4b146102dd578063a8a65a78146102fa578063be2030941461031a57600080fd5b806354524328116100fd57806354524328146101e0578063573ea575146102005780636dff132e1461022d578063715018a61461024d5780637517314e146102625780638322fff21461028257600080fd5b80630885ec37146101455780630a1bb969146101675780631c15ff771461017c57806333eb2878146101a85780633705f69e146101be57600080fd5b3661014057005b600080fd5b34801561015157600080fd5b50610165610160366004610d7e565b6103e2565b005b34801561017357600080fd5b5061016561046f565b34801561018857600080fd5b50610192606a5481565b60405161019f9190610daf565b60405180910390f35b3480156101b457600080fd5b5061019260695481565b3480156101ca57600080fd5b506101d3610503565b60405161019f9190610dc5565b3480156101ec57600080fd5b506101656101fb366004610de4565b61051c565b34801561020c57600080fd5b50600154610220906001600160a01b031681565b60405161019f9190610e0e565b34801561023957600080fd5b50606654610220906001600160a01b031681565b34801561025957600080fd5b5061016561057b565b34801561026e57600080fd5b50606854610220906001600160a01b031681565b34801561028e57600080fd5b5061022073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b3480156102b657600080fd5b5061016561058f565b3480156102cb57600080fd5b506034546001600160a01b0316610220565b3480156102e957600080fd5b5061019268022b1c8c1227a0000081565b34801561030657600080fd5b50610165610315366004610de4565b610685565b34801561032657600080fd5b50610165610335366004610e1c565b6106eb565b34801561034657600080fd5b50610192606b5481565b34801561035c57600080fd5b50600054610220906201000090046001600160a01b031681565b34801561038257600080fd5b5061019261138881565b34801561039857600080fd5b506101656103a7366004610d7e565b610813565b3480156103b857600080fd5b506101656103c7366004610de4565b61084a565b3480156103d857600080fd5b5061019260675481565b6103ea610857565b6001600160a01b0381166104195760405162461bcd60e51b815260040161041090610ec4565b60405180910390fd5b606880546001600160a01b0319166001600160a01b0383161790556040517f5a4d7b4f079d73d0d2e1a3ac3b52732edcc6cdf98a5259a23079db5777c1ab0c90610464908390610e0e565b60405180910390a150565b610477610857565b606754801561049d5760665460685461049d916001600160a01b03908116911683610881565b6068546069546040516337bdc99b60e01b81526001600160a01b03909216916337bdc99b916104ce91600401610daf565b600060405180830381600087803b1580156104e857600080fd5b505af11580156104fc573d6000803e3d6000fd5b5050505050565b6000606b54606a54426105169190610eea565b11905090565b610524610857565b6113888111156105465760405162461bcd60e51b815260040161041090610f42565b60698190556040517f5ce12d8752b48bfa2500ea68100bf93ee9ab6d34e54a7ab5c07b8abd6d7048d490610464908390610daf565b610583610857565b61058d60006108dc565b565b6000546201000090046001600160a01b031633146105bf5760405162461bcd60e51b815260040161041090610f7d565b606b54606a546105cf9042610eea565b116105ec5760405162461bcd60e51b815260040161041090610fcf565b606754801561061257606654606854610612916001600160a01b03908116911683610881565b6068546069546040516337bdc99b60e01b81526001600160a01b03909216916337bdc99b9161064391600401610daf565b600060405180830381600087803b15801561065d57600080fd5b505af1158015610671573d6000803e3d6000fd5b505042606a5550610682905061092e565b50565b61068d610857565b68022b1c8c1227a000008111156106b65760405162461bcd60e51b81526004016104109061101f565b60678190556040517f615887b5cbbcbf6b5e1bd6c02f0de1cf413945e42a6733e9ec675ae8dd3e91ad90610464908390610daf565b600054610100900460ff161580801561070b5750600054600160ff909116105b806107255750303b158015610725575060005460ff166001145b6107415760405162461bcd60e51b81526004016104109061107a565b6000805460ff191660011790558015610764576000805461ff0019166101001790555b61076d856109b0565b6107756109e0565b606680546001600160a01b038085166001600160a01b03199283161790925568022b1c8c1227a000006067556068805492871692909116919091179055606983905542606a5562015180606b5580156104fc576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906108049060019061109e565b60405180910390a15050505050565b61081b610857565b6001600160a01b0381166108415760405162461bcd60e51b8152600401610410906110ef565b610682816108dc565b610852610857565b606a55565b6034546001600160a01b0316331461058d5760405162461bcd60e51b815260040161041090611131565b6108d78363a9059cbb60e01b84846040516024016108a0929190611141565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610a0f565b505050565b603480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805460408051635c08631b60e11b8152815184936201000090046001600160a01b03169263b810c63692600480820193918290030181865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190611172565b915091506109ac8282610a9e565b5050565b600054610100900460ff166109d75760405162461bcd60e51b8152600401610410906111f7565b61068281610b5c565b600054610100900460ff16610a075760405162461bcd60e51b8152600401610410906111f7565b61058d610c08565b6000610a64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c389092919063ffffffff16565b8051909150156108d75780806020019051810190610a82919061121a565b6108d75760405162461bcd60e51b815260040161041090611282565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610b44576001546040516000916001600160a01b0316908490610ae190611292565b60006040518083038185875af1925050503d8060008114610b1e576040519150601f19603f3d011682016040523d82523d6000602084013e610b23565b606091505b50509050806108d75760405162461bcd60e51b8152600401610410906112ce565b6001546109ac9082906001600160a01b031684610881565b80600060026101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b031663573ea5756040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be591906112de565b600180546001600160a01b0319166001600160a01b039290921691909117905550565b600054610100900460ff16610c2f5760405162461bcd60e51b8152600401610410906111f7565b61058d336108dc565b6060610c478484600085610c51565b90505b9392505050565b606082471015610c735760405162461bcd60e51b815260040161041090611342565b6001600160a01b0385163b610c9a5760405162461bcd60e51b815260040161041090611386565b600080866001600160a01b03168587604051610cb691906113e8565b60006040518083038185875af1925050503d8060008114610cf3576040519150601f19603f3d011682016040523d82523d6000602084013e610cf8565b606091505b5091509150610d08828286610d13565b979650505050505050565b60608315610d22575081610c4a565b825115610d325782518084602001fd5b8160405162461bcd60e51b81526004016104109190611426565b60006001600160a01b0382165b92915050565b610d6881610d4c565b811461068257600080fd5b8035610d5981610d5f565b600060208284031215610d9357610d93600080fd5b6000610d9f8484610d73565b949350505050565b805b82525050565b60208101610d598284610da7565b801515610da9565b60208101610d598284610dbd565b80610d68565b8035610d5981610dd3565b600060208284031215610df957610df9600080fd5b6000610d9f8484610dd9565b610da981610d4c565b60208101610d598284610e05565b60008060008060808587031215610e3557610e35600080fd5b6000610e418787610d73565b9450506020610e5287828801610d73565b9350506040610e6387828801610dd9565b9250506060610e7487828801610d73565b91505092959194509250565b602481526000602082017f4665655472616e736d69747465725461736b733a20696e76616c6964206164648152637265737360e01b602082015291505b5060400190565b60208082528101610d5981610e80565b634e487b7160e01b600052601160045260246000fd5b600082821015610efc57610efc610ed4565b500390565b602481526000602082017f4665655472616e736d69747465725461736b733a20696e76616c696420706f728152633a34b7b760e11b60208201529150610ebd565b60208082528101610d5981610f01565b60118152600060208201704f707352656164793a206f6e6c794f707360781b815291505b5060200190565b60208082528101610d5981610f52565b602581526000602082017f4665655472616e736d69747465725461736b733a2074696d65206e6f7420656c815264185c1cd95960da1b60208201529150610ebd565b60208082528101610d5981610f8d565b602381526000602082017f4665655472616e736d69747465725461736b733a20696e76616c696420616d6f8152621d5b9d60ea1b60208201529150610ebd565b60208082528101610d5981610fdf565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b60208201529150610ebd565b60208082528101610d598161102f565b600060ff8216610d59565b610da98161108a565b60208101610d598284611095565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150610ebd565b60208082528101610d59816110ac565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000610f76565b60208082528101610d59816110ff565b6040810161114f8285610e05565b610c4a6020830184610da7565b8051610d5981610dd3565b8051610d5981610d5f565b6000806040838503121561118857611188600080fd5b6000611194858561115c565b92505060206111a585828601611167565b9150509250929050565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b60208201529150610ebd565b60208082528101610d59816111af565b801515610d68565b8051610d5981611207565b60006020828403121561122f5761122f600080fd5b6000610d9f848461120f565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b60208201529150610ebd565b60208082528101610d598161123b565b600081610d59565b601e81526000602082017f5f7472616e736665723a20455448207472616e73666572206661696c6564000081529150610f76565b60208082528101610d598161129a565b6000602082840312156112f3576112f3600080fd5b6000610d9f8484611167565b602681526000602082017f416464726573733a20696e73756666696369656e742062616c616e636520666f8152651c8818d85b1b60d21b60208201529150610ebd565b60208082528101610d59816112ff565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081529150610f76565b60208082528101610d5981611352565b60005b838110156113b1578181015183820152602001611399565b838111156113c0576000848401525b50505050565b60006113d0825190565b6113de818560208601611396565b9290920192915050565b6000610c4a82846113c6565b60006113fe825190565b808452602084019350611415818560208601611396565b601f01601f19169290920192915050565b60208082528101610c4a81846113f456fea2646970667358221220be4fec6a0f1e3b264a96f41613d33e5bea49d5cf21eacbaa2d905f8eaa18ce5064736f6c634300080b0033

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

Txn 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.