ETH Price: $2,690.69 (-0.19%)

Contract

0x1A87c0F9CCA2f0926A155640e8958a8A6B0260bE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...213649142024-12-09 12:21:4769 days ago1733746907IN
1inch: Staking farm
0 ETH0.0010437236.54252795
Transfer Ownersh...213634052024-12-09 7:19:3570 days ago1733728775IN
1inch: Staking farm
0 ETH0.000306310.72426329

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingFarmingPod

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 19 : StakingFarmingPod.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "@1inch/farming/contracts/FarmingPod.sol";
import "./interfaces/ISt1inch.sol";

contract StakingFarmingPod is FarmingPod {
    using SafeERC20 for IERC20;

    ISt1inch public immutable st1inch;

    constructor(ISt1inch st1inch_) FarmingPod(st1inch_, st1inch_.oneInch()) {
        st1inch = st1inch_;
    }

    function _transferReward(IERC20 reward, address to, uint256 amount) internal override {
        if (st1inch.emergencyExit()) {
            reward.safeTransfer(to, amount);
        } else {
            st1inch.depositFor(to, amount);
        }
    }
}

File 2 of 19 : IERC20Pods.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IERC20Pods is IERC20 {
    event PodAdded(address account, address pod);
    event PodRemoved(address account, address pod);

    function hasPod(address account, address pod) external view returns(bool);
    function podsCount(address account) external view returns(uint256);
    function podAt(address account, uint256 index) external view returns(address);
    function pods(address account) external view returns(address[] memory);
    function podBalanceOf(address pod, address account) external view returns(uint256);

    function addPod(address pod) external;
    function removePod(address pod) external;
    function removeAllPods() external;
}

File 3 of 19 : IPod.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IPod {
    function updateBalances(address from, address to, uint256 amount) external;
}

File 4 of 19 : Pod.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./interfaces/IPod.sol";
import "./interfaces/IERC20Pods.sol";

abstract contract Pod is IPod {
    error AccessDenied();

    IERC20Pods public immutable token;

    modifier onlyToken {
        if (msg.sender != address(token)) revert AccessDenied();
        _;
    }

    constructor(IERC20Pods token_) {
        token = token_;
    }

    function updateBalances(address from, address to, uint256 amount) external onlyToken {
        _updateBalances(from, to, amount);
    }

    function _updateBalances(address from, address to, uint256 amount) internal virtual;
}

File 5 of 19 : FarmAccounting.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/Math.sol";

library FarmAccounting {
    error ZeroDuration();
    error DurationTooLarge();
    error AmountTooLarge();

    struct Info {
        uint40 finished;
        uint32 duration;
        uint184 reward;
    }

    uint256 internal constant _MAX_REWARD_AMOUNT = 1e32;  // 108 bits
    uint256 internal constant _SCALE = 1e18;  // 60 bits

    /// @dev Requires extra 18 decimals for precision, result fits in 168 bits
    function farmedSinceCheckpointScaled(Info memory info, uint256 checkpoint) internal view returns(uint256 amount) {
        unchecked {
            if (info.duration > 0) {
                uint256 elapsed = Math.min(block.timestamp, info.finished) - Math.min(checkpoint, info.finished);
                // size of (type(uint32).max * _MAX_REWARD_AMOUNT * _SCALE) is less than 200 bits, so there is no overflow
                return elapsed * info.reward * _SCALE / info.duration;
            }
        }
    }

    function startFarming(Info storage info, uint256 amount, uint256 period) internal returns(uint256) {
        if (period == 0) revert ZeroDuration();
        if (period > type(uint32).max) revert DurationTooLarge();
        if (amount > _MAX_REWARD_AMOUNT) revert AmountTooLarge();

        // If something left from prev farming add it to the new farming
        Info memory prev = info;
        if (block.timestamp < prev.finished) {
            amount += prev.reward - farmedSinceCheckpointScaled(prev, prev.finished - prev.duration) / _SCALE;
        }

        (info.finished, info.duration, info.reward) = (uint40(block.timestamp + period), uint32(period), uint184(amount));
        return amount;
    }
}

File 6 of 19 : UserAccounting.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./FarmAccounting.sol";

