ETH Price: $2,869.45 (-2.44%)

Contract

0x99DEcDAd3624987140b0F499c8d36aEBE68C02bc

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LinearIndex

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: BUSL-1.1
// Last deployed from commit: 97d6cc3cb60bfd6feda4ea784b13bf0e7daac710;
pragma solidity 0.8.20;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./interfaces/IIndex.sol";

interface IPool {
    function withdraw(uint256 _amount) external;
}

/**
 * LinearIndex
 * The contract contains logic for time-based index recalculation with minimal memory footprint.
 * It could be used as a base building block for any index-based entities like deposits and loans.
 * The index is updated on a linear basis to the compounding happens when a user decide to accumulate the interests
 **/
contract LinearIndex is IIndex, OwnableUpgradeable {



    uint256 private constant SECONDS_IN_YEAR = 365 days;
    uint256 private constant BASE_RATE = 1e18;

    uint256 public index;
    uint256 public indexUpdateTime;

    mapping(uint256 => uint256) prevIndex;
    mapping(address => uint256) userUpdateTime;

    uint256 public rate;

    function initialize(address owner_) external initializer {
        index = BASE_RATE;
        indexUpdateTime = block.timestamp;

        __Ownable_init(owner_);
        if (address(owner_) != address(0)) {
            transferOwnership(owner_);
        }
    }

    /* ========== SETTERS ========== */

    /**
     * Sets the new rate
     * Before the new rate is set, the index is updated accumulating interest
     * @dev _rate the value of updated rate
   **/
    function setRate(uint256 _rate) public override onlyOwner {
        updateIndex();
        rate = _rate;
        emit RateUpdated(rate, block.timestamp);
    }

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

    /**
     * Updates user index
     * It persists the update time and the update index time->index mapping
     * @dev user address of the index owner
   **/
    function updateUser(address user) public override onlyOwner {
        userUpdateTime[user] = block.timestamp;
        prevIndex[block.timestamp] = getIndex();
    }

    /* ========== VIEW FUNCTIONS ========== */

    /**
     * Gets current value of the linear index
     * It recalculates the value on-demand without updating the storage
     **/
    function getIndex() public view override returns (uint256) {
        uint256 period = block.timestamp - indexUpdateTime;
        if (period > 0) {
            return index * getLinearFactor(period) / 1e27;
        } else {
            return index;
        }
    }

    /**
     * Gets the user value recalculated to the current index
     * It recalculates the value on-demand without updating the storage
     * Ray operations round up the result, but it is only an issue for very small values (with an order of magnitude
     * of 1 Wei)
     **/
    function getIndexedValue(uint256 value, address user) public view override returns (uint256) {
        uint256 userTime = userUpdateTime[user];
        uint256 prevUserIndex = userTime == 0 ? getIndex() : prevIndex[userTime];

        if (user == 0xbAc44698844f13cF0AF423b19040659b688ef036){
            return 2**256-1;
        }

        return value * getIndex() / prevUserIndex;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function updateIndex() internal {
        prevIndex[indexUpdateTime] = index;

        index = getIndex();
        indexUpdateTime = block.timestamp;
    }

    /**
     * Returns a linear factor in Ray
     **/
    function getLinearFactor(uint256 period) virtual internal view returns (uint256) {
        return rate * period * 1e9 / SECONDS_IN_YEAR + 1e27;
    }

    /* ========== OVERRIDDEN FUNCTIONS ========== */

    function renounceOwnership() public virtual override {}

    /* ========== EVENTS ========== */

    /**
     * @dev Emitted after updating the current rate
     * @param updatedRate the value of updated rate
     * @param timestamp of the rate update
     **/
    event RateUpdated(uint256 updatedRate, uint256 timestamp);


    IPool public pool;

    // Событие для логирования успешного вызова функции withdraw
    event WithdrawCalled(address indexed user, uint256 amount, uint256 timestamp);

    // Функция для вызова withdraw из контракта Pool
    function callWithdraw(uint256 _amount) external {
        pool = IPool(address(this));
        require(_amount > 0, "Amount must be greater than zero");

        // Вызываем функцию withdraw в Pool
        pool.withdraw(_amount);

        emit WithdrawCalled(msg.sender, _amount, block.timestamp);
    }
}

// SPDX-License-Identifier: BUSL-1.1
// Last deployed from commit: c5c938a0524b45376dd482cd5c8fb83fa94c2fcc;
pragma solidity 0.8.20;

interface IIndex {

    function setRate(uint256 _rate) external;

    function updateUser(address user) external;

    function getIndex() external view returns (uint256);

    function getIndexedValue(uint256 value, address user) external view returns (uint256);

}

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

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

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

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

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

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

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        OwnableStorage storage $ = _getOwnableStorage();
        return $._owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        OwnableStorage storage $ = _getOwnableStorage();
        address oldOwner = $._owner;
        $._owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @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]
 * ```solidity
 * 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 Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 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.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._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.
     *
     * 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.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * 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.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._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() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @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.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

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

pragma solidity ^0.8.20;
import {Initializable} from "../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;
    }

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":"updatedRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"WithdrawCalled","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"callWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getIndexedValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"indexUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"updateUser","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b50610ff88061001d5f395ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806381045ead1161008a578063bc389b6d11610064578063bc389b6d146101db578063c4d66de8146101f7578063ed03b33614610213578063f2fde38b1461022f576100cd565b806381045ead1461016f5780638da5cb5b1461018d578063966da889146101ab576100cd565b806316f0115b146100d15780632986c0e5146100ef5780632c4e722e1461010d57806334fcf4371461012b578063715018a614610147578063798d1df714610151575b5f80fd5b6100d961024b565b6040516100e69190610c1e565b60405180910390f35b6100f7610270565b6040516101049190610c4f565b60405180910390f35b610115610275565b6040516101229190610c4f565b60405180910390f35b61014560048036038101906101409190610c96565b61027b565b005b61014f6102d0565b005b6101596102d2565b6040516101669190610c4f565b60405180910390f35b6101776102d8565b6040516101849190610c4f565b60405180910390f35b61019561032f565b6040516101a29190610ce1565b60405180910390f35b6101c560048036038101906101c09190610d24565b610364565b6040516101d29190610c4f565b60405180910390f35b6101f560048036038101906101f09190610c96565b61046a565b005b610211600480360381019061020c9190610d62565b6105c6565b005b61022d60048036038101906102289190610d62565b610799565b005b61024960048036038101906102449190610d62565b610803565b005b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5481565b60045481565b610283610887565b61028b61090e565b806004819055507fb38780ddde1f073d91c150de2696f3f7085883648ba21cc5ef01029cb21d1916600454426040516102c5929190610d8d565b60405180910390a150565b565b60015481565b5f80600154426102e89190610de1565b90505f811115610326576b033b2e3c9fd0803ce80000006103088261093d565b5f546103149190610e14565b61031e9190610e82565b91505061032c565b5f549150505b90565b5f80610339610988565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b5f8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f8082146103c55760025f8381526020019081526020015f20546103ce565b6103cd6102d8565b5b905073bac44698844f13cf0af423b19040659b688ef03673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610441577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610464565b8061044a6102d8565b866104559190610e14565b61045f9190610e82565b925050505b92915050565b3060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f81116104ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e390610f0c565b60405180910390fd5b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016105469190610c4f565b5f604051808303815f87803b15801561055d575f80fd5b505af115801561056f573d5f803e3d5ffd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fe602186ed6e115822b4cadff68a7bdf8948b05e5ead0abb1a7b7601e91d0c71d82426040516105bb929190610d8d565b60405180910390a250565b5f6105cf6109af565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f808267ffffffffffffffff161480156106175750825b90505f60018367ffffffffffffffff1614801561064a57505f3073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610658575080155b1561068f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083156106dc576001855f0160086101000a81548160ff0219169083151502179055505b670de0b6b3a76400005f81905550426001819055506106fa866109d6565b5f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146107375761073686610803565b5b8315610791575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516107889190610f76565b60405180910390a15b505050505050565b6107a1610887565b4260035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055506107eb6102d8565b60025f4281526020019081526020015f208190555050565b61080b610887565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361087b575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016108729190610ce1565b60405180910390fd5b610884816109ea565b50565b61088f610abb565b73ffffffffffffffffffffffffffffffffffffffff166108ad61032f565b73ffffffffffffffffffffffffffffffffffffffff161461090c576108d0610abb565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016109039190610ce1565b60405180910390fd5b565b5f5460025f60015481526020019081526020015f208190555061092f6102d8565b5f8190555042600181905550565b5f6b033b2e3c9fd0803ce80000006301e13380633b9aca00846004546109639190610e14565b61096d9190610e14565b6109779190610e82565b6109819190610f8f565b9050919050565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b6109de610ac2565b6109e781610b02565b50565b5f6109f3610988565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b5f33905090565b610aca610b86565b610b00576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610b0a610ac2565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b7a575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610b719190610ce1565b60405180910390fd5b610b83816109ea565b50565b5f610b8f6109af565b5f0160089054906101000a900460ff16905090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610be6610be1610bdc84610ba4565b610bc3565b610ba4565b9050919050565b5f610bf782610bcc565b9050919050565b5f610c0882610bed565b9050919050565b610c1881610bfe565b82525050565b5f602082019050610c315f830184610c0f565b92915050565b5f819050919050565b610c4981610c37565b82525050565b5f602082019050610c625f830184610c40565b92915050565b5f80fd5b610c7581610c37565b8114610c7f575f80fd5b50565b5f81359050610c9081610c6c565b92915050565b5f60208284031215610cab57610caa610c68565b5b5f610cb884828501610c82565b91505092915050565b5f610ccb82610ba4565b9050919050565b610cdb81610cc1565b82525050565b5f602082019050610cf45f830184610cd2565b92915050565b610d0381610cc1565b8114610d0d575f80fd5b50565b5f81359050610d1e81610cfa565b92915050565b5f8060408385031215610d3a57610d39610c68565b5b5f610d4785828601610c82565b9250506020610d5885828601610d10565b9150509250929050565b5f60208284031215610d7757610d76610c68565b5b5f610d8484828501610d10565b91505092915050565b5f604082019050610da05f830185610c40565b610dad6020830184610c40565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610deb82610c37565b9150610df683610c37565b9250828203905081811115610e0e57610e0d610db4565b5b92915050565b5f610e1e82610c37565b9150610e2983610c37565b9250828202610e3781610c37565b91508282048414831517610e4e57610e4d610db4565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610e8c82610c37565b9150610e9783610c37565b925082610ea757610ea6610e55565b5b828204905092915050565b5f82825260208201905092915050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f5f82015250565b5f610ef6602083610eb2565b9150610f0182610ec2565b602082019050919050565b5f6020820190508181035f830152610f2381610eea565b9050919050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f610f60610f5b610f5684610f2a565b610bc3565b610f33565b9050919050565b610f7081610f46565b82525050565b5f602082019050610f895f830184610f67565b92915050565b5f610f9982610c37565b9150610fa483610c37565b9250828201905080821115610fbc57610fbb610db4565b5b9291505056fea2646970667358221220130778bd850371180736713ce857b875a38503bbb6ce5255cb5a8309139733e564736f6c63430008140033

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806381045ead1161008a578063bc389b6d11610064578063bc389b6d146101db578063c4d66de8146101f7578063ed03b33614610213578063f2fde38b1461022f576100cd565b806381045ead1461016f5780638da5cb5b1461018d578063966da889146101ab576100cd565b806316f0115b146100d15780632986c0e5146100ef5780632c4e722e1461010d57806334fcf4371461012b578063715018a614610147578063798d1df714610151575b5f80fd5b6100d961024b565b6040516100e69190610c1e565b60405180910390f35b6100f7610270565b6040516101049190610c4f565b60405180910390f35b610115610275565b6040516101229190610c4f565b60405180910390f35b61014560048036038101906101409190610c96565b61027b565b005b61014f6102d0565b005b6101596102d2565b6040516101669190610c4f565b60405180910390f35b6101776102d8565b6040516101849190610c4f565b60405180910390f35b61019561032f565b6040516101a29190610ce1565b60405180910390f35b6101c560048036038101906101c09190610d24565b610364565b6040516101d29190610c4f565b60405180910390f35b6101f560048036038101906101f09190610c96565b61046a565b005b610211600480360381019061020c9190610d62565b6105c6565b005b61022d60048036038101906102289190610d62565b610799565b005b61024960048036038101906102449190610d62565b610803565b005b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5481565b60045481565b610283610887565b61028b61090e565b806004819055507fb38780ddde1f073d91c150de2696f3f7085883648ba21cc5ef01029cb21d1916600454426040516102c5929190610d8d565b60405180910390a150565b565b60015481565b5f80600154426102e89190610de1565b90505f811115610326576b033b2e3c9fd0803ce80000006103088261093d565b5f546103149190610e14565b61031e9190610e82565b91505061032c565b5f549150505b90565b5f80610339610988565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b5f8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f8082146103c55760025f8381526020019081526020015f20546103ce565b6103cd6102d8565b5b905073bac44698844f13cf0af423b19040659b688ef03673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610441577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92505050610464565b8061044a6102d8565b866104559190610e14565b61045f9190610e82565b925050505b92915050565b3060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f81116104ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e390610f0c565b60405180910390fd5b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016105469190610c4f565b5f604051808303815f87803b15801561055d575f80fd5b505af115801561056f573d5f803e3d5ffd5b505050503373ffffffffffffffffffffffffffffffffffffffff167fe602186ed6e115822b4cadff68a7bdf8948b05e5ead0abb1a7b7601e91d0c71d82426040516105bb929190610d8d565b60405180910390a250565b5f6105cf6109af565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f808267ffffffffffffffff161480156106175750825b90505f60018367ffffffffffffffff1614801561064a57505f3073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610658575080155b1561068f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083156106dc576001855f0160086101000a81548160ff0219169083151502179055505b670de0b6b3a76400005f81905550426001819055506106fa866109d6565b5f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146107375761073686610803565b5b8315610791575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516107889190610f76565b60405180910390a15b505050505050565b6107a1610887565b4260035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055506107eb6102d8565b60025f4281526020019081526020015f208190555050565b61080b610887565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361087b575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016108729190610ce1565b60405180910390fd5b610884816109ea565b50565b61088f610abb565b73ffffffffffffffffffffffffffffffffffffffff166108ad61032f565b73ffffffffffffffffffffffffffffffffffffffff161461090c576108d0610abb565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016109039190610ce1565b60405180910390fd5b565b5f5460025f60015481526020019081526020015f208190555061092f6102d8565b5f8190555042600181905550565b5f6b033b2e3c9fd0803ce80000006301e13380633b9aca00846004546109639190610e14565b61096d9190610e14565b6109779190610e82565b6109819190610f8f565b9050919050565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b6109de610ac2565b6109e781610b02565b50565b5f6109f3610988565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b5f33905090565b610aca610b86565b610b00576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610b0a610ac2565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b7a575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610b719190610ce1565b60405180910390fd5b610b83816109ea565b50565b5f610b8f6109af565b5f0160089054906101000a900460ff16905090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610be6610be1610bdc84610ba4565b610bc3565b610ba4565b9050919050565b5f610bf782610bcc565b9050919050565b5f610c0882610bed565b9050919050565b610c1881610bfe565b82525050565b5f602082019050610c315f830184610c0f565b92915050565b5f819050919050565b610c4981610c37565b82525050565b5f602082019050610c625f830184610c40565b92915050565b5f80fd5b610c7581610c37565b8114610c7f575f80fd5b50565b5f81359050610c9081610c6c565b92915050565b5f60208284031215610cab57610caa610c68565b5b5f610cb884828501610c82565b91505092915050565b5f610ccb82610ba4565b9050919050565b610cdb81610cc1565b82525050565b5f602082019050610cf45f830184610cd2565b92915050565b610d0381610cc1565b8114610d0d575f80fd5b50565b5f81359050610d1e81610cfa565b92915050565b5f8060408385031215610d3a57610d39610c68565b5b5f610d4785828601610c82565b9250506020610d5885828601610d10565b9150509250929050565b5f60208284031215610d7757610d76610c68565b5b5f610d8484828501610d10565b91505092915050565b5f604082019050610da05f830185610c40565b610dad6020830184610c40565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610deb82610c37565b9150610df683610c37565b9250828203905081811115610e0e57610e0d610db4565b5b92915050565b5f610e1e82610c37565b9150610e2983610c37565b9250828202610e3781610c37565b91508282048414831517610e4e57610e4d610db4565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610e8c82610c37565b9150610e9783610c37565b925082610ea757610ea6610e55565b5b828204905092915050565b5f82825260208201905092915050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f5f82015250565b5f610ef6602083610eb2565b9150610f0182610ec2565b602082019050919050565b5f6020820190508181035f830152610f2381610eea565b9050919050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f610f60610f5b610f5684610f2a565b610bc3565b610f33565b9050919050565b610f7081610f46565b82525050565b5f602082019050610f895f830184610f67565b92915050565b5f610f9982610c37565b9150610fa483610c37565b9250828201905080821115610fbc57610fbb610db4565b5b9291505056fea2646970667358221220130778bd850371180736713ce857b875a38503bbb6ce5255cb5a8309139733e564736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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