ETH Price: $2,371.36 (+2.53%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Submit Initial R...1472266602026-02-02 17:08:172 mins ago1770052097IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000174750.00003629
Submit Initial R...1472266232026-02-02 17:07:033 mins ago1770052023IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000180670.00001288
Submit Initial R...1472265632026-02-02 17:05:035 mins ago1770051903IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000173690.00003616
Submit Initial R...1472264642026-02-02 17:01:458 mins ago1770051705IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000163910.00003661
Submit Initial R...1472263712026-02-02 16:58:3911 mins ago1770051519IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000170730.00003654
Submit Initial R...1472263062026-02-02 16:56:2913 mins ago1770051389IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000160450.00001336
Submit Initial R...1472262782026-02-02 16:55:3314 mins ago1770051333IN
0xF07c0874...0bE8Ce98c
0 ETH0.000000017260.00003657
Submit Initial R...1472261932026-02-02 16:52:4317 mins ago1770051163IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000183530.00003679
Submit Initial R...1472260972026-02-02 16:49:3120 mins ago1770050971IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000181810.00003668
Submit Initial R...1472260192026-02-02 16:46:5523 mins ago1770050815IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000182260.00001394
Submit Initial R...1472260012026-02-02 16:46:1924 mins ago1770050779IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000183520.00003702
Submit Initial R...1472259042026-02-02 16:43:0527 mins ago1770050585IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000183990.00003675
Submit Initial R...1472258082026-02-02 16:39:5330 mins ago1770050393IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000184630.00003675
Submit Initial R...1472257212026-02-02 16:36:5933 mins ago1770050219IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000191290.00003669
Submit Initial R...1472257092026-02-02 16:36:3533 mins ago1770050195IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000205570.0000121
Submit Initial R...1472256262026-02-02 16:33:4936 mins ago1770050029IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000197570.00003688
Submit Initial R...1472255302026-02-02 16:30:3739 mins ago1770049837IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000201570.00003672
Submit Initial R...1472254372026-02-02 16:27:3142 mins ago1770049651IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000209530.00003667
Submit Initial R...1472254022026-02-02 16:26:2144 mins ago1770049581IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000260170.00001048
Submit Initial R...1472253402026-02-02 16:24:1746 mins ago1770049457IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000214170.00003663
Submit Initial R...1472252532026-02-02 16:21:2349 mins ago1770049283IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000205210.00003647
Submit Initial R...1472251632026-02-02 16:18:2352 mins ago1770049103IN
0xF07c0874...0bE8Ce98c
0 ETH0.00000002170.00003648
Submit Initial R...1472250972026-02-02 16:16:1154 mins ago1770048971IN
0xF07c0874...0bE8Ce98c
0 ETH0.000000026590.00001073
Submit Initial R...1472250672026-02-02 16:15:1155 mins ago1770048911IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000232810.00003658
Submit Initial R...1472249822026-02-02 16:12:2158 mins ago1770048741IN
0xF07c0874...0bE8Ce98c
0 ETH0.0000000239780.00003669
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1472153642026-02-02 10:51:456 hrs ago1770029505
0xF07c0874...0bE8Ce98c
0.00000246015246 ETH
1472153592026-02-02 10:51:356 hrs ago1770029495
0xF07c0874...0bE8Ce98c
0.00000028921831 ETH
1472153562026-02-02 10:51:296 hrs ago1770029489
0xF07c0874...0bE8Ce98c
0.00000274937077 ETH
1472130282026-02-02 9:33:537 hrs ago1770024833
0xF07c0874...0bE8Ce98c
0.000001903891767 ETH
1472130262026-02-02 9:33:497 hrs ago1770024829
0xF07c0874...0bE8Ce98c
0.000000853436675 ETH
1472130252026-02-02 9:33:477 hrs ago1770024827
0xF07c0874...0bE8Ce98c
0.000002757328443 ETH
1472126022026-02-02 9:19:417 hrs ago1770023981
0xF07c0874...0bE8Ce98c
0.000002240699136 ETH
1472126002026-02-02 9:19:377 hrs ago1770023977
0xF07c0874...0bE8Ce98c
0.000000506308382 ETH
1472125982026-02-02 9:19:337 hrs ago1770023973
0xF07c0874...0bE8Ce98c
0.000002747007519 ETH
1472123222026-02-02 9:10:218 hrs ago1770023421
0xF07c0874...0bE8Ce98c
0.000002123925577 ETH
1472123202026-02-02 9:10:178 hrs ago1770023417
0xF07c0874...0bE8Ce98c
0.000000646590199 ETH
1472123152026-02-02 9:10:078 hrs ago1770023407
0xF07c0874...0bE8Ce98c
0.000002770515777 ETH
1472096052026-02-02 7:39:479 hrs ago1770017987
0xF07c0874...0bE8Ce98c
0.000001218199123 ETH
1472096032026-02-02 7:39:439 hrs ago1770017983
0xF07c0874...0bE8Ce98c
0.000000898450876 ETH
1472096012026-02-02 7:39:399 hrs ago1770017979
0xF07c0874...0bE8Ce98c
0.00000211665 ETH
1472091572026-02-02 7:24:519 hrs ago1770017091
0xF07c0874...0bE8Ce98c
0.000001757410239 ETH
1472091542026-02-02 7:24:459 hrs ago1770017085
0xF07c0874...0bE8Ce98c
0.00000036508976 ETH
1472091532026-02-02 7:24:439 hrs ago1770017083
0xF07c0874...0bE8Ce98c
0.0000021225 ETH
1472090932026-02-02 7:22:439 hrs ago1770016963
0xF07c0874...0bE8Ce98c
0.00000141732672 ETH
1472090912026-02-02 7:22:399 hrs ago1770016959
0xF07c0874...0bE8Ce98c
0.000000706223279 ETH
1472090882026-02-02 7:22:339 hrs ago1770016953
0xF07c0874...0bE8Ce98c
0.00000212355 ETH
1472080842026-02-02 6:49:0510 hrs ago1770014945
0xF07c0874...0bE8Ce98c
0.000001182689494 ETH
1472080822026-02-02 6:49:0110 hrs ago1770014941
0xF07c0874...0bE8Ce98c
0.000000975210505 ETH
1472080812026-02-02 6:48:5910 hrs ago1770014939
0xF07c0874...0bE8Ce98c
0.0000021579 ETH
1472077622026-02-02 6:38:2110 hrs ago1770014301
0xF07c0874...0bE8Ce98c
0.000000725956726 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
openOracleBounty

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 190 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {IOpenOracle} from "./interfaces/IOpenOracle.sol";

/* *****************************************************
 *      openOracle Initial Report Bounty Contract      *
 ***************************************************** */
contract openOracleBounty is ReentrancyGuard {
    using SafeERC20 for IERC20;

    /* immutables */
    IOpenOracle public immutable oracle;

    /* -------- EVENTS -------- */
    event BountyInitialReportSubmitted(
        uint256 indexed reportId,
        uint256 bountyPaid,
        address bountyToken
    );

    event BountyRecalled(
        uint256 indexed reportId,
        uint256 amt,
        address bountyToken
    );

    event BountyCreated(
        uint256 indexed reportId,
        uint256 totalAmtDeposited,
        uint256 bountyStartAmt,
        uint256 maxRounds,
        uint256 bountyMultiplier,
        uint256 blockTimestamp,
        bool timeType,
        uint256 startTime,
        uint256 roundLength,
        address bountyToken
    );

    event BountyRetargeted(
        uint256 indexed newReportId,
        uint256 oldReportId,
        uint256 totalAmtDeposited,
        uint256 bountyStartAmt,
        uint256 maxRounds,
        uint256 bountyMultiplier,
        uint256 blockTimestamp,
        bool timeType,
        uint256 startTime,
        uint256 roundLength,
        address bountyToken
    );

    error InvalidInput(string parameter);

    //reportId to bounty
    mapping (uint256 => Bounties) public Bounty;

    //temp holding
    mapping (address => mapping(address => uint256)) public tempHolding;

    struct Bounties {
        uint256 totalAmtDeposited;
        uint256 bountyStartAmt;
        uint256 bountyClaimed;
        uint256 start;
        uint256 forwardStartTime;
        uint256 roundLength;
        uint256 recallUnlockAt;
        address payable creator;
        address editor;
        address bountyToken;
        uint16 bountyMultiplier;
        uint16 maxRounds;
        bool claimed;
        bool recalled;
        bool timeType;
        bool recallOnClaim;
    }

    struct oracleParams {
        uint256 exactToken1Report;
        uint256 escalationHalt;
        uint256 fee;
        uint256 settlerReward;
        address token1;
        uint48 settlementTime;
        address token2;
        bool timeType;
        uint24 feePercentage;
        uint24 protocolFee;
        uint16 multiplier;
        uint24 disputeDelay;//reportMeta end
        uint256 currentAmount1;
        uint256 currentAmount2;//reportStatus end
        uint32 callbackGasLimit;
        address protocolFeeRecipient;
        bool keepFee; //extraData end
    }

    constructor(address oracle_) {
        require(oracle_ != address(0), "oracle addr 0");
        oracle = IOpenOracle(oracle_);
    }

    // overload to let user choose a start timestamp or block number for bounty
    // see _createOracleBounty for NatSpec
    function createOracleBounty(uint256 reportId, uint256 bountyStartAmt, address creator, address editor, uint16 bountyMultiplier, uint16 maxRounds, bool timeType, uint256 start, address bountyToken, uint256 maxAmount, uint256 roundLength, bool recallOnClaim, uint48 recallDelay) external payable nonReentrant {
        _createOracleBounty(reportId, bountyStartAmt, creator, editor, bountyMultiplier, maxRounds, timeType, start, 0, bountyToken, maxAmount, roundLength, recallOnClaim, recallDelay);
    }

    // overload to automatically set start to current block number or time
    // see _createOracleBounty for NatSpec
    function createOracleBounty(uint256 reportId, uint256 bountyStartAmt, address creator, address editor, uint16 bountyMultiplier, uint16 maxRounds, bool timeType, address bountyToken, uint256 maxAmount, uint256 roundLength, bool recallOnClaim, uint48 recallDelay) external payable nonReentrant {
        uint256 start = timeType ? block.timestamp : block.number;
        _createOracleBounty(reportId, bountyStartAmt, creator, editor, bountyMultiplier, maxRounds, timeType, start, 0, bountyToken, maxAmount, roundLength, recallOnClaim, recallDelay);
    }

    // overload to automatically set start to current block number or time plus forward start time
    // see _createOracleBounty for NatSpec
    function createOracleBountyFwd(uint256 reportId, uint256 bountyStartAmt, address creator, address editor, uint16 bountyMultiplier, uint16 maxRounds, bool timeType, uint256 forwardStartTime, address bountyToken, uint256 maxAmount, uint256 roundLength, bool recallOnClaim, uint48 recallDelay) external payable nonReentrant {
        uint256 start = timeType ? block.timestamp : block.number;
        start += forwardStartTime;
        _createOracleBounty(reportId, bountyStartAmt, creator, editor, bountyMultiplier, maxRounds, timeType, start, forwardStartTime, bountyToken, maxAmount, roundLength, recallOnClaim, recallDelay);
    }

    /**
     * @notice Exponential bounty for an initial reporter in openOracle. Must be called atomically with and just after createReportInstance() in the oracle
     * @param reportId The unique identifier for the openOracle report instance. Must be oracle.nextReportId() - 1
     * @param bountyStartAmt Starting bounty amount in wei
     * @param creator Address to receive any unclaimed wei back
     * @param editor Optional address that can redirect your bounty to a new reportId
     * @param bountyMultiplier Per-block or per-second exponential increase in bounty from start amount where 15000 = 1.5x
     * @param maxRounds Time window of seconds or blocks over which you allow the bounty to exponentially increase
     * @param timeType True means time is measured in seconds, false means blocks
     * @param start Time past which the bounty starts escalating
     * @param bountyToken Token address bounty is paid in. address(0) means bounty paid in ETH.
     * @param maxAmount Maximum bounty paid
     * @param roundLength Time length of per-round bounty escalation
     * @param recallOnClaim If true, bounty is recalled to creator on claim (successful initial report)
     * @param recallDelay Delay period where a recall cannot be submitted so long as there has been no initial report
     */
    function _createOracleBounty(uint256 reportId, uint256 bountyStartAmt, address creator, address editor, uint16 bountyMultiplier, uint16 maxRounds, bool timeType, uint256 start, uint256 forwardStartTime, address bountyToken, uint256 maxAmount, uint256 roundLength, bool recallOnClaim, uint48 recallDelay) internal {

        if (maxRounds == 0 || bountyStartAmt == 0 || bountyMultiplier == 0 || maxAmount == 0 || roundLength == 0) revert InvalidInput("amounts cannot = 0");
        if (maxRounds > 100) revert InvalidInput("too many rounds");
        if (Bounty[reportId].maxRounds > 0) revert InvalidInput("reportId has bounty");      
        if (bountyToken == address(0) && maxAmount != msg.value) revert InvalidInput("msg.value wrong");
        if (bountyStartAmt > maxAmount) revert InvalidInput("start > max");
        if (reportId != oracle.nextReportId() - 1) revert InvalidInput("wrong reportId"); // create report instance right before creating bounty
        if (oracle.reportStatus(reportId).currentReporter != address(0)) revert InvalidInput("reportId has a report");

        if (timeType ? block.timestamp > start : block.number > start) revert InvalidInput("startHeight too low");
        if (bountyMultiplier < 10001) revert InvalidInput("bountyMultiplier too low");
        if (bountyToken != address(0) && msg.value > 0) revert InvalidInput("msg.value with wrong bountyToken");

        Bounty[reportId].totalAmtDeposited = maxAmount;
        Bounty[reportId].bountyStartAmt = bountyStartAmt;
        Bounty[reportId].creator = payable(creator);
        Bounty[reportId].editor = editor;
        Bounty[reportId].bountyToken = bountyToken;
        Bounty[reportId].bountyMultiplier = bountyMultiplier;
        Bounty[reportId].maxRounds = maxRounds;
        Bounty[reportId].timeType = timeType;
        Bounty[reportId].start = start;
        Bounty[reportId].forwardStartTime = forwardStartTime;
        Bounty[reportId].roundLength = roundLength;
        Bounty[reportId].recallOnClaim = recallOnClaim;
        Bounty[reportId].recallUnlockAt = timeType ? recallDelay + block.timestamp : recallDelay + block.number;

        if (bountyToken != address(0)) {
            IERC20(bountyToken).safeTransferFrom(msg.sender, address(this), maxAmount);
        }

        emit BountyCreated(reportId, maxAmount, bountyStartAmt, maxRounds, bountyMultiplier, block.timestamp, timeType, start, roundLength, bountyToken);
    }

    /**
     * @notice Allows bounty creator or editor to recall either the full or unclaimed portion of a bounty back to the creator.
     * @param reportId The unique identifier for the openOracle report instance for which there is a bounty
     */
    function recallBounty(uint256 reportId) external nonReentrant {
        Bounties storage bounty = Bounty[reportId];

        if (bounty.maxRounds == 0) revert InvalidInput("bounty doesnt exist");        
        if (bounty.recalled) revert InvalidInput("bounty already recalled");
        if (msg.sender != bounty.creator && msg.sender != bounty.editor) revert InvalidInput("wrong sender");

        uint256 time = bounty.timeType ? block.timestamp : block.number;
        if (time <= bounty.recallUnlockAt && !bounty.claimed) revert InvalidInput("recall delay");

        uint256 amount;

        if (bounty.claimed) {
            amount = bounty.totalAmtDeposited - bounty.bountyClaimed;
            bounty.recalled = true;
            if (bounty.bountyToken == address(0)){
                _sendEth(bounty.creator, amount);
            } else {
                IERC20(bounty.bountyToken).safeTransfer(bounty.creator, amount);
            }
            emit BountyRecalled(reportId, amount, bounty.bountyToken);
        } else {
            bounty.recalled = true;
            if (bounty.bountyToken == address(0)){
                _sendEth(bounty.creator, bounty.totalAmtDeposited);
            } else {
                IERC20(bounty.bountyToken).safeTransfer(bounty.creator, bounty.totalAmtDeposited);
            }
            emit BountyRecalled(reportId, bounty.totalAmtDeposited, bounty.bountyToken);
        }

    }

    /**
     * @notice Allows bounty editor to redirect the full or unclaimed bounty to a new reportId. Must be called atomically with and just after createReportInstance() in the oracle
     * @param reportId The unique identifier for the openOracle report instance for which there is a bounty
     * @param newReportId The unique identifier for the new openOracle report instance for which a bounty is desired. Must be oracle.nextReportId() - 1.
     */
    function editBounty(uint256 reportId, uint256 newReportId) external nonReentrant {
        Bounties storage bounty = Bounty[reportId];
        if (msg.sender != bounty.editor) revert InvalidInput("wrong caller");
        if (newReportId != oracle.nextReportId() - 1) revert InvalidInput("wrong reportId"); // create report instance right before creating bounty
        if (oracle.reportStatus(newReportId).currentReporter != address(0)) revert InvalidInput("reportId has a report");
        if (Bounty[newReportId].maxRounds > 0) revert InvalidInput("newReportId has bounty");
        if (bounty.recalled) revert InvalidInput("bounty recalled");
        if (bounty.maxRounds == 0) revert InvalidInput("bounty doesnt exist");

        uint256 amount;
        Bounty[newReportId] = Bounty[reportId];
        amount = bounty.claimed ? bounty.totalAmtDeposited - bounty.bountyClaimed : bounty.totalAmtDeposited;

        if (bounty.claimed){
            Bounty[newReportId].totalAmtDeposited = amount;

            if (amount < bounty.bountyStartAmt) {
                Bounty[newReportId].bountyStartAmt = amount;
            }

            Bounty[newReportId].bountyClaimed = 0;
            Bounty[newReportId].claimed = false;
        }

            Bounty[newReportId].start = bounty.timeType ? block.timestamp + bounty.forwardStartTime : block.number + bounty.forwardStartTime;
            Bounty[reportId].recalled = true;
            Bounty[reportId].totalAmtDeposited = 0;
            emit BountyRetargeted(newReportId, reportId, amount, Bounty[newReportId].bountyStartAmt, bounty.maxRounds, bounty.bountyMultiplier, block.timestamp, bounty.timeType, Bounty[newReportId].start, bounty.roundLength, bounty.bountyToken);
    }

    /**
     * @notice Submits the initial price report with a custom reporter address and claims the bounty to this address. Amounts use smallest unit for a given ERC-20.
     * @param reportId The unique identifier for the report
     * @param p Oracle parameter data from struct oracleParams
     * @param amount1 Amount of token1 (must equal exactToken1Report)
     * @param amount2 Choose the amount of token2 that equals amount1 in value
     * @param stateHash State hash for a given reportId in the oracle game
     * @param reporter The address that will receive tokens back when this report is settled or disputed
     * @param timestamp Current block.timestamp
     * @param blockNumber Current block number
     * @param timestampBound Transaction will revert if it lands +/- this number of seconds outside passed timestamp
     * @param blockNumber Transaction will revert if it lands +/- this number of blocks outside passed blockNumber
     * @dev Tokens are pulled from msg.sender but will be returned to reporter address
     * @dev This overload enables contracts to submit reports on behalf of users
     */
    function submitInitialReport(uint256 reportId, oracleParams calldata p, uint256 amount1, uint256 amount2, bytes32 stateHash, address reporter, uint256 timestamp, uint256 blockNumber, uint256 timestampBound, uint256 blockNumberBound) external nonReentrant {
        if (block.timestamp > timestamp + timestampBound || block.timestamp < timestamp - timestampBound) revert InvalidInput("timestamp");
        if (block.number > blockNumber + blockNumberBound || block.number < blockNumber - blockNumberBound) revert InvalidInput("block number");
        if (!validate(reportId, p)) revert InvalidInput("params dont match");
        _submitInitialReport(reportId, amount1, amount2, stateHash, reporter);
    }

    /**
     * @notice Submits the initial price report and claims the bounty. Amounts use smallest unit for a given ERC-20.
     * @param reportId The unique identifier for the report
     * @param p Oracle parameter data from struct oracleParams which is checked against on-chain oracle state.
     * @param amount1 Amount of token1 (must equal exactToken1Report)
     * @param amount2 Choose the amount of token2 that equals amount1 in value
     * @param stateHash State hash for a given reportId in the oracle game
     * @param timestamp Current block.timestamp
     * @param blockNumber Current block number
     * @param timestampBound Transaction will revert if it lands +/- this number of seconds outside passed timestamp
     * @param blockNumber Transaction will revert if it lands +/- this number of blocks outside passed blockNumber
     * @dev Tokens are pulled from msg.sender and will be returned to msg.sender when settled or disputed
     */
    function submitInitialReport(uint256 reportId, oracleParams calldata p, uint256 amount1, uint256 amount2, bytes32 stateHash, uint256 timestamp, uint256 blockNumber, uint256 timestampBound, uint256 blockNumberBound) external nonReentrant {
        if (block.timestamp > timestamp + timestampBound || block.timestamp < timestamp - timestampBound) revert InvalidInput("timestamp");
        if (block.number > blockNumber + blockNumberBound || block.number < blockNumber - blockNumberBound) revert InvalidInput("block number");
        if (!validate(reportId, p)) revert InvalidInput("params dont match");
        _submitInitialReport(reportId, amount1, amount2, stateHash, msg.sender);
    }

    /**
     * @notice Submits the initial price report for a given report ID and claims the bounty. Amounts use smallest unit for a given ERC-20.
               No validation other than stateHash is performed
     * @param reportId The unique identifier for the report
     * @param amount1 Amount of token1 (must equal exactToken1Report)
     * @param amount2 Choose the amount of token2 that equals amount1 in value
     * @param stateHash State hash for a given reportId in the oracle game
     * @dev Tokens are pulled from msg.sender and will be returned to msg.sender when settled or disputed
     */
    function submitInitialReport(uint256 reportId, uint256 amount1, uint256 amount2, bytes32 stateHash) external nonReentrant {
        _submitInitialReport(reportId, amount1, amount2, stateHash, msg.sender);
    }

    /**
     * @notice Submits the initial price report with a custom reporter address and claims the bounty to this address. Amounts use smallest unit for a given ERC-20.
               No validation other than stateHash is performed
     * @param reportId The unique identifier for the report
     * @param amount1 Amount of token1 (must equal exactToken1Report)
     * @param amount2 Choose the amount of token2 that equals amount1 in value
     * @param stateHash State hash for a given reportId in the oracle game
     * @param reporter The address that will receive tokens back when this report is settled or disputed
     * @dev Tokens are pulled from msg.sender and will be returned to reporter when settled or disputed
     */
    function submitInitialReport(uint256 reportId, uint256 amount1, uint256 amount2, bytes32 stateHash, address reporter) external nonReentrant {
        _submitInitialReport(reportId, amount1, amount2, stateHash, reporter);
    }

    function _submitInitialReport(uint256 reportId, uint256 amount1, uint256 amount2, bytes32 stateHash, address reporter) internal {
        Bounties storage bounty = Bounty[reportId];

        if (bounty.recalled) revert InvalidInput("bounty recalled");
        if (bounty.claimed) revert InvalidInput("bounty claimed");
        if (bounty.maxRounds == 0) revert InvalidInput("bounty doesnt exist");

        address token1 = oracle.reportMeta(reportId).token1;
        address token2 = oracle.reportMeta(reportId).token2;

        uint256 bountyAmt = calcBounty(bounty.start, bounty.bountyStartAmt, bounty.maxRounds, bounty.bountyMultiplier, bounty.totalAmtDeposited, bounty.timeType, bounty.roundLength);
        bounty.bountyClaimed = bountyAmt;
        bounty.claimed = true;

        IERC20(token1).safeTransferFrom(msg.sender, address(this), amount1);
        IERC20(token2).safeTransferFrom(msg.sender, address(this), amount2);

        IERC20(token1).forceApprove(address(oracle), amount1);
        IERC20(token2).forceApprove(address(oracle), amount2);

        oracle.submitInitialReport(reportId, amount1, amount2, stateHash, reporter);

        IERC20(token1).forceApprove(address(oracle), 0);
        IERC20(token2).forceApprove(address(oracle), 0);

        if (bounty.bountyToken == address(0)){
            _sendEth(payable(reporter), bountyAmt);
        } else {
            IERC20(bounty.bountyToken).safeTransfer(reporter, bountyAmt);
        }
        
        uint256 amount = bounty.totalAmtDeposited - bounty.bountyClaimed;

        if (bounty.recallOnClaim && amount > 0){
            bounty.recalled = true;
            if (bounty.bountyToken == address(0)){
                _sendEth(bounty.creator, amount);
            } else {
                _transferTokens(bounty.bountyToken, address(this), bounty.creator, amount);
            }
            emit BountyRecalled(reportId, amount, bounty.bountyToken);
        }

        emit BountyInitialReportSubmitted(reportId, bountyAmt, bounty.bountyToken);
    }

    /**
     * @notice Withdraws temp holdings for a specific token
     * @param tokenToGet The token address to withdraw tokens for
     */
    function getTempHolding(address tokenToGet, address _to) external nonReentrant {
        uint256 amount = tempHolding[_to][tokenToGet];
        if (amount > 0) {
            if (tokenToGet != address(0)){
                tempHolding[_to][tokenToGet] = 0;
                _transferTokens(tokenToGet, address(this), _to, amount);
            } else {
                tempHolding[_to][tokenToGet] = 0;
                _sendEth(payable(_to), amount);
            }
        }
    }

    function calcBounty(uint256 start, uint256 bountyStartAmt, uint256 maxRounds, uint256 bountyMultiplier, uint256 totalAmtDeposited, bool timeType, uint256 roundLength) internal view returns (uint256){

        uint256 currentTime = timeType ? block.timestamp : block.number;
        if (currentTime < start) revert InvalidInput("start time");

            uint256 rounds = (currentTime - start) / roundLength;
            if (rounds > maxRounds) {
                rounds = maxRounds;
            }

            uint256 bounty = bountyStartAmt;
            for (uint256 i = 0; i < rounds; i++) {
                bounty = (bounty * bountyMultiplier) / 10000;
            }

            if (bounty > totalAmtDeposited){
                bounty = totalAmtDeposited;
            }

            return bounty;

    }

    function validate(uint256 reportId, oracleParams calldata p) internal view returns (bool) {
        IOpenOracle.ReportMeta memory meta = oracle.reportMeta(reportId);
        IOpenOracle.ReportStatus memory status = oracle.reportStatus(reportId);
        IOpenOracle.extraReportData memory extra = oracle.extraData(reportId);

        //basic callbackGasLimit and settlement time checks
        if (meta.timeType && meta.settlementTime > 86400) return false;
        if (!meta.timeType && meta.settlementTime > 43200) return false;
        if (extra.callbackGasLimit > 1500000) return false;

        if (p.keepFee == false) return false;

        //oracle instance sanity checks
        if (p.exactToken1Report != meta.exactToken1Report) return false;
        if (p.keepFee != extra.keepFee) return false;

        if (p.escalationHalt != meta.escalationHalt) return false;
        if (p.fee != meta.fee) return false;
        if (p.settlerReward != meta.settlerReward) return false;
        if (p.token1 != meta.token1) return false;
        if (p.settlementTime != meta.settlementTime) return false;
        if (p.token2 != meta.token2) return false;
        if (p.timeType != meta.timeType) return false;
        if (p.feePercentage != meta.feePercentage) return false;
        if (p.protocolFee != meta.protocolFee) return false;
        if (p.multiplier != meta.multiplier) return false;
        if (p.disputeDelay != meta.disputeDelay) return false;

        if (p.currentAmount1 != status.currentAmount1) return false;
        if (p.currentAmount2 != status.currentAmount2) return false;

        if (p.callbackGasLimit != extra.callbackGasLimit) return false;
        if (p.protocolFeeRecipient != extra.protocolFeeRecipient) return false;

        return true;

    }


    /**
     * @dev Internal function to send ETH to a recipient
     */
    function _sendEth(address payable recipient, uint256 amount) internal {
        if (amount == 0) return;
        (bool success,) =  recipient.call{value: amount, gas: 40000}("");
        if (!success){
            tempHolding[recipient][address(0)] += amount;
        }
    }

    /**
     * @dev Internal function to handle token transfers.                
     */
    function _transferTokens(address token, address from, address to, uint256 amount) internal {
        if (amount == 0) return; // Gas optimization: skip zero transfers

        if (from == address(this)) {

            (bool success, bytes memory returndata) = token.call(
                    abi.encodeWithSelector(IERC20.transfer.selector, to, amount)
                );

            if (success && ((returndata.length > 0 && abi.decode(returndata, (bool))) || 
                (returndata.length == 0 && address(token).code.length > 0))) {
               return;
            }

            tempHolding[to][token] += amount;

        } else {
            IERC20(token).safeTransferFrom(from, to, amount);
        }
    }

    /**
     * @notice Returns bounty data for an array of reportIds
     * @param reportIds Array of report IDs to query
     * @return Array of Bounties structs corresponding to each reportId
     */
    function getBounties(uint256[] calldata reportIds) external view returns (Bounties[] memory) {
        Bounties[] memory results = new Bounties[](reportIds.length);
        for (uint256 i = 0; i < reportIds.length; i++) {
            results[i] = Bounty[reportIds[i]];
        }
        return results;
    }

    receive() external payable {

    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 3 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

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

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

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

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

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

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

interface IOpenOracle {
    struct disputeRecord {
        uint256 amount1;
        uint256 amount2;
        address tokenToSwap;
        uint48 reportTimestamp;
    }

    struct extraReportData {
        bytes32 stateHash;
        address callbackContract;
        uint32 numReports;
        uint32 callbackGasLimit;
        bytes4 callbackSelector;
        address protocolFeeRecipient;
        bool trackDisputes;
        bool keepFee;
    }

    struct ReportMeta {
        uint256 exactToken1Report;
        uint256 escalationHalt;
        uint256 fee;
        uint256 settlerReward;
        address token1;
        uint48 settlementTime;
        address token2;
        bool timeType;
        uint24 feePercentage;
        uint24 protocolFee;
        uint16 multiplier;
        uint24 disputeDelay;
    }

    struct ReportStatus {
        uint256 currentAmount1;
        uint256 currentAmount2;
        uint256 price;
        address payable currentReporter;
        uint48 reportTimestamp;
        uint48 settlementTimestamp;
        address payable initialReporter;
        uint48 lastReportOppoTime;
        bool disputeOccurred;
        bool isDistributed;
    }

    struct CreateReportParams {
        uint256 exactToken1Report;
        uint256 escalationHalt;
        uint256 settlerReward;
        address token1Address;
        uint48 settlementTime;
        uint24 disputeDelay;
        uint24 protocolFee;
        address token2Address;
        uint32 callbackGasLimit;
        uint24 feePercentage;
        uint16 multiplier;
        bool timeType;
        bool trackDisputes;
        bool keepFee;
        address callbackContract;
        bytes4 callbackSelector;
        address protocolFeeRecipient;
    }

    function createReportInstance(CreateReportParams calldata params) external payable returns (uint256 reportId);

    /* initial report overload with reporter */
    function submitInitialReport(
        uint256 reportId,
        uint256 amount1,
        uint256 amount2,
        bytes32 stateHash,
        address reporter
    ) external;

    function disputeAndSwap(
        uint256 reportId,
        address tokenToSwap,
        uint256 newAmount1,
        uint256 newAmount2,
        address disputer,
        uint256 amt2Expected,
        bytes32 stateHash
    ) external;

    function getProtocolFees(
        address tokenToGet
    ) external;

    function settle(uint256 id) external returns (uint256 price, uint256 settlementTimestamp);

    function nextReportId() external view returns (uint256);

    function reportMeta(uint256 id) external view returns (ReportMeta memory);

    function reportStatus(uint256 id) external view returns (ReportStatus memory);

    function extraData(uint256 id) external view returns (extraReportData memory);
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 190
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"oracle_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"parameter","type":"string"}],"name":"InvalidInput","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"reportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmtDeposited","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRounds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"blockTimestamp","type":"uint256"},{"indexed":false,"internalType":"bool","name":"timeType","type":"bool"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roundLength","type":"uint256"},{"indexed":false,"internalType":"address","name":"bountyToken","type":"address"}],"name":"BountyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"reportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyPaid","type":"uint256"},{"indexed":false,"internalType":"address","name":"bountyToken","type":"address"}],"name":"BountyInitialReportSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"reportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"address","name":"bountyToken","type":"address"}],"name":"BountyRecalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newReportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldReportId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmtDeposited","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRounds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"blockTimestamp","type":"uint256"},{"indexed":false,"internalType":"bool","name":"timeType","type":"bool"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roundLength","type":"uint256"},{"indexed":false,"internalType":"address","name":"bountyToken","type":"address"}],"name":"BountyRetargeted","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Bounty","outputs":[{"internalType":"uint256","name":"totalAmtDeposited","type":"uint256"},{"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"internalType":"uint256","name":"bountyClaimed","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"forwardStartTime","type":"uint256"},{"internalType":"uint256","name":"roundLength","type":"uint256"},{"internalType":"uint256","name":"recallUnlockAt","type":"uint256"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"address","name":"editor","type":"address"},{"internalType":"address","name":"bountyToken","type":"address"},{"internalType":"uint16","name":"bountyMultiplier","type":"uint16"},{"internalType":"uint16","name":"maxRounds","type":"uint16"},{"internalType":"bool","name":"claimed","type":"bool"},{"internalType":"bool","name":"recalled","type":"bool"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"bool","name":"recallOnClaim","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"editor","type":"address"},{"internalType":"uint16","name":"bountyMultiplier","type":"uint16"},{"internalType":"uint16","name":"maxRounds","type":"uint16"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"address","name":"bountyToken","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"roundLength","type":"uint256"},{"internalType":"bool","name":"recallOnClaim","type":"bool"},{"internalType":"uint48","name":"recallDelay","type":"uint48"}],"name":"createOracleBounty","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"editor","type":"address"},{"internalType":"uint16","name":"bountyMultiplier","type":"uint16"},{"internalType":"uint16","name":"maxRounds","type":"uint16"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"address","name":"bountyToken","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"roundLength","type":"uint256"},{"internalType":"bool","name":"recallOnClaim","type":"bool"},{"internalType":"uint48","name":"recallDelay","type":"uint48"}],"name":"createOracleBounty","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"editor","type":"address"},{"internalType":"uint16","name":"bountyMultiplier","type":"uint16"},{"internalType":"uint16","name":"maxRounds","type":"uint16"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"uint256","name":"forwardStartTime","type":"uint256"},{"internalType":"address","name":"bountyToken","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"roundLength","type":"uint256"},{"internalType":"bool","name":"recallOnClaim","type":"bool"},{"internalType":"uint48","name":"recallDelay","type":"uint48"}],"name":"createOracleBountyFwd","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"newReportId","type":"uint256"}],"name":"editBounty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"reportIds","type":"uint256[]"}],"name":"getBounties","outputs":[{"components":[{"internalType":"uint256","name":"totalAmtDeposited","type":"uint256"},{"internalType":"uint256","name":"bountyStartAmt","type":"uint256"},{"internalType":"uint256","name":"bountyClaimed","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"forwardStartTime","type":"uint256"},{"internalType":"uint256","name":"roundLength","type":"uint256"},{"internalType":"uint256","name":"recallUnlockAt","type":"uint256"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"address","name":"editor","type":"address"},{"internalType":"address","name":"bountyToken","type":"address"},{"internalType":"uint16","name":"bountyMultiplier","type":"uint16"},{"internalType":"uint16","name":"maxRounds","type":"uint16"},{"internalType":"bool","name":"claimed","type":"bool"},{"internalType":"bool","name":"recalled","type":"bool"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"bool","name":"recallOnClaim","type":"bool"}],"internalType":"struct openOracleBounty.Bounties[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenToGet","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"getTempHolding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOpenOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"}],"name":"recallBounty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"amount2","type":"uint256"},{"internalType":"bytes32","name":"stateHash","type":"bytes32"},{"internalType":"address","name":"reporter","type":"address"}],"name":"submitInitialReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"components":[{"internalType":"uint256","name":"exactToken1Report","type":"uint256"},{"internalType":"uint256","name":"escalationHalt","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"settlerReward","type":"uint256"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint48","name":"settlementTime","type":"uint48"},{"internalType":"address","name":"token2","type":"address"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"uint24","name":"feePercentage","type":"uint24"},{"internalType":"uint24","name":"protocolFee","type":"uint24"},{"internalType":"uint16","name":"multiplier","type":"uint16"},{"internalType":"uint24","name":"disputeDelay","type":"uint24"},{"internalType":"uint256","name":"currentAmount1","type":"uint256"},{"internalType":"uint256","name":"currentAmount2","type":"uint256"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"address","name":"protocolFeeRecipient","type":"address"},{"internalType":"bool","name":"keepFee","type":"bool"}],"internalType":"struct openOracleBounty.oracleParams","name":"p","type":"tuple"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"amount2","type":"uint256"},{"internalType":"bytes32","name":"stateHash","type":"bytes32"},{"internalType":"address","name":"reporter","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"timestampBound","type":"uint256"},{"internalType":"uint256","name":"blockNumberBound","type":"uint256"}],"name":"submitInitialReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"amount2","type":"uint256"},{"internalType":"bytes32","name":"stateHash","type":"bytes32"}],"name":"submitInitialReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reportId","type":"uint256"},{"components":[{"internalType":"uint256","name":"exactToken1Report","type":"uint256"},{"internalType":"uint256","name":"escalationHalt","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"settlerReward","type":"uint256"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint48","name":"settlementTime","type":"uint48"},{"internalType":"address","name":"token2","type":"address"},{"internalType":"bool","name":"timeType","type":"bool"},{"internalType":"uint24","name":"feePercentage","type":"uint24"},{"internalType":"uint24","name":"protocolFee","type":"uint24"},{"internalType":"uint16","name":"multiplier","type":"uint16"},{"internalType":"uint24","name":"disputeDelay","type":"uint24"},{"internalType":"uint256","name":"currentAmount1","type":"uint256"},{"internalType":"uint256","name":"currentAmount2","type":"uint256"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"address","name":"protocolFeeRecipient","type":"address"},{"internalType":"bool","name":"keepFee","type":"bool"}],"internalType":"struct openOracleBounty.oracleParams","name":"p","type":"tuple"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"amount2","type":"uint256"},{"internalType":"bytes32","name":"stateHash","type":"bytes32"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"timestampBound","type":"uint256"},{"internalType":"uint256","name":"blockNumberBound","type":"uint256"}],"name":"submitInitialReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"tempHolding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0346100cf57601f612df638819003918201601f19168301916001600160401b038311848410176100d4578084926020946040528339810103126100cf57516001600160a01b038116908190036100cf576001600055801561009a57608052604051612d0b90816100eb823960805181818161059e01528181610c5801528181610d9b01528181611c180152818161208e01526126f70152f35b60405162461bcd60e51b815260206004820152600d60248201526c06f7261636c652061646472203609c1b6044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60c0604052600436101561001b575b361561001957600080fd5b005b60003560e01c806303758481146117cd5780630654464e1461149157806316d6704a146113c3578063195a1dea146112e557806349d5fdad146112945780635a71ec361461126b5780635bb6141214610d4b57806371607de414610c875780637dc0d1d014610c425780637fc88cd814610c1457806380bc150d14610b17578063b64783e7146104e7578063d01089ec146102235763ea8083bd0361000e573461021e5761032036600319011261021e5760043561022036602319011261021e576102c435610304356102a4356102e4356100f4611a90565b6100fe8183611980565b421191821561020b575b50506101d9576101188183611980565b43119182156101c6575b50506101915761013181612075565b1561015757610150903390610284359061026435906102443590611bbe565b6001600055005b60405163d647364f60e01b81526020600482015260116024820152700e0c2e4c2dae640c8dedce840dac2e8c6d607b1b6044820152606490fd5b60405163d647364f60e01b815260206004820152600c60248201526b313637b1b590373ab6b132b960a11b6044820152606490fd5b6101d0925061198d565b43103880610122565b60405163d647364f60e01b8152602060048201526009602482015268074696d657374616d760bc1b6044820152606490fd5b610215925061198d565b42103880610108565b600080fd5b3461021e57602036600319011261021e5760043561023f611a90565b8060005260016020526040600020600981019081549161ffff8360b01c16156104ab5760ff8360c81c1661046b576007820180549092906001600160a01b03163381141580610454575b61041f5760ff8560d01c1660001461041957425b600683015410158061040b575b6103d6578460ff7fd0ae4f12020d4d5146e8dd1029e14be811ef6b326fa9e581bf173913443218cf9660c01c166000146103695750508060026102f192549101549061198d565b815460ff60c81b198116600160c81b17835590929083906001600160a01b03168061034d5750905461032c91906001600160a01b03166124f5565b54604080519283526001600160a01b03909116602083015290a26001600055005b9154610364926001600160a01b0390911690612a7e565b61032c565b60ff60c81b198116600160c81b178455929391926001600160a01b031690816103c45750505481546103a3916001600160a01b03166124f5565b549054604080519283526001600160a01b03909116602083015290a2610150565b6103d19250835491612a7e565b6103a3565b60405163d647364f60e01b815260206004820152600c60248201526b726563616c6c2064656c617960a01b6044820152606490fd5b5060ff8560c01c16156102aa565b4361029d565b60405163d647364f60e01b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606490fd5b5060088201546001600160a01b0316331415610289565b60405163d647364f60e01b8152602060048201526017602482015276189bdd5b9d1e48185b1c9958591e481c9958d85b1b1959604a1b6044820152606490fd5b60405163d647364f60e01b8152602060048201526013602482015272189bdd5b9d1e48191bd95cdb9d08195e1a5cdd606a1b6044820152606490fd5b6104f03661183a565b60809c909c52919a92999098979496939593949392909190610510611a90565b8715610b0d576105208742611980565b9861ffff8516158015610b05575b8015610af9575b8015610af1575b8015610ae9575b610aae57606461ffff861611610a7657608051600052600160205261ffff60096040600020015460b01c16610a3a576001600160a01b038c16158080610a30575b6109f8578d85116109c45760405163373cddfb60e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa9081156109365760009161098f575b50600019810190811161097957608051036109425761014060249160405192838092635ddf502960e11b825260805160048301525afa90811561093657600091610907575b50606001516001600160a01b03166108c95789156108c1578a42115b6108855761271161ffff89161061083f5715928380610836575b6107f15760805160009081526001602081905260409091208f81559081018690556007810180546001600160a01b039485166001600160a01b0319918216179091556008820180549985169990911698909817909755600987018054600389018d9055600489019a909a5560059097018c905560ff60d81b90151560d81b16600163ffff000160c01b0319909816908c161761ffff60a01b60a088901b161761ffff60b01b60b086901b161760ff60d01b89151560d01b16179690961790935561ffff9485939087156107d95761073a9065ffffffffffff429116611980565b60805160005260016020526006604060002001556107bf575b604051998a5260208a0152166040880152166060860152426080860152151560a085015260c084015260e083015260018060a01b03166101008201527fd84515a3c74ff85b73c315e7a95e1603068893e2061c76be6080ffa3f0eebf3e61012060805192a26001600055005b6107d48a30336001600160a01b038d16612abf565b610753565b6107ec9065ffffffffffff439116611980565b61073a565b606460405163d647364f60e01b815260206004820152602060248201527f6d73672e76616c756520776974682077726f6e6720626f756e7479546f6b656e6044820152fd5b5034151561065a565b60405163d647364f60e01b815260206004820152601860248201527f626f756e74794d756c7469706c69657220746f6f206c6f7700000000000000006044820152606490fd5b60405163d647364f60e01b8152602060048201526013602482015272737461727448656967687420746f6f206c6f7760681b6044820152606490fd5b8a4311610640565b60405163d647364f60e01b81526020600482015260156024820152741c995c1bdc9d1259081a185cc818481c995c1bdc9d605a1b6044820152606490fd5b61092991506101403d811161092f575b610921818361191c565b8101906119ce565b8f610624565b503d610917565b6040513d6000823e3d90fd5b60405163d647364f60e01b815260206004820152600e60248201526d1ddc9bdb99c81c995c1bdc9d125960921b6044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b906020823d6020116109bc575b816109a96020938361191c565b810103126109b9575051386105df565b80fd5b3d915061099c565b60405163d647364f60e01b815260206004820152600b60248201526a0e6e8c2e4e8407c40dac2f60ab1b6044820152606490fd5b60405163d647364f60e01b815260206004820152600f60248201526e6d73672e76616c75652077726f6e6760881b6044820152606490fd5b508d341415610584565b60405163d647364f60e01b81526020600482015260136024820152727265706f727449642068617320626f756e747960681b6044820152606490fd5b60405163d647364f60e01b815260206004820152600f60248201526e746f6f206d616e7920726f756e647360881b6044820152606490fd5b60405163d647364f60e01b81526020600482015260126024820152710616d6f756e74732063616e6e6f74203d20360741b6044820152606490fd5b508a15610543565b508c1561053c565b5061ffff871615610535565b50831561052e565b6105208743611980565b3461021e57602036600319011261021e576004356000526001602052610200604060002060ff81549160018101549060028101546003820154600483015460058401549060068501549260018060a01b0360078701541694600960018060a01b03600889015416970154976040519a8b5260208b015260408a01526060890152608088015260a087015260c086015260e085015261010084015260018060a01b03811661012084015261ffff8160a01c1661014084015261ffff8160b01c16610160840152818160c01c161515610180840152818160c81c1615156101a0840152818160d01c1615156101c084015260d81c1615156101e0820152f35b3461021e57608036600319011261021e57610c2d611a90565b61015033606435604435602435600435611bbe565b3461021e57600036600319011261021e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b61018036600319011261021e576044356001600160a01b038116810361021e57606435906001600160a01b038216820361021e5760843561ffff8116810361021e5760a4359261ffff8416840361021e5760c43592831515840361021e5760e4356001600160a01b038116810361021e576101443593841515850361021e57610164359565ffffffffffff8716870361021e5761015097610d26611a90565b8115610d445742925b6101243596610104359660243560043561266a565b4392610d2f565b3461021e57604036600319011261021e57602435600435610d6a611a90565b600081815260016020526040902060088101546001600160a01b031633036112365760405163373cddfb60e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa90811561093657600091611204575b5060001981019081116109795784036109425761014060249160405192838092635ddf502960e11b82528860048301525afa908115610936576000916111e5575b50606001516001600160a01b03166108c95782600052600160205261ffff60096040600020015460b01c166111a6576009810191825460ff8160c81c1661116e5760b01c61ffff16156104ab577f6c68dbc2042e00c7bdc05739f926dc72a8170320d4ec12caef27041f418ca6669261014092826000526001602052604060002086600052600160205260406000209080820361101f575b5050815460c01c60ff1690811561101757610ed6815460028301549061198d565b915b610fba575b825460d01c60ff1615610fa757610ef8600482015442611980565b60008881526001602081815260408084206003810195865589855281852060098101805460ff60c81b1916600160c81b179055859055938c90529290910154955492546005949094015482519788529087019490945285019390935260b083901c61ffff908116606086015260a084811c9091166080860152429085015260d083901c60ff16151560c085015260e08401526101008301526001600160a01b0316610120820152a26001600055005b610fb5600482015443611980565b610ef8565b8660005260016020528160406000205560018101548210610fff575b60008781526001602052604081206002810191909155600901805460ff60c01b19169055610edd565b86600052600160205281600160406000200155610fd6565b805491610ed8565b8054825560018082015490830155600280820154908301556003808201549083015560048082015490830155600580820154908301556006808201549083015560078082015490830180546001600160a01b039283166001600160a01b0319918216179091556008808401549085018054918416918316919091179055600992830180549390940180549390921690831681178255835461ffff60a01b166001600160b01b0319909316179190911781556111679160ff908054835461ffff60b01b191661ffff60b01b9091161783558054835460c091821c841615158416821b9184901b191617808455815460c890811c841615158416811b9084901b1990911617808455815460ff60d01b60d091821c8516151590911b1660ff60d01b1990911617835554825460ff60d81b191660d891821c929092161515901b60ff60d81b16179055565b8680610eb5565b60405163d647364f60e01b815260206004820152600f60248201526e189bdd5b9d1e481c9958d85b1b1959608a1b6044820152606490fd5b60405163d647364f60e01b81526020600482015260166024820152756e65775265706f727449642068617320626f756e747960501b6044820152606490fd5b6111fe91506101403d811161092f57610921818361191c565b84610e1d565b906020823d60201161122e575b8161121e6020938361191c565b810103126109b957505185610ddc565b3d9150611211565b60405163d647364f60e01b815260206004820152600c60248201526b3bb937b7339031b0b63632b960a11b6044820152606490fd5b6101506112773661183a565b9b61128f9b919b9a929a999399989498979597611a90565b61266a565b3461021e57604036600319011261021e576112ad61180e565b6112b5611824565b6001600160a01b039182166000908152600260209081526040808320949093168252928352819020549051908152f35b3461021e57604036600319011261021e576112fe61180e565b611306611824565b9061130f611a90565b60018060a01b03821691826000526002602052604060002060018060a01b0383166000526020526040600020549182611349576001600055005b6001600160a01b0381161561138f57611386936000526002602052604060002060018060a01b03821660005260205260006040812055309061254c565b80808080610150565b836113be949250600052600260205260406000209060018060a01b0316600052602052600060408120556124f5565b611386565b3461021e5761034036600319011261021e5760043561022036602319011261021e576102a4356001600160a01b038116810361021e576102e435610324356102c43561030435611411611a90565b61141b8183611980565b421191821561147e575b50506101d9576114358183611980565b431191821561146b575b50506101915761144e82612075565b156101575761015091610284359061026435906102443590611bbe565b611475925061198d565b4310838061143f565b611488925061198d565b42108580611425565b3461021e57602036600319011261021e5760043567ffffffffffffffff811161021e573660238201121561021e57806004013567ffffffffffffffff811161021e573660248260051b8401011161021e576114eb8161193e565b916114f9604051938461191c565b818352601f196115088361193e565b0160005b81811061173e57505060005b82811015611629576001906040600060248360051b860101358152836020522060ff600960405192611549846118e9565b80548452858101546020850152600281015460408501526003810154606085015260048101546080850152600581015460a0850152600681015460c0850152858060a01b0360078201541660e0850152858060a01b036008820154166101008501520154848060a01b03811661012084015261ffff8160a01c1661014084015261ffff8160b01c16610160840152818160c01c161515610180840152818160c81c1615156101a0840152818160d01c1615156101c084015260d81c1615156101e08201526116178287611956565b526116228186611956565b5001611518565b8360405180916020820160208352815180915260206040840192019060005b818110611656575050500390f35b9193509160206102006001926101e0875180518352848101518584015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152858060a01b0360e08201511660e0840152858060a01b0361010082015116610100840152858060a01b036101208201511661012084015261ffff6101408201511661014084015261ffff6101608201511661016084015261018081015115156101808401526101a081015115156101a08401526101c081015115156101c0840152015115156101e0820152019401910191849392611648565b60209060405161174d816118e9565b60008152600083820152600060408201526000606082015260006080820152600060a0820152600060c0820152600060e08201526000610100820152600061012082015260006101408201526000610160820152600061018082015260006101a082015260006101c082015260006101e08201528282880101520161150c565b3461021e5760a036600319011261021e576084356001600160a01b038116810361021e57610150906117fd611a90565b606435604435602435600435611bbe565b600435906001600160a01b038216820361021e57565b602435906001600160a01b038216820361021e57565b6101a090600319011261021e5760043590602435906044356001600160a01b038116810361021e57906064356001600160a01b038116810361021e579060843561ffff8116810361021e579060a43561ffff8116810361021e579060c435801515810361021e579060e43590610104356001600160a01b038116810361021e57906101243590610144359061016435801515810361021e57906101843565ffffffffffff8116810361021e5790565b610200810190811067ffffffffffffffff82111761190657604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761190657604052565b67ffffffffffffffff81116119065760051b60200190565b805182101561196a5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b9190820180921161097957565b9190820391821161097957565b51906001600160a01b038216820361021e57565b519065ffffffffffff8216820361021e57565b5190811515820361021e57565b908161014091031261021e5760405190610140820182811067ffffffffffffffff82111761190657611a879161012091604052805184526020810151602085015260408101516040850152611a256060820161199a565b6060850152611a36608082016119ae565b6080850152611a4760a082016119ae565b60a0850152611a5860c0820161199a565b60c0850152611a6960e082016119ae565b60e0850152611a7b61010082016119c1565b610100850152016119c1565b61012082015290565b600260005414611aa1576002600055565b633ee5aeb560e01b60005260046000fd5b519062ffffff8216820361021e57565b908161018091031261021e57604051906000610180830167ffffffffffffffff811184821017611baa5760405281518352602082015160208401526040820151604084015260608201516060840152611b1d6080830161199a565b6080840152611b2e60a083016119ae565b60a0840152611b3f60c0830161199a565b60c0840152611b5060e083016119c1565b60e0840152611b626101008301611ab2565b610100840152611b756101208301611ab2565b6101208401526101408201519061ffff821682036109b95750610140830152611ba19061016001611ab2565b61016082015290565b634e487b7160e01b82526041600452602482fd5b9193949290946000958387526001602052604087209160098301549760ff8960c81c1661116e5760ff8960c01c1661202d5761ffff8960b01c169485156104ab57604051600162a8ebc560e01b03198152600481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316929061018081602481875afa908115611f2157829161200e575b5060800151604051600162a8ebc560e01b03198152600481018a90526001600160a01b03909116929061018081602481885afa908115612003578391611fd4575b5060c060018060a01b03910151169a60038801548d60018a0154908a549260ff60058d01549260d01c16600014611fcd5742905b808210611f9a57611cdf9161198d565b8115611f8657049a808c11611f7e575b509984905b808210611f385750509c8d8d9e8b9e9c9d9e11611f30575b50600289018a815560ff60c01b19909116600160c01b1760098a01559899979897611d5d9082908790611d418b30338b612abf565b611d4d83303384612abf565b611d588b838a612bb8565b612bb8565b843b15611f2c57604051630375848160e01b8152600481018c90526024810197909752604487015260648601526001600160a01b0384166084860181905294818160a48183885af18015611f2157938a9b9c611def828c967f9681446de2fd0e4faf24417d7f08b310763d4e4e15f0a31200dbef2dd80fcdbd9e9b9996611df496611e1c9c9a611f11575b5050612b03565b612b03565b60098701546001600160a01b031680611f02575050611e12916124f5565b835490549061198d565b60098301549060ff8260d81c1680611ef9575b611e56575b50505060090154604080519283526001600160a01b03909116602083015290a2565b60ff60c81b198216600160c81b1760098501557fd0ae4f12020d4d5146e8dd1029e14be811ef6b326fa9e581bf173913443218cf916001600160a01b03168181611ed8576007860154611eb292506001600160a01b03166124f5565b6009840154604080519283526001600160a01b03909116602083015290a2833880611e34565b6007860154611ef4926001600160a01b0390911690309061254c565b611eb2565b50801515611e2f565b611f0c9350612a7e565b611e12565b81611f1b9161191c565b38611de8565b6040513d84823e3d90fd5b8280fd5b995081611d0c565b909a8f9061ffff8260a01c1681029161ffff8284049160a01c161490151715611f6a57612710600191049b0190611cf4565b634e487b7160e01b86526011600452602486fd5b9a5038611cef565b634e487b7160e01b87526012600452602487fd5b60405163d647364f60e01b815260206004820152600a60248201526973746172742074696d6560b01b6044820152606490fd5b4390611ccf565b611ff691506101803d8111611ffc575b611fee818361191c565b810190611ac2565b38611c9b565b503d611fe4565b6040513d85823e3d90fd5b61202791506101803d8111611ffc57611fee818361191c565b38611c5a565b60405163d647364f60e01b815260206004820152600e60248201526d189bdd5b9d1e4818db185a5b595960921b6044820152606490fd5b519063ffffffff8216820361021e57565b604051600162a8ebc560e01b03198152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169161018082602481865afa91821561093657600092612494575b50604051635ddf502960e11b8152600481018290529061014082602481875afa9182156109365760009261246f575b5061010090602460405180968193631e0097b160e21b835260048301525afa92831561093657600093612390575b5060e082015115801592908380612378575b61234b5780612361575b6123425763ffffffff606085015116926216e360841161234b576102243580159081159182820361021e5761235557835160243503612355575060e086015115150361234b5760208201516044350361234b5760408201516064350361234b5760608201516084350361234b5760a4356001600160a01b0381169081810361021e575060808301516001600160a01b03160361234b5760c43565ffffffffffff811680910361021e5765ffffffffffff60a0840151160361234b5760e4356001600160a01b0381169081810361021e575060c08301516001600160a01b03160361234b57610104358015159081810361021e575003612342576101243562ffffff81169081810361021e575062ffffff6101008301511603612342576101443562ffffff81169081810361021e575062ffffff6101208301511603612342576101643561ffff811680910361021e5761ffff610140830151160361234257610184359062ffffff82169182810361021e5750610160015162ffffff160361233a5780516101a4350361233a57602001516101c43503612333576101e43563ffffffff811680910361021e570361232d57610204356001600160a01b038116919082810361021e575060a001516001600160a01b03160361232857600190565b600090565b50600090565b5050600090565b505050600090565b50505050600090565b5050505050600090565b50505050505050600090565b5061a8c065ffffffffffff60a08301511611612149565b506201518065ffffffffffff60a0840151161161213f565b610100939193813d8211612467575b816123ad610100938361191c565b810103126124635760405191610100830183811067ffffffffffffffff821117611baa57604052815183526123e46020830161199a565b60208401526123f560408301612064565b604084015261240660608301612064565b60608401526080820151906001600160e01b0319821682036109b957506124579160e091608085015261243b60a0820161199a565b60a085015261244c60c082016119c1565b60c0850152016119c1565b60e0820152913861212d565b5080fd5b3d915061239f565b61010091925061248d906101403d811161092f57610921818361191c565b91906120ff565b6124ae9192506101803d8111611ffc57611fee818361191c565b90386120d0565b3d156124f0573d9067ffffffffffffffff821161190657604051916124e4601f8201601f19166020018461191c565b82523d6000602084013e565b606090565b8115612548576001600160a01b031660008080808585619c40f16125176124b5565b5015612521575050565b600052600260205261254460408060002060009081805260205220918254611980565b9055565b5050565b91908315612664576001600160a01b038116300361264f575060405163a9059cbb60e01b602082019081526001600160a01b0383166024830152604480830186905282526000918291906125a160648261191c565b519082865af16125af6124b5565b816125f3575b506125ee5760018060a01b0316600052600260205260406000209060018060a01b03166000526020526125446040600020918254611980565b505050565b805180158015935091908361262b575b50508115612613575b50386125b5565b905080612621575b3861260c565b50813b151561261b565b81929350906020918101031261021e57602061264791016119c1565b903880612603565b61266293926001600160a01b0316612abf565b565b50505050565b9b9293919a909496989b97959760a05261ffff87169586158015612a76575b8015612a6a575b8015612a62575b8015612a5a575b610aae5760648711610a765760a051600052600160205261ffff60096040600020015460b01c16610a3a576001600160a01b03169a8b15978880612a50575b6109f8578d87116109c45760405163373cddfb60e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa90811561093657600091612a1e575b5080600019810111610979576000190160a051036109425761014060249160405192838092635ddf502960e11b825260a05160048301525afa908115610936576000916129ff575b50606001516001600160a01b03166108c95789156129f7578a42115b6108855761ffff8416986127118a1061083f57159586806129ee575b6107f157612936948f8f90926128dd956128aa9460a051600052600160205260406000205560a05160005260016020528b60016040600020015560a051600052600160205260076040600020019060018060a01b039060018060a01b0316166001600160601b0360a01b82541617905560a051600052600160205260086040600020019060018060a01b03166001600160601b0360a01b82541617905560a05160005260016020526009604060002001906001600160601b0360a01b82541617905560a051600052600160205260096040600020019081549061ffff60a01b9060a01b169061ffff60a01b1916179055565b60a0516000908152600160205260409020600901805461ffff60b01b191660b09290921b61ffff60b01b16919091179055565b60a0516000908152600160205260408120600981018054600383018d9055600483019390935560059091018c905560ff60d81b92151560d81b9290921661ffff60d01b1990911660ff60d01b8a151560d01b1617179055565b85156129d65761294f9065ffffffffffff429116611980565b60a05160005260016020526006604060002001556129c5575b604051978852602088015260408701526060860152426080860152151560a085015260c084015260e08301526101008201527fd84515a3c74ff85b73c315e7a95e1603068893e2061c76be6080ffa3f0eebf3e61012060a05192a2565b6129d18830338a612abf565b612968565b6129e99065ffffffffffff439116611980565b61294f565b503415156127b8565b8a431161279c565b612a1891506101403d811161092f57610921818361191c565b38612780565b906020823d602011612a48575b81612a386020938361191c565b810103126109b957505138612738565b3d9150612a2b565b508d3414156126dd565b508a1561269e565b508c15612697565b5061ffff831615612690565b508515612689565b60405163a9059cbb60e01b60208201526001600160a01b0392909216602483015260448083019390935291815261266291612aba60648361191c565b612c7a565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815261266291612aba60848361191c565b60405190602060008184019463095ea7b360e01b865260018060a01b03169485602486015281604486015260448552612b3d60648661191c565b84519082855af16000513d82612b93575b505015612b5a57505050565b612aba612662936040519063095ea7b360e01b602083015260248201526000604482015260448152612b8d60648261191c565b82612c7a565b909150612bb057506001600160a01b0381163b15155b3880612b4e565b600114612ba9565b60405163095ea7b360e01b60208083019182526001600160a01b038516602484015260448084019690965294825292939092600090612bf860648661191c565b84519082855af16000513d82612c55575b505015612c1557505050565b60405163095ea7b360e01b60208201526001600160a01b0390931660248401526000604480850191909152835261266292612aba90612b8d60648261191c565b909150612c7257506001600160a01b0381163b15155b3880612c09565b600114612c6b565b906000602091828151910182855af115610936576000513d612ccc57506001600160a01b0381163b155b612cab5750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b60011415612ca456fea264697066735822122029b6b7a55d053383e9bc243a36f97c36b5f07fc01bbbe78cd7ebb59398ecee6264736f6c634300081c0033000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f

