Contract 0xF904680aC38D9c01413382aBe66174758fE6C60f

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x404e58e294a0c9a489a3bbfb1ff8290c9d49b8661d1b6540f2a0e125a75f31ec0x6080604058123912022-12-01 7:46:5368 days 13 hrs agoTectonic: Deployer IN  Create: ClaimTokenHelper0 CRO4.719026533907 4,867.168542846
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ClaimTokenHelper

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : ClaimTokenHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;

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

abstract contract TectonicCoreInterface {
    function claimTonic(address) external virtual;
}

abstract contract TectonicVaultInterface {
    function depositFor(uint256 _pid, uint256 _amount, address _holder) external virtual;
}

abstract contract TectonicStakingPoolInterface {
    function stake(uint amount) external virtual;
}

contract ClaimTokenHelper is Initializable, OwnableUpgradeable, ClaimTokenHelperStorage {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    uint constant PRECISION = 1e18;

    constructor() initializer {}

    function claimTokenHelperVersion() external pure virtual returns (uint8) {
        return 1;
    }

    function initialize(
        IERC20Upgradeable _tonic,
        IERC20Upgradeable _xTonic,
        address _stakingPoolAddress,
        address _vaultAddress,
        address _tectonicSocketAddress
    ) public initializer {
        tonic = _tonic;
        xTonic = _xTonic;
        stakingPoolAddress = _stakingPoolAddress;
        vaultAddress = _vaultAddress;
        tectonicSocketAddress = _tectonicSocketAddress;

        __Ownable_init();
    }

    /**
     * Only tectonic core can access
     */
    modifier onlyTectonicCore() virtual {
        require(msg.sender == tectonicSocketAddress, "only tectonicCore can access this function");
        _;
    }

    /** External Functions **/

    /**
     * @notice Claim all the tonic accrued by holder in all tectonicCore, deposit part of them into a selected vault
     * @param holder                The address to claim TONIC for
     * @param depositPercentage     How many percentage of TONIC reward will be deposit to vault
     * @param vaultPoolId           Pool id of the vault to deposit to
     */
    function claimTonic(address holder, uint depositPercentage, uint vaultPoolId) external {
        require(depositPercentage >= defaultDepositPercentage, "deposit percentage should be higher");
        require(depositPercentage <= PRECISION, "deposit percentage exceed 100%");
        TectonicCoreInterface tectonicCore = TectonicCoreInterface(tectonicSocketAddress);
        tectonicCore.claimTonic(holder);
        tonicDelayedEmissionsInternal(holder, depositPercentage, vaultPoolId);
    }

    /**
     * @dev External function called by TectonicCore only
     * @param holder    User to claim TONIC
     */
    function tonicDelayedEmissions(address holder) external onlyTectonicCore {
        tonicDelayedEmissionsInternal(holder, defaultDepositPercentage, defaultVaultPoolId);
    }

    /** Admin Functions **/

    /**
     * @notice Set default values for delayed emission
     * @param _defaultDepositPercentage         How many percentage of TONIC will be deposit to vault by default
     * @param _defaultVaultPoolId               The pool id of the vault by default
     */
    function setDelayedEmissionsParameter(uint _defaultDepositPercentage, uint _defaultVaultPoolId) external onlyOwner {
        defaultDepositPercentage = _defaultDepositPercentage;
        defaultVaultPoolId = _defaultVaultPoolId;
    }

    /** Internal Functions **/

    /**
     * @notice Claim TONIC with delayed emissions feature, part of the TONIC reward will be auto-deposited to vault
     * @dev depositPercentage of TONIC will be deposited to the user chosen vault, remaining TONIC Send to user's wallet
     *
     * @param holder                            User to claim TONIC
     * @param depositPercentage                 How many percentage of TONIC reward will be deposit to vault
     * @param vaultPoolId                       Pool id of the vault to deposit to
     */
    function tonicDelayedEmissionsInternal(address holder, uint depositPercentage, uint vaultPoolId) internal {
        uint totalTonicAmount = tonic.balanceOf(address(this));

        // stake depositPercentage of Tonic to staking pool
        uint tonicAmountToStake = totalTonicAmount * depositPercentage / PRECISION;
        // since TectonicStakingPool.stake function need staking amount must be equal to or greater than 100 TONIC
        require(tonicAmountToStake >= 100 ether, "ClaimTokenHelper: Amount must be equal to or greater than 100 TONIC");

        tonic.approve(stakingPoolAddress, tonicAmountToStake);
        TectonicStakingPoolInterface(stakingPoolAddress).stake(tonicAmountToStake);

        // deposit xTonic to vault
        uint xTonicAmount = xTonic.balanceOf(address(this));
        xTonic.approve(vaultAddress, xTonicAmount);
        TectonicVaultInterface(vaultAddress).depositFor(vaultPoolId, xTonicAmount, holder);

        // send (1 - depositPercentage)% of TONIC back to user
        tonic.safeTransfer(holder, totalTonicAmount - tonicAmountToStake);
    }
}