library UserAccounting {
    struct Info {
        uint40 checkpoint;
        uint216 farmedPerTokenStored;
        mapping(address => int256) corrections;
    }

    function farmedPerToken(
        Info storage info,
        bytes32 context,
        function(bytes32) internal view returns(uint256) lazyGetSupply,
        function(bytes32, uint256) internal view returns(uint256) lazyGetFarmed
    ) internal view returns(uint256) {
        (uint256 checkpoint, uint256 fpt) = (info.checkpoint, info.farmedPerTokenStored);
        if (block.timestamp != checkpoint) {
            uint256 supply = lazyGetSupply(context);
            if (supply > 0) {
                // fpt increases by 168 bit / supply
                unchecked { fpt += lazyGetFarmed(context, checkpoint) / supply; }
            }
        }
        return fpt;
    }

    function farmed(Info storage info, address account, uint256 balance, uint256 fpt) internal view returns(uint256) {
        // balance * fpt is less than 168 bit
        return uint256(int256(balance * fpt) - info.corrections[account]) / FarmAccounting._SCALE;
    }

    function eraseFarmed(Info storage info, address account, uint256 balance, uint256 fpt) internal {
        // balance * fpt is less than 168 bit
        info.corrections[account] = int256(balance * fpt);
    }

    function updateFarmedPerToken(Info storage info, uint256 fpt) internal {
        (info.checkpoint, info.farmedPerTokenStored) = (uint40(block.timestamp), uint216(fpt));
    }

    function updateBalances(Info storage info, address from, address to, uint256 amount, uint256 fpt) internal {
        bool fromZero = (from == address(0));
        bool toZero = (to == address(0));
        if (amount > 0 && from != to) {
            if (fromZero || toZero) {
                updateFarmedPerToken(info, fpt);
            }

            // fpt is less than 168 bit, so amount should be less 98 bit
            int256 diff = int256(amount * fpt);
            if (!fromZero) {
                info.corrections[from] -= diff;
            }
            if (!toZero) {
                info.corrections[to] += diff;
            }
        }
    }
}

File 7 of 19 : FarmingLib.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./accounting/FarmAccounting.sol";
import "./accounting/UserAccounting.sol";

library FarmingLib {
    using FarmAccounting for FarmAccounting.Info;
    using UserAccounting for UserAccounting.Info;
    using FarmingLib for FarmingLib.Info;

    struct Data {
        FarmAccounting.Info farmInfo;
        UserAccounting.Info userInfo;
    }

    struct Info {
        function() internal view returns(uint256) getTotalSupply;
        bytes32 dataSlot;
    }

    function makeInfo(function() internal view returns(uint256) getTotalSupply, Data storage data) internal pure returns(Info memory info) {
        info.getTotalSupply = getTotalSupply;
        bytes32 dataSlot;
        assembly {  // solhint-disable-line no-inline-assembly
            dataSlot := data.slot
        }
        info.dataSlot = dataSlot;
    }

    function getData(Info memory self) internal pure returns(Data storage data) {
        bytes32 dataSlot = self.dataSlot;
        assembly {  // solhint-disable-line no-inline-assembly
            data.slot := dataSlot
        }
    }

    function startFarming(Info memory self, uint256 amount, uint256 period) internal returns(uint256 reward) {
        Data storage data = self.getData();
        data.userInfo.updateFarmedPerToken(_farmedPerToken(self));
        reward = data.farmInfo.startFarming(amount, period);
    }

    function farmed(Info memory self, address account, uint256 balance) internal view returns(uint256) {
        return self.getData().userInfo.farmed(account, balance, _farmedPerToken(self));
    }

    function claim(Info memory self, address account, uint256 balance) internal returns(uint256 amount) {
        Data storage data = self.getData();
        uint256 fpt = _farmedPerToken(self);
        amount = data.userInfo.farmed(account, balance, fpt);
        if (amount > 0) {
            data.userInfo.eraseFarmed(account, balance, fpt);
        }
    }

    function updateBalances(Info memory self, address from, address to, uint256 amount) internal {
        self.getData().userInfo.updateBalances(from, to, amount, _farmedPerToken(self));
    }

    function _farmedPerToken(Info memory self) private view returns (uint256) {
        return self.getData().userInfo.farmedPerToken(_infoToContext(self), _lazyGetSupply, _lazyGetFarmed);
    }

    // UserAccounting bindings

    function _lazyGetSupply(bytes32 context) private view returns(uint256) {
        Info memory self = _contextToInfo(context);
        return self.getTotalSupply();
    }

    function _lazyGetFarmed(bytes32 context, uint256 checkpoint) private view returns(uint256) {
        Info memory self = _contextToInfo(context);
        return self.getData().farmInfo.farmedSinceCheckpointScaled(checkpoint);
    }

    function _contextToInfo(bytes32 context) private pure returns(Info memory self) {
        assembly {  // solhint-disable-line no-inline-assembly
            self := context
        }
    }

    function _infoToContext(Info memory self) private pure returns(bytes32 context) {
        assembly {  // solhint-disable-line no-inline-assembly
            context := self
        }
    }
}

File 8 of 19 : FarmingPod.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@1inch/solidity-utils/contracts/libraries/SafeERC20.sol";
import "@1inch/erc20-pods/contracts/Pod.sol";
import "@1inch/erc20-pods/contracts/interfaces/IERC20Pods.sol";

import "./interfaces/IFarmingPod.sol";
import "./FarmingLib.sol";

contract FarmingPod is Pod, IFarmingPod, Ownable {
    using SafeERC20 for IERC20;
    using FarmingLib for FarmingLib.Info;
    using Address for address payable;

    error ZeroFarmableTokenAddress();
    error ZeroRewardsTokenAddress();
    error SameDistributor();

    IERC20 public immutable rewardsToken;

    address private _distributor;
    uint256 private _totalSupply;
    FarmingLib.Data private _farm;

    modifier onlyDistributor {
        if (msg.sender != _distributor) revert AccessDenied();
        _;
    }

    constructor(IERC20Pods farmableToken_, IERC20 rewardsToken_)
        Pod(farmableToken_)
    {
        if (address(farmableToken_) == address(0)) revert ZeroFarmableTokenAddress();
        if (address(rewardsToken_) == address(0)) revert ZeroRewardsTokenAddress();
        rewardsToken = rewardsToken_;
        emit FarmCreated(address(farmableToken_), address(rewardsToken_));
    }

    function farmInfo() public view returns(FarmAccounting.Info memory) {
        return _farm.farmInfo;
    }

    function totalSupply() public view returns(uint256) {
        return _totalSupply;
    }

    function distributor() public view returns(address) {
        return _distributor;
    }

    function setDistributor(address distributor_) public virtual onlyOwner {
        address oldDistributor = _distributor;
        if (distributor_ == oldDistributor) revert SameDistributor();
        emit DistributorChanged(oldDistributor, distributor_);
        _distributor = distributor_;
    }

    function startFarming(uint256 amount, uint256 period) public virtual onlyDistributor {
        uint256 reward = _makeInfo().startFarming(amount, period);
        emit RewardAdded(reward, period);
        rewardsToken.safeTransferFrom(msg.sender, address(this), amount);
    }

    function farmed(address account) public view virtual returns(uint256) {
        uint256 balance = IERC20Pods(token).podBalanceOf(address(this), account);
        return _makeInfo().farmed(account, balance);
    }

    function claim() public virtual {
        uint256 podBalance = IERC20Pods(token).podBalanceOf(address(this), msg.sender);
        uint256 amount = _makeInfo().claim(msg.sender, podBalance);
        if (amount > 0) {
            _transferReward(rewardsToken, msg.sender, amount);
        }
    }

    function _transferReward(IERC20 reward, address to, uint256 amount) internal virtual {
        reward.safeTransfer(to, amount);
    }

    function _updateBalances(address from, address to, uint256 amount) internal virtual override {
        _makeInfo().updateBalances(from, to, amount);
        if (from == address(0)) {
            _totalSupply += amount;
        }
        if (to == address(0)) {
            _totalSupply -= amount;
        }
    }

    function rescueFunds(IERC20 token, uint256 amount) public virtual onlyDistributor {
        if(token == IERC20(address(0))) {
            payable(_distributor).sendValue(amount);
        } else {
            token.safeTransfer(_distributor, amount);
        }
    }

    function _makeInfo() private view returns(FarmingLib.Info memory) {
        return FarmingLib.makeInfo(totalSupply, _farm);
    }
}

File 9 of 19 : IFarmingPod.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@1inch/erc20-pods/contracts/interfaces/IPod.sol";
import "../accounting/FarmAccounting.sol";

interface IFarmingPod is IPod {
    event FarmCreated(address token, address reward);
    event DistributorChanged(address oldDistributor, address newDistributor);
    event RewardAdded(uint256 reward, uint256 duration);

    // View functions
    function totalSupply() external view returns(uint256);
    function distributor() external view returns(address);
    function farmInfo() external view returns(FarmAccounting.Info memory);
    function farmed(address account) external view returns(uint256);

    // User functions
    function claim() external;

    // Owner functions
    function setDistributor(address distributor_) external;

    // Distributor functions
    function startFarming(uint256 amount, uint256 period) external;
    function rescueFunds(IERC20 token, uint256 amount) external;
}

File 10 of 19 : IDaiLikePermit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

