Contract 0xE19A10294b9AfA5f07677459C1227F777293987f

  Note: Our ETH balance display is temporarily unavailable. Please check back later.

Contract Overview

Balance:
Txn Hash Method
Block
From
To
Value
0x1433c5e18fa0c96bfb3a49dfcd5247dfcbe2852758b879b9945a6b5c2bcf8b950x60806040166852912023-11-01 0:30:50205 days 12 hrs ago0xd866b2332d4383c1bf719732177e2d9109c99dbc IN  Create: SpeedMarketMastercopy0 ETH0.0000000094430.00001
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SpeedMarketMastercopy

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : SpeedMarketMastercopy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Inheritance
import "./SpeedMarket.sol";

contract SpeedMarketMastercopy is SpeedMarket {
    constructor() {
        // Freeze mastercopy on deployment so it can never be initialized with real arguments
        initialized = true;
    }
}

File 2 of 6 : SpeedMarket.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import "../interfaces/ISpeedMarketsAMM.sol";

contract SpeedMarket {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    struct InitParams {
        address _speedMarketsAMM;
        address _user;
        bytes32 _asset;
        uint64 _strikeTime;
        int64 _strikePrice;
        Direction _direction;
        uint _buyinAmount;
        uint _safeBoxImpact;
        uint _lpFee;
    }

    enum Direction {
        Up,
        Down
    }

    address public user;
    bytes32 public asset;
    uint64 public strikeTime;
    int64 public strikePrice;
    Direction public direction;
    uint public buyinAmount;

    bool public resolved;
    int64 public finalPrice;
    Direction public result;

    ISpeedMarketsAMM public speedMarketsAMM;

    uint public safeBoxImpact;
    uint public lpFee;

    uint256 public createdAt;

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

    bool public initialized = false;

    function initialize(InitParams calldata params) external {
        require(!initialized, "Speed market already initialized");
        initialized = true;
        speedMarketsAMM = ISpeedMarketsAMM(params._speedMarketsAMM);
        user = params._user;
        asset = params._asset;
        strikeTime = params._strikeTime;
        strikePrice = params._strikePrice;
        direction = params._direction;
        buyinAmount = params._buyinAmount;
        safeBoxImpact = params._safeBoxImpact;
        lpFee = params._lpFee;
        speedMarketsAMM.sUSD().approve(params._speedMarketsAMM, type(uint256).max);
        createdAt = block.timestamp;
    }

    function resolve(int64 _finalPrice) external onlyAMM {
        require(!resolved, "already resolved");
        require(block.timestamp > strikeTime, "not ready to be resolved");
        resolved = true;
        finalPrice = _finalPrice;

        if (finalPrice < strikePrice) {
            result = Direction.Down;
        } else if (finalPrice > strikePrice) {
            result = Direction.Up;
        } else {
            result = direction == Direction.Up ? Direction.Down : Direction.Up;
        }

        if (direction == result) {
            speedMarketsAMM.sUSD().safeTransfer(user, speedMarketsAMM.sUSD().balanceOf(address(this)));
        } else {
            speedMarketsAMM.sUSD().safeTransfer(address(speedMarketsAMM), speedMarketsAMM.sUSD().balanceOf(address(this)));
        }

        emit Resolved(finalPrice, result, direction == result);
    }

    function isUserWinner() external view returns (bool) {
        return resolved && (direction == result);
    }

    modifier onlyAMM() {
        require(msg.sender == address(speedMarketsAMM), "only the AMM may perform these methods");
        _;
    }

    event Resolved(int64 finalPrice, Direction result, bool userIsWinner);
}

File 3 of 6 : 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 6 : 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 5 of 6 : ISpeedMarketsAMM.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.16;

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

import "../SpeedMarkets/SpeedMarket.sol";

interface ISpeedMarketsAMM {
    function sUSD() external view returns (IERC20Upgradeable);

    function supportedAsset(bytes32 asset) external view returns (bool);

    function assetToPythId(bytes32 asset) external view returns (bytes32);

    function minBuyinAmount() external view returns (uint);

    function maxBuyinAmount() external view returns (uint);