Deployed Bytecode

0x60c0604052600436101561001b575b361561001957600080fd5b005b60003560e01c806303758481146117cd5780630654464e1461149157806316d6704a146113c3578063195a1dea146112e557806349d5fdad146112945780635a71ec361461126b5780635bb6141214610d4b57806371607de414610c875780637dc0d1d014610c425780637fc88cd814610c1457806380bc150d14610b17578063b64783e7146104e7578063d01089ec146102235763ea8083bd0361000e573461021e5761032036600319011261021e5760043561022036602319011261021e576102c435610304356102a4356102e4356100f4611a90565b6100fe8183611980565b421191821561020b575b50506101d9576101188183611980565b43119182156101c6575b50506101915761013181612075565b1561015757610150903390610284359061026435906102443590611bbe565b6001600055005b60405163d647364f60e01b81526020600482015260116024820152700e0c2e4c2dae640c8dedce840dac2e8c6d607b1b6044820152606490fd5b60405163d647364f60e01b815260206004820152600c60248201526b313637b1b590373ab6b132b960a11b6044820152606490fd5b6101d0925061198d565b43103880610122565b60405163d647364f60e01b8152602060048201526009602482015268074696d657374616d760bc1b6044820152606490fd5b610215925061198d565b42103880610108565b600080fd5b3461021e57602036600319011261021e5760043561023f611a90565b8060005260016020526040600020600981019081549161ffff8360b01c16156104ab5760ff8360c81c1661046b576007820180549092906001600160a01b03163381141580610454575b61041f5760ff8560d01c1660001461041957425b600683015410158061040b575b6103d6578460ff7fd0ae4f12020d4d5146e8dd1029e14be811ef6b326fa9e581bf173913443218cf9660c01c166000146103695750508060026102f192549101549061198d565b815460ff60c81b198116600160c81b17835590929083906001600160a01b03168061034d5750905461032c91906001600160a01b03166124f5565b54604080519283526001600160a01b03909116602083015290a26001600055005b9154610364926001600160a01b0390911690612a7e565b61032c565b60ff60c81b198116600160c81b178455929391926001600160a01b031690816103c45750505481546103a3916001600160a01b03166124f5565b549054604080519283526001600160a01b03909116602083015290a2610150565b6103d19250835491612a7e565b6103a3565b60405163d647364f60e01b815260206004820152600c60248201526b726563616c6c2064656c617960a01b6044820152606490fd5b5060ff8560c01c16156102aa565b4361029d565b60405163d647364f60e01b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606490fd5b5060088201546001600160a01b0316331415610289565b60405163d647364f60e01b8152602060048201526017602482015276189bdd5b9d1e48185b1c9958591e481c9958d85b1b1959604a1b6044820152606490fd5b60405163d647364f60e01b8152602060048201526013602482015272189bdd5b9d1e48191bd95cdb9d08195e1a5cdd606a1b6044820152606490fd5b6104f03661183a565b60809c909c52919a92999098979496939593949392909190610510611a90565b8715610b0d576105208742611980565b9861ffff8516158015610b05575b8015610af9575b8015610af1575b8015610ae9575b610aae57606461ffff861611610a7657608051600052600160205261ffff60096040600020015460b01c16610a3a576001600160a01b038c16158080610a30575b6109f8578d85116109c45760405163373cddfb60e11b81527f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b031690602081600481855afa9081156109365760009161098f575b50600019810190811161097957608051036109425761014060249160405192838092635ddf502960e11b825260805160048301525afa90811561093657600091610907575b50606001516001600160a01b03166108c95789156108c1578a42115b6108855761271161ffff89161061083f5715928380610836575b6107f15760805160009081526001602081905260409091208f81559081018690556007810180546001600160a01b039485166001600160a01b0319918216179091556008820180549985169990911698909817909755600987018054600389018d9055600489019a909a5560059097018c905560ff60d81b90151560d81b16600163ffff000160c01b0319909816908c161761ffff60a01b60a088901b161761ffff60b01b60b086901b161760ff60d01b89151560d01b16179690961790935561ffff9485939087156107d95761073a9065ffffffffffff429116611980565b60805160005260016020526006604060002001556107bf575b604051998a5260208a0152166040880152166060860152426080860152151560a085015260c084015260e083015260018060a01b03166101008201527fd84515a3c74ff85b73c315e7a95e1603068893e2061c76be6080ffa3f0eebf3e61012060805192a26001600055005b6107d48a30336001600160a01b038d16612abf565b610753565b6107ec9065ffffffffffff439116611980565b61073a565b606460405163d647364f60e01b815260206004820152602060248201527f6d73672e76616c756520776974682077726f6e6720626f756e7479546f6b656e6044820152fd5b5034151561065a565b60405163d647364f60e01b815260206004820152601860248201527f626f756e74794d756c7469706c69657220746f6f206c6f7700000000000000006044820152606490fd5b60405163d647364f60e01b8152602060048201526013602482015272737461727448656967687420746f6f206c6f7760681b6044820152606490fd5b8a4311610640565b60405163d647364f60e01b81526020600482015260156024820152741c995c1bdc9d1259081a185cc818481c995c1bdc9d605a1b6044820152606490fd5b61092991506101403d811161092f575b610921818361191c565b8101906119ce565b8f610624565b503d610917565b6040513d6000823e3d90fd5b60405163d647364f60e01b815260206004820152600e60248201526d1ddc9bdb99c81c995c1bdc9d125960921b6044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b906020823d6020116109bc575b816109a96020938361191c565b810103126109b9575051386105df565b80fd5b3d915061099c565b60405163d647364f60e01b815260206004820152600b60248201526a0e6e8c2e4e8407c40dac2f60ab1b6044820152606490fd5b60405163d647364f60e01b815260206004820152600f60248201526e6d73672e76616c75652077726f6e6760881b6044820152606490fd5b508d341415610584565b60405163d647364f60e01b81526020600482015260136024820152727265706f727449642068617320626f756e747960681b6044820152606490fd5b60405163d647364f60e01b815260206004820152600f60248201526e746f6f206d616e7920726f756e647360881b6044820152606490fd5b60405163d647364f60e01b81526020600482015260126024820152710616d6f756e74732063616e6e6f74203d20360741b6044820152606490fd5b508a15610543565b508c1561053c565b5061ffff871615610535565b50831561052e565b6105208743611980565b3461021e57602036600319011261021e576004356000526001602052610200604060002060ff81549160018101549060028101546003820154600483015460058401549060068501549260018060a01b0360078701541694600960018060a01b03600889015416970154976040519a8b5260208b015260408a01526060890152608088015260a087015260c086015260e085015261010084015260018060a01b03811661012084015261ffff8160a01c1661014084015261ffff8160b01c16610160840152818160c01c161515610180840152818160c81c1615156101a0840152818160d01c1615156101c084015260d81c1615156101e0820152f35b3461021e57608036600319011261021e57610c2d611a90565b61015033606435604435602435600435611bbe565b3461021e57600036600319011261021e576040517f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b03168152602090f35b61018036600319011261021e576044356001600160a01b038116810361021e57606435906001600160a01b038216820361021e5760843561ffff8116810361021e5760a4359261ffff8416840361021e5760c43592831515840361021e5760e4356001600160a01b038116810361021e576101443593841515850361021e57610164359565ffffffffffff8716870361021e5761015097610d26611a90565b8115610d445742925b6101243596610104359660243560043561266a565b4392610d2f565b3461021e57604036600319011261021e57602435600435610d6a611a90565b600081815260016020526040902060088101546001600160a01b031633036112365760405163373cddfb60e11b81527f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b031690602081600481855afa90811561093657600091611204575b5060001981019081116109795784036109425761014060249160405192838092635ddf502960e11b82528860048301525afa908115610936576000916111e5575b50606001516001600160a01b03166108c95782600052600160205261ffff60096040600020015460b01c166111a6576009810191825460ff8160c81c1661116e5760b01c61ffff16156104ab577f6c68dbc2042e00c7bdc05739f926dc72a8170320d4ec12caef27041f418ca6669261014092826000526001602052604060002086600052600160205260406000209080820361101f575b5050815460c01c60ff1690811561101757610ed6815460028301549061198d565b915b610fba575b825460d01c60ff1615610fa757610ef8600482015442611980565b60008881526001602081815260408084206003810195865589855281852060098101805460ff60c81b1916600160c81b179055859055938c90529290910154955492546005949094015482519788529087019490945285019390935260b083901c61ffff908116606086015260a084811c9091166080860152429085015260d083901c60ff16151560c085015260e08401526101008301526001600160a01b0316610120820152a26001600055005b610fb5600482015443611980565b610ef8565b8660005260016020528160406000205560018101548210610fff575b60008781526001602052604081206002810191909155600901805460ff60c01b19169055610edd565b86600052600160205281600160406000200155610fd6565b805491610ed8565b8054825560018082015490830155600280820154908301556003808201549083015560048082015490830155600580820154908301556006808201549083015560078082015490830180546001600160a01b039283166001600160a01b0319918216179091556008808401549085018054918416918316919091179055600992830180549390940180549390921690831681178255835461ffff60a01b166001600160b01b0319909316179190911781556111679160ff908054835461ffff60b01b191661ffff60b01b9091161783558054835460c091821c841615158416821b9184901b191617808455815460c890811c841615158416811b9084901b1990911617808455815460ff60d01b60d091821c8516151590911b1660ff60d01b1990911617835554825460ff60d81b191660d891821c929092161515901b60ff60d81b16179055565b8680610eb5565b60405163d647364f60e01b815260206004820152600f60248201526e189bdd5b9d1e481c9958d85b1b1959608a1b6044820152606490fd5b60405163d647364f60e01b81526020600482015260166024820152756e65775265706f727449642068617320626f756e747960501b6044820152606490fd5b6111fe91506101403d811161092f57610921818361191c565b84610e1d565b906020823d60201161122e575b8161121e6020938361191c565b810103126109b957505185610ddc565b3d9150611211565b60405163d647364f60e01b815260206004820152600c60248201526b3bb937b7339031b0b63632b960a11b6044820152606490fd5b6101506112773661183a565b9b61128f9b919b9a929a999399989498979597611a90565b61266a565b3461021e57604036600319011261021e576112ad61180e565b6112b5611824565b6001600160a01b039182166000908152600260209081526040808320949093168252928352819020549051908152f35b3461021e57604036600319011261021e576112fe61180e565b611306611824565b9061130f611a90565b60018060a01b03821691826000526002602052604060002060018060a01b0383166000526020526040600020549182611349576001600055005b6001600160a01b0381161561138f57611386936000526002602052604060002060018060a01b03821660005260205260006040812055309061254c565b80808080610150565b836113be949250600052600260205260406000209060018060a01b0316600052602052600060408120556124f5565b611386565b3461021e5761034036600319011261021e5760043561022036602319011261021e576102a4356001600160a01b038116810361021e576102e435610324356102c43561030435611411611a90565b61141b8183611980565b421191821561147e575b50506101d9576114358183611980565b431191821561146b575b50506101915761144e82612075565b156101575761015091610284359061026435906102443590611bbe565b611475925061198d565b4310838061143f565b611488925061198d565b42108580611425565b3461021e57602036600319011261021e5760043567ffffffffffffffff811161021e573660238201121561021e57806004013567ffffffffffffffff811161021e573660248260051b8401011161021e576114eb8161193e565b916114f9604051938461191c565b818352601f196115088361193e565b0160005b81811061173e57505060005b82811015611629576001906040600060248360051b860101358152836020522060ff600960405192611549846118e9565b80548452858101546020850152600281015460408501526003810154606085015260048101546080850152600581015460a0850152600681015460c0850152858060a01b0360078201541660e0850152858060a01b036008820154166101008501520154848060a01b03811661012084015261ffff8160a01c1661014084015261ffff8160b01c16610160840152818160c01c161515610180840152818160c81c1615156101a0840152818160d01c1615156101c084015260d81c1615156101e08201526116178287611956565b526116228186611956565b5001611518565b8360405180916020820160208352815180915260206040840192019060005b818110611656575050500390f35b9193509160206102006001926101e0875180518352848101518584015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152858060a01b0360e08201511660e0840152858060a01b0361010082015116610100840152858060a01b036101208201511661012084015261ffff6101408201511661014084015261ffff6101608201511661016084015261018081015115156101808401526101a081015115156101a08401526101c081015115156101c0840152015115156101e0820152019401910191849392611648565b60209060405161174d816118e9565b60008152600083820152600060408201526000606082015260006080820152600060a0820152600060c0820152600060e08201526000610100820152600061012082015260006101408201526000610160820152600061018082015260006101a082015260006101c082015260006101e08201528282880101520161150c565b3461021e5760a036600319011261021e576084356001600160a01b038116810361021e57610150906117fd611a90565b606435604435602435600435611bbe565b600435906001600160a01b038216820361021e57565b602435906001600160a01b038216820361021e57565b6101a090600319011261021e5760043590602435906044356001600160a01b038116810361021e57906064356001600160a01b038116810361021e579060843561ffff8116810361021e579060a43561ffff8116810361021e579060c435801515810361021e579060e43590610104356001600160a01b038116810361021e57906101243590610144359061016435801515810361021e57906101843565ffffffffffff8116810361021e5790565b610200810190811067ffffffffffffffff82111761190657604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761190657604052565b67ffffffffffffffff81116119065760051b60200190565b805182101561196a5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b9190820180921161097957565b9190820391821161097957565b51906001600160a01b038216820361021e57565b519065ffffffffffff8216820361021e57565b5190811515820361021e57565b908161014091031261021e5760405190610140820182811067ffffffffffffffff82111761190657611a879161012091604052805184526020810151602085015260408101516040850152611a256060820161199a565b6060850152611a36608082016119ae565b6080850152611a4760a082016119ae565b60a0850152611a5860c0820161199a565b60c0850152611a6960e082016119ae565b60e0850152611a7b61010082016119c1565b610100850152016119c1565b61012082015290565b600260005414611aa1576002600055565b633ee5aeb560e01b60005260046000fd5b519062ffffff8216820361021e57565b908161018091031261021e57604051906000610180830167ffffffffffffffff811184821017611baa5760405281518352602082015160208401526040820151604084015260608201516060840152611b1d6080830161199a565b6080840152611b2e60a083016119ae565b60a0840152611b3f60c0830161199a565b60c0840152611b5060e083016119c1565b60e0840152611b626101008301611ab2565b610100840152611b756101208301611ab2565b6101208401526101408201519061ffff821682036109b95750610140830152611ba19061016001611ab2565b61016082015290565b634e487b7160e01b82526041600452602482fd5b9193949290946000958387526001602052604087209160098301549760ff8960c81c1661116e5760ff8960c01c1661202d5761ffff8960b01c169485156104ab57604051600162a8ebc560e01b03198152600481018890527f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b0316929061018081602481875afa908115611f2157829161200e575b5060800151604051600162a8ebc560e01b03198152600481018a90526001600160a01b03909116929061018081602481885afa908115612003578391611fd4575b5060c060018060a01b03910151169a60038801548d60018a0154908a549260ff60058d01549260d01c16600014611fcd5742905b808210611f9a57611cdf9161198d565b8115611f8657049a808c11611f7e575b509984905b808210611f385750509c8d8d9e8b9e9c9d9e11611f30575b50600289018a815560ff60c01b19909116600160c01b1760098a01559899979897611d5d9082908790611d418b30338b612abf565b611d4d83303384612abf565b611d588b838a612bb8565b612bb8565b843b15611f2c57604051630375848160e01b8152600481018c90526024810197909752604487015260648601526001600160a01b0384166084860181905294818160a48183885af18015611f2157938a9b9c611def828c967f9681446de2fd0e4faf24417d7f08b310763d4e4e15f0a31200dbef2dd80fcdbd9e9b9996611df496611e1c9c9a611f11575b5050612b03565b612b03565b60098701546001600160a01b031680611f02575050611e12916124f5565b835490549061198d565b60098301549060ff8260d81c1680611ef9575b611e56575b50505060090154604080519283526001600160a01b03909116602083015290a2565b60ff60c81b198216600160c81b1760098501557fd0ae4f12020d4d5146e8dd1029e14be811ef6b326fa9e581bf173913443218cf916001600160a01b03168181611ed8576007860154611eb292506001600160a01b03166124f5565b6009840154604080519283526001600160a01b03909116602083015290a2833880611e34565b6007860154611ef4926001600160a01b0390911690309061254c565b611eb2565b50801515611e2f565b611f0c9350612a7e565b611e12565b81611f1b9161191c565b38611de8565b6040513d84823e3d90fd5b8280fd5b995081611d0c565b909a8f9061ffff8260a01c1681029161ffff8284049160a01c161490151715611f6a57612710600191049b0190611cf4565b634e487b7160e01b86526011600452602486fd5b9a5038611cef565b634e487b7160e01b87526012600452602487fd5b60405163d647364f60e01b815260206004820152600a60248201526973746172742074696d6560b01b6044820152606490fd5b4390611ccf565b611ff691506101803d8111611ffc575b611fee818361191c565b810190611ac2565b38611c9b565b503d611fe4565b6040513d85823e3d90fd5b61202791506101803d8111611ffc57611fee818361191c565b38611c5a565b60405163d647364f60e01b815260206004820152600e60248201526d189bdd5b9d1e4818db185a5b595960921b6044820152606490fd5b519063ffffffff8216820361021e57565b604051600162a8ebc560e01b03198152600481018290527f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b03169161018082602481865afa91821561093657600092612494575b50604051635ddf502960e11b8152600481018290529061014082602481875afa9182156109365760009261246f575b5061010090602460405180968193631e0097b160e21b835260048301525afa92831561093657600093612390575b5060e082015115801592908380612378575b61234b5780612361575b6123425763ffffffff606085015116926216e360841161234b576102243580159081159182820361021e5761235557835160243503612355575060e086015115150361234b5760208201516044350361234b5760408201516064350361234b5760608201516084350361234b5760a4356001600160a01b0381169081810361021e575060808301516001600160a01b03160361234b5760c43565ffffffffffff811680910361021e5765ffffffffffff60a0840151160361234b5760e4356001600160a01b0381169081810361021e575060c08301516001600160a01b03160361234b57610104358015159081810361021e575003612342576101243562ffffff81169081810361021e575062ffffff6101008301511603612342576101443562ffffff81169081810361021e575062ffffff6101208301511603612342576101643561ffff811680910361021e5761ffff610140830151160361234257610184359062ffffff82169182810361021e5750610160015162ffffff160361233a5780516101a4350361233a57602001516101c43503612333576101e43563ffffffff811680910361021e570361232d57610204356001600160a01b038116919082810361021e575060a001516001600160a01b03160361232857600190565b600090565b50600090565b5050600090565b505050600090565b50505050600090565b5050505050600090565b50505050505050600090565b5061a8c065ffffffffffff60a08301511611612149565b506201518065ffffffffffff60a0840151161161213f565b610100939193813d8211612467575b816123ad610100938361191c565b810103126124635760405191610100830183811067ffffffffffffffff821117611baa57604052815183526123e46020830161199a565b60208401526123f560408301612064565b604084015261240660608301612064565b60608401526080820151906001600160e01b0319821682036109b957506124579160e091608085015261243b60a0820161199a565b60a085015261244c60c082016119c1565b60c0850152016119c1565b60e0820152913861212d565b5080fd5b3d915061239f565b61010091925061248d906101403d811161092f57610921818361191c565b91906120ff565b6124ae9192506101803d8111611ffc57611fee818361191c565b90386120d0565b3d156124f0573d9067ffffffffffffffff821161190657604051916124e4601f8201601f19166020018461191c565b82523d6000602084013e565b606090565b8115612548576001600160a01b031660008080808585619c40f16125176124b5565b5015612521575050565b600052600260205261254460408060002060009081805260205220918254611980565b9055565b5050565b91908315612664576001600160a01b038116300361264f575060405163a9059cbb60e01b602082019081526001600160a01b0383166024830152604480830186905282526000918291906125a160648261191c565b519082865af16125af6124b5565b816125f3575b506125ee5760018060a01b0316600052600260205260406000209060018060a01b03166000526020526125446040600020918254611980565b505050565b805180158015935091908361262b575b50508115612613575b50386125b5565b905080612621575b3861260c565b50813b151561261b565b81929350906020918101031261021e57602061264791016119c1565b903880612603565b61266293926001600160a01b0316612abf565b565b50505050565b9b9293919a909496989b97959760a05261ffff87169586158015612a76575b8015612a6a575b8015612a62575b8015612a5a575b610aae5760648711610a765760a051600052600160205261ffff60096040600020015460b01c16610a3a576001600160a01b03169a8b15978880612a50575b6109f8578d87116109c45760405163373cddfb60e11b81527f000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f6001600160a01b031690602081600481855afa90811561093657600091612a1e575b5080600019810111610979576000190160a051036109425761014060249160405192838092635ddf502960e11b825260a05160048301525afa908115610936576000916129ff575b50606001516001600160a01b03166108c95789156129f7578a42115b6108855761ffff8416986127118a1061083f57159586806129ee575b6107f157612936948f8f90926128dd956128aa9460a051600052600160205260406000205560a05160005260016020528b60016040600020015560a051600052600160205260076040600020019060018060a01b039060018060a01b0316166001600160601b0360a01b82541617905560a051600052600160205260086040600020019060018060a01b03166001600160601b0360a01b82541617905560a05160005260016020526009604060002001906001600160601b0360a01b82541617905560a051600052600160205260096040600020019081549061ffff60a01b9060a01b169061ffff60a01b1916179055565b60a0516000908152600160205260409020600901805461ffff60b01b191660b09290921b61ffff60b01b16919091179055565b60a0516000908152600160205260408120600981018054600383018d9055600483019390935560059091018c905560ff60d81b92151560d81b9290921661ffff60d01b1990911660ff60d01b8a151560d01b1617179055565b85156129d65761294f9065ffffffffffff429116611980565b60a05160005260016020526006604060002001556129c5575b604051978852602088015260408701526060860152426080860152151560a085015260c084015260e08301526101008201527fd84515a3c74ff85b73c315e7a95e1603068893e2061c76be6080ffa3f0eebf3e61012060a05192a2565b6129d18830338a612abf565b612968565b6129e99065ffffffffffff439116611980565b61294f565b503415156127b8565b8a431161279c565b612a1891506101403d811161092f57610921818361191c565b38612780565b906020823d602011612a48575b81612a386020938361191c565b810103126109b957505138612738565b3d9150612a2b565b508d3414156126dd565b508a1561269e565b508c15612697565b5061ffff831615612690565b508515612689565b60405163a9059cbb60e01b60208201526001600160a01b0392909216602483015260448083019390935291815261266291612aba60648361191c565b612c7a565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815261266291612aba60848361191c565b60405190602060008184019463095ea7b360e01b865260018060a01b03169485602486015281604486015260448552612b3d60648661191c565b84519082855af16000513d82612b93575b505015612b5a57505050565b612aba612662936040519063095ea7b360e01b602083015260248201526000604482015260448152612b8d60648261191c565b82612c7a565b909150612bb057506001600160a01b0381163b15155b3880612b4e565b600114612ba9565b60405163095ea7b360e01b60208083019182526001600160a01b038516602484015260448084019690965294825292939092600090612bf860648661191c565b84519082855af16000513d82612c55575b505015612c1557505050565b60405163095ea7b360e01b60208201526001600160a01b0390931660248401526000604480850191909152835261266292612aba90612b8d60648261191c565b909150612c7257506001600160a01b0381163b15155b3880612c09565b600114612c6b565b906000602091828151910182855af115610936576000513d612ccc57506001600160a01b0381163b155b612cab5750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b60011415612ca456fea264697066735822122029b6b7a55d053383e9bc243a36f97c36b5f07fc01bbbe78cd7ebb59398ecee6264736f6c634300081c0033

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

000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f

-----Decoded View---------------
Arg [0] : oracle_ (address): 0xf3CCE3274c32f1F344Ba48336D5EFF34dc6E145f

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3cce3274c32f1f344ba48336d5eff34dc6e145f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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