interface IDaiLikePermit {
    function permit(
        address holder,
        address spender,
        uint256 nonce,
        uint256 expiry,
        bool allowed,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 11 of 19 : RevertReasonForwarder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

/// @title Revert reason forwarder.
library RevertReasonForwarder {
    /// @dev Forwards latest externall call revert.
    function reRevert() internal pure {
        // bubble up revert reason from latest external call
        /// @solidity memory-safe-assembly
        assembly { // solhint-disable-line no-inline-assembly
            let ptr := mload(0x40)
            returndatacopy(ptr, 0, returndatasize())
            revert(ptr, returndatasize())
        }
    }
}

File 12 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "../interfaces/IDaiLikePermit.sol";
import "../libraries/RevertReasonForwarder.sol";

/// @title Implements efficient safe methods for ERC20 interface.
library SafeERC20 {
    error SafeTransferFailed();
    error SafeTransferFromFailed();
    error ForceApproveFailed();
    error SafeIncreaseAllowanceFailed();
    error SafeDecreaseAllowanceFailed();
    error SafePermitBadLength();

    /// @dev Ensures method do not revert or return boolean `true`, admits call to non-smart-contract.
    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bytes4 selector = token.transferFrom.selector;
        bool success;
        /// @solidity memory-safe-assembly
        assembly { // solhint-disable-line no-inline-assembly
            let data := mload(0x40)

            mstore(data, selector)
            mstore(add(data, 0x04), from)
            mstore(add(data, 0x24), to)
            mstore(add(data, 0x44), amount)
            success := call(gas(), token, 0, data, 100, 0x0, 0x20)
            if success {
                switch returndatasize()
                case 0 {
                    success := gt(extcodesize(token), 0)
                }
                default {
                    success := and(gt(returndatasize(), 31), eq(mload(0), 1))
                }
            }
        }
        if (!success) revert SafeTransferFromFailed();
    }

    /// @dev Ensures method do not revert or return boolean `true`, admits call to non-smart-contract.
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        if (!_makeCall(token, token.transfer.selector, to, value)) {
            revert SafeTransferFailed();
        }
    }

    /// @dev If `approve(from, to, amount)` fails, try to `approve(from, to, 0)` before retry.
    function forceApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        if (!_makeCall(token, token.approve.selector, spender, value)) {
            if (
                !_makeCall(token, token.approve.selector, spender, 0) ||
                !_makeCall(token, token.approve.selector, spender, value)
            ) {
                revert ForceApproveFailed();
            }
        }
    }

    /// @dev Allowance increase with safe math check.
    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (value > type(uint256).max - allowance) revert SafeIncreaseAllowanceFailed();
        forceApprove(token, spender, allowance + value);
    }

    /// @dev Allowance decrease with safe math check.
    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (value > allowance) revert SafeDecreaseAllowanceFailed();
        forceApprove(token, spender, allowance - value);
    }

    /// @dev Calls either ERC20 or Dai `permit` for `token`, if unsuccessful forwards revert from external call.
    function safePermit(IERC20 token, bytes calldata permit) internal {
        if (!tryPermit(token, permit)) RevertReasonForwarder.reRevert();
    }

    function tryPermit(IERC20 token, bytes calldata permit) internal returns(bool) {
        if (permit.length == 32 * 7) {
            return _makeCalldataCall(token, IERC20Permit.permit.selector, permit);
        }
        if (permit.length == 32 * 8) {
            return _makeCalldataCall(token, IDaiLikePermit.permit.selector, permit);
        }
        revert SafePermitBadLength();
    }

    function _makeCall(
        IERC20 token,
        bytes4 selector,
        address to,
        uint256 amount
    ) private returns (bool success) {
        /// @solidity memory-safe-assembly
        assembly { // solhint-disable-line no-inline-assembly
            let data := mload(0x40)

            mstore(data, selector)
            mstore(add(data, 0x04), to)
            mstore(add(data, 0x24), amount)
            success := call(gas(), token, 0, data, 0x44, 0x0, 0x20)
            if success {
                switch returndatasize()
                case 0 {
                    success := gt(extcodesize(token), 0)
                }
                default {
                    success := and(gt(returndatasize(), 31), eq(mload(0), 1))
                }
            }
        }
    }

    function _makeCalldataCall(
        IERC20 token,
        bytes4 selector,
        bytes calldata args
    ) private returns (bool success) {
        /// @solidity memory-safe-assembly
        assembly { // solhint-disable-line no-inline-assembly
            let len := add(4, args.length)
            let data := mload(0x40)

            mstore(data, selector)
            calldatacopy(add(data, 0x04), args.offset, args.length)
            success := call(gas(), token, 0, data, len, 0x0, 0x20)
            if success {
                switch returndatasize()
                case 0 {
                    success := gt(extcodesize(token), 0)
                }
                default {
                    success := and(gt(returndatasize(), 31), eq(mload(0), 1))
                }
            }
        }
    }
}

