ETH Price: $2,897.35 (-1.39%)

Contract

0x4A084b06eFdB44e9fB26Eac29334E4808BA65A32
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Withdraw267165072025-11-04 7:53:4983 days ago1762242829IN
0x4A084b06...08BA65A32
0 ETH0.000000070.00054282
Withdraw236155262025-08-24 13:07:47154 days ago1756040867IN
0x4A084b06...08BA65A32
0 ETH0.000000160.00111103
Withdraw234942482025-08-21 17:45:11157 days ago1755798311IN
0x4A084b06...08BA65A32
0 ETH00.00001023
Withdraw215782972025-07-08 9:20:09202 days ago1751966409IN
0x4A084b06...08BA65A32
0 ETH0.000000140.00100744
Withdraw212437312025-06-30 15:27:57209 days ago1751297277IN
0x4A084b06...08BA65A32
0 ETH0.000000250.00188138
Withdraw153070162025-02-13 5:17:27347 days ago1739423847IN
0x4A084b06...08BA65A32
0 ETH0.00000120.00394281
Stake153065832025-02-13 5:03:01347 days ago1739422981IN
0x4A084b06...08BA65A32
0 ETH0.000001180.00387212
Withdraw140172552025-01-14 8:45:25377 days ago1736844325IN
0x4A084b06...08BA65A32
0 ETH0.00000020.00123691
Stake134600162025-01-01 11:10:47390 days ago1735729847IN
0x4A084b06...08BA65A32
0 ETH0.000000420.00287647
Withdraw113451132024-11-13 12:14:01439 days ago1731500041IN
0x4A084b06...08BA65A32
0 ETH0.000000310.00124996
Stake112556092024-11-11 10:30:33441 days ago1731321033IN
0x4A084b06...08BA65A32
0 ETH0.000001160.00168481
Withdraw108292202024-11-01 13:37:35450 days ago1730468255IN
0x4A084b06...08BA65A32
0 ETH0.000000480.0014873
Withdraw107510402024-10-30 18:11:35452 days ago1730311895IN
0x4A084b06...08BA65A32
0 ETH0.000000780.0045802
Withdraw96233892024-10-04 15:43:13478 days ago1728056593IN
0x4A084b06...08BA65A32
0 ETH0.000000380.00240404
Withdraw96137352024-10-04 10:21:25479 days ago1728037285IN
0x4A084b06...08BA65A32
0 ETH0.00000030.00201042
Withdraw90893272024-09-22 7:01:09491 days ago1726988469IN
0x4A084b06...08BA65A32
0 ETH0.000000660.00445398
Withdraw83295682024-09-04 16:55:51508 days ago1725468951IN
0x4A084b06...08BA65A32
0 ETH0.000003380.02018887
Withdraw82560822024-09-03 0:06:19510 days ago1725321979IN
0x4A084b06...08BA65A32
0 ETH0.000000160.00100305
Withdraw77844752024-08-23 2:06:05521 days ago1724378765IN
0x4A084b06...08BA65A32
0 ETH0.000004350.03002789
Stake70946082024-08-07 2:50:31537 days ago1722999031IN
0x4A084b06...08BA65A32
0 ETH0.000001690.01076772
Withdraw70204682024-08-05 9:39:11539 days ago1722850751IN
0x4A084b06...08BA65A32
0 ETH0.000000420.00270583
Stake67261492024-07-29 14:08:33545 days ago1722262113IN
0x4A084b06...08BA65A32
0 ETH0.000000080.00046467
Withdraw64861892024-07-24 0:49:53551 days ago1721782193IN
0x4A084b06...08BA65A32
0 ETH0.000000160.0011
Withdraw61173022024-07-15 11:53:39560 days ago1721044419IN
0x4A084b06...08BA65A32
0 ETH0.000009990.0617
Stake61147542024-07-15 10:28:43560 days ago1721039323IN
0x4A084b06...08BA65A32
0 ETH0.000000860.0059
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlainVault

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

// import "hardhat/console.sol";

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "../libs/Constants.sol";
import "../libs/TokensTransfer.sol";
import "../interfaces/IBlast.sol";
import "../interfaces/IBlastPoints.sol";
import "../interfaces/IProtocolSettings.sol";
import "../settings/ProtocolOwner.sol";