File 2 of 8 : ClaimTokenHelperStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

contract ClaimTokenHelperStorage {
    // default percentage of TONIC should be deposit to vault
    uint public defaultDepositPercentage;

    //default deposit to one pool of vault
    uint public defaultVaultPoolId;

    // tonic token contract
    IERC20Upgradeable public tonic;

    // xTonic token contract
    IERC20Upgradeable public xTonic;

    // address of tectonic staking pool
    address public stakingPoolAddress;

    // address of tectonic vault
    address public vaultAddress;

    // address of tectonicSocket
    address public tectonicSocketAddress;
}

File 3 of 8 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 8 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
    uint256[49] private __gap;
}

File 5 of 8 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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);
}

File 6 of 8 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

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

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    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;
    }
    uint256[50] private __gap;
}

File 8 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have 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.
 *
 * 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 initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"claimTokenHelperVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"depositPercentage","type":"uint256"},{"internalType":"uint256","name":"vaultPoolId","type":"uint256"}],"name":"claimTonic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultDepositPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultVaultPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_tonic","type":"address"},{"internalType":"contract IERC20Upgradeable","name":"_xTonic","type":"address"},{"internalType":"address","name":"_stakingPoolAddress","type":"address"},{"internalType":"address","name":"_vaultAddress","type":"address"},{"internalType":"address","name":"_tectonicSocketAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_defaultDepositPercentage","type":"uint256"},{"internalType":"uint256","name":"_defaultVaultPoolId","type":"uint256"}],"name":"setDelayedEmissionsParameter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tectonicSocketAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tonic","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"tonicDelayedEmissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xTonic","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50600054610100900460ff1661002c5760005460ff1615610034565b6100346100d5565b61009b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff161580156100bd576000805461ffff19166101011790555b80156100cf576000805461ff00191690555b506100f6565b60006100ea306100f060201b6105cb1760201c565b15905090565b3b151590565b611004806101056000396000f3fe608060405234801561001057600080fd5b50600436106100c55760003560e01c80630e427a0e146100ca5780631459457a146100f357806325b15a0c14610108578063430bf08a1461011b578063546b0f231461012e578063620a9871146101415780636276b69114610158578063715018a61461016757806384d178321461016f5780638da5cb5b14610178578063ada029e614610180578063c555698414610193578063edca5b68146101a6578063f2fde38b146101b9578063fe7ab5cf146101cc575b600080fd5b606b546100dd906001600160a01b031681565b6040516100ea9190610e41565b60405180910390f35b610106610101366004610d7c565b6101df565b005b6069546100dd906001600160a01b031681565b606a546100dd906001600160a01b031681565b6067546100dd906001600160a01b031681565b61014a60665481565b6040519081526020016100ea565b604051600181526020016100ea565b610106610300565b61014a60655481565b6100dd61033b565b61010661018e366004610d28565b61034a565b6101066101a1366004610d0c565b610475565b6068546100dd906001600160a01b031681565b6101066101c7366004610d0c565b6104f4565b6101066101da366004610e04565b610591565b600054610100900460ff166101fa5760005460ff16156101fe565b303b155b6102665760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015610288576000805461ffff19166101011790555b606780546001600160a01b03199081166001600160a01b0389811691909117909255606880548216888416179055606980548216878416179055606a80548216868416179055606b80549091169184169190911790556102e66105d1565b80156102f8576000805461ff00191690555b505050505050565b3361030961033b565b6001600160a01b03161461032f5760405162461bcd60e51b815260040161025d90610ea1565b6103396000610608565b565b6033546001600160a01b031690565b6065548210156103a85760405162461bcd60e51b815260206004820152602360248201527f6465706f7369742070657263656e746167652073686f756c64206265206869676044820152623432b960e91b606482015260840161025d565b670de0b6b3a76400008211156104005760405162461bcd60e51b815260206004820152601e60248201527f6465706f7369742070657263656e746167652065786365656420313030250000604482015260640161025d565b606b546040516363eb0a4d60e01b81526001600160a01b039091169081906363eb0a4d90610432908790600401610e41565b600060405180830381600087803b15801561044c57600080fd5b505af1158015610460573d6000803e3d6000fd5b5050505061046f84848461065a565b50505050565b606b546001600160a01b031633146104e25760405162461bcd60e51b815260206004820152602a60248201527f6f6e6c7920746563746f6e6963436f72652063616e20616363657373207468696044820152693990333ab731ba34b7b760b11b606482015260840161025d565b6104f18160655460665461065a565b50565b336104fd61033b565b6001600160a01b0316146105235760405162461bcd60e51b815260040161025d90610ea1565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161025d565b6104f181610608565b3361059a61033b565b6001600160a01b0316146105c05760405162461bcd60e51b815260040161025d90610ea1565b606591909155606655565b3b151590565b600054610100900460ff166105f85760405162461bcd60e51b815260040161025d90610ed6565b610600610a0e565b610339610a35565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6067546040516370a0823160e01b81526000916001600160a01b0316906370a082319061068b903090600401610e41565b60206040518083038186803b1580156106a357600080fd5b505afa1580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190610dec565b90506000670de0b6b3a76400006106f28584610f41565b6106fc9190610f21565b905068056bc75e2d631000008110156107895760405162461bcd60e51b815260206004820152604360248201527f436c61696d546f6b656e48656c7065723a20416d6f756e74206d75737420626560448201527f20657175616c20746f206f722067726561746572207468616e2031303020544f6064820152624e494360e81b608482015260a40161025d565b60675460695460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926107bf929116908590600401610e55565b602060405180830381600087803b1580156107d957600080fd5b505af11580156107ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108119190610d5c565b5060695460405163534a7e1d60e11b8152600481018390526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b50506068546040516370a0823160e01b8152600093506001600160a01b0390911691506370a08231906108a3903090600401610e41565b60206040518083038186803b1580156108bb57600080fd5b505afa1580156108cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f39190610dec565b606854606a5460405163095ea7b360e01b81529293506001600160a01b039182169263095ea7b39261092b9216908590600401610e55565b602060405180830381600087803b15801561094557600080fd5b505af1158015610959573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097d9190610d5c565b50606a5460405163481086bf60e11b815260048101869052602481018390526001600160a01b038881166044830152909116906390210d7e90606401600060405180830381600087803b1580156109d357600080fd5b505af11580156109e7573d6000803e3d6000fd5b505050506102f88683856109fb9190610f60565b6067546001600160a01b03169190610a65565b600054610100900460ff166103395760405162461bcd60e51b815260040161025d90610ed6565b600054610100900460ff16610a5c5760405162461bcd60e51b815260040161025d90610ed6565b61033933610608565b610abb8363a9059cbb60e01b8484604051602401610a84929190610e55565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ac0565b505050565b6000610b15826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b929092919063ffffffff16565b805190915015610abb5780806020019051810190610b339190610d5c565b610abb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161025d565b6060610ba18484600085610bab565b90505b9392505050565b606082471015610c0c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161025d565b843b610c5a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161025d565b600080866001600160a01b03168587604051610c769190610e25565b60006040518083038185875af1925050503d8060008114610cb3576040519150601f19603f3d011682016040523d82523d6000602084013e610cb8565b606091505b5091509150610cc8828286610cd3565b979650505050505050565b60608315610ce2575081610ba4565b825115610cf25782518084602001fd5b8160405162461bcd60e51b815260040161025d9190610e6e565b600060208284031215610d1d578081fd5b8135610ba481610fb9565b600080600060608486031215610d3c578182fd5b8335610d4781610fb9565b95602085013595506040909401359392505050565b600060208284031215610d6d578081fd5b81518015158114610ba4578182fd5b600080600080600060a08688031215610d93578081fd5b8535610d9e81610fb9565b94506020860135610dae81610fb9565b93506040860135610dbe81610fb9565b92506060860135610dce81610fb9565b91506080860135610dde81610fb9565b809150509295509295909350565b600060208284031215610dfd578081fd5b5051919050565b60008060408385031215610e16578182fd5b50508035926020909101359150565b60008251610e37818460208701610f77565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152610e8d816040850160208701610f77565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082610f3c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610f5b57610f5b610fa3565b500290565b600082821015610f7257610f72610fa3565b500390565b60005b83811015610f92578181015183820152602001610f7a565b8381111561046f5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146104f157600080fdfea26469706673582212204c2b69cf2b97d5bf4ef081207c05b9a507b1fde3190d1a9debc246137954b64c64736f6c63430008030033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.