ETH Price: $1,934.02 (-1.55%)
Gas: 0.06 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
God

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 2048 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

contract God is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable {
    using ECDSAUpgradeable for bytes32;
    uint256 private constant MINTPRICE = 1;
    uint256 private constant BURNPRICE = 2;

    struct OP {
        uint256 datatype;
        address token;
        uint256 price;
        uint256 timestamp;
    }

    uint256 constant ONE = 0x100000000000000000000000000000000;

    uint256 public EXPIRY;
    uint256 public SIGNATURENUM;
    address public ATAN;
    address public GOV;

    mapping(address => bool) public authorization;
    mapping(address => mapping(address => uint256)) public tax_base;
    mapping(address => mapping(address => uint256)) public amt_mint;
    mapping(address => mapping(address => uint256)) public amt_burn;
    mapping(address => mapping(address => uint256)) public time_swap;

    function initialize() public initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
        __ReentrancyGuard_init_unchained();
    }

    function set_expiry(uint256 data) public onlyOwner {
        EXPIRY = data;
    }

    function set_signature_num(uint256 data) public onlyOwner {
        SIGNATURENUM = data;
    }

    function set_atan(address v) public onlyOwner {
        ATAN = v;
    }

    function set_gov(address v) public onlyOwner {
        GOV = v;
    }

    function add_authorization(address addr) public onlyOwner {
        authorization[addr] = true;
    }

    function remove_authorization(address addr) public onlyOwner {
        delete authorization[addr];
    }

    function set_tax_base(
        address src,
        address dst,
        uint256 num
    ) public onlyOwner {
        tax_base[src][dst] = num;
    }

    function swap(uint256[2] calldata ns, bytes[2] calldata oracle) public {
        OP memory x = decode_op(oracle[0]);
        OP memory y = decode_op(oracle[1]);
        require(x.datatype == BURNPRICE);
        require(y.datatype == MINTPRICE);
        require(x.timestamp == y.timestamp, "timestamp not match");
        uint256 t = tax(
            x.token,
            y.token,
            (ns[0] * x.price) / 1e18,
            (ns[1] * y.price) / 1e18
        );
        I(x.token).burn(msg.sender, ns[0]);
        I(y.token).mint(msg.sender, ns[1]);
        I(x.token).mint(GOV, (t * 1e18) / x.price);
        emit Swap(msg.sender, x.token, y.token, ns[0], ns[1]);
    }

    function decode_op(bytes calldata data) public view returns (OP memory) {
        (bytes memory o, bytes[] memory s) = abi.decode(data, (bytes, bytes[]));
        OP memory op = abi.decode(o, (OP));
        require(s.length == SIGNATURENUM, "signature num error");
        bytes32 hash = keccak256(o).toEthSignedMessageHash();
        address auth = address(0);
        for (uint256 i = 0; i < s.length; i++) {
            address addr = hash.recover(s[i]);
            require(addr > auth, "signature order error");
            require(authorization[addr], "invalid Signature");
            auth = addr;
        }

        require(op.timestamp + EXPIRY > block.timestamp, "op expired");
        return op;
    }

    function tax(
        address src,
        address dst,
        uint256 burn,
        uint256 mint
    ) internal returns (uint256) {
        if (time_swap[src][dst] == block.timestamp / (1 days)) {
            amt_mint[src][dst] += mint;
            amt_burn[src][dst] += burn;
        } else {
            amt_mint[src][dst] = mint;
            amt_burn[src][dst] = burn;
        }
        time_swap[src][dst] = (block.timestamp / (1 days));

        uint256 n = (amt_burn[src][dst] * ONE) / tax_base[src][dst];
        n = (I(ATAN).arctan(n) * amt_burn[src][dst]) / ONE;
        require(amt_burn[src][dst] - amt_mint[src][dst] >= n, "overmint");
        return burn - mint;
    }

    function calculate_tax(
        address src,
        address dst,
        uint256 burn
    ) public view returns (uint256) {
        if (time_swap[src][dst] != block.timestamp / (1 days)) {
            uint256 n00 = (burn * ONE) / tax_base[src][dst];
            return (I(ATAN).arctan(n00) * burn) / ONE;
        }

        uint256 nb = amt_burn[src][dst] + burn;
        uint256 n = (nb * ONE) / tax_base[src][dst];
        n = (I(ATAN).arctan(n) * nb) / ONE;
        uint256 n0 = amt_burn[src][dst] - amt_mint[src][dst];
        if (n <= n0) {
            return 0;
        }
        return n - n0;
    }

    function encode_op(
        uint256 datatype,
        address token,
        uint256 price,
        uint256 timestamp
    ) public pure returns (bytes memory) {
        OP memory op;
        op.datatype = datatype;
        op.token = token;
        op.price = price;
        op.timestamp = timestamp;
        return abi.encode(op);
    }

    function encode_sigs(bytes memory o, bytes[] memory s)
        public
        pure
        returns (bytes memory)
    {
        return abi.encode(o, s);
    }

    event Swap(address user, address x, address y, uint256 nx, uint256 ny);
}

interface I {
    function arctan(uint256) external view returns (uint256);

    function mint(address, uint256) external;

    function burn(address, uint256) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 3 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity ^0.8.0;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

// SPDX-License-Identifier: MIT

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSAUpgradeable {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

// SPDX-License-Identifier: MIT

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

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

// SPDX-License-Identifier: MIT

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

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

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
    uint256[50] private __gap;
}

// SPDX-License-Identifier: MIT

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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"x","type":"address"},{"indexed":false,"internalType":"address","name":"y","type":"address"},{"indexed":false,"internalType":"uint256","name":"nx","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ny","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[],"name":"ATAN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXPIRY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GOV","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNATURENUM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"add_authorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"amt_burn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"amt_mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorization","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"burn","type":"uint256"}],"name":"calculate_tax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"decode_op","outputs":[{"components":[{"internalType":"uint256","name":"datatype","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct God.OP","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"datatype","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"encode_op","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"o","type":"bytes"},{"internalType":"bytes[]","name":"s","type":"bytes[]"}],"name":"encode_sigs","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"remove_authorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"set_atan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"data","type":"uint256"}],"name":"set_expiry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"set_gov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"data","type":"uint256"}],"name":"set_signature_num","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"num","type":"uint256"}],"name":"set_tax_base","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"ns","type":"uint256[2]"},{"internalType":"bytes[2]","name":"oracle","type":"bytes[2]"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"tax_base","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"time_swap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612150806100206000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638129fc1c116100ee578063d85651e311610097578063daa49b5011610071578063daa49b50146103e9578063e1615db2146103fc578063f2fde38b14610427578063f849ceef1461043a576101a3565b8063d85651e3146103b0578063d9a876ba146103c3578063da1a934f146103d6576101a3565b8063a1a36e99116100c8578063a1a36e9914610303578063cb8fe8461461032e578063cbe129691461037d576101a3565b80638129fc1c146102bf5780638da5cb5b146102c7578063980c7ab4146102d8576101a3565b806347f9a1dd11610150578063768b23d31161012a578063768b23d3146102835780637c0053831461028c57806380acb4f7146102ac576101a3565b806347f9a1dd1461025557806352f8096214610268578063715018a61461027b576101a3565b80633f901af4116101815780633f901af414610226578063419830e2146102395780634530a2d71461024c576101a3565b806304eb5454146101a8578063180cb47f146101bd57806324ab038f146101ed575b600080fd5b6101bb6101b6366004611c1c565b61044d565b005b609a546101d0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102186101fb366004611c38565b609c60209081526000928352604080842090915290825290205481565b6040519081526020016101e4565b6101bb610234366004611e7a565b6104d0565b6099546101d0906001600160a01b031681565b61021860975481565b610218610263366004611c70565b61052f565b6101bb610276366004611e7a565b6107d2565b6101bb610831565b61021860985481565b61029f61029a366004611eaa565b6108e2565b6040516101e49190611f31565b6101bb6102ba366004611c70565b61097d565b6101bb610a03565b6033546001600160a01b03166101d0565b6102186102e6366004611c38565b609f60209081526000928352604080842090915290825290205481565b610218610311366004611c38565b609d60209081526000928352604080842090915290825290205481565b61034161033c366004611cfd565b610add565b6040516101e49190815181526020808301516001600160a01b031690820152604080830151908201526060918201519181019190915260800190565b6103a061038b366004611c1c565b609b6020526000908152604090205460ff1681565b60405190151581526020016101e4565b6101bb6103be366004611cb0565b610d76565b6101bb6103d1366004611c1c565b6110de565b6101bb6103e4366004611c1c565b611167565b61029f6103f7366004611d6a565b6111f0565b61021861040a366004611c38565b609e60209081526000928352604080842090915290825290205481565b6101bb610435366004611c1c565b61121c565b6101bb610448366004611c1c565b61135b565b6033546001600160a01b031633146104ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03166000908152609b60205260409020805460ff19166001179055565b6033546001600160a01b0316331461052a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609855565b600061053e6201518042612068565b6001600160a01b038086166000908152609f60209081526040808320938816835292905220541461064a576001600160a01b038085166000908152609c6020908152604080832093871683529290529081205461059f600160801b85612088565b6105a99190612068565b60995460405163ab86eee960e01b815260048101839052919250600160801b9185916001600160a01b03169063ab86eee99060240160206040518083038186803b1580156105f657600080fd5b505afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611e92565b6106389190612088565b6106429190612068565b9150506107cb565b6001600160a01b038085166000908152609e6020908152604080832093871683529290529081205461067d908490612050565b6001600160a01b038087166000908152609c60209081526040808320938916835292905290812054919250906106b7600160801b84612088565b6106c19190612068565b60995460405163ab86eee960e01b815260048101839052919250600160801b9184916001600160a01b03169063ab86eee99060240160206040518083038186803b15801561070e57600080fd5b505afa158015610722573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107469190611e92565b6107509190612088565b61075a9190612068565b6001600160a01b038088166000818152609d60209081526040808320948b1680845294825280832054938352609e82528083209483529390529182205492935090916107a691906120a7565b90508082116107bb57600093505050506107cb565b6107c581836120a7565b93505050505b9392505050565b6033546001600160a01b0316331461082c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609755565b6033546001600160a01b0316331461088b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36033805473ffffffffffffffffffffffffffffffffffffffff19169055565b606061091860405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b8581526001600160a01b0385811660208084019182526040808501888152606080870189815283519485018d9052945190951691830191909152519281019290925251608082015260a001604051602081830303815290604052915050949350505050565b6033546001600160a01b031633146109d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b039283166000908152609c602090815260408083209490951682529290925291902055565b600054610100900460ff1680610a1c575060005460ff16155b610a8e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015610ab0576000805461ffff19166101011790555b610ab86113d6565b610ac0611496565b610ac86115a7565b8015610ada576000805461ff00191690555b50565b610b1160405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b600080610b2084860186611d6a565b91509150600082806020019051810190610b3a9190611e2b565b9050609854825114610b8e5760405162461bcd60e51b815260206004820152601360248201527f7369676e6174757265206e756d206572726f720000000000000000000000000060448201526064016104a3565b8251602080850191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c01905280519101206000805b8451811015610d07576000610c28868381518110610c1157634e487b7160e01b600052603260045260246000fd5b60200260200101518561166d90919063ffffffff16565b9050826001600160a01b0316816001600160a01b031611610c8b5760405162461bcd60e51b815260206004820152601560248201527f7369676e6174757265206f72646572206572726f72000000000000000000000060448201526064016104a3565b6001600160a01b0381166000908152609b602052604090205460ff16610cf35760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964205369676e617475726500000000000000000000000000000060448201526064016104a3565b915080610cff816120be565b915050610be3565b50426097548460600151610d1b9190612050565b11610d685760405162461bcd60e51b815260206004820152600a60248201527f6f7020657870697265640000000000000000000000000000000000000000000060448201526064016104a3565b509093505050505b92915050565b6000610d8e82825b60200281019061033c9190611fb5565b90506000610d9d836001610d7e565b8251909150600214610dae57600080fd5b8051600114610dbc57600080fd5b8060600151826060015114610e135760405162461bcd60e51b815260206004820152601360248201527f74696d657374616d70206e6f74206d617463680000000000000000000000000060448201526064016104a3565b6000610e9683602001518360200151670de0b6b3a7640000866040015189600060028110610e5157634e487b7160e01b600052603260045260246000fd5b6020020135610e609190612088565b610e6a9190612068565b6040860151670de0b6b3a764000090610e879060208c0135612088565b610e919190612068565b6116e8565b60208401516040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152873560248201529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b505050506020828101516040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201529187013560248301526001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610f7e57600080fd5b505af1158015610f92573d6000803e3d6000fd5b505050506020830151609a5460408501516001600160a01b03928316926340c10f19921690610fc985670de0b6b3a7640000612088565b610fd39190612068565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561103157600080fd5b505af1158015611045573d6000803e3d6000fd5b505050507fcd3829a3813dc3cdd188fd3d01dcf3268c16be2fdd2dd21d0665418816e4606233846020015184602001518860006002811061109657634e487b7160e01b600052603260045260246000fd5b604080516001600160a01b0396871681529486166020808701919091529390951684860152820201356060830152880135608082015290519081900360a00190a15050505050565b6033546001600160a01b031633146111385760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6099805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6033546001600160a01b031633146111c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60608282604051602001611205929190611f44565b604051602081830303815290604052905092915050565b6033546001600160a01b031633146112765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b0381166112f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a3565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36033805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6033546001600160a01b031633146113b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b03166000908152609b60205260409020805460ff19169055565b600054610100900460ff16806113ef575060005460ff16155b6114615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015610ac8576000805461ffff19166101011790558015610ada576000805461ff001916905550565b600054610100900460ff16806114af575060005460ff16155b6115215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015611543576000805461ffff19166101011790555b6033805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610ada576000805461ff001916905550565b600054610100900460ff16806115c0575060005460ff16155b6116325760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015611654576000805461ffff19166101011790555b60016065558015610ada576000805461ff001916905550565b600081516041146116c05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a3565b60208201516040830151606084015160001a6116de868285856119c1565b9695505050505050565b60006116f76201518042612068565b6001600160a01b038087166000908152609f602090815260408083209389168352929052205414156117a1576001600160a01b038086166000908152609d602090815260408083209388168352929052908120805484929061175a908490612050565b90915550506001600160a01b038086166000908152609e6020908152604080832093881683529290529081208054859290611796908490612050565b909155506117e39050565b6001600160a01b038086166000818152609d60209081526040808320948916808452948252808320879055928252609e81528282209382529290925290208390555b6117f06201518042612068565b6001600160a01b038087166000818152609f60209081526040808320948a1680845294825280832095909555828252609c8152848220848352815284822054928252609e8152848220938252929092529181205490919061185690600160801b90612088565b6118609190612068565b6001600160a01b038781166000908152609e602090815260408083208a851684529091529081902054609954915163ab86eee960e01b815260048101859052939450600160801b939092919091169063ab86eee99060240160206040518083038186803b1580156118d057600080fd5b505afa1580156118e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119089190611e92565b6119129190612088565b61191c9190612068565b6001600160a01b038088166000818152609d60209081526040808320948b1680845294825280832054938352609e82528083209483529390529190912054919250829161196991906120a7565b10156119b75760405162461bcd60e51b815260206004820152600860248201527f6f7665726d696e7400000000000000000000000000000000000000000000000060448201526064016104a3565b6116de83856120a7565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611a595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a3565b8360ff16601b1480611a6e57508360ff16601c145b611ae05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a3565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b34573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b975760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a3565b95945050505050565b8060408101831015610d7057600080fd5b600082601f830112611bc1578081fd5b813567ffffffffffffffff811115611bdb57611bdb6120ef565b611bee6020601f19601f8401160161201f565b818152846020838601011115611c02578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611c2d578081fd5b81356107cb81612105565b60008060408385031215611c4a578081fd5b8235611c5581612105565b91506020830135611c6581612105565b809150509250929050565b600080600060608486031215611c84578081fd5b8335611c8f81612105565b92506020840135611c9f81612105565b929592945050506040919091013590565b60008060608385031215611cc2578182fd5b611ccc8484611ba0565b9150604083013567ffffffffffffffff811115611ce7578182fd5b611cf385828601611ba0565b9150509250929050565b60008060208385031215611d0f578182fd5b823567ffffffffffffffff80821115611d26578384fd5b818501915085601f830112611d39578384fd5b813581811115611d47578485fd5b866020828501011115611d58578485fd5b60209290920196919550909350505050565b60008060408385031215611d7c578182fd5b823567ffffffffffffffff80821115611d93578384fd5b611d9f86838701611bb1565b9350602091508185013581811115611db5578384fd5b8501601f81018713611dc5578384fd5b803582811115611dd757611dd76120ef565b611de5848260051b0161201f565b8181528481019350828501865b83811015611e1b57611e098b888435880101611bb1565b86529486019490860190600101611df2565b5096999098509650505050505050565b600060808284031215611e3c578081fd5b611e46608061201f565b825181526020830151611e5881612105565b6020820152604083810151908201526060928301519281019290925250919050565b600060208284031215611e8b578081fd5b5035919050565b600060208284031215611ea3578081fd5b5051919050565b60008060008060808587031215611ebf578081fd5b843593506020850135611ed181612105565b93969395505050506040820135916060013590565b60008151808452815b81811015611f0b57602081850181015186830182015201611eef565b81811115611f1c5782602083870101525b50601f01601f19169290920160200192915050565b6000602082526107cb6020830184611ee6565b600060408252611f576040830185611ee6565b6020838203818501528185518084528284019150828160051b850101838801865b83811015611fa657601f19878403018552611f94838351611ee6565b94860194925090850190600101611f78565b50909998505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611fe9578283fd5b83018035915067ffffffffffffffff821115612003578283fd5b60200191503681900382131561201857600080fd5b9250929050565b604051601f8201601f1916810167ffffffffffffffff81118282101715612048576120486120ef565b604052919050565b60008219821115612063576120636120d9565b500190565b60008261208357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156120a2576120a26120d9565b500290565b6000828210156120b9576120b96120d9565b500390565b60006000198214156120d2576120d26120d9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ada57600080fdfea2646970667358221220260d2eb5e10e0e3ff6ff8d56e53049af042a0c62d6a2309c6c1e9190912fa0df64736f6c63430008030033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80638129fc1c116100ee578063d85651e311610097578063daa49b5011610071578063daa49b50146103e9578063e1615db2146103fc578063f2fde38b14610427578063f849ceef1461043a576101a3565b8063d85651e3146103b0578063d9a876ba146103c3578063da1a934f146103d6576101a3565b8063a1a36e99116100c8578063a1a36e9914610303578063cb8fe8461461032e578063cbe129691461037d576101a3565b80638129fc1c146102bf5780638da5cb5b146102c7578063980c7ab4146102d8576101a3565b806347f9a1dd11610150578063768b23d31161012a578063768b23d3146102835780637c0053831461028c57806380acb4f7146102ac576101a3565b806347f9a1dd1461025557806352f8096214610268578063715018a61461027b576101a3565b80633f901af4116101815780633f901af414610226578063419830e2146102395780634530a2d71461024c576101a3565b806304eb5454146101a8578063180cb47f146101bd57806324ab038f146101ed575b600080fd5b6101bb6101b6366004611c1c565b61044d565b005b609a546101d0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102186101fb366004611c38565b609c60209081526000928352604080842090915290825290205481565b6040519081526020016101e4565b6101bb610234366004611e7a565b6104d0565b6099546101d0906001600160a01b031681565b61021860975481565b610218610263366004611c70565b61052f565b6101bb610276366004611e7a565b6107d2565b6101bb610831565b61021860985481565b61029f61029a366004611eaa565b6108e2565b6040516101e49190611f31565b6101bb6102ba366004611c70565b61097d565b6101bb610a03565b6033546001600160a01b03166101d0565b6102186102e6366004611c38565b609f60209081526000928352604080842090915290825290205481565b610218610311366004611c38565b609d60209081526000928352604080842090915290825290205481565b61034161033c366004611cfd565b610add565b6040516101e49190815181526020808301516001600160a01b031690820152604080830151908201526060918201519181019190915260800190565b6103a061038b366004611c1c565b609b6020526000908152604090205460ff1681565b60405190151581526020016101e4565b6101bb6103be366004611cb0565b610d76565b6101bb6103d1366004611c1c565b6110de565b6101bb6103e4366004611c1c565b611167565b61029f6103f7366004611d6a565b6111f0565b61021861040a366004611c38565b609e60209081526000928352604080842090915290825290205481565b6101bb610435366004611c1c565b61121c565b6101bb610448366004611c1c565b61135b565b6033546001600160a01b031633146104ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03166000908152609b60205260409020805460ff19166001179055565b6033546001600160a01b0316331461052a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609855565b600061053e6201518042612068565b6001600160a01b038086166000908152609f60209081526040808320938816835292905220541461064a576001600160a01b038085166000908152609c6020908152604080832093871683529290529081205461059f600160801b85612088565b6105a99190612068565b60995460405163ab86eee960e01b815260048101839052919250600160801b9185916001600160a01b03169063ab86eee99060240160206040518083038186803b1580156105f657600080fd5b505afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611e92565b6106389190612088565b6106429190612068565b9150506107cb565b6001600160a01b038085166000908152609e6020908152604080832093871683529290529081205461067d908490612050565b6001600160a01b038087166000908152609c60209081526040808320938916835292905290812054919250906106b7600160801b84612088565b6106c19190612068565b60995460405163ab86eee960e01b815260048101839052919250600160801b9184916001600160a01b03169063ab86eee99060240160206040518083038186803b15801561070e57600080fd5b505afa158015610722573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107469190611e92565b6107509190612088565b61075a9190612068565b6001600160a01b038088166000818152609d60209081526040808320948b1680845294825280832054938352609e82528083209483529390529182205492935090916107a691906120a7565b90508082116107bb57600093505050506107cb565b6107c581836120a7565b93505050505b9392505050565b6033546001600160a01b0316331461082c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609755565b6033546001600160a01b0316331461088b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36033805473ffffffffffffffffffffffffffffffffffffffff19169055565b606061091860405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b8581526001600160a01b0385811660208084019182526040808501888152606080870189815283519485018d9052945190951691830191909152519281019290925251608082015260a001604051602081830303815290604052915050949350505050565b6033546001600160a01b031633146109d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b039283166000908152609c602090815260408083209490951682529290925291902055565b600054610100900460ff1680610a1c575060005460ff16155b610a8e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015610ab0576000805461ffff19166101011790555b610ab86113d6565b610ac0611496565b610ac86115a7565b8015610ada576000805461ff00191690555b50565b610b1160405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b600080610b2084860186611d6a565b91509150600082806020019051810190610b3a9190611e2b565b9050609854825114610b8e5760405162461bcd60e51b815260206004820152601360248201527f7369676e6174757265206e756d206572726f720000000000000000000000000060448201526064016104a3565b8251602080850191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c01905280519101206000805b8451811015610d07576000610c28868381518110610c1157634e487b7160e01b600052603260045260246000fd5b60200260200101518561166d90919063ffffffff16565b9050826001600160a01b0316816001600160a01b031611610c8b5760405162461bcd60e51b815260206004820152601560248201527f7369676e6174757265206f72646572206572726f72000000000000000000000060448201526064016104a3565b6001600160a01b0381166000908152609b602052604090205460ff16610cf35760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964205369676e617475726500000000000000000000000000000060448201526064016104a3565b915080610cff816120be565b915050610be3565b50426097548460600151610d1b9190612050565b11610d685760405162461bcd60e51b815260206004820152600a60248201527f6f7020657870697265640000000000000000000000000000000000000000000060448201526064016104a3565b509093505050505b92915050565b6000610d8e82825b60200281019061033c9190611fb5565b90506000610d9d836001610d7e565b8251909150600214610dae57600080fd5b8051600114610dbc57600080fd5b8060600151826060015114610e135760405162461bcd60e51b815260206004820152601360248201527f74696d657374616d70206e6f74206d617463680000000000000000000000000060448201526064016104a3565b6000610e9683602001518360200151670de0b6b3a7640000866040015189600060028110610e5157634e487b7160e01b600052603260045260246000fd5b6020020135610e609190612088565b610e6a9190612068565b6040860151670de0b6b3a764000090610e879060208c0135612088565b610e919190612068565b6116e8565b60208401516040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152873560248201529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b505050506020828101516040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201529187013560248301526001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610f7e57600080fd5b505af1158015610f92573d6000803e3d6000fd5b505050506020830151609a5460408501516001600160a01b03928316926340c10f19921690610fc985670de0b6b3a7640000612088565b610fd39190612068565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561103157600080fd5b505af1158015611045573d6000803e3d6000fd5b505050507fcd3829a3813dc3cdd188fd3d01dcf3268c16be2fdd2dd21d0665418816e4606233846020015184602001518860006002811061109657634e487b7160e01b600052603260045260246000fd5b604080516001600160a01b0396871681529486166020808701919091529390951684860152820201356060830152880135608082015290519081900360a00190a15050505050565b6033546001600160a01b031633146111385760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6099805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6033546001600160a01b031633146111c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b609a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60608282604051602001611205929190611f44565b604051602081830303815290604052905092915050565b6033546001600160a01b031633146112765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b0381166112f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a3565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36033805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6033546001600160a01b031633146113b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6001600160a01b03166000908152609b60205260409020805460ff19169055565b600054610100900460ff16806113ef575060005460ff16155b6114615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015610ac8576000805461ffff19166101011790558015610ada576000805461ff001916905550565b600054610100900460ff16806114af575060005460ff16155b6115215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015611543576000805461ffff19166101011790555b6033805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610ada576000805461ff001916905550565b600054610100900460ff16806115c0575060005460ff16155b6116325760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104a3565b600054610100900460ff16158015611654576000805461ffff19166101011790555b60016065558015610ada576000805461ff001916905550565b600081516041146116c05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a3565b60208201516040830151606084015160001a6116de868285856119c1565b9695505050505050565b60006116f76201518042612068565b6001600160a01b038087166000908152609f602090815260408083209389168352929052205414156117a1576001600160a01b038086166000908152609d602090815260408083209388168352929052908120805484929061175a908490612050565b90915550506001600160a01b038086166000908152609e6020908152604080832093881683529290529081208054859290611796908490612050565b909155506117e39050565b6001600160a01b038086166000818152609d60209081526040808320948916808452948252808320879055928252609e81528282209382529290925290208390555b6117f06201518042612068565b6001600160a01b038087166000818152609f60209081526040808320948a1680845294825280832095909555828252609c8152848220848352815284822054928252609e8152848220938252929092529181205490919061185690600160801b90612088565b6118609190612068565b6001600160a01b038781166000908152609e602090815260408083208a851684529091529081902054609954915163ab86eee960e01b815260048101859052939450600160801b939092919091169063ab86eee99060240160206040518083038186803b1580156118d057600080fd5b505afa1580156118e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119089190611e92565b6119129190612088565b61191c9190612068565b6001600160a01b038088166000818152609d60209081526040808320948b1680845294825280832054938352609e82528083209483529390529190912054919250829161196991906120a7565b10156119b75760405162461bcd60e51b815260206004820152600860248201527f6f7665726d696e7400000000000000000000000000000000000000000000000060448201526064016104a3565b6116de83856120a7565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611a595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a3565b8360ff16601b1480611a6e57508360ff16601c145b611ae05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a3565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b34573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b975760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a3565b95945050505050565b8060408101831015610d7057600080fd5b600082601f830112611bc1578081fd5b813567ffffffffffffffff811115611bdb57611bdb6120ef565b611bee6020601f19601f8401160161201f565b818152846020838601011115611c02578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611c2d578081fd5b81356107cb81612105565b60008060408385031215611c4a578081fd5b8235611c5581612105565b91506020830135611c6581612105565b809150509250929050565b600080600060608486031215611c84578081fd5b8335611c8f81612105565b92506020840135611c9f81612105565b929592945050506040919091013590565b60008060608385031215611cc2578182fd5b611ccc8484611ba0565b9150604083013567ffffffffffffffff811115611ce7578182fd5b611cf385828601611ba0565b9150509250929050565b60008060208385031215611d0f578182fd5b823567ffffffffffffffff80821115611d26578384fd5b818501915085601f830112611d39578384fd5b813581811115611d47578485fd5b866020828501011115611d58578485fd5b60209290920196919550909350505050565b60008060408385031215611d7c578182fd5b823567ffffffffffffffff80821115611d93578384fd5b611d9f86838701611bb1565b9350602091508185013581811115611db5578384fd5b8501601f81018713611dc5578384fd5b803582811115611dd757611dd76120ef565b611de5848260051b0161201f565b8181528481019350828501865b83811015611e1b57611e098b888435880101611bb1565b86529486019490860190600101611df2565b5096999098509650505050505050565b600060808284031215611e3c578081fd5b611e46608061201f565b825181526020830151611e5881612105565b6020820152604083810151908201526060928301519281019290925250919050565b600060208284031215611e8b578081fd5b5035919050565b600060208284031215611ea3578081fd5b5051919050565b60008060008060808587031215611ebf578081fd5b843593506020850135611ed181612105565b93969395505050506040820135916060013590565b60008151808452815b81811015611f0b57602081850181015186830182015201611eef565b81811115611f1c5782602083870101525b50601f01601f19169290920160200192915050565b6000602082526107cb6020830184611ee6565b600060408252611f576040830185611ee6565b6020838203818501528185518084528284019150828160051b850101838801865b83811015611fa657601f19878403018552611f94838351611ee6565b94860194925090850190600101611f78565b50909998505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611fe9578283fd5b83018035915067ffffffffffffffff821115612003578283fd5b60200191503681900382131561201857600080fd5b9250929050565b604051601f8201601f1916810167ffffffffffffffff81118282101715612048576120486120ef565b604052919050565b60008219821115612063576120636120d9565b500190565b60008261208357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156120a2576120a26120d9565b500290565b6000828210156120b9576120b96120d9565b500390565b60006000198214156120d2576120d26120d9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ada57600080fdfea2646970667358221220260d2eb5e10e0e3ff6ff8d56e53049af042a0c62d6a2309c6c1e9190912fa0df64736f6c63430008030033

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

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