Address io1jqj8fxr8hg083f82hxvmjh799jr0qece4qqcrh

Contract Overview

Balance:
0 IOTX

IOTX Value:
$ 0

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
4e73628c69dd40c147eaeeb85819ae1c5ba50ea98d7edb2cbe7b3c75d62b73ff 16803748 2022-10-14 07:01:10 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.049419
d0c8efb81b5d904574a77ba19ce431788326a35feedfa50868f90dc80960c187 16803559 2022-10-14 06:43:05 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.049419
cdf5ed9934ed1444559a15bea05b2c2fdcc99c8d1a32dfb1c832c5d059ed6217 16803529 2022-10-14 06:40:10 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.049419
39ee37fec5e00e63e33c93aacb3f6767e811d796d4a5cf477a4f46583e5ad2c5 16803499 2022-10-14 06:37:30 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.016901
c13b27bec9ae628a12ba8e0192017cb2b765c594ec55a4da6a2e99566117a94d 16803499 2022-10-14 06:37:30 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.021101
4833b7af61fff639ee95d336095c30086b56da69915934b3fab4bfd7dc13cb69 16803403 2022-10-14 06:28:10 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.016901
90f4c5d8eca96fb2790fe94b3d49fd30e3d2ca982d06150523f47ba644d5caa7 16803399 2022-10-14 06:27:50 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.016901
54b0291e4eec0f13b6b839296a220a3fb701918efe5b572fdf2a76759f38a7a5 16803379 2022-10-14 06:25:50 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.049419
8cd5db38413c13f7cfb67b70cd1bfcb7972e988d18f2dbfc6b84eb954e4c5d1d 16803030 2022-10-14 05:55:10 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.084007
08af35bde0c58cc3a4e8952dc8aa4af9680d5595612b0dd1bc7dde0cf6457e0e 16801683 2022-10-14 03:52:15 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.036101
8e54a9f4ce28d7fc9da4319d1beff489cef00267df367c6d0e3581c4835e3234 16801627 2022-10-14 03:46:40 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.046679
fab12bfb95a2fd52b0cf0e82ce2768f36151f3faaa518b8f7257378d244bc18e 16801619 2022-10-14 03:45:55 +0000 UTC 2 years ago io1ldcr9vlullq2g85khxd06e36gaupjenu0ay99j  IN    Contract: Reward 0 IOTX 0.067212
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Reward

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

        (bool success, bytes memory returndata) = target.delegatecall(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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;




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

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

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

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

    function safeIncreaseAllowance(
        IERC20 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(
        IERC20 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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

// File: game-contracts/Reward.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

 
contract Reward {

  //contract deployer
  address public contract_owner;
  uint public contract_balance;
  //reward amount
  uint public reward_amount;

  //a map to store watch and report
  mapping(string => bool) public watch_is_stored;
  mapping(string => bool) public report_is_stored;


  //reward time
  mapping(string => uint) reward_time;
  uint system_time;

  //event
  event WatchStored(string _watch_id);
  event ReportStored(string _report);
  event TransferReceived(address _from,uint _amount);
  event TransferSent(address _from,address _destAddr,uint _amount);
  event RewardAmountChanged(uint _amount);

  
  constructor() {
    contract_owner = msg.sender;
  }

  //get erc20 token
  receive() payable external {
    contract_balance += msg.value;
    emit TransferReceived(msg.sender, msg.value);
  }

  //set reward amount 
  function set_reward_amount(uint amount) public {

    //Only owner can set reward amount
    require(msg.sender == contract_owner,"Only owner can set reward amount");
    reward_amount = amount;

    emit RewardAmountChanged(amount);
    
  }

  //store report 
  function store_reportHash(string memory reportHash) public {
    //Only owner can store reportHash
    require(msg.sender == contract_owner,"Only owner can store report");

    require(report_is_stored[reportHash]== false,"The report has been stored");

    //store reportHash
    report_is_stored[reportHash] = true;
   
    emit ReportStored(reportHash);
  }

   //store watch id
  function store_watch(string memory watch_id) public {
        //Only owner can transfer funds
    require(msg.sender == contract_owner,"Only owner can store owner");
    require(watch_is_stored[watch_id] == false,"The watch has been stored");

    //store watch and set reward_time is now
    watch_is_stored[watch_id] = true;
    reward_time[watch_id] = block.timestamp;

    emit WatchStored(watch_id);
  }

  //get next reward time
  function get_next_reward_time(string memory watch_id) view public returns(uint) {

    return reward_time[watch_id] + 5; //86400
  }

  //get contract balance
  function get_contract_balance(IERC20 tokenContractAddress) public view returns (uint) {
    //get erc20 token balance
    uint256 erc20balance = tokenContractAddress.balanceOf(address(this));
    return erc20balance;
  }

  //reward token
  //bug 1 amount
  function transfer_erc20(IERC20 tokenContractAddress, string memory watch_id,string memory reportHash,address receiveAddress) public {

    //set amount
    uint amount; 
    amount = reward_amount;

    //verify watch
    require(watch_is_stored[watch_id]== true,"Your watch id is invalid");
    
    //get system time
    system_time = block.timestamp;

    //judege last reward time
    require(get_next_reward_time(watch_id) <= system_time,"Wear the watch for less than 24 hours");

    //duplicate reward varify
    require(report_is_stored[reportHash] == true,"Invalid report");

    //get erc20 token balance
    uint256 erc20balance = tokenContractAddress.balanceOf(address(this));
    require(amount <= erc20balance,"Contract balance is low");

    //transfer
    tokenContractAddress.transfer(receiveAddress,amount);
    emit TransferSent(msg.sender,receiveAddress,amount);

    //change reportHash invalid 
    report_is_stored[reportHash] = false;
    reward_time[watch_id]=block.timestamp;


    amount = 0;

  }

}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_report","type":"string"}],"name":"ReportStored","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RewardAmountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TransferReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_destAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TransferSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_watch_id","type":"string"}],"name":"WatchStored","type":"event"},{"inputs":[],"name":"contract_balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contract_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenContractAddress","type":"address"}],"name":"get_contract_balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"watch_id","type":"string"}],"name":"get_next_reward_time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"report_is_stored","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reward_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"set_reward_amount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"reportHash","type":"string"}],"name":"store_reportHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"watch_id","type":"string"}],"name":"store_watch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenContractAddress","type":"address"},{"internalType":"string","name":"watch_id","type":"string"},{"internalType":"string","name":"reportHash","type":"string"},{"internalType":"address","name":"receiveAddress","type":"address"}],"name":"transfer_erc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"watch_is_stored","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Contract Creation Code