File 13 of 19 : 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 14 of 19 : draft-IERC20Permit.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 IERC20Permit {
    /**
     * @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 15 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 16 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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 17 of 19 : 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 18 of 19 : 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 19 of 19 : ISt1inch.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma abicoder v1;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@1inch/erc20-pods/contracts/interfaces/IERC20Pods.sol";

interface ISt1inch is IERC20Pods {
    function oneInch() external view returns (IERC20);
    function emergencyExit() external view returns (bool);
    function depositFor(address account, uint256 amount) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ISt1inch","name":"st1inch_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AmountTooLarge","type":"error"},{"inputs":[],"name":"DurationTooLarge","type":"error"},{"inputs":[],"name":"SafeTransferFailed","type":"error"},{"inputs":[],"name":"SafeTransferFromFailed","type":"error"},{"inputs":[],"name":"SameDistributor","type":"error"},{"inputs":[],"name":"ZeroDuration","type":"error"},{"inputs":[],"name":"ZeroFarmableTokenAddress","type":"error"},{"inputs":[],"name":"ZeroRewardsTokenAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldDistributor","type":"address"},{"indexed":false,"internalType":"address","name":"newDistributor","type":"address"}],"name":"DistributorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"reward","type":"address"}],"name":"FarmCreated","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RewardAdded","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmInfo","outputs":[{"components":[{"internalType":"uint40","name":"finished","type":"uint40"},{"internalType":"uint32","name":"duration","type":"uint32"},{"internalType":"uint184","name":"reward","type":"uint184"}],"internalType":"struct FarmAccounting.Info","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"farmed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"distributor_","type":"address"}],"name":"setDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"st1inch","outputs":[{"internalType":"contract ISt1inch","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"name":"startFarming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Pods","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateBalances","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001b7838038062001b788339810160408190526200003491620001cb565b80816001600160a01b031663045c08d56040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009a9190620001cb565b6001600160a01b038216608052620000b23362000162565b6001600160a01b038216620000da5760405163d0af4eb760e01b815260040160405180910390fd5b6001600160a01b03811662000102576040516330c1035b60e21b815260040160405180910390fd5b6001600160a01b0381811660a081905260408051928516835260208301919091527f6bff9ddd187ef283e9c7726f406ab27bcc3719a41b6bee3585c7447183cffcec910160405180910390a150506001600160a01b031660c052620001f2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620001c857600080fd5b50565b600060208284031215620001de57600080fd5b8151620001eb81620001b2565b9392505050565b60805160a05160c05161192562000253600039600081816101f7015281816109df0152610ade0152600081816102d301528181610537015261064501526000818161030d015281816103850152818161046b015261084b01526119256000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806375619ab511610097578063bfe1092811610066578063bfe10928146102b0578063d1af0c7d146102ce578063f2fde38b146102f5578063fc0c546a1461030857600080fd5b806375619ab51461025957806378e3214f1461026c5780637a1f1aa91461027f5780638da5cb5b1461029257600080fd5b80634e71d92d116100d35780634e71d92d146101e857806357425508146101f2578063702612221461023e578063715018a61461025157600080fd5b806318160ddd146100fa5780631d49d66c146101115780634216f972146101d5575b600080fd5b6002545b6040519081526020015b60405180910390f35b61018d6040805160608101825260008082526020820181905291810191909152506040805160608101825260035464ffffffffff8116825265010000000000810463ffffffff1660208301526901000000000000000000900476ffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825164ffffffffff16815260208084015163ffffffff16908201529181015176ffffffffffffffffffffffffffffffffffffffffffffff1690820152606001610108565b6100fe6101e3366004611696565b610335565b6101f0610434565b005b6102197f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610108565b6101f061024c3660046116b3565b610561565b6101f0610672565b6101f0610267366004611696565b610686565b6101f061027a3660046116d5565b61077d565b6101f061028d366004611701565b610833565b60005473ffffffffffffffffffffffffffffffffffffffff16610219565b60015473ffffffffffffffffffffffffffffffffffffffff16610219565b6102197f000000000000000000000000000000000000000000000000000000000000000081565b6101f0610303366004611696565b6108ad565b6102197f000000000000000000000000000000000000000000000000000000000000000081565b60025490565b6040517f3466a88600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff828116602483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690633466a88690604401602060405180830381865afa1580156103cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f09190611742565b905061042d838261042660408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610969565b9392505050565b6040517f3466a8860000000000000000000000000000000000000000000000000000000081523060048201523360248201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633466a88690604401602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611742565b9050600061052a338361052360408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610991565b9050801561055d5761055d7f000000000000000000000000000000000000000000000000000000000000000033836109dd565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105b2576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006105ef83836105e860408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610b3f565b60408051828152602081018590529192507f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55910160405180910390a161066d73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333086610bca565b505050565b61067a610c67565b6106846000610ce8565b565b61068e610c67565b60015473ffffffffffffffffffffffffffffffffffffffff9081169082168190036106e5576040517f8750ee9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527fa9f739537fc57540bed0a44e33e27baa63290d865cc15f0f16cf17d38c998a4d910160405180910390a150600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107ce576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661080c5760015461055d9073ffffffffffffffffffffffffffffffffffffffff1682610d5d565b60015461055d9073ffffffffffffffffffffffffffffffffffffffff848116911683610eb7565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146108a2576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61066d838383610f19565b6108b5610c67565b73ffffffffffffffffffffffffffffffffffffffff811661095d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61096681610ce8565b50565b6000610989838361097987610fc0565b6020880151600101929190610fe8565b949350505050565b60008061099f856020015190565b905060006109ac86610fc0565b90506109bd60018301868684610fe8565b925082156109d4576109d460018301868684611038565b50509392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635641ec036040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6c919061175b565b15610a925761066d73ffffffffffffffffffffffffffffffffffffffff84168383610eb7565b6040517f2f4f21e200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690632f4f21e290604401600060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b50505050505050565b600080610b4d856020015190565b9050610bb6610b5b86610fc0565b600183019064ffffffffff42167affffffffffffffffffffffffffffffffffffffffffffffffffffff90911665010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016179055565b610bc1818585611071565b95945050505050565b60006323b872dd60e01b905060006040518281528560048201528460248201528360448201526020600060648360008b5af19150508015610c28573d8015610c1e57600160005114601f3d11169150610c26565b6000873b1191505b505b80610c5f576040517ff405907100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610954565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80471015610dc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610954565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610e21576040519150601f19603f3d011682016040523d82523d6000602084013e610e26565b606091505b505090508061066d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610954565b610ee3837fa9059cbb0000000000000000000000000000000000000000000000000000000084846112ad565b61066d576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f56838383610f4e60408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b929190611300565b73ffffffffffffffffffffffffffffffffffffffff8316610f89578060026000828254610f8391906117ac565b90915550505b73ffffffffffffffffffffffffffffffffffffffff821661066d578060026000828254610fb691906117bf565b9091555050505050565b6000610fe282611326611359610fd7866020015190565b6001019291906113ee565b92915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600185016020526040812054670de0b6b3a76400009061102484866117d2565b61102e91906117e9565b610bc1919061183f565b61104281836117d2565b73ffffffffffffffffffffffffffffffffffffffff909316600090815260019094016020525050604090912055565b6000816000036110ad576040517f68d5686e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63ffffffff8211156110eb576040517f426a107300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6d04ee2d6d415b85acef8100000000831115611133576040517f0625040100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051606081018252855464ffffffffff811680835265010000000000820463ffffffff166020840152690100000000000000000090910476ffffffffffffffffffffffffffffffffffffffffffffff16928201929092529042101561120657670de0b6b3a76400006111c782836020015163ffffffff1684600001516111bb919061187a565b64ffffffffff1661146e565b6111d1919061183f565b816040015176ffffffffffffffffffffffffffffffffffffffffffffff166111f991906117bf565b61120390856117ac565b93505b61121083426117ac565b855464ffffffffff908116690100000000000000000076ffffffffffffffffffffffffffffffffffffffffffffff8816027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff16176501000000000063ffffffff9690961695909502949094177fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001693169290921790935550919050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610989573d80156112ef57600160005114601f3d111691506112f7565b6000863b1191505b50949350505050565b61132083838361130f88610fc0565b6020890151600101939291906114fb565b50505050565b600080611347836040805180820190915261166c8152600060208201525090565b905061042d816000015163ffffffff16565b60008061137a846040805180820190915261166c8152600060208201525090565b90506109898361138b836020015190565b60408051606081018252915464ffffffffff8116835265010000000000810463ffffffff9081166020850152690100000000000000000090910476ffffffffffffffffffffffffffffffffffffffffffffff169183019190915290919061146e16565b835460009064ffffffffff8116906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16428214611464576000611438878763ffffffff16565b90508015611462578061144f88858863ffffffff16565b8161145c5761145c611810565b04820191505b505b9695505050505050565b602082015160009063ffffffff1615610fe257600061149883856000015164ffffffffff16611656565b6114ad42866000015164ffffffffff16611656565b039050836020015163ffffffff16670de0b6b3a7640000856040015176ffffffffffffffffffffffffffffffffffffffffffffff16830202816114f2576114f2611810565b04915050610fe2565b73ffffffffffffffffffffffffffffffffffffffff8481161590841615831580159061155357508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614155b15610b365781806115615750805b156115ba577fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff851602164264ffffffffff161787555b60006115c684866117d2565b90508261160a5773ffffffffffffffffffffffffffffffffffffffff87166000908152600189016020526040812080548392906116049084906117e9565b90915550505b8161164c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260018901602052604081208054839290611646908490611898565b90915550505b5050505050505050565b6000818310611665578161042d565b5090919050565b6106846118c0565b73ffffffffffffffffffffffffffffffffffffffff8116811461096657600080fd5b6000602082840312156116a857600080fd5b813561042d81611674565b600080604083850312156116c657600080fd5b50508035926020909101359150565b600080604083850312156116e857600080fd5b82356116f381611674565b946020939093013593505050565b60008060006060848603121561171657600080fd5b833561172181611674565b9250602084013561173181611674565b929592945050506040919091013590565b60006020828403121561175457600080fd5b5051919050565b60006020828403121561176d57600080fd5b8151801515811461042d57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610fe257610fe261177d565b81810381811115610fe257610fe261177d565b8082028115828204841417610fe257610fe261177d565b81810360008312801583831316838312821617156118095761180961177d565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611875577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b64ffffffffff8281168282160390808211156118095761180961177d565b80820182811260008312801582168215821617156118b8576118b861177d565b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052605160045260246000fdfea264697066735822122034466a7444fbfe72c0ad864e9d1e30cf4dfc6176b03de945f641f740b8a4824b64736f6c634300081100330000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806375619ab511610097578063bfe1092811610066578063bfe10928146102b0578063d1af0c7d146102ce578063f2fde38b146102f5578063fc0c546a1461030857600080fd5b806375619ab51461025957806378e3214f1461026c5780637a1f1aa91461027f5780638da5cb5b1461029257600080fd5b80634e71d92d116100d35780634e71d92d146101e857806357425508146101f2578063702612221461023e578063715018a61461025157600080fd5b806318160ddd146100fa5780631d49d66c146101115780634216f972146101d5575b600080fd5b6002545b6040519081526020015b60405180910390f35b61018d6040805160608101825260008082526020820181905291810191909152506040805160608101825260035464ffffffffff8116825265010000000000810463ffffffff1660208301526901000000000000000000900476ffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825164ffffffffff16815260208084015163ffffffff16908201529181015176ffffffffffffffffffffffffffffffffffffffffffffff1690820152606001610108565b6100fe6101e3366004611696565b610335565b6101f0610434565b005b6102197f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610108565b6101f061024c3660046116b3565b610561565b6101f0610672565b6101f0610267366004611696565b610686565b6101f061027a3660046116d5565b61077d565b6101f061028d366004611701565b610833565b60005473ffffffffffffffffffffffffffffffffffffffff16610219565b60015473ffffffffffffffffffffffffffffffffffffffff16610219565b6102197f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30281565b6101f0610303366004611696565b6108ad565b6102197f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d781565b60025490565b6040517f3466a88600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff828116602483015260009182917f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d71690633466a88690604401602060405180830381865afa1580156103cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f09190611742565b905061042d838261042660408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610969565b9392505050565b6040517f3466a8860000000000000000000000000000000000000000000000000000000081523060048201523360248201526000907f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d773ffffffffffffffffffffffffffffffffffffffff1690633466a88690604401602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611742565b9050600061052a338361052360408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610991565b9050801561055d5761055d7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30233836109dd565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105b2576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006105ef83836105e860408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b9190610b3f565b60408051828152602081018590529192507f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55910160405180910390a161066d73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30216333086610bca565b505050565b61067a610c67565b6106846000610ce8565b565b61068e610c67565b60015473ffffffffffffffffffffffffffffffffffffffff9081169082168190036106e5576040517f8750ee9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527fa9f739537fc57540bed0a44e33e27baa63290d865cc15f0f16cf17d38c998a4d910160405180910390a150600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107ce576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661080c5760015461055d9073ffffffffffffffffffffffffffffffffffffffff1682610d5d565b60015461055d9073ffffffffffffffffffffffffffffffffffffffff848116911683610eb7565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d716146108a2576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61066d838383610f19565b6108b5610c67565b73ffffffffffffffffffffffffffffffffffffffff811661095d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61096681610ce8565b50565b6000610989838361097987610fc0565b6020880151600101929190610fe8565b949350505050565b60008061099f856020015190565b905060006109ac86610fc0565b90506109bd60018301868684610fe8565b925082156109d4576109d460018301868684611038565b50509392505050565b7f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d773ffffffffffffffffffffffffffffffffffffffff16635641ec036040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6c919061175b565b15610a925761066d73ffffffffffffffffffffffffffffffffffffffff84168383610eb7565b6040517f2f4f21e200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d71690632f4f21e290604401600060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b50505050505050565b600080610b4d856020015190565b9050610bb6610b5b86610fc0565b600183019064ffffffffff42167affffffffffffffffffffffffffffffffffffffffffffffffffffff90911665010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016179055565b610bc1818585611071565b95945050505050565b60006323b872dd60e01b905060006040518281528560048201528460248201528360448201526020600060648360008b5af19150508015610c28573d8015610c1e57600160005114601f3d11169150610c26565b6000873b1191505b505b80610c5f576040517ff405907100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610954565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80471015610dc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610954565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610e21576040519150601f19603f3d011682016040523d82523d6000602084013e610e26565b606091505b505090508061066d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610954565b610ee3837fa9059cbb0000000000000000000000000000000000000000000000000000000084846112ad565b61066d576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f56838383610f4e60408051808201825261166c81526000602091820152815180830190925261032f825260039082015290565b929190611300565b73ffffffffffffffffffffffffffffffffffffffff8316610f89578060026000828254610f8391906117ac565b90915550505b73ffffffffffffffffffffffffffffffffffffffff821661066d578060026000828254610fb691906117bf565b9091555050505050565b6000610fe282611326611359610fd7866020015190565b6001019291906113ee565b92915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600185016020526040812054670de0b6b3a76400009061102484866117d2565b61102e91906117e9565b610bc1919061183f565b61104281836117d2565b73ffffffffffffffffffffffffffffffffffffffff909316600090815260019094016020525050604090912055565b6000816000036110ad576040517f68d5686e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63ffffffff8211156110eb576040517f426a107300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6d04ee2d6d415b85acef8100000000831115611133576040517f0625040100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051606081018252855464ffffffffff811680835265010000000000820463ffffffff166020840152690100000000000000000090910476ffffffffffffffffffffffffffffffffffffffffffffff16928201929092529042101561120657670de0b6b3a76400006111c782836020015163ffffffff1684600001516111bb919061187a565b64ffffffffff1661146e565b6111d1919061183f565b816040015176ffffffffffffffffffffffffffffffffffffffffffffff166111f991906117bf565b61120390856117ac565b93505b61121083426117ac565b855464ffffffffff908116690100000000000000000076ffffffffffffffffffffffffffffffffffffffffffffff8816027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff16176501000000000063ffffffff9690961695909502949094177fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001693169290921790935550919050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610989573d80156112ef57600160005114601f3d111691506112f7565b6000863b1191505b50949350505050565b61132083838361130f88610fc0565b6020890151600101939291906114fb565b50505050565b600080611347836040805180820190915261166c8152600060208201525090565b905061042d816000015163ffffffff16565b60008061137a846040805180820190915261166c8152600060208201525090565b90506109898361138b836020015190565b60408051606081018252915464ffffffffff8116835265010000000000810463ffffffff9081166020850152690100000000000000000090910476ffffffffffffffffffffffffffffffffffffffffffffff169183019190915290919061146e16565b835460009064ffffffffff8116906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16428214611464576000611438878763ffffffff16565b90508015611462578061144f88858863ffffffff16565b8161145c5761145c611810565b04820191505b505b9695505050505050565b602082015160009063ffffffff1615610fe257600061149883856000015164ffffffffff16611656565b6114ad42866000015164ffffffffff16611656565b039050836020015163ffffffff16670de0b6b3a7640000856040015176ffffffffffffffffffffffffffffffffffffffffffffff16830202816114f2576114f2611810565b04915050610fe2565b73ffffffffffffffffffffffffffffffffffffffff8481161590841615831580159061155357508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614155b15610b365781806115615750805b156115ba577fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff851602164264ffffffffff161787555b60006115c684866117d2565b90508261160a5773ffffffffffffffffffffffffffffffffffffffff87166000908152600189016020526040812080548392906116049084906117e9565b90915550505b8161164c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260018901602052604081208054839290611646908490611898565b90915550505b5050505050505050565b6000818310611665578161042d565b5090919050565b6106846118c0565b73ffffffffffffffffffffffffffffffffffffffff8116811461096657600080fd5b6000602082840312156116a857600080fd5b813561042d81611674565b600080604083850312156116c657600080fd5b50508035926020909101359150565b600080604083850312156116e857600080fd5b82356116f381611674565b946020939093013593505050565b60008060006060848603121561171657600080fd5b833561172181611674565b9250602084013561173181611674565b929592945050506040919091013590565b60006020828403121561175457600080fd5b5051919050565b60006020828403121561176d57600080fd5b8151801515811461042d57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610fe257610fe261177d565b81810381811115610fe257610fe261177d565b8082028115828204841417610fe257610fe261177d565b81810360008312801583831316838312821617156118095761180961177d565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611875577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b64ffffffffff8281168282160390808211156118095761180961177d565b80820182811260008312801582168215821617156118b8576118b861177d565b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052605160045260246000fdfea264697066735822122034466a7444fbfe72c0ad864e9d1e30cf4dfc6176b03de945f641f740b8a4824b64736f6c63430008110033

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

0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d7

-----Decoded View---------------
Arg [0] : st1inch_ (address): 0x9A0C8Ff858d273f57072D714bca7411D717501D7

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009a0c8ff858d273f57072d714bca7411d717501d7


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.