contract PlainVault is ProtocolOwner, ReentrancyGuard {
  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  IProtocolSettings public immutable settings;
  mapping(bytes32 => bool) internal _vaultParamsSet;
  mapping(bytes32 => uint256) internal _vaultParams;

  address public stakingToken;

  uint256 internal _totalSupply;
  mapping(address => uint256) internal _balances;

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

  constructor(
    address _wandProtocol,
    address _settings,
    address _stakingToken
  ) ProtocolOwner(_wandProtocol) {
    settings = IProtocolSettings(_settings);
    stakingToken = _stakingToken;
  }

  receive() external payable {}

  /* ========== VIEWS ========== */

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

  function balanceOf(address account) external view returns (uint256) {
    return _balances[account];
  }

  function vaultParamValue(bytes32 param) public view returns (uint256) {
    require(param.length > 0, "Empty param name");

    if (_vaultParamsSet[param]) {
      return _vaultParams[param];
    }
    return settings.paramDefaultValue(param);
  }

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

  function stake(uint256 amount) external payable nonReentrant onUserAction {
    require(amount > 0, "Cannot stake 0");
    if (stakingToken == Constants.NATIVE_TOKEN) {
      require(msg.value == amount, "Incorrect msg.value");
    }
    else {
      require(msg.value == 0, "msg.value should be 0");
    }

    _totalSupply = _totalSupply.add(amount);
    _balances[_msgSender()] = _balances[_msgSender()].add(amount);
    TokensTransfer.transferTokens(stakingToken, _msgSender(), address(this), amount);
    emit Staked(_msgSender(), amount);
  }

  function withdraw(uint256 amount) public nonReentrant onUserAction {
    require(amount > 0, "Cannot withdraw 0");
    require(amount <= _balances[_msgSender()], "Insufficient balance");

    uint256 fees = amount.mul(vaultParamValue("C")).div(10 ** settings.decimals());
    uint256 netAmount = amount.sub(fees);

    _totalSupply = _totalSupply.sub(amount);
    _balances[_msgSender()] = _balances[_msgSender()].sub(amount);

    TokensTransfer.transferTokens(stakingToken, address(this), _msgSender(), netAmount);
    if (fees > 0) {
      TokensTransfer.transferTokens(stakingToken, address(this), settings.treasury(), fees);
    }

    emit Withdrawn(_msgSender(), fees, netAmount);
  }

  function exit() external {
    withdraw(_balances[_msgSender()]);
  }

  /* ========== RESTRICTED FUNCTIONS ========== */

  function updateVaultParamValue(bytes32 param, uint256 value) external nonReentrant onlyOwner {
    require(settings.isValidParam(param, value), "Invalid param or value");

    _vaultParamsSet[param] = true;
    _vaultParams[param] = value;
    emit UpdateVaultParamValue(param, value);
  }

  /**
   * Rescue tokens that are accidently sent to this contract
   */
  function rescue(address token, address recipient) external nonReentrant onlyOwner {
    require(token != address(0) && recipient != address(0), "Zero address detected");

    uint256 balance;
    if (token == Constants.NATIVE_TOKEN) {
      balance = address(this).balance;
    }
    else {
      balance = IERC20(token).balanceOf(address(this));
    }
    
    uint256 amount = balance;
    if (token == stakingToken) {
      amount = amount.sub(_totalSupply);
    }
    require(amount > 0, "No tokens to rescue");

    TokensTransfer.transferTokens(token, address(this), recipient, amount);
    emit TokenRescued(token, recipient, amount);
  }

  function configureBlastYieldsAndGas() external nonReentrant onlyOwner {
    address blastAddress = wandProtocol.blastAddress();
    if (blastAddress != address(0)) {
      IBlast blast = IBlast(wandProtocol.blastAddress());
      blast.configureAutomaticYield();
      blast.configureClaimableGas();
    }
  }

  function configureBlastPoints() external nonReentrant onlyOwner {
    address blastPointsAddress = wandProtocol.blastPointsAddress();
    address blastPointsOperatorAddress = wandProtocol.blastPointsOperator();
    if (blastPointsAddress != address(0) && blastPointsOperatorAddress != address(0)) {
      IBlastPoints blastPoints = IBlastPoints(blastPointsAddress);
      blastPoints.configurePointsOperator(blastPointsOperatorAddress);
    }
  }


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

  modifier onUserAction() {
    _;

    address blastAddress = wandProtocol.blastAddress();
    if (blastAddress != address(0)) {
      IBlast blast = IBlast(blastAddress);
      (uint256 etherSeconds, uint256 etherBalance, ,) = blast.readGasParams(address(this));
      if (etherSeconds > 0 && etherBalance > 0) {
        blast.claimAllGas(address(this), settings.treasury());
      }
    }
  }


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

  event Staked(address indexed user, uint256 amount);
  event Withdrawn(address indexed user, uint256 fees, uint256 netAmount);
  event TokenRescued(address indexed token, address indexed recipient, uint256 amount);
  event UpdateVaultParamValue(bytes32 indexed param, uint256 value);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.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 SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 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(IERC20 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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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);
        }
    }
}

// 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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

enum YieldMode {
  AUTOMATIC,
  VOID,
  CLAIMABLE
}

enum GasMode {
  VOID,
  CLAIMABLE 
}

interface IBlast{
  // configure
  function configureContract(address contractAddress, YieldMode _yield, GasMode gasMode, address governor) external;
  function configure(YieldMode _yield, GasMode gasMode, address governor) external;

  // base configuration options
  function configureClaimableYield() external;
  function configureClaimableYieldOnBehalf(address contractAddress) external;
  function configureAutomaticYield() external;
  function configureAutomaticYieldOnBehalf(address contractAddress) external;
  function configureVoidYield() external;
  function configureVoidYieldOnBehalf(address contractAddress) external;
  function configureClaimableGas() external;
  function configureClaimableGasOnBehalf(address contractAddress) external;
  function configureVoidGas() external;
  function configureVoidGasOnBehalf(address contractAddress) external;
  function configureGovernor(address _governor) external;
  function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;

  // claim yield
  function claimYield(address contractAddress, address recipientOfYield, uint256 amount) external returns (uint256);
  function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256);

  // claim gas
  function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
  function claimGasAtMinClaimRate(address contractAddress, address recipientOfGas, uint256 minClaimRateBips) external returns (uint256);
  function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
  function claimGas(address contractAddress, address recipientOfGas, uint256 gasToClaim, uint256 gasSecondsToConsume) external returns (uint256);

  // read functions
  function readClaimableYield(address contractAddress) external view returns (uint256);
  function readYieldConfiguration(address contractAddress) external view returns (uint8);
  function readGasParams(address contractAddress) external view returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

interface IBlastPoints {
  function configurePointsOperator(address operator) external;
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

interface IProtocolSettings {

  function treasury() external view returns (address);

  function decimals() external view returns (uint256);

  function isValidParam(bytes32 param, uint256 value) external view returns (bool);

  function paramDefaultValue(bytes32 param) external view returns (uint256);

  function vaultParamValue(address vault, bytes32 param) external view returns (uint256);
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

interface IWandProtocol {

  function protocolOwner() external view returns (address);

  function usbToken() external view returns (address);

  function blastAddress() external view returns (address);
  
  function blastPointsAddress() external view returns (address);

  function blastPointsOperator() external view returns (address);

  function isVault(address vaultAddress) external view returns (bool);

  function isVaultAsset(address assetToken) external view returns (bool);
}

File 13 of 15 : Constants.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

library Constants {
  /**
   * @notice The address interpreted as native token of the chain.
   */
  address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

  uint256 public constant PROTOCOL_DECIMALS = 10;

  struct Terms {
    uint256 T1;
    uint256 T2;
    uint256 T3;
    uint256 T4;
    uint256 T5;
    uint256 T6;
    uint256 T7;
    uint256 T8;
  }

  enum VaultType {
    Volatile,
    Stable
  }

  enum VaultMode {
    Empty,
    Stability,
    AdjustmentBelowAARS,
    AdjustmentAboveAARU
  }

  struct VaultState {
    uint256 M_ETH;
    uint256 P_ETH;
    uint256 P_ETH_DECIMALS;
    uint256 M_USB_ETH;
    uint256 M_ETHx;
    uint256 aar;
    uint256 AART;
    uint256 AARS;
    uint256 AARU;
    uint256 AARC;
    uint256 AARDecimals;
    uint256 RateR;
    uint256 AARBelowSafeLineTime;
    uint256 AARBelowCircuitBreakerLineTime;
  }

  struct StableVaultState {
    uint256 M_USDC;
    uint256 P_USDC;
    uint256 P_USDC_DECIMALS;
    uint256 M_USB_USDC;
    uint256 M_USDCx;
    uint256 aar;
    // uint256 AART;
    uint256 AARS;
    // uint256 AARU;
    // uint256 AARC;
    uint256 AARDecimals;
    uint256 RateR;
    uint256 AARBelowSafeLineTime;
  }

}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./Constants.sol";

library TokensTransfer {
  using SafeERC20 for IERC20;

  /// @dev Transfers a given amount of token.
  function transferTokens(
    address token,
    address from,
    address to,
    uint256 amount
  ) internal {
    if (token == Constants.NATIVE_TOKEN) {
      safeTransferNativeToken(from, to, amount);
    }
    else {
      safeTransferERC20(token, from, to, amount);
    }
  }

  /// @dev Transfers `amount` of native token to `to`.
  function safeTransferNativeToken(address from, address to, uint256 amount) internal {
    require(from != to, "Same address");
    require(from != address(0) && to != address(0), "Zero address");
    require(from == address(this) || to == address(this), "One of the addresses must be this contract");
    require(amount > 0, "Amount must be greater than 0");

    if (to == address(this)) {
      require(msg.value == amount, "Incorrect msg.value");
      return;
    }

    // solhint-disable avoid-low-level-calls
    // slither-disable-next-line low-level-calls
    (bool success, ) = to.call{ value: amount }("");
    require(success, "Native token transfer failed");
  }

  /// @dev Transfer `amount` of ERC20 token from `from` to `to`.
  function safeTransferERC20(
    address token,
    address from,
    address to,
    uint256 amount
  ) internal {
    require(from != to, "Same address");
    require(from != address(0) && to != address(0), "Zero address");
    // require(from == address(this) || to == address(this), "One of the addresses must be this contract");
    require(amount > 0, "Amount must be greater than 0");

    if (from == address(this)) {
      IERC20(token).safeTransfer(to, amount);
    }
    else {
      IERC20(token).safeTransferFrom(from, to, amount);
    }
  }
}

File 15 of 15 : ProtocolOwner.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;

import "@openzeppelin/contracts/utils/Context.sol";
import "../interfaces/IWandProtocol.sol";

abstract contract ProtocolOwner is Context {
  IWandProtocol public immutable wandProtocol;

  constructor(address _wandProtocol_) {
    require(_wandProtocol_ != address(0), "Zero address detected");
    wandProtocol = IWandProtocol(_wandProtocol_);
  }

  modifier onlyProtocol() {
    require(_msgSender() == address(wandProtocol), "Ownable: caller is not the protocol");
    _;
  }

  modifier onlyOwner() {
    require(_msgSender() == IWandProtocol(wandProtocol).protocolOwner(), "Ownable: caller is not the owner");
    _;
  }

  function owner() public view returns(address) {
    return IWandProtocol(wandProtocol).protocolOwner();
  }
}

Settings
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": true,
    "runs": 100,
    "details": {
      "yulDetails": {
        "optimizerSteps": "u"
      }
    }
  },
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_wandProtocol","type":"address"},{"internalType":"address","name":"_settings","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"param","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"UpdateVaultParamValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"netAmount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configureBlastPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configureBlastYieldsAndGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settings","outputs":[{"internalType":"contract IProtocolSettings","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"param","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateVaultParamValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"param","type":"bytes32"}],"name":"vaultParamValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wandProtocol","outputs":[{"internalType":"contract IWandProtocol","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523462000090576200001f6200001862000153565b91620001dc565b604051612040620002ff82396080518181816101f00152818161047b0152818161077e015281816117f5015281816119de01528181611c7b01528181611cdd0152611eb9015260a0518181816103cb0152818161061d0152818161087f0152818161156601526118dd015261204090f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b03821117620000cd57604052565b62000095565b90620000ea620000e260405190565b9283620000ab565b565b6001600160a01b031690565b90565b6001600160a01b038116036200009057565b90505190620000ea82620000fb565b90916060828403126200009057620000f86200013984846200010d565b936200014981602086016200010d565b936040016200010d565b620001766200233f803803806200016a81620000d3565b9283398101906200011c565b909192565b620000f890620000ec906001600160a01b031682565b620000f8906200017b565b620000f89062000191565b906001600160a01b03905b9181191691161790565b90620001d0620000f8620001d8926200019c565b8254620001a7565b9055565b620000ea9291620001f1620001f79262000245565b6200019c565b60a0526003620001bc565b620000f8620000f8620000f89290565b620000f8600162000202565b9060001990620001b2565b906200023d620000f8620001d89262000202565b82546200021e565b6200025090620002ce565b620000ea6200025e62000212565b600062000229565b620000ec620000f8620000f89290565b620000f89062000266565b156200028957565b60405162461bcd60e51b815260206004820152601560248201527f5a65726f206164647265737320646574656374656400000000000000000000006044820152606490fd5b620002f990620001f1620002e7620000ec600062000276565b6001600160a01b038316141562000281565b60805256fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806318160ddd146100fb5780632e1a7d4d146100f65780633fef6dc1146100f15780634e29a333146100ec5780634fdf5d1d146100e757806370a08231146100e257806372f702f3146100dd5780638da5cb5b146100d85780639296940c146100d3578063a694fc3a146100ce578063c9f0a628146100c9578063ddef1953146100c4578063e06174e4146100bf5763e9fad8ee0361000e576103ef565b6103b6565b61039e565b610385565b61034f565b610334565b610319565b6102f2565b61029a565b61026d565b61021c565b6101db565b610173565b610116565b600091031261010b57565b600080fd5b9052565b565b3461010b57610126366004610100565b610142610131610510565b6040515b9182918290815260200190565b0390f35b805b0361010b57565b9050359061011482610146565b9060208282031261010b576101709161014f565b90565b3461010b5761018b61018636600461015c565b611709565b604051005b610170906101a4906001600160a01b031682565b6001600160a01b031690565b61017090610190565b610170906101b0565b610110906101b9565b60208101929161011491906101c2565b3461010b576101eb366004610100565b6101427f00000000000000000000000000000000000000000000000000000000000000005b604051918291826101cb565b3461010b5761022c366004610100565b61018b611e6e565b610148816101a4565b9050359061011482610234565b919060408382031261010b5761017090610264818561023d565b9360200161023d565b3461010b5761018b61028036600461024a565b90611c5a565b9060208282031261010b576101709161023d565b3461010b576101426101316102b0366004610286565b610532565b610170916008021c6101a4565b9061017091546102b5565b610170600060036102c2565b610110906101a4565b60208101929161011491906102d9565b3461010b57610302366004610100565b61014261030d6102cd565b604051918291826102e2565b3461010b57610329366004610100565b61014261030d610471565b3461010b5761014261013161034a36600461015c565b6105e2565b61018b61035d36600461015c565b610bc8565b919060408382031261010b576101709061037c818561014f565b9360200161014f565b3461010b5761018b610398366004610362565b906119ba565b3461010b576103ae366004610100565b61018b612002565b3461010b576103c6366004610100565b6101427f0000000000000000000000000000000000000000000000000000000000000000610210565b3461010b576103ff366004610100565b61018b611775565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff82111761043f57604052565b610407565b9050519061011482610234565b9060208282031261010b5761017091610444565b6040513d6000823e3d90fd5b6104b7602061049f7f00000000000000000000000000000000000000000000000000000000000000006101b9565b63c1d6ba69906104ae60405190565b93849260e01b90565b825260049082905afa9081156104fa576000916104d2575090565b610170915060203d81116104f3575b6104eb818361041d565b810190610451565b503d6104e1565b610465565b6101709081565b61017090546104ff565b6101706004610506565b90610524906101b9565b600052602052604060002090565b61054961017091610541600090565b50600561051a565b610506565b61055b6101706101709290565b60ff1690565b0190565b1561056c57565b60405162461bcd60e51b815260206004820152601060248201526f456d70747920706172616d206e616d6560801b6044820152606490fd5b0390fd5b90610524565b6101709061055b565b61017090546105ae565b9050519061011482610146565b9060208282031261010b57610170916105c1565b6020906105fc6105f2600061054e565b60ff841611610565565b61060f61060a8260016105a8565b6105b7565b6106aa578161066d916106417f00000000000000000000000000000000000000000000000000000000000000006101b9565b61065f63cd6fd28461065260405190565b9586948593849360e01b90565b835260048301526024820190565b03915afa9182156104fa5760009261068457505090565b6101709250803d106106a3575b61069b818361041d565b8101906105ce565b503d610691565b61017091506105499060026105a8565b6106cb906106c6610c27565b61076b565b610114610c59565b6101a46101706101709290565b610170906106d3565b6002111561010b57565b90505190610114826106e9565b60808183031261010b5761071482826105c1565b9261017061072584602085016105c1565b9361073381604086016105c1565b936060016106f3565b6101706101706101709290565b916020610114929493610764604082019660008301906102d9565b01906102d9565b61077490610ab8565b6107b160206107a27f00000000000000000000000000000000000000000000000000000000000000006101b9565b6349d3d5e1906104ae60405190565b825260049082905afa9081156104fa57600091610999575b506000906107de6107d9836106e0565b6101a4565b6107e7826101a4565b036107f0575050565b6107fc610801916101b9565b6101b9565b63dde798a461080f306101b9565b9061082361081c60405190565b9160e01b90565b81526080818061083685600483016102e2565b0381865afa80156104fa576000918291610966575b5061085c6108588661073c565b9190565b119081610951575b5061086e57505050565b6108bb9163954fa5ee9360206108a37f00000000000000000000000000000000000000000000000000000000000000006101b9565b6361d027b3906108b260405190565b96879260e01b90565b825260049082905afa9384156104fa5760009461092b575b506108f590602094956109006108e860405190565b9788968795869460e01b90565b845260048401610749565b03925af180156104fa576109115750565b6109289060203d81116106a35761069b818361041d565b50565b60209450906109496108f592863d81116104f3576104eb818361041d565b9450906108d3565b905061095f6108588561073c565b1138610864565b9050610989915060803d8111610992575b610981818361041d565b810190610700565b5091909161084b565b503d610977565b6109b1915060203d81116104f3576104eb818361041d565b386107c9565b156109be57565b60405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606490fd5b610170906101a4565b61017090546109f4565b15610a0e57565b60405162461bcd60e51b815260206004820152601560248201527406d73672e76616c75652073686f756c64206265203605c1b6044820152606490fd5b15610a5257565b60405162461bcd60e51b8152602060048201526013602482015272496e636f7272656374206d73672e76616c756560681b6044820152606490fd5b90600019905b9181191691161790565b90610aad610170610ab49261073c565b8254610a8d565b9055565b6000610acd610ac68261073c565b83116109b7565b610ad760036109fd565b610afd610af773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b916101a4565b03610bac5750610b0f81345b14610a4b565b610b2c610b2582610b206004610506565b610c8c565b6004610a9d565b33610b526005610b4d83610b4786610b20610549848761051a565b9261051a565b610a9d565b610b7082610b6060036109fd565b83610b6a306101b9565b91610c96565b610ba7610b9d7f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d926101b9565b9261013560405190565b0390a2565b610bc390610bbd610858349261073c565b14610a07565b610b0f565b610114906106ba565b610170600261073c565b15610be257565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b610114610c346000610506565b610c48610c3f610bd1565b91821415610bdb565b6000610a9d565b610170600161073c565b610114610c48610c4f565b634e487b7160e01b600052601160045260246000fd5b91908201809211610c8757565b610c64565b6101709190610c7a565b929190610cb673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b610cbf856101a4565b03610cce576101149350610eab565b61011493610fb2565b15610cde57565b60405162461bcd60e51b815260206004820152600c60248201526b53616d65206164647265737360a01b6044820152606490fd5b15610d1957565b60405162461bcd60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606490fd5b15610d5457565b60405162461bcd60e51b815260206004820152602a60248201527f4f6e65206f662074686520616464726573736573206d757374206265207468696044820152691cc818dbdb9d1c9858dd60b21b6064820152608490fd5b15610db357565b60405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606490fd5b90610114610e0560405190565b928361041d565b67ffffffffffffffff811161043f57602090601f01601f19160190565b90610e3b610e3683610e0c565b610df8565b918252565b3d15610e5a57610e4f3d610e29565b903d6000602084013e565b606090565b15610e6657565b60405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606490fd5b90610ec8610eb8826101a4565b610ec1846101a4565b1415610cd7565b610f36600092610efb610eda856106e0565b610ee3816101a4565b610eec846101a4565b14159081610f97575b50610d12565b610f04306101b9565b90610f11610af7836101a4565b148015610f79575b610f2290610d4d565b6107d9610f2e8561073c565b865b11610dac565b610f3f826101a4565b14610f6857819061011493610f5360405190565b90818003925af1610f62610e40565b50610e5f565b505061011490610b09610858349290565b50610f22610f86826101a4565b610f8f856101a4565b149050610f19565b610fa191506101a4565b610faa856101a4565b141538610ef5565b929190610fca610fc1836101a4565b610ec1836101a4565b6110096110036000610ffe610fde826106e0565b610fe7816101a4565b610ff0876101a4565b141590816110465750610d12565b61073c565b84610f30565b6110156107d9306101b9565b61101e826101a4565b036110355750611030610114936101b9565b61109e565b611041610114946101b9565b611110565b61105091506101a4565b610faa876101a4565b61107261106c6101709263ffffffff1690565b60e01b90565b6001600160e01b03191690565b91602061011492949361109a604082019660008301906102d9565b0152565b6110e16004926110d2610114956110b863a9059cbb611059565b926110c260405190565b968794602086019081520161107f565b6020820181038252038361041d565b611209565b60409061109a6101149496959396611106606084019860008501906102d9565b60208301906102d9565b906110e1906110d26101149560049561112c6323b872dd611059565b9361113660405190565b97889560208701908152016110e6565b6111506020610e29565b7f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602082015290565b610170611146565b801515610148565b9050519061011482611181565b9060208282031261010b5761017091611189565b156111b157565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b61011491611219611228926101b9565b90611222611179565b91611266565b8051611237610858600061073c565b14908115611246575b506111aa565b61126091506020611255825190565b818301019101611196565b38611240565b6101709291611275600061073c565b916112d6565b1561128257565b60405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608490fd5b906000610170949381926112e8606090565b506112ff6112f5306101b9565b839031101561127b565b60208101905191855af1611311610e40565b91611363565b1561131e57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b919290156113955750815161137b610858600061073c565b14611384575090565b6113906101709161139b565b611317565b82611415565b3b6113a9610858600061073c565b1190565b60005b8381106113c05750506000910152565b81810151838201526020016113b0565b6113f16113fa602093610561936113e5815190565b80835293849260200190565b958691016113ad565b601f01601f191690565b6020808252610170929101906113d0565b9061141e825190565b61142b610858600061073c565b111561143a5750805190602001fd5b6105a49061144760405190565b62461bcd60e51b815291829160048301611404565b6106cb90611468610c27565b61077490611515565b1561147857565b60405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606490fd5b156114b857565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606490fd5b604d8111610c8757600a0a90565b9081526040810192916101149160200152565b600061152a6115238261073c565b8311611471565b600591339161154a611542610170610549868861051a565b8311156114b1565b61156061155a604360f81b6105e2565b8361173c565b9061158a7f00000000000000000000000000000000000000000000000000000000000000006101b9565b9163313ce567906115a461159d60405190565b9260e01b90565b8252602082600481875afa9081156104fa576115cf6115d59261160b946000916116eb575b506114f4565b9061176b565b95610b4d86610b476115e78a8961171f565b976115fe610b25826115f96004610506565b61171f565b6115f9610549848761051a565b61162e61161860036109fd565b91610ffe8587611627306101b9565b8096610c96565b8511611677575b50506116617f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6926101b9565b92610ba761166e60405190565b92839283611502565b6116a090602061168760036109fd565b936361d027b39061169760405190565b94859260e01b90565b825260049082905afa9081156104fa576116c49387936000936116cb575b50610c96565b3880611635565b6116e491935060203d81116104f3576104eb818361041d565b91386116be565b611703915060203d81116106a35761069b818361041d565b386115c9565b6101149061145c565b91908203918211610c8757565b6101709190611712565b81810292918115918404141715610c8757565b6101709190611729565b634e487b7160e01b600052601260045260246000fd5b8115611766570490565b611746565b610170919061175c565b61011461018661054933600561051a565b906106cb91611793610c27565b6117e8565b1561179f57565b60405162461bcd60e51b8152806105a4600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b903391611819602061049f7f00000000000000000000000000000000000000000000000000000000000000006101b9565b825260049082905afa9384156104fa57611845610af76101149661184b94600091611850575b506101a4565b14611798565b6118d3565b611868915060203d81116104f3576104eb818361041d565b3861183f565b1561187557565b60405162461bcd60e51b8152602060048201526016602482015275496e76616c696420706172616d206f722076616c756560501b6044820152606490fd5b9060ff90610a93565b906118cc610170610ab492151590565b82546118b3565b61191060206119017f00000000000000000000000000000000000000000000000000000000000000006101b9565b6392a974b4906104ae60405190565b82528180611922888860048401611502565b03915afa80156104fa5761193e9160009161198c575b5061186e565b611952600161194d83826105a8565b6118bc565b61196182610b4d8360026105a8565b610ba7610b9d7f300cf4883f97aafc1f75443709a6dc997cdc11f1cc07d89a23589c90bf28de6c9290565b6119ad915060203d81116119b3575b6119a5818361041d565b810190611196565b38611938565b503d61199b565b9061011491611786565b906106cb916119d1610c27565b903391611a02602061049f7f00000000000000000000000000000000000000000000000000000000000000006101b9565b825260049082905afa9384156104fa57611845610af761011496611a2d9460009161185057506101a4565b611ab8565b15611a3957565b60405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b6044820152606490fd5b15611a7d57565b60405162461bcd60e51b81526020600482015260136024820152724e6f20746f6b656e7320746f2072657363756560681b6044820152606490fd5b90600091611ae9611ac8846106e0565b611ad1816101a4565b611ada846101a4565b14159081611c3f575b50611a32565b611b0673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b611b0f826101a4565b03611bcf57611b1d306101b9565b31925b83611b2e6107d960036109fd565b611b37846101a4565b14611baa575b50611b4a611b519161073c565b8411611a76565b611b658383611b5f306101b9565b84610c96565b611ba5611b9b611b957f4143f7b5cb6ea007914c32b8a3e64cebc051d7f493fa0755454da1e47701e125936101b9565b936101b9565b9361013560405190565b0390a3565b611b51919450611bc7611b4a91611bc16004610506565b9061171f565b949150611b3d565b611c076020611be06107fc846101b9565b6370a0823190611bfc611bf2306101b9565b9261065260405190565b8352600483016102e2565b03915afa9081156104fa57600091611c21575b5092611b20565b611c39915060203d81116106a35761069b818361041d565b38611c1a565b611c4991506101a4565b611c52846101a4565b141538611ae3565b90610114916119c4565b611c6c610c27565b6106cb611cae335b6020611c9f7f00000000000000000000000000000000000000000000000000000000000000006101b9565b63c1d6ba699061169760405190565b825260049082905afa80156104fa57610af761184591611cd59460009161185057506101a4565b610114611d017f00000000000000000000000000000000000000000000000000000000000000006101b9565b6349d3d5e1611d0f60405190565b91611d1a8260e01b90565b8352602083600481845afa9283156104fa57600093611e4e575b50600092611d47610af76107d9866106e0565b03611d5157505050565b611d61916020916104ae60405190565b825260049082905afa9081156104fa57611d87916107fc91600091611e30575b506101b9565b637114177a813b1561010b57611d9f61081c60405190565b8152828160048183865af180156104fa57611e14575b50634e606c4790803b1561010b57611dd29183916104ae60405190565b8252818381600481015b03925af180156104fa57611dee575050565b8161011492903d10611e0d575b611e05818361041d565b810190610100565b503d611dfb565b611e2a90833d8511611e0d57611e05818361041d565b38611db5565b611e48915060203d81116104f3576104eb818361041d565b38611d81565b611e6791935060203d81116104f3576104eb818361041d565b9138611d34565b610114611c64565b611e7e610c27565b6106cb611e8a33611c74565b825260049082905afa80156104fa57610af761184591611eb19460009161185057506101a4565b610114611edd7f00000000000000000000000000000000000000000000000000000000000000006101b9565b63095f363c90611eef61159d60405190565b8252602082600481845afa9182156104fa57600092611fdc575b506020611f1f916340ae3e14906104ae60405190565b825260049082905afa9081156104fa57600091611fbe575b50600091611f44836106e0565b611f4d816101a4565b611f56836101a4565b14159081611fa3575b50611f6957505050565b6107fc611f75916101b9565b906336b91f2b90823b1561010b57611ddc92611bfc858094611f9660405190565b9687958694859360e01b90565b611fad91506101a4565b611fb6836101a4565b141538611f5f565b611fd6915060203d81116104f3576104eb818361041d565b38611f37565b611f1f919250611ffa602091823d81116104f3576104eb818361041d565b929150611f09565b610114611e7656fea26469706673582212207f1ee541ec2dc7954c7ef7c0c377727cb365010bd3964a1636fdd4f53011fe3c64736f6c6343000812003300000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f8793300000000000000000000000004c0599ae5a44757c0af6f9ec3b93da8976c150a

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806318160ddd146100fb5780632e1a7d4d146100f65780633fef6dc1146100f15780634e29a333146100ec5780634fdf5d1d146100e757806370a08231146100e257806372f702f3146100dd5780638da5cb5b146100d85780639296940c146100d3578063a694fc3a146100ce578063c9f0a628146100c9578063ddef1953146100c4578063e06174e4146100bf5763e9fad8ee0361000e576103ef565b6103b6565b61039e565b610385565b61034f565b610334565b610319565b6102f2565b61029a565b61026d565b61021c565b6101db565b610173565b610116565b600091031261010b57565b600080fd5b9052565b565b3461010b57610126366004610100565b610142610131610510565b6040515b9182918290815260200190565b0390f35b805b0361010b57565b9050359061011482610146565b9060208282031261010b576101709161014f565b90565b3461010b5761018b61018636600461015c565b611709565b604051005b610170906101a4906001600160a01b031682565b6001600160a01b031690565b61017090610190565b610170906101b0565b610110906101b9565b60208101929161011491906101c2565b3461010b576101eb366004610100565b6101427f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b5b604051918291826101cb565b3461010b5761022c366004610100565b61018b611e6e565b610148816101a4565b9050359061011482610234565b919060408382031261010b5761017090610264818561023d565b9360200161023d565b3461010b5761018b61028036600461024a565b90611c5a565b9060208282031261010b576101709161023d565b3461010b576101426101316102b0366004610286565b610532565b610170916008021c6101a4565b9061017091546102b5565b610170600060036102c2565b610110906101a4565b60208101929161011491906102d9565b3461010b57610302366004610100565b61014261030d6102cd565b604051918291826102e2565b3461010b57610329366004610100565b61014261030d610471565b3461010b5761014261013161034a36600461015c565b6105e2565b61018b61035d36600461015c565b610bc8565b919060408382031261010b576101709061037c818561014f565b9360200161014f565b3461010b5761018b610398366004610362565b906119ba565b3461010b576103ae366004610100565b61018b612002565b3461010b576103c6366004610100565b6101427f0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f87933610210565b3461010b576103ff366004610100565b61018b611775565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff82111761043f57604052565b610407565b9050519061011482610234565b9060208282031261010b5761017091610444565b6040513d6000823e3d90fd5b6104b7602061049f7f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b63c1d6ba69906104ae60405190565b93849260e01b90565b825260049082905afa9081156104fa576000916104d2575090565b610170915060203d81116104f3575b6104eb818361041d565b810190610451565b503d6104e1565b610465565b6101709081565b61017090546104ff565b6101706004610506565b90610524906101b9565b600052602052604060002090565b61054961017091610541600090565b50600561051a565b610506565b61055b6101706101709290565b60ff1690565b0190565b1561056c57565b60405162461bcd60e51b815260206004820152601060248201526f456d70747920706172616d206e616d6560801b6044820152606490fd5b0390fd5b90610524565b6101709061055b565b61017090546105ae565b9050519061011482610146565b9060208282031261010b57610170916105c1565b6020906105fc6105f2600061054e565b60ff841611610565565b61060f61060a8260016105a8565b6105b7565b6106aa578161066d916106417f0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f879336101b9565b61065f63cd6fd28461065260405190565b9586948593849360e01b90565b835260048301526024820190565b03915afa9182156104fa5760009261068457505090565b6101709250803d106106a3575b61069b818361041d565b8101906105ce565b503d610691565b61017091506105499060026105a8565b6106cb906106c6610c27565b61076b565b610114610c59565b6101a46101706101709290565b610170906106d3565b6002111561010b57565b90505190610114826106e9565b60808183031261010b5761071482826105c1565b9261017061072584602085016105c1565b9361073381604086016105c1565b936060016106f3565b6101706101706101709290565b916020610114929493610764604082019660008301906102d9565b01906102d9565b61077490610ab8565b6107b160206107a27f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b6349d3d5e1906104ae60405190565b825260049082905afa9081156104fa57600091610999575b506000906107de6107d9836106e0565b6101a4565b6107e7826101a4565b036107f0575050565b6107fc610801916101b9565b6101b9565b63dde798a461080f306101b9565b9061082361081c60405190565b9160e01b90565b81526080818061083685600483016102e2565b0381865afa80156104fa576000918291610966575b5061085c6108588661073c565b9190565b119081610951575b5061086e57505050565b6108bb9163954fa5ee9360206108a37f0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f879336101b9565b6361d027b3906108b260405190565b96879260e01b90565b825260049082905afa9384156104fa5760009461092b575b506108f590602094956109006108e860405190565b9788968795869460e01b90565b845260048401610749565b03925af180156104fa576109115750565b6109289060203d81116106a35761069b818361041d565b50565b60209450906109496108f592863d81116104f3576104eb818361041d565b9450906108d3565b905061095f6108588561073c565b1138610864565b9050610989915060803d8111610992575b610981818361041d565b810190610700565b5091909161084b565b503d610977565b6109b1915060203d81116104f3576104eb818361041d565b386107c9565b156109be57565b60405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606490fd5b610170906101a4565b61017090546109f4565b15610a0e57565b60405162461bcd60e51b815260206004820152601560248201527406d73672e76616c75652073686f756c64206265203605c1b6044820152606490fd5b15610a5257565b60405162461bcd60e51b8152602060048201526013602482015272496e636f7272656374206d73672e76616c756560681b6044820152606490fd5b90600019905b9181191691161790565b90610aad610170610ab49261073c565b8254610a8d565b9055565b6000610acd610ac68261073c565b83116109b7565b610ad760036109fd565b610afd610af773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b916101a4565b03610bac5750610b0f81345b14610a4b565b610b2c610b2582610b206004610506565b610c8c565b6004610a9d565b33610b526005610b4d83610b4786610b20610549848761051a565b9261051a565b610a9d565b610b7082610b6060036109fd565b83610b6a306101b9565b91610c96565b610ba7610b9d7f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d926101b9565b9261013560405190565b0390a2565b610bc390610bbd610858349261073c565b14610a07565b610b0f565b610114906106ba565b610170600261073c565b15610be257565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b610114610c346000610506565b610c48610c3f610bd1565b91821415610bdb565b6000610a9d565b610170600161073c565b610114610c48610c4f565b634e487b7160e01b600052601160045260246000fd5b91908201809211610c8757565b610c64565b6101709190610c7a565b929190610cb673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b610cbf856101a4565b03610cce576101149350610eab565b61011493610fb2565b15610cde57565b60405162461bcd60e51b815260206004820152600c60248201526b53616d65206164647265737360a01b6044820152606490fd5b15610d1957565b60405162461bcd60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606490fd5b15610d5457565b60405162461bcd60e51b815260206004820152602a60248201527f4f6e65206f662074686520616464726573736573206d757374206265207468696044820152691cc818dbdb9d1c9858dd60b21b6064820152608490fd5b15610db357565b60405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606490fd5b90610114610e0560405190565b928361041d565b67ffffffffffffffff811161043f57602090601f01601f19160190565b90610e3b610e3683610e0c565b610df8565b918252565b3d15610e5a57610e4f3d610e29565b903d6000602084013e565b606090565b15610e6657565b60405162461bcd60e51b815260206004820152601c60248201527f4e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606490fd5b90610ec8610eb8826101a4565b610ec1846101a4565b1415610cd7565b610f36600092610efb610eda856106e0565b610ee3816101a4565b610eec846101a4565b14159081610f97575b50610d12565b610f04306101b9565b90610f11610af7836101a4565b148015610f79575b610f2290610d4d565b6107d9610f2e8561073c565b865b11610dac565b610f3f826101a4565b14610f6857819061011493610f5360405190565b90818003925af1610f62610e40565b50610e5f565b505061011490610b09610858349290565b50610f22610f86826101a4565b610f8f856101a4565b149050610f19565b610fa191506101a4565b610faa856101a4565b141538610ef5565b929190610fca610fc1836101a4565b610ec1836101a4565b6110096110036000610ffe610fde826106e0565b610fe7816101a4565b610ff0876101a4565b141590816110465750610d12565b61073c565b84610f30565b6110156107d9306101b9565b61101e826101a4565b036110355750611030610114936101b9565b61109e565b611041610114946101b9565b611110565b61105091506101a4565b610faa876101a4565b61107261106c6101709263ffffffff1690565b60e01b90565b6001600160e01b03191690565b91602061011492949361109a604082019660008301906102d9565b0152565b6110e16004926110d2610114956110b863a9059cbb611059565b926110c260405190565b968794602086019081520161107f565b6020820181038252038361041d565b611209565b60409061109a6101149496959396611106606084019860008501906102d9565b60208301906102d9565b906110e1906110d26101149560049561112c6323b872dd611059565b9361113660405190565b97889560208701908152016110e6565b6111506020610e29565b7f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602082015290565b610170611146565b801515610148565b9050519061011482611181565b9060208282031261010b5761017091611189565b156111b157565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b61011491611219611228926101b9565b90611222611179565b91611266565b8051611237610858600061073c565b14908115611246575b506111aa565b61126091506020611255825190565b818301019101611196565b38611240565b6101709291611275600061073c565b916112d6565b1561128257565b60405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608490fd5b906000610170949381926112e8606090565b506112ff6112f5306101b9565b839031101561127b565b60208101905191855af1611311610e40565b91611363565b1561131e57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b919290156113955750815161137b610858600061073c565b14611384575090565b6113906101709161139b565b611317565b82611415565b3b6113a9610858600061073c565b1190565b60005b8381106113c05750506000910152565b81810151838201526020016113b0565b6113f16113fa602093610561936113e5815190565b80835293849260200190565b958691016113ad565b601f01601f191690565b6020808252610170929101906113d0565b9061141e825190565b61142b610858600061073c565b111561143a5750805190602001fd5b6105a49061144760405190565b62461bcd60e51b815291829160048301611404565b6106cb90611468610c27565b61077490611515565b1561147857565b60405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606490fd5b156114b857565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606490fd5b604d8111610c8757600a0a90565b9081526040810192916101149160200152565b600061152a6115238261073c565b8311611471565b600591339161154a611542610170610549868861051a565b8311156114b1565b61156061155a604360f81b6105e2565b8361173c565b9061158a7f0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f879336101b9565b9163313ce567906115a461159d60405190565b9260e01b90565b8252602082600481875afa9081156104fa576115cf6115d59261160b946000916116eb575b506114f4565b9061176b565b95610b4d86610b476115e78a8961171f565b976115fe610b25826115f96004610506565b61171f565b6115f9610549848761051a565b61162e61161860036109fd565b91610ffe8587611627306101b9565b8096610c96565b8511611677575b50506116617f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6926101b9565b92610ba761166e60405190565b92839283611502565b6116a090602061168760036109fd565b936361d027b39061169760405190565b94859260e01b90565b825260049082905afa9081156104fa576116c49387936000936116cb575b50610c96565b3880611635565b6116e491935060203d81116104f3576104eb818361041d565b91386116be565b611703915060203d81116106a35761069b818361041d565b386115c9565b6101149061145c565b91908203918211610c8757565b6101709190611712565b81810292918115918404141715610c8757565b6101709190611729565b634e487b7160e01b600052601260045260246000fd5b8115611766570490565b611746565b610170919061175c565b61011461018661054933600561051a565b906106cb91611793610c27565b6117e8565b1561179f57565b60405162461bcd60e51b8152806105a4600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b903391611819602061049f7f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b825260049082905afa9384156104fa57611845610af76101149661184b94600091611850575b506101a4565b14611798565b6118d3565b611868915060203d81116104f3576104eb818361041d565b3861183f565b1561187557565b60405162461bcd60e51b8152602060048201526016602482015275496e76616c696420706172616d206f722076616c756560501b6044820152606490fd5b9060ff90610a93565b906118cc610170610ab492151590565b82546118b3565b61191060206119017f0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f879336101b9565b6392a974b4906104ae60405190565b82528180611922888860048401611502565b03915afa80156104fa5761193e9160009161198c575b5061186e565b611952600161194d83826105a8565b6118bc565b61196182610b4d8360026105a8565b610ba7610b9d7f300cf4883f97aafc1f75443709a6dc997cdc11f1cc07d89a23589c90bf28de6c9290565b6119ad915060203d81116119b3575b6119a5818361041d565b810190611196565b38611938565b503d61199b565b9061011491611786565b906106cb916119d1610c27565b903391611a02602061049f7f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b825260049082905afa9384156104fa57611845610af761011496611a2d9460009161185057506101a4565b611ab8565b15611a3957565b60405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b6044820152606490fd5b15611a7d57565b60405162461bcd60e51b81526020600482015260136024820152724e6f20746f6b656e7320746f2072657363756560681b6044820152606490fd5b90600091611ae9611ac8846106e0565b611ad1816101a4565b611ada846101a4565b14159081611c3f575b50611a32565b611b0673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6101a4565b611b0f826101a4565b03611bcf57611b1d306101b9565b31925b83611b2e6107d960036109fd565b611b37846101a4565b14611baa575b50611b4a611b519161073c565b8411611a76565b611b658383611b5f306101b9565b84610c96565b611ba5611b9b611b957f4143f7b5cb6ea007914c32b8a3e64cebc051d7f493fa0755454da1e47701e125936101b9565b936101b9565b9361013560405190565b0390a3565b611b51919450611bc7611b4a91611bc16004610506565b9061171f565b949150611b3d565b611c076020611be06107fc846101b9565b6370a0823190611bfc611bf2306101b9565b9261065260405190565b8352600483016102e2565b03915afa9081156104fa57600091611c21575b5092611b20565b611c39915060203d81116106a35761069b818361041d565b38611c1a565b611c4991506101a4565b611c52846101a4565b141538611ae3565b90610114916119c4565b611c6c610c27565b6106cb611cae335b6020611c9f7f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b63c1d6ba699061169760405190565b825260049082905afa80156104fa57610af761184591611cd59460009161185057506101a4565b610114611d017f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b6349d3d5e1611d0f60405190565b91611d1a8260e01b90565b8352602083600481845afa9283156104fa57600093611e4e575b50600092611d47610af76107d9866106e0565b03611d5157505050565b611d61916020916104ae60405190565b825260049082905afa9081156104fa57611d87916107fc91600091611e30575b506101b9565b637114177a813b1561010b57611d9f61081c60405190565b8152828160048183865af180156104fa57611e14575b50634e606c4790803b1561010b57611dd29183916104ae60405190565b8252818381600481015b03925af180156104fa57611dee575050565b8161011492903d10611e0d575b611e05818361041d565b810190610100565b503d611dfb565b611e2a90833d8511611e0d57611e05818361041d565b38611db5565b611e48915060203d81116104f3576104eb818361041d565b38611d81565b611e6791935060203d81116104f3576104eb818361041d565b9138611d34565b610114611c64565b611e7e610c27565b6106cb611e8a33611c74565b825260049082905afa80156104fa57610af761184591611eb19460009161185057506101a4565b610114611edd7f00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b6101b9565b63095f363c90611eef61159d60405190565b8252602082600481845afa9182156104fa57600092611fdc575b506020611f1f916340ae3e14906104ae60405190565b825260049082905afa9081156104fa57600091611fbe575b50600091611f44836106e0565b611f4d816101a4565b611f56836101a4565b14159081611fa3575b50611f6957505050565b6107fc611f75916101b9565b906336b91f2b90823b1561010b57611ddc92611bfc858094611f9660405190565b9687958694859360e01b90565b611fad91506101a4565b611fb6836101a4565b141538611f5f565b611fd6915060203d81116104f3576104eb818361041d565b38611f37565b611f1f919250611ffa602091823d81116104f3576104eb818361041d565b929150611f09565b610114611e7656fea26469706673582212207f1ee541ec2dc7954c7ef7c0c377727cb365010bd3964a1636fdd4f53011fe3c64736f6c63430008120033

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

00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f8793300000000000000000000000004c0599ae5a44757c0af6f9ec3b93da8976c150a

-----Decoded View---------------
Arg [0] : _wandProtocol (address): 0x31e9026bf3A20FA3250a94caD5E6BFbE203B001B
Arg [1] : _settings (address): 0x7449dc43a03e70050c4AcD3F8A6acab9A7F87933
Arg [2] : _stakingToken (address): 0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000031e9026bf3a20fa3250a94cad5e6bfbe203b001b
Arg [1] : 0000000000000000000000007449dc43a03e70050c4acd3f8a6acab9a7f87933
Arg [2] : 00000000000000000000000004c0599ae5a44757c0af6f9ec3b93da8976c150a


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