6080604052600436106100a05760003560e01c8063592e6afd11610064578063592e6afd146101d15780638bfbdd341461020e578063b55dd4161461024b578063c4ecb6c214610288578063c91d32ff146102b1578063c9eb486f146102da576100f9565b8063057440d3146100fe5780630fd8d607146101295780632381a60e14610152578063384f58eb1461017d5780634aecff7f146101a8576100f9565b366100f95734600160008282546100b79190611231565b925050819055507ff1b03f708b9c39f453fe3f0cef84164c7d6f7df836df0796e1e9c2bce6ee397e33346040516100ef929190611013565b60405180910390a1005b600080fd5b34801561010a57600080fd5b50610113610317565b6040516101209190611199565b60405180910390f35b34801561013557600080fd5b50610150600480360381019061014b9190610d86565b61031d565b005b34801561015e57600080fd5b506101676103ec565b6040516101749190611199565b60405180910390f35b34801561018957600080fd5b506101926103f2565b60405161019f9190610fc1565b60405180910390f35b3480156101b457600080fd5b506101cf60048036038101906101ca9190610d45565b610416565b005b3480156101dd57600080fd5b506101f860048036038101906101f39190610d45565b6105aa565b6040516102059190611199565b60405180910390f35b34801561021a57600080fd5b5061023560048036038101906102309190610c89565b6105dd565b6040516102429190611199565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d9190610d45565b610674565b60405161027f919061103c565b60405180910390f35b34801561029457600080fd5b506102af60048036038101906102aa9190610d45565b6106aa565b005b3480156102bd57600080fd5b506102d860048036038101906102d39190610cb2565b61081b565b005b3480156102e657600080fd5b5061030160048036038101906102fc9190610d45565b610b59565b60405161030e919061103c565b60405180910390f35b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a2906110d9565b60405180910390fd5b806002819055507f694305e46f4c8e70a4418b46e8dcfc297246dc2c4ac63e60cfb2c1970d3a1373816040516103e19190611199565b60405180910390a150565b60025481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049b906110b9565b60405180910390fd5b600015156003826040516104b89190610faa565b908152602001604051809103902060009054906101000a900460ff16151514610516576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050d90611079565b60405180910390fd5b60016003826040516105289190610faa565b908152602001604051809103902060006101000a81548160ff0219169083151502179055504260058260405161055e9190610faa565b9081526020016040518091039020819055507f0dbb74e5cfdcfc213e3be2eed25fb880a54b4b943c542fe2428eda5efb47c70d8160405161059f9190611057565b60405180910390a150565b6000600580836040516105bd9190610faa565b9081526020016040518091039020546105d69190611231565b9050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106199190610fc1565b60206040518083038186803b15801561063157600080fd5b505afa158015610645573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106699190610daf565b905080915050919050565b6003818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072f90611139565b60405180910390fd5b6000151560048260405161074c9190610faa565b908152602001604051809103902060009054906101000a900460ff161515146107aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a190611119565b60405180910390fd5b60016004826040516107bc9190610faa565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507f45df57b2e0855df995eef5ff2699c545cd83ef1a251c3dfe0cabe379afed1b21816040516108109190611057565b60405180910390a150565b60006002549050600115156003856040516108369190610faa565b908152602001604051809103902060009054906101000a900460ff16151514610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088b90611179565b60405180910390fd5b426006819055506006546108a7856105aa565b11156108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df90611159565b60405180910390fd5b600115156004846040516108fc9190610faa565b908152602001604051809103902060009054906101000a900460ff1615151461095a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610951906110f9565b60405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109959190610fc1565b60206040518083038186803b1580156109ad57600080fd5b505afa1580156109c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e59190610daf565b905080821115610a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2190611099565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401610a65929190611013565b602060405180830381600087803b158015610a7f57600080fd5b505af1158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190610c60565b507ffda3a3e0e1479b43cb1c701f7576187f4c4ad80768d627387e00184302f7d88e338484604051610aeb93929190610fdc565b60405180910390a16000600485604051610b059190610faa565b908152602001604051809103902060006101000a81548160ff02191690831515021790555042600586604051610b3b9190610faa565b90815260200160405180910390208190555060009150505050505050565b6004818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6000610ba2610b9d846111d9565b6111b4565b905082815260208101848484011115610bba57600080fd5b610bc58482856112e1565b509392505050565b600081359050610bdc8161155a565b92915050565b600081519050610bf181611571565b92915050565b600081359050610c0681611588565b92915050565b600082601f830112610c1d57600080fd5b8135610c2d848260208601610b8f565b91505092915050565b600081359050610c458161159f565b92915050565b600081519050610c5a8161159f565b92915050565b600060208284031215610c7257600080fd5b6000610c8084828501610be2565b91505092915050565b600060208284031215610c9b57600080fd5b6000610ca984828501610bf7565b91505092915050565b60008060008060808587031215610cc857600080fd5b6000610cd687828801610bf7565b945050602085013567ffffffffffffffff811115610cf357600080fd5b610cff87828801610c0c565b935050604085013567ffffffffffffffff811115610d1c57600080fd5b610d2887828801610c0c565b9250506060610d3987828801610bcd565b91505092959194509250565b600060208284031215610d5757600080fd5b600082013567ffffffffffffffff811115610d7157600080fd5b610d7d84828501610c0c565b91505092915050565b600060208284031215610d9857600080fd5b6000610da684828501610c36565b91505092915050565b600060208284031215610dc157600080fd5b6000610dcf84828501610c4b565b91505092915050565b610de181611287565b82525050565b610df081611299565b82525050565b6000610e018261120a565b610e0b8185611215565b9350610e1b8185602086016112f0565b610e24816113b2565b840191505092915050565b6000610e3a8261120a565b610e448185611226565b9350610e548185602086016112f0565b80840191505092915050565b6000610e6d601983611215565b9150610e78826113c3565b602082019050919050565b6000610e90601783611215565b9150610e9b826113ec565b602082019050919050565b6000610eb3601a83611215565b9150610ebe82611415565b602082019050919050565b6000610ed6602083611215565b9150610ee18261143e565b602082019050919050565b6000610ef9600e83611215565b9150610f0482611467565b602082019050919050565b6000610f1c601a83611215565b9150610f2782611490565b602082019050919050565b6000610f3f601b83611215565b9150610f4a826114b9565b602082019050919050565b6000610f62602583611215565b9150610f6d826114e2565b604082019050919050565b6000610f85601883611215565b9150610f9082611531565b602082019050919050565b610fa4816112d7565b82525050565b6000610fb68284610e2f565b915081905092915050565b6000602082019050610fd66000830184610dd8565b92915050565b6000606082019050610ff16000830186610dd8565b610ffe6020830185610dd8565b61100b6040830184610f9b565b949350505050565b60006040820190506110286000830185610dd8565b6110356020830184610f9b565b9392505050565b60006020820190506110516000830184610de7565b92915050565b600060208201905081810360008301526110718184610df6565b905092915050565b6000602082019050818103600083015261109281610e60565b9050919050565b600060208201905081810360008301526110b281610e83565b9050919050565b600060208201905081810360008301526110d281610ea6565b9050919050565b600060208201905081810360008301526110f281610ec9565b9050919050565b6000602082019050818103600083015261111281610eec565b9050919050565b6000602082019050818103600083015261113281610f0f565b9050919050565b6000602082019050818103600083015261115281610f32565b9050919050565b6000602082019050818103600083015261117281610f55565b9050919050565b6000602082019050818103600083015261119281610f78565b9050919050565b60006020820190506111ae6000830184610f9b565b92915050565b60006111be6111cf565b90506111ca8282611323565b919050565b6000604051905090565b600067ffffffffffffffff8211156111f4576111f3611383565b5b6111fd826113b2565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061123c826112d7565b9150611247836112d7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561127c5761127b611354565b5b828201905092915050565b6000611292826112b7565b9050919050565b60008115159050919050565b60006112b082611287565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561130e5780820151818401526020810190506112f3565b8381111561131d576000848401525b50505050565b61132c826113b2565b810181811067ffffffffffffffff8211171561134b5761134a611383565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f54686520776174636820686173206265656e2073746f72656400000000000000600082015250565b7f436f6e74726163742062616c616e6365206973206c6f77000000000000000000600082015250565b7f4f6e6c79206f776e65722063616e2073746f7265206f776e6572000000000000600082015250565b7f4f6e6c79206f776e65722063616e207365742072657761726420616d6f756e74600082015250565b7f496e76616c6964207265706f7274000000000000000000000000000000000000600082015250565b7f546865207265706f727420686173206265656e2073746f726564000000000000600082015250565b7f4f6e6c79206f776e65722063616e2073746f7265207265706f72740000000000600082015250565b7f576561722074686520776174636820666f72206c657373207468616e2032342060008201527f686f757273000000000000000000000000000000000000000000000000000000602082015250565b7f596f757220776174636820696420697320696e76616c69640000000000000000600082015250565b61156381611287565b811461156e57600080fd5b50565b61157a81611299565b811461158557600080fd5b50565b611591816112a5565b811461159c57600080fd5b50565b6115a8816112d7565b81146115b357600080fd5b5056fea26469706673582212207bd8fcd5933cdb2e5a52b30d8c6f8d98b174d3abb2cdc9101a1e92269bcb84bc64736f6c63430008040033

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