    function minimalTimeToMaturity() external view returns (uint);

    function maximalTimeToMaturity() external view returns (uint);

    function maximumPriceDelay() external view returns (uint64);

    function maximumPriceDelayForResolving() external view returns (uint64);

    function timeThresholdsForFees(uint index) external view returns (uint);

    function lpFees(uint index) external view returns (uint);

    function lpFee() external view returns (uint);

    function safeBoxImpact() external view returns (uint);

    function marketHasCreatedAtAttribute(address _market) external view returns (bool);

    function marketHasFeeAttribute(address _market) external view returns (bool);

    function maxRiskPerAsset(bytes32 _asset) external view returns (uint);

    function currentRiskPerAsset(bytes32 _asset) external view returns (uint);

    function maxRiskPerAssetAndDirection(bytes32 _asset, SpeedMarket.Direction _direction) external view returns (uint);

    function currentRiskPerAssetAndDirection(bytes32 _asset, SpeedMarket.Direction _direction) external view returns (uint);

    function whitelistedAddresses(address _wallet) external view returns (bool);

    function getLengths(address user) external view returns (uint[5] memory);
}

File 6 of 6 : 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);
            }
        }
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int64","name":"finalPrice","type":"int64"},{"indexed":false,"internalType":"enum SpeedMarket.Direction","name":"result","type":"uint8"},{"indexed":false,"internalType":"bool","name":"userIsWinner","type":"bool"}],"name":"Resolved","type":"event"},{"inputs":[],"name":"asset","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyinAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createdAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"direction","outputs":[{"internalType":"enum SpeedMarket.Direction","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalPrice","outputs":[{"internalType":"int64","name":"","type":"int64"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_speedMarketsAMM","type":"address"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32","name":"_asset","type":"bytes32"},{"internalType":"uint64","name":"_strikeTime","type":"uint64"},{"internalType":"int64","name":"_strikePrice","type":"int64"},{"internalType":"enum SpeedMarket.Direction","name":"_direction","type":"uint8"},{"internalType":"uint256","name":"_buyinAmount","type":"uint256"},{"internalType":"uint256","name":"_safeBoxImpact","type":"uint256"},{"internalType":"uint256","name":"_lpFee","type":"uint256"}],"internalType":"struct SpeedMarket.InitParams","name":"params","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isUserWinner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int64","name":"_finalPrice","type":"int64"}],"name":"resolve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"result","outputs":[{"internalType":"enum SpeedMarket.Direction","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safeBoxImpact","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"speedMarketsAMM","outputs":[{"internalType":"contract ISpeedMarketsAMM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strikePrice","outputs":[{"internalType":"int64","name":"","type":"int64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strikeTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"user","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526008805460ff1916905534801561001a57600080fd5b506008805460ff19166001179055610fb6806100376000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806358d9d182116100a2578063a6b513ee11610071578063a6b513ee14610225578063c52987cf1461024a578063cf09e0d01461025e578063d69fb66814610267578063d9a10e941461027057600080fd5b806358d9d182146101d4578063645539ed146101e75780636537214714610208578063704ce43e1461021c57600080fd5b80633a2c1e55116100de5780633a2c1e55146101675780633f6fa6551461016f5780634f8632ba1461017c57806351d8044f146101a757600080fd5b8063158ef93e146101105780631f67c491146101325780631fcc8bb21461014757806338d52e0f1461015e575b600080fd5b60085461011d9060ff1681565b60405190151581526020015b60405180910390f35b610145610140366004610e12565b61028a565b005b61015060035481565b604051908152602001610129565b61015060015481565b61011d6107ab565b60045461011d9060ff1681565b60005461018f906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b6002546101bb9067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610129565b6101456101e2366004610e33565b61081a565b6002546101fb90600160801b900460ff1681565b6040516101299190610ec9565b6004546101fb90600160481b900460ff1681565b61015060065481565b60045461023790610100900460070b81565b60405160079190910b8152602001610129565b60025461023790600160401b900460070b81565b61015060075481565b61015060055481565b60045461018f90600160501b90046001600160a01b031681565b600454600160501b90046001600160a01b031633146102ff5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c792074686520414d4d206d617920706572666f726d207468657365206d6044820152656574686f647360d01b60648201526084015b60405180910390fd5b60045460ff16156103455760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995cdbdb1d995960821b60448201526064016102f6565b60025467ffffffffffffffff1642116103a05760405162461bcd60e51b815260206004820152601860248201527f6e6f7420726561647920746f206265207265736f6c766564000000000000000060448201526064016102f6565b60048054600783810b67ffffffffffffffff1661010090810268ffffffffffffffffff199093169290921760011792839055600254600160401b9004810b810b91909204820b90910b121561040f57600480546001919060ff60481b1916600160481b835b02179055506104c1565b600254600454600160401b909104600790810b810b610100909204810b900b131561044e57600480546000919060ff60481b1916600160481b83610405565b6000600254600160801b900460ff16600181111561047c57634e487b7160e01b600052602160045260246000fd5b1461048857600061048b565b60015b6004805460ff60481b1916600160481b8360018111156104bb57634e487b7160e01b600052602160045260246000fd5b02179055505b600454600160481b900460ff1660018111156104ed57634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561051957634e487b7160e01b600052602160045260246000fd5b14156106bf576000546004805460408051639324cac760e01b815290516106ba946001600160a01b0390811694600160501b9094041692639324cac792808201926020929091829003018186803b15801561057357600080fd5b505afa158015610587573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ab9190610dd7565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156105ec57600080fd5b505afa158015610600573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106249190610e4b565b6004600a9054906101000a90046001600160a01b03166001600160a01b0316639324cac76040518163ffffffff1660e01b815260040160206040518083038186803b15801561067257600080fd5b505afa158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610dd7565b6001600160a01b03169190610af8565b61070c565b6004805460408051639324cac760e01b8152905161070c93600160501b9093046001600160a01b0316928392639324cac79281830192602092829003018186803b15801561057357600080fd5b6004547f3f2ed3988c720bd4f2cf66d1dfb206a085cf674f03df67d5c1d506969871855a90610100810460070b90600160481b900460ff1680600181111561076457634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561079057634e487b7160e01b600052602160045260246000fd5b146040516107a093929190610edd565b60405180910390a150565b60045460009060ff1680156108155750600454600160481b900460ff1660018111156107e757634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561081357634e487b7160e01b600052602160045260246000fd5b145b905090565b60085460ff161561086d5760405162461bcd60e51b815260206004820181905260248201527f5370656564206d61726b657420616c726561647920696e697469616c697a656460448201526064016102f6565b6008805460ff191660011790556108876020820182610d9b565b600480546001600160a01b0392909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff9092169190911790556108d76040820160208301610d9b565b600080546001600160a01b0319166001600160a01b0392909216919091179055604081013560015561090f6080820160608301610e63565b6002805467ffffffffffffffff191667ffffffffffffffff9290921691909117905561094160a0820160808301610e12565b6002805460079290920b67ffffffffffffffff16600160401b026fffffffffffffffff00000000000000001990921691909117905561098660c0820160a08301610df3565b6002805460ff60801b1916600160801b8360018111156109b657634e487b7160e01b600052602160045260246000fd5b021790555060c081013560035560e08101356005556101008101356006556004805460408051639324cac760e01b81529051600160501b9092046001600160a01b031692639324cac7928282019260209290829003018186803b158015610a1c57600080fd5b505afa158015610a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a549190610dd7565b6001600160a01b031663095ea7b3610a6f6020840184610d9b565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610ab857600080fd5b505af1158015610acc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af09190610db7565b505042600755565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b4a908490610b4f565b505050565b6000610ba4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c219092919063ffffffff16565b805190915015610b4a5780806020019051810190610bc29190610db7565b610b4a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f6565b6060610c308484600085610c3a565b90505b9392505050565b606082471015610c9b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f6565b843b610ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f6565b600080866001600160a01b03168587604051610d059190610ead565b60006040518083038185875af1925050503d8060008114610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b5091509150610d57828286610d62565b979650505050505050565b60608315610d71575081610c33565b825115610d815782518084602001fd5b8160405162461bcd60e51b81526004016102f69190610f05565b600060208284031215610dac578081fd5b8135610c3381610f68565b600060208284031215610dc8578081fd5b81518015158114610c33578182fd5b600060208284031215610de8578081fd5b8151610c3381610f68565b600060208284031215610e04578081fd5b813560028110610c33578182fd5b600060208284031215610e23578081fd5b81358060070b8114610c33578182fd5b60006101208284031215610e45578081fd5b50919050565b600060208284031215610e5c578081fd5b5051919050565b600060208284031215610e74578081fd5b813567ffffffffffffffff81168114610c33578182fd5b60028110610ea957634e487b7160e01b600052602160045260246000fd5b9052565b60008251610ebf818460208701610f38565b9190910192915050565b60208101610ed78284610e8b565b92915050565b600784900b815260608101610ef56020830185610e8b565b8215156040830152949350505050565b6020815260008251806020840152610f24816040850160208701610f38565b601f01601f19169190910160400192915050565b60005b83811015610f53578181015183820152602001610f3b565b83811115610f62576000848401525b50505050565b6001600160a01b0381168114610f7d57600080fd5b5056fea264697066735822122036fc33bf73081ab20860b21c6607b0b16e1c68d47e4a2fdbedf4a64fda0b4a5d64736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806358d9d182116100a2578063a6b513ee11610071578063a6b513ee14610225578063c52987cf1461024a578063cf09e0d01461025e578063d69fb66814610267578063d9a10e941461027057600080fd5b806358d9d182146101d4578063645539ed146101e75780636537214714610208578063704ce43e1461021c57600080fd5b80633a2c1e55116100de5780633a2c1e55146101675780633f6fa6551461016f5780634f8632ba1461017c57806351d8044f146101a757600080fd5b8063158ef93e146101105780631f67c491146101325780631fcc8bb21461014757806338d52e0f1461015e575b600080fd5b60085461011d9060ff1681565b60405190151581526020015b60405180910390f35b610145610140366004610e12565b61028a565b005b61015060035481565b604051908152602001610129565b61015060015481565b61011d6107ab565b60045461011d9060ff1681565b60005461018f906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b6002546101bb9067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610129565b6101456101e2366004610e33565b61081a565b6002546101fb90600160801b900460ff1681565b6040516101299190610ec9565b6004546101fb90600160481b900460ff1681565b61015060065481565b60045461023790610100900460070b81565b60405160079190910b8152602001610129565b60025461023790600160401b900460070b81565b61015060075481565b61015060055481565b60045461018f90600160501b90046001600160a01b031681565b600454600160501b90046001600160a01b031633146102ff5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c792074686520414d4d206d617920706572666f726d207468657365206d6044820152656574686f647360d01b60648201526084015b60405180910390fd5b60045460ff16156103455760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481c995cdbdb1d995960821b60448201526064016102f6565b60025467ffffffffffffffff1642116103a05760405162461bcd60e51b815260206004820152601860248201527f6e6f7420726561647920746f206265207265736f6c766564000000000000000060448201526064016102f6565b60048054600783810b67ffffffffffffffff1661010090810268ffffffffffffffffff199093169290921760011792839055600254600160401b9004810b810b91909204820b90910b121561040f57600480546001919060ff60481b1916600160481b835b02179055506104c1565b600254600454600160401b909104600790810b810b610100909204810b900b131561044e57600480546000919060ff60481b1916600160481b83610405565b6000600254600160801b900460ff16600181111561047c57634e487b7160e01b600052602160045260246000fd5b1461048857600061048b565b60015b6004805460ff60481b1916600160481b8360018111156104bb57634e487b7160e01b600052602160045260246000fd5b02179055505b600454600160481b900460ff1660018111156104ed57634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561051957634e487b7160e01b600052602160045260246000fd5b14156106bf576000546004805460408051639324cac760e01b815290516106ba946001600160a01b0390811694600160501b9094041692639324cac792808201926020929091829003018186803b15801561057357600080fd5b505afa158015610587573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ab9190610dd7565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156105ec57600080fd5b505afa158015610600573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106249190610e4b565b6004600a9054906101000a90046001600160a01b03166001600160a01b0316639324cac76040518163ffffffff1660e01b815260040160206040518083038186803b15801561067257600080fd5b505afa158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610dd7565b6001600160a01b03169190610af8565b61070c565b6004805460408051639324cac760e01b8152905161070c93600160501b9093046001600160a01b0316928392639324cac79281830192602092829003018186803b15801561057357600080fd5b6004547f3f2ed3988c720bd4f2cf66d1dfb206a085cf674f03df67d5c1d506969871855a90610100810460070b90600160481b900460ff1680600181111561076457634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561079057634e487b7160e01b600052602160045260246000fd5b146040516107a093929190610edd565b60405180910390a150565b60045460009060ff1680156108155750600454600160481b900460ff1660018111156107e757634e487b7160e01b600052602160045260246000fd5b600254600160801b900460ff16600181111561081357634e487b7160e01b600052602160045260246000fd5b145b905090565b60085460ff161561086d5760405162461bcd60e51b815260206004820181905260248201527f5370656564206d61726b657420616c726561647920696e697469616c697a656460448201526064016102f6565b6008805460ff191660011790556108876020820182610d9b565b600480546001600160a01b0392909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff9092169190911790556108d76040820160208301610d9b565b600080546001600160a01b0319166001600160a01b0392909216919091179055604081013560015561090f6080820160608301610e63565b6002805467ffffffffffffffff191667ffffffffffffffff9290921691909117905561094160a0820160808301610e12565b6002805460079290920b67ffffffffffffffff16600160401b026fffffffffffffffff00000000000000001990921691909117905561098660c0820160a08301610df3565b6002805460ff60801b1916600160801b8360018111156109b657634e487b7160e01b600052602160045260246000fd5b021790555060c081013560035560e08101356005556101008101356006556004805460408051639324cac760e01b81529051600160501b9092046001600160a01b031692639324cac7928282019260209290829003018186803b158015610a1c57600080fd5b505afa158015610a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a549190610dd7565b6001600160a01b031663095ea7b3610a6f6020840184610d9b565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526000196024820152604401602060405180830381600087803b158015610ab857600080fd5b505af1158015610acc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af09190610db7565b505042600755565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b4a908490610b4f565b505050565b6000610ba4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c219092919063ffffffff16565b805190915015610b4a5780806020019051810190610bc29190610db7565b610b4a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f6565b6060610c308484600085610c3a565b90505b9392505050565b606082471015610c9b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f6565b843b610ce95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f6565b600080866001600160a01b03168587604051610d059190610ead565b60006040518083038185875af1925050503d8060008114610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b5091509150610d57828286610d62565b979650505050505050565b60608315610d71575081610c33565b825115610d815782518084602001fd5b8160405162461bcd60e51b81526004016102f69190610f05565b600060208284031215610dac578081fd5b8135610c3381610f68565b600060208284031215610dc8578081fd5b81518015158114610c33578182fd5b600060208284031215610de8578081fd5b8151610c3381610f68565b600060208284031215610e04578081fd5b813560028110610c33578182fd5b600060208284031215610e23578081fd5b81358060070b8114610c33578182fd5b60006101208284031215610e45578081fd5b50919050565b600060208284031215610e5c578081fd5b5051919050565b600060208284031215610e74578081fd5b813567ffffffffffffffff81168114610c33578182fd5b60028110610ea957634e487b7160e01b600052602160045260246000fd5b9052565b60008251610ebf818460208701610f38565b9190910192915050565b60208101610ed78284610e8b565b92915050565b600784900b815260608101610ef56020830185610e8b565b8215156040830152949350505050565b6020815260008251806020840152610f24816040850160208701610f38565b601f01601f19169190910160400192915050565b60005b83811015610f53578181015183820152602001610f3b565b83811115610f62576000848401525b50505050565b6001600160a01b0381168114610f7d57600080fd5b5056fea264697066735822122036fc33bf73081ab20860b21c6607b0b16e1c68d47e4a2fdbedf4a64fda0b4a5d64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading