From 4e8d1de994903418ff490ce7fb2a18cf1e1d8788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 7 Oct 2024 17:45:05 +0200 Subject: [PATCH 01/62] feat: prepare for wit/2.1 --- contracts/apps/WitPriceFeedsV21.sol | 4 +- contracts/data/WitOracleDataLib.sol | 831 ++++++++++++++++-- contracts/interfaces/IWitOracleConsumer.sol | 8 +- contracts/interfaces/IWitPriceFeedsSolver.sol | 2 +- contracts/interfaces/IWitRandomness.sol | 4 +- contracts/libs/WitOracleRadonEncodingLib.sol | 4 +- contracts/libs/Witnet.sol | 653 +++++++++----- test/TestWitnet.sol | 2 +- 8 files changed, 1189 insertions(+), 319 deletions(-) diff --git a/contracts/apps/WitPriceFeedsV21.sol b/contracts/apps/WitPriceFeedsV21.sol index 3af65105..ccb8089e 100644 --- a/contracts/apps/WitPriceFeedsV21.sol +++ b/contracts/apps/WitPriceFeedsV21.sol @@ -587,7 +587,7 @@ contract WitPriceFeedsV21 return IWitPriceFeedsSolver.Price({ value: _latestResult.asUint(), timestamp: _lastValidQueryResponse.resultTimestamp, - tallyHash: _lastValidQueryResponse.resultTallyHash, + drTxHash: _lastValidQueryResponse.resultDrTxHash, status: latestUpdateQueryResponseStatus(feedId) }); } else { @@ -613,7 +613,7 @@ contract WitPriceFeedsV21 return IWitPriceFeedsSolver.Price({ value: 0, timestamp: 0, - tallyHash: 0, + drTxHash: 0, status: latestUpdateQueryResponseStatus(feedId) }); } diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index d471f2ae..1bd903d0 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -3,16 +3,23 @@ pragma solidity >=0.7.0 <0.9.0; import "../WitOracleRadonRegistry.sol"; +import "../interfaces/IWitOracleAdminACLs.sol"; +import "../interfaces/IWitOracleBlocks.sol"; import "../interfaces/IWitOracleConsumer.sol"; import "../interfaces/IWitOracleEvents.sol"; import "../interfaces/IWitOracleReporter.sol"; import "../libs/Witnet.sol"; +import "../patterns/Escrowable.sol"; /// @title Witnet Request Board base data model library /// @author The Witnet Foundation. library WitOracleDataLib { - using Witnet for Witnet.QueryRequest; + using Witnet for Witnet.Beacon; + using Witnet for Witnet.QueryReport; + using Witnet for Witnet.QueryResponseReport; + using Witnet for Witnet.RadonSLA; + using WitnetCBOR for WitnetCBOR.CBOR; bytes32 internal constant _WIT_ORACLE_DATA_SLOTHASH = @@ -23,8 +30,12 @@ library WitOracleDataLib { uint256 nonce; mapping (uint => Witnet.Query) queries; mapping (address => bool) reporters; + mapping (address => Escrowable.Escrow) escrows; + mapping (uint256 => Witnet.Beacon) beacons; + uint256 lastKnownBeaconIndex; } + // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- @@ -36,24 +47,38 @@ library WitOracleDataLib { } } - function isReporter(address addr) internal view returns (bool) { - return data().reporters[addr]; + function queryHashOf(Storage storage self, bytes4 channel, uint256 queryId) + internal view returns (bytes32) + { + Witnet.Query storage __query = self.queries[queryId]; + return keccak256(abi.encode( + channel, + queryId, + blockhash(__query.block), + __query.request.radonRadHash != bytes32(0) + ? __query.request.radonRadHash + : keccak256(bytes(__query.request.radonBytecode)), + __query.request.radonSLA + )); } /// Saves query response into storage. function saveQueryResponse( + address evmReporter, + uint64 evmFinalityBlock, uint256 queryId, uint32 resultTimestamp, - bytes32 resultTallyHash, + bytes32 resultDrTxHash, bytes memory resultCborBytes ) internal { seekQuery(queryId).response = Witnet.QueryResponse({ - reporter: msg.sender, - finality: uint64(block.number), + reporter: evmReporter, + finality: evmFinalityBlock, resultTimestamp: resultTimestamp, - resultTallyHash: resultTallyHash, - resultCborBytes: resultCborBytes + resultDrTxHash: resultDrTxHash, + resultCborBytes: resultCborBytes, + disputer: address(0) }); } @@ -72,93 +97,286 @@ library WitOracleDataLib { return data().queries[queryId].response; } - function seekQueryStatus(uint256 queryId) internal view returns (Witnet.QueryStatus) { - Witnet.Query storage __query = data().queries[queryId]; + + /// ======================================================================= + /// --- Escrowable -------------------------------------------------------- + + function burn(address from, uint256 value) public { + require( + data().escrows[from].balance >= value, + "Escrowable: insufficient balance" + ); + data().escrows[from].balance -= value; + emit Escrowable.Burnt(from, value); + } + + function deposit(address to, uint256 value) public { + data().escrows[to].balance += value; + emit Payable.Received(to, value); + } + + function stake(address from, uint256 value) public { + Escrowable.Escrow storage __escrow = data().escrows[from]; + require( + __escrow.balance >= value, + "Escrowable: insufficient balance" + ); + __escrow.balance -= value; + __escrow.collateral += value; + emit Escrowable.Staked(from, value); + } + + function slash(address from, address to, uint256 value) public { + Escrowable.Escrow storage __escrowFrom = data().escrows[from]; + Escrowable.Escrow storage __escrowTo = data().escrows[to]; + require( + __escrowFrom.collateral >= value, + "Escrowable: insufficient collateral" + ); + __escrowTo.balance += value; + __escrowFrom.collateral -= value; + emit Escrowable.Slashed(from, value); + emit Payable.Received(to, value); + } + + function unstake(address from, uint256 value) public { + Escrowable.Escrow storage __escrow = data().escrows[from]; + require( + __escrow.collateral >= value, + "Escrowable: insufficient collateral" + ); + __escrow.collateral -= value; + __escrow.balance += value; + emit Escrowable.Unstaked(from, value); + } + + function withdraw(address from) public returns (uint256 _withdrawn) { + Escrowable.Escrow storage __escrow = data().escrows[from]; + _withdrawn = __escrow.balance; + __escrow.balance = 0; + emit Escrowable.Withdrawn(from, _withdrawn); + } + + + /// ======================================================================= + /// --- IWitOracleAdminACLs ----------------------------------------------- + + function isReporter(address addr) internal view returns (bool) { + return data().reporters[addr]; + } + + function setReporters(address[] calldata reporters) public { + for (uint ix = 0; ix < reporters.length; ix ++) { + data().reporters[reporters[ix]] = true; + } + emit IWitOracleAdminACLs.ReportersSet(reporters); + } + + function unsetReporters(address[] calldata reporters) public { + for (uint ix = 0; ix < reporters.length; ix ++) { + data().reporters[reporters[ix]] = false; + } + emit IWitOracleAdminACLs.ReportersUnset(reporters); + } + + + /// ======================================================================= + /// --- IWitOracle -------------------------------------------------------- + + function fetchQueryResponseTrustlessly( + uint256 evmQueryReportingStake, + uint256 queryId, + Witnet.QueryStatus queryStatus + ) + public returns (Witnet.QueryResponse memory _queryResponse) + { + Witnet.Query storage __query = seekQuery(queryId); + + uint72 _evmReward = __query.request.evmReward; + __query.request.evmReward = 0; + + if (queryStatus == Witnet.QueryStatus.Expired) { + if (_evmReward > 0) { + if (__query.response.disputer != address(0)) { + // transfer reporter's stake to the disputer + slash( + __query.response.reporter, + __query.response.disputer, + evmQueryReportingStake + ); + // transfer back disputer's stake + unstake( + __query.response.disputer, + evmQueryReportingStake + ); + } + } + + } else if (queryStatus != Witnet.QueryStatus.Finalized) { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(queryStatus) + ))); + } + + // completely delete query metadata from storage: + _queryResponse = __query.response; + delete data().queries[queryId]; + + // transfer unused reward to requester: + if (_evmReward > 0) { + deposit(msg.sender, _evmReward); + } + } + + function getQueryStatusTrustlessly( + uint256 queryId, + uint256 evmQueryAwaitingBlocks + ) + public view returns (Witnet.QueryStatus) + { + Witnet.Query storage __query = seekQuery(queryId); if (__query.response.resultTimestamp != 0) { if (block.number >= __query.response.finality) { - return Witnet.QueryStatus.Finalized; + if (__query.response.disputer != address(0)) { + return Witnet.QueryStatus.Expired; + + } else { + return Witnet.QueryStatus.Finalized; + } } else { - return Witnet.QueryStatus.Reported; + if (__query.response.disputer != address(0)) { + return Witnet.QueryStatus.Disputed; + + } else { + return Witnet.QueryStatus.Reported; + } } - } else if (__query.request.requester != address(0)) { - return Witnet.QueryStatus.Posted; - } else { + } else if (__query.block == 0) { return Witnet.QueryStatus.Unknown; + + } else if (block.number > __query.block + evmQueryAwaitingBlocks * 2) { + return Witnet.QueryStatus.Expired; + + } else if (block.number > __query.block + evmQueryAwaitingBlocks) { + return Witnet.QueryStatus.Delayed; + + } else { + return Witnet.QueryStatus.Posted; } } - function seekQueryResponseStatus(uint256 queryId) internal view returns (Witnet.QueryResponseStatus) { - Witnet.QueryStatus _queryStatus = seekQueryStatus(queryId); + function getQueryResponseStatusTrustlessly( + uint256 queryId, + uint256 evmQueryAwaitingBlocks + ) + public view returns (Witnet.QueryResponseStatus) + { + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( + queryId, + evmQueryAwaitingBlocks + ); if (_queryStatus == Witnet.QueryStatus.Finalized) { - bytes storage __cborValues = data().queries[queryId].response.resultCborBytes; + bytes storage __cborValues = seekQueryResponse(queryId).resultCborBytes; if (__cborValues.length > 0) { // determine whether stored result is an error by peeking the first byte return (__cborValues[0] == bytes1(0xd8) ? Witnet.QueryResponseStatus.Error : Witnet.QueryResponseStatus.Ready ); + } else { // the result is final but delivered to the requesting address return Witnet.QueryResponseStatus.Delivered; } - } else if (_queryStatus == Witnet.QueryStatus.Posted) { + } else if ( + _queryStatus == Witnet.QueryStatus.Posted + || _queryStatus == Witnet.QueryStatus.Delayed + ) { return Witnet.QueryResponseStatus.Awaiting; - } else if (_queryStatus == Witnet.QueryStatus.Reported) { + + } else if ( + _queryStatus == Witnet.QueryStatus.Reported + || _queryStatus == Witnet.QueryStatus.Disputed + ) { return Witnet.QueryResponseStatus.Finalizing; + + } else if (_queryStatus == Witnet.QueryStatus.Expired) { + return Witnet.QueryResponseStatus.Expired; + } else { return Witnet.QueryResponseStatus.Void; } } - // ================================================================================================================ - // --- Public functions ------------------------------------------------------------------------------------------- - function extractWitnetDataRequests(WitOracleRadonRegistry registry, uint256[] calldata queryIds) + /// ======================================================================= + /// --- IWitOracleBlocks -------------------------------------------------- + + function getLastKnownBeacon() internal view returns (Witnet.Beacon storage) { + return data().beacons[data().lastKnownBeaconIndex]; + } + + function getLastKnownBeaconIndex() internal view returns (uint256) { + return data().lastKnownBeaconIndex; + } + + function rollupBeacons(Witnet.FastForward[] calldata rollup) + public returns (Witnet.Beacon memory head) + { + require( + data().beacons[rollup[0].beacon.index].equals(rollup[0].beacon), + "fast-forwarding from unmatching beacon" + ); + head = _verifyFastForwards(rollup); + data().beacons[head.index] = head; + data().lastKnownBeaconIndex = head.index; + emit IWitOracleBlocks.Rollup(head); + } + + function seekBeacon(uint256 _index) internal view returns (Witnet.Beacon storage) { + return data().beacons[_index]; + } + + + /// ======================================================================= + /// --- IWitOracleReporter ------------------------------------------------ + + function extractWitnetDataRequests( + WitOracleRadonRegistry registry, + uint256[] calldata queryIds + ) public view returns (bytes[] memory bytecodes) { bytecodes = new bytes[](queryIds.length); for (uint _ix = 0; _ix < queryIds.length; _ix ++) { - if (seekQueryStatus(queryIds[_ix]) != Witnet.QueryStatus.Unknown) { - Witnet.QueryRequest storage __request = data().queries[queryIds[_ix]].request; - if (__request.radonRadHash != bytes32(0)) { - bytecodes[_ix] = registry.bytecodeOf( - __request.radonRadHash, - __request.radonSLA - ); - } else { - bytecodes[_ix] = registry.bytecodeOf( - __request.radonBytecode, - __request.radonSLA - ); - } + Witnet.QueryRequest storage __request = data().queries[queryIds[_ix]].request; + if (__request.radonRadHash != bytes32(0)) { + bytecodes[_ix] = registry.bytecodeOf( + __request.radonRadHash, + __request.radonSLA + ); + } else { + bytecodes[_ix] = registry.bytecodeOf( + __request.radonBytecode, + __request.radonSLA + ); } } } - - function notInStatusRevertMessage(Witnet.QueryStatus self) public pure returns (string memory) { - if (self == Witnet.QueryStatus.Posted) { - return "query not in Posted status"; - } else if (self == Witnet.QueryStatus.Reported) { - return "query not in Reported status"; - } else if (self == Witnet.QueryStatus.Finalized) { - return "query not in Finalized status"; - } else { - return "bad mood"; - } - } - - function reportResult( + + function reportQueryResponse( + address evmReporter, uint256 evmGasPrice, - uint256 queryId, - uint32 resultTimestamp, - bytes32 resultTallyHash, - bytes calldata resultCborBytes + uint64 evmFinalityBlock, + Witnet.QueryResponseReport calldata report ) public returns (uint256 evmReward) + // todo: turn into private { // read requester address and whether a callback was requested: - Witnet.QueryRequest storage __request = seekQueryRequest(queryId); + Witnet.QueryRequest storage __request = seekQueryRequest(report.queryId); // read query EVM reward: evmReward = __request.evmReward; @@ -172,81 +390,82 @@ library WitOracleDataLib { uint256 evmCallbackActualGas, bool evmCallbackSuccess, string memory evmCallbackRevertMessage - ) = reportResultCallback( + ) = reportQueryResponseCallback( __request.requester, __request.gasCallback, - queryId, - resultTimestamp, - resultTallyHash, - resultCborBytes + evmFinalityBlock, + report ); if (evmCallbackSuccess) { // => the callback run successfully emit IWitOracleEvents.WitOracleQueryReponseDelivered( - queryId, + report.queryId, evmGasPrice, evmCallbackActualGas ); } else { // => the callback reverted emit IWitOracleEvents.WitOracleQueryResponseDeliveryFailed( - queryId, + report.queryId, evmGasPrice, evmCallbackActualGas, bytes(evmCallbackRevertMessage).length > 0 ? evmCallbackRevertMessage : "WitOracleDataLib: callback exceeded gas limit", - resultCborBytes + report.witDrResultCborBytes ); } // upon delivery, successfull or not, the audit trail is saved into storage, // but not the actual result which was intended to be passed over to the requester: saveQueryResponse( - queryId, - resultTimestamp, - resultTallyHash, + evmReporter, + evmFinalityBlock, + report.queryId, + Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + report.witDrTxHash, hex"" ); } else { // => no callback is involved emit IWitOracleEvents.WitOracleQueryResponse( - queryId, + report.queryId, evmGasPrice ); // write query result and audit trail data into storage saveQueryResponse( - queryId, - resultTimestamp, - resultTallyHash, - resultCborBytes + evmReporter, + evmFinalityBlock, + report.queryId, + Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + report.witDrTxHash, + report.witDrResultCborBytes ); } } - function reportResultCallback( + function reportQueryResponseCallback( address evmRequester, - uint256 evmCallbackGasLimit, - uint256 queryId, - uint64 resultTimestamp, - bytes32 resultTallyHash, - bytes calldata resultCborBytes + uint24 evmCallbackGasLimit, + uint64 evmFinalityBlock, + Witnet.QueryResponseReport calldata report ) public returns ( uint256 evmCallbackActualGas, bool evmCallbackSuccess, string memory evmCallbackRevertMessage ) + // todo: turn into private { evmCallbackActualGas = gasleft(); - if (resultCborBytes[0] == bytes1(0xd8)) { - WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(resultCborBytes).readArray(); + if (report.witDrResultCborBytes[0] == bytes1(0xd8)) { + WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(report.witDrResultCborBytes).readArray(); if (_errors.length < 2) { // try to report result with unknown error: try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - queryId, - resultTimestamp, - resultTallyHash, - block.number, + report.queryId, + Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + report.witDrTxHash, + evmFinalityBlock, Witnet.ResultErrorCodes.Unknown, WitnetCBOR.CBOR({ buffer: WitnetBuffer.Buffer({ data: hex"", cursor: 0}), @@ -261,13 +480,14 @@ library WitOracleDataLib { } catch Error(string memory err) { evmCallbackRevertMessage = err; } + } else { // try to report result with parsable error: try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - queryId, - resultTimestamp, - resultTallyHash, - block.number, + report.queryId, + Witnet.determineEpochFromTimestamp(report.witDrResultEpoch), + report.witDrTxHash, + evmFinalityBlock, Witnet.ResultErrorCodes(_errors[0].readUint()), _errors[0] ) { @@ -276,14 +496,15 @@ library WitOracleDataLib { evmCallbackRevertMessage = err; } } + } else { // try to report result result with no error : try IWitOracleConsumer(evmRequester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( - queryId, - resultTimestamp, - resultTallyHash, - block.number, - WitnetCBOR.fromBytes(resultCborBytes) + report.queryId, + Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + report.witDrTxHash, + evmFinalityBlock, + WitnetCBOR.fromBytes(report.witDrResultCborBytes) ) { evmCallbackSuccess = true; } catch Error(string memory err) { @@ -292,4 +513,430 @@ library WitOracleDataLib { } evmCallbackActualGas -= gasleft(); } + + function reportQueryResponseTrustlessly( + bytes4 channel, + uint256 evmGasPrice, + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake, + Witnet.QueryStatus queryStatus, + Witnet.QueryResponseReport calldata queryResponseReport + ) + public returns (uint256) + { + (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( + channel, + queryResponseReport + ); + require( + _isValidQueryResponseReport, + _queryResponseReportInvalidError + ); + + address _queryReporter; + if (queryStatus == Witnet.QueryStatus.Posted) { + _queryReporter = queryResponseReport.queryRelayer(); + require( + _queryReporter == msg.sender, + "unauthorized query reporter" + ); + } + + else if (queryStatus == Witnet.QueryStatus.Delayed) { + _queryReporter = msg.sender; + + } else { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(queryStatus) + ))); + } + + // stake from caller's balance: + stake(msg.sender, evmQueryReportingStake); + + // save query response into storage: + return reportQueryResponse( + _queryReporter, + evmGasPrice, + uint64(block.number + evmQueryAwaitingBlocks), + queryResponseReport + ); + } + + + /// ======================================================================= + /// --- IWitOracleReporterTrustless --------------------------------------- + + function claimQueryReward( + uint256 evmQueryReportingStake, + uint256 queryId, + Witnet.QueryStatus queryStatus + ) + public returns (uint256 evmReward) + { + Witnet.Query storage __query = seekQuery(queryId); + + evmReward = __query.request.evmReward; + __query.request.evmReward = 0; + + // revert if already claimed: + require( + evmReward > 0, + "already claimed" + ); + + // deposit query's reward into the caller's balance (if proven to be legitimate): + deposit( + msg.sender, + evmReward + ); + + if (queryStatus == Witnet.QueryStatus.Finalized) { + // only the reporter can claim, + require( + msg.sender == __query.request.requester, + "not the requester" + ); + // recovering also the report stake + unstake( + msg.sender, + evmQueryReportingStake + ); + + } else if (queryStatus == Witnet.QueryStatus.Expired) { + if (__query.response.disputer != address(0)) { + // only the disputer can claim, + require( + msg.sender == __query.response.disputer, + "not the disputer" + ); + // receiving the reporter's stake, + slash( + __query.response.reporter, + msg.sender, + evmQueryReportingStake + ); + // and recovering the dispute stake, + unstake( + msg.sender, + evmQueryReportingStake + ); + evmReward += evmQueryReportingStake; + + } else { + // only the requester can claim, + require( + msg.sender == __query.request.requester, + "not the requester" + ); + + } + } else { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(queryStatus) + ))); + } + } + + function disputeQueryResponse( + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake, + uint256 queryId + ) + public returns (uint256 evmPotentialReward) + { + stake(msg.sender, evmQueryReportingStake); + Witnet.Query storage __query = seekQuery(queryId); + __query.response.disputer = msg.sender; + __query.response.finality = uint64(block.number + evmQueryAwaitingBlocks); + emit IWitOracleEvents.WitOracleQueryResponseDispute( + queryId, + msg.sender + ); + return ( + __query.request.evmReward + + evmQueryReportingStake + ); + } + + function rollupQueryResponseProof( + bytes4 channel, + uint256 evmQueryReportingStake, + Witnet.QueryResponseReport calldata queryResponseReport, + Witnet.QueryStatus queryStatus, + Witnet.FastForward[] calldata witOracleRollup, + bytes32[] calldata ddrTalliesMerkleTrie + ) + public returns (uint256 evmTotalReward) + { + // validate query response report + (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( + channel, + queryResponseReport + ); + require(_isValidQueryResponseReport, _queryResponseReportInvalidError); + + // validate rollup proofs + Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); + require( + _witOracleHead.index == Witnet.determineBeaconIndexFromEpoch( + queryResponseReport.witDrResultEpoch + ) + 1, "mismatching head beacon" + ); + + // validate merkle proof + require( + _witOracleHead.ddrTalliesMerkleRoot == Witnet.merkleRoot( + ddrTalliesMerkleTrie, + queryResponseReport.tallyHash() + ), "invalid merkle proof" + ); + + Witnet.Query storage __query = seekQuery(queryResponseReport.queryId); + // process query response report depending on query's current status ... + { + if (queryStatus == Witnet.QueryStatus.Reported) { + // check that proven report actually differs from what was formerly reported + require( + keccak256(abi.encode( + queryResponseReport.witDrTxHash, + queryResponseReport.witDrResultEpoch, + queryResponseReport.witDrResultCborBytes + )) != keccak256(abi.encode( + __query.response.resultDrTxHash, + Witnet.determineEpochFromTimestamp(__query.response.resultTimestamp), + __query.response.resultCborBytes + )), + "proving no fake report" + ); + + // transfer fake reporter's stake into caller's balance: + slash( + __query.response.reporter, + msg.sender, + evmQueryReportingStake + ); + + // transfer query's reward into caller's balance + deposit(msg.sender, __query.request.evmReward); + + // update query's response data into storage: + __query.response.reporter = msg.sender; + __query.response.resultCborBytes = queryResponseReport.witDrResultCborBytes; + __query.response.resultDrTxHash = queryResponseReport.witDrTxHash; + __query.response.resultTimestamp = Witnet.determineTimestampFromEpoch(queryResponseReport.witDrResultEpoch); + + } else if (queryStatus == Witnet.QueryStatus.Disputed) { + // check that proven report actually matches what was formerly reported + require( + keccak256(abi.encode( + queryResponseReport.witDrTxHash, + queryResponseReport.witDrResultEpoch, + queryResponseReport.witDrResultCborBytes + )) == keccak256(abi.encode( + __query.response.resultDrTxHash, + Witnet.determineEpochFromTimestamp(__query.response.resultTimestamp), + __query.response.resultCborBytes + )), + "proving disputed fake report" + ); + + // transfer fake disputer's stake into reporter's balance: + slash( + __query.response.disputer, + __query.response.reporter, + evmQueryReportingStake + ); + + // transfer query's reward into reporter's balance: + deposit(__query.response.reporter, __query.request.evmReward); + + // clear query's disputer + __query.response.disputer = address(0); + + } else { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(queryStatus) + ))); + } + + // finalize query: + evmTotalReward = __query.request.evmReward + evmQueryReportingStake; + __query.request.evmReward = 0; // no claimQueryReward(.) will be required (nor accepted whatsoever) + __query.response.finality = uint64(block.number); // set query status to Finalized + } + } + + function rollupQueryResultProof( + Witnet.QueryReport calldata queryReport, + Witnet.FastForward[] calldata witOracleRollup, + bytes32[] calldata droTalliesMerkleTrie + ) + public returns (Witnet.Result memory) + { + // validate query report + require( + queryReport.witDrRadHash != bytes32(0) + && queryReport.witDrResultCborBytes.length > 0 + && queryReport.witDrResultEpoch > 0 + && queryReport.witDrTxHash != bytes32(0) + && queryReport.witDrSLA.isValid() + , "invalid query report" + ); + + // validate rollup proofs + Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); + require( + _witOracleHead.index == Witnet.determineBeaconIndexFromEpoch( + queryReport.witDrResultEpoch + ) + 1, "mismatching head beacon" + ); + + // validate merkle proof + require( + _witOracleHead.droTalliesMerkleRoot == Witnet.merkleRoot( + droTalliesMerkleTrie, + queryReport.tallyHash() + ), "invalid merkle proof" + ); + + // deserialize result cbor bytes into Witnet.Result + return Witnet.toWitnetResult( + queryReport.witDrResultCborBytes + ); + } + + + /// ======================================================================= + /// --- Other public helper methods --------------------------------------- + + function isValidQueryResponseReport(bytes4 channel, Witnet.QueryResponseReport calldata report) + public view + // todo: turn into private + returns (bool, string memory) + { + if (queryHashOf(data(), channel, report.queryId) != report.queryHash) { + return (false, "invalid query hash"); + + } else if (report.witDrResultEpoch == 0) { + return (false, "invalid result epoch"); + + } else if (report.witDrResultCborBytes.length == 0) { + return (false, "invalid empty result"); + + } else { + return (true, new string(0)); + + } + } + + function notInStatusRevertMessage(Witnet.QueryStatus self) public pure returns (string memory) { + if (self == Witnet.QueryStatus.Posted) { + return "query not in Posted status"; + } else if (self == Witnet.QueryStatus.Reported) { + return "query not in Reported status"; + } else if (self == Witnet.QueryStatus.Finalized) { + return "query not in Finalized status"; + } else { + return "bad mood"; + } + } + + function toString(Witnet.QueryStatus _status) public pure returns (string memory) { + if (_status == Witnet.QueryStatus.Posted) { + return "Posted"; + } else if (_status == Witnet.QueryStatus.Reported) { + return "Reported"; + } else if (_status == Witnet.QueryStatus.Finalized) { + return "Finalized"; + } else if (_status == Witnet.QueryStatus.Delayed) { + return "Delayed"; + } else if (_status == Witnet.QueryStatus.Expired) { + return "Expired"; + } else if (_status == Witnet.QueryStatus.Disputed) { + return "Disputed"; + } else { + return "Unknown"; + } + } + + function toString(Witnet.QueryResponseStatus _status) external pure returns (string memory) { + if (_status == Witnet.QueryResponseStatus.Awaiting) { + return "Awaiting"; + } else if (_status == Witnet.QueryResponseStatus.Ready) { + return "Ready"; + } else if (_status == Witnet.QueryResponseStatus.Error) { + return "Reverted"; + } else if (_status == Witnet.QueryResponseStatus.Finalizing) { + return "Finalizing"; + } else if (_status == Witnet.QueryResponseStatus.Delivered) { + return "Delivered"; + } else if (_status == Witnet.QueryResponseStatus.Expired) { + return "Expired"; + } else { + return "Unknown"; + } + } + + + /// ======================================================================= + /// --- Private library methods ------------------------------------------- + + function _verifyFastForwards(Witnet.FastForward[] calldata ff) + private pure + returns (Witnet.Beacon calldata) + { + for (uint _ix = 1; _ix < ff.length; _ix ++) { + require( + ff[_ix].beacon.prevIndex == ff[_ix - 1].beacon.index + && ff[_ix].beacon.prevRoot == ff[_ix - 1].beacon.root(), + string(abi.encodePacked( + "mismatching beacons on fast-forward step #", + Witnet.toString(_ix) + )) + ); + require( + ff[_ix].committeeMissingPubkeys.length <= ( + Witnet.WIT_2_FAST_FORWARD_COMMITTEE_SIZE / 3 + ), string(abi.encodePacked( + "too many missing pubkeys on fast-forward step #", + Witnet.toString(_ix) + )) + ); + // TODO: + // uint256[4] memory _committeePubkey = ff[_ix - 1].beacon.nextCommitteePubkey; + // for (uint _mx = 0; _mx < ff[_ix].committeeMissingPubKeys.length; _mx ++) { + // require( + // 0 < ( + // ff[_ix].committeeMissingPubkey[_mx][0] + // + ff[_ix].committeeMissingPubkey[_mx][1] + // + ff[_ix].committeeMissingPubkey[_mx][2] + // + ff[_ix].committeeMissingPubkey[_mx][3] + + // ), string(abi.encodePacked( + // "null missing pubkey on fast-forward step #", + // Witnet.toString(_ix), + // " index #", + // Witnet.toString(_mx) + // )) + // ); + // _committeePubkey -= ff[_ix].committeeMissingPubkey[_mx]; + // } + // require( + // _verifySignature( + // ff[_ix].beacon.committeeSignature, + // _committeePubkey, + // ff[_ix].beacon.root() + + // ), string(abi.encodedPacked( + // "invalid signature on fast-forward step #", + // Witnet.toString(_ix) + // )) + // ); + } + return ff[ff.length - 1].beacon; + } } diff --git a/contracts/interfaces/IWitOracleConsumer.sol b/contracts/interfaces/IWitOracleConsumer.sol index 7d58196e..51b718bd 100644 --- a/contracts/interfaces/IWitOracleConsumer.sol +++ b/contracts/interfaces/IWitOracleConsumer.sol @@ -10,14 +10,14 @@ interface IWitOracleConsumer { /// @dev It should revert if called from any other address different to the WitOracle being used /// @dev by the WitOracleConsumer contract. /// @param queryId The unique identifier of the Witnet query being reported. - /// @param resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. /// @param witnetResultCborValue The CBOR-encoded resulting value of the Witnet query being reported. function reportWitOracleResultValue( uint256 queryId, uint64 resultTimestamp, - bytes32 resultTallyHash, + bytes32 resultDrTxHash, uint256 resultEvmFinalityBlock, WitnetCBOR.CBOR calldata witnetResultCborValue ) external; @@ -27,7 +27,7 @@ interface IWitOracleConsumer { /// @dev It should revert if called from any other address different to the WitOracle being used /// @dev by the WitOracleConsumer contract. /// @param queryId The unique identifier of the Witnet query being reported. - /// @param resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. /// @param errorCode The error code enum identifying the error produced during resolution on the Witnet blockchain. @@ -35,7 +35,7 @@ interface IWitOracleConsumer { function reportWitOracleResultError( uint256 queryId, uint64 resultTimestamp, - bytes32 resultTallyHash, + bytes32 resultDrTxHash, uint256 resultEvmFinalityBlock, Witnet.ResultErrorCodes errorCode, WitnetCBOR.CBOR calldata errorArgs diff --git a/contracts/interfaces/IWitPriceFeedsSolver.sol b/contracts/interfaces/IWitPriceFeedsSolver.sol index 8e7fc3ae..ccf69ba8 100644 --- a/contracts/interfaces/IWitPriceFeedsSolver.sol +++ b/contracts/interfaces/IWitPriceFeedsSolver.sol @@ -8,7 +8,7 @@ interface IWitPriceFeedsSolver { struct Price { uint value; uint timestamp; - bytes32 tallyHash; + bytes32 drTxHash; Witnet.QueryResponseStatus status; } function class() external pure returns (string memory); diff --git a/contracts/interfaces/IWitRandomness.sol b/contracts/interfaces/IWitRandomness.sol index 8d60d870..0eebf1c7 100644 --- a/contracts/interfaces/IWitRandomness.sol +++ b/contracts/interfaces/IWitRandomness.sol @@ -33,12 +33,12 @@ interface IWitRandomness { /// @param blockNumber Block number from which the search will start. /// @return witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. /// @return resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. - /// @return resultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. + /// @return resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. /// @return witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final. function fetchRandomnessAfterProof(uint256 blockNumber) external view returns ( bytes32 witnetResultRandomness, uint64 resultTimestamp, - bytes32 resultTallyHash, + bytes32 resultDrTxHash, uint256 witnetResultFinalityBlock ); diff --git a/contracts/libs/WitOracleRadonEncodingLib.sol b/contracts/libs/WitOracleRadonEncodingLib.sol index 4329d823..25b14672 100644 --- a/contracts/libs/WitOracleRadonEncodingLib.sol +++ b/contracts/libs/WitOracleRadonEncodingLib.sol @@ -405,13 +405,15 @@ library WitOracleRadonEncodingLib { maxDataSize ); } - return maxDataSize + 3; // TODO: determine CBOR-encoding length overhead + return maxDataSize + 3; // todo?: determine CBOR-encoding length overhead?? + } else if ( dataType == Witnet.RadonDataTypes.Integer || dataType == Witnet.RadonDataTypes.Float || dataType == Witnet.RadonDataTypes.Bool ) { return 9; + } else { revert UnsupportedRadonDataType( uint8(dataType), diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index c5ec28c5..0a3b8c79 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./WitnetCBOR.sol"; @@ -11,10 +10,44 @@ library Witnet { using WitnetCBOR for WitnetCBOR.CBOR; using WitnetCBOR for WitnetCBOR.CBOR[]; + uint32 constant internal WIT_1_GENESIS_TIMESTAMP = 0; // TBD + uint32 constant internal WIT_1_SECS_PER_EPOCH = 45; + + uint32 constant internal WIT_2_GENESIS_BEACON_INDEX = 0; // TBD + uint32 constant internal WIT_2_GENESIS_BEACON_PREV_INDEX = 0; // TBD + bytes24 constant internal WIT_2_GENESIS_BEACON_PREV_ROOT = 0; // TBD + bytes16 constant internal WIT_2_GENESIS_BEACON_DDR_TALLIES_MERKLE_ROOT = 0; // TBD + bytes16 constant internal WIT_2_GENESIS_BEACON_DRO_TALLIES_MERKLE_ROOT = 0; // TBD + uint256 constant internal WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_0 = 0; // TBD + uint256 constant internal WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_1 = 0; // TBD + uint256 constant internal WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_2 = 0; // TBD + uint256 constant internal WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 = 0; // TBD + uint32 constant internal WIT_2_GENESIS_EPOCH = 0; // TBD + uint32 constant internal WIT_2_GENESIS_TIMESTAMP = 0; // TBD + uint32 constant internal WIT_2_SECS_PER_EPOCH = 20; // TBD + uint32 constant internal WIT_2_FAST_FORWARD_COMMITTEE_SIZE = 64; // TBD + + struct Beacon { + uint32 index; + uint32 prevIndex; + bytes24 prevRoot; + bytes16 ddrTalliesMerkleRoot; + bytes16 droTalliesMerkleRoot; + uint256[4] nextCommitteeAggPubkey; + } + + struct FastForward { + Beacon beacon; + uint256[2] committeeAggSignature; + uint256[4][] committeeMissingPubkeys; + } + + /// Struct containing both request and response data related to every query posted to the Witnet Request Board struct Query { QueryRequest request; QueryResponse response; + uint256 block; } /// Data kept in EVM-storage for every Request posted to the Witnet Request Board. @@ -24,7 +57,7 @@ library Witnet { uint72 evmReward; // EVM amount in wei eventually to be paid to the legit result reporter. bytes radonBytecode; // Optional: Witnet Data Request bytecode to be solved by the Witnet blockchain. bytes32 radonRadHash; // Optional: Previously verified hash of the Witnet Data Request to be solved. - RadonSLA radonSLA; // Minimum Service-Level parameters to be committed by the Witnet blockchain. + RadonSLA radonSLA; // Minimum Service-Level parameters to be committed by the Witnet blockchain. } /// QueryResponse metadata and result as resolved by the Witnet blockchain. @@ -32,8 +65,26 @@ library Witnet { address reporter; // EVM address from which the Data Request result was reported. uint64 finality; // EVM block number at which the reported data will be considered to be finalized. uint32 resultTimestamp; // Unix timestamp (seconds) at which the data request was resolved in the Witnet blockchain. - bytes32 resultTallyHash; // Unique hash of the commit/reveal act in the Witnet blockchain that resolved the data request. + bytes32 resultDrTxHash; // Unique hash of the commit/reveal act in the Witnet blockchain that resolved the data request. bytes resultCborBytes; // CBOR-encode result to the request, as resolved in the Witnet blockchain. + address disputer; + } + + struct QueryResponseReport { + uint256 queryId; + bytes32 queryHash; // KECCAK256(channel | queryId | blockhash(query.block) | ...) + bytes witDrRelayerSignature; // ECDSA.signature(queryHash) + bytes32 witDrTxHash; + uint32 witDrResultEpoch; + bytes witDrResultCborBytes; + } + + struct QueryReport { + bytes32 witDrRadHash; + RadonSLA witDrSLA; + bytes32 witDrTxHash; + uint32 witDrResultEpoch; + bytes witDrResultCborBytes; } /// QueryResponse status from a requester's point of view. @@ -43,7 +94,8 @@ library Witnet { Ready, Error, Finalizing, - Delivered + Delivered, + Expired } /// Possible status of a Witnet query. @@ -51,7 +103,10 @@ library Witnet { Unknown, Posted, Reported, - Finalized + Finalized, + Delayed, + Expired, + Disputed } /// Data struct containing the Witnet-provided result to a Data Request. @@ -257,35 +312,6 @@ library Witnet { UnhandledIntercept } - function isCircumstantial(ResultErrorCodes self) internal pure returns (bool) { - return (self == ResultErrorCodes.CircumstantialFailure); - } - - function lackOfConsensus(ResultErrorCodes self) internal pure returns (bool) { - return ( - self == ResultErrorCodes.InsufficientCommits - || self == ResultErrorCodes.InsufficientMajority - || self == ResultErrorCodes.InsufficientReveals - ); - } - - function isRetriable(ResultErrorCodes self) internal pure returns (bool) { - return ( - lackOfConsensus(self) - || isCircumstantial(self) - || poorIncentives(self) - ); - } - - function poorIncentives(ResultErrorCodes self) internal pure returns (bool) { - return ( - self == ResultErrorCodes.OversizedTallyResult - || self == ResultErrorCodes.InsufficientCommits - || self == ResultErrorCodes.BridgePoorIncentives - || self == ResultErrorCodes.BridgeOversizedTallyResult - ); - } - /// Possible types either processed by Witnet Radon Scripts or included within results to Witnet Data Requests. enum RadonDataTypes { /* 0x00 */ Any, @@ -377,10 +403,10 @@ library Witnet { } struct RadonSLA { - /// Number of witnessing nodes in the Witnet blockchain that contribute to solve some data query. + /// Number of witnessing nodes in the Wit/oracle blockchain that will contribute to solve some data request. uint8 witNumWitnesses; - /// Reward in $nanoWit ultimately paid to every earnest node in the Wit/oracle blockchain contributing to solve some data query. + /// Reward in $nanoWit ultimately paid to every earnest node in the Wit/oracle blockchain contributing to solve some data request. uint64 witUnitaryReward; /// Maximum size accepted for the CBOR-encoded buffer containing successfull result values. @@ -397,207 +423,78 @@ library Witnet { } - /// =============================================================================================================== - /// --- 'Witnet.RadonSLA' helper methods ------------------------------------------------------------------------ + /// ======================================================================= + /// --- Witnet.Beacon helper functions ------------------------------------ - function equalOrGreaterThan(RadonSLA memory a, RadonSLA memory b) - internal pure returns (bool) + function equals(Beacon storage self, Beacon calldata other) + internal view returns (bool) { return ( - a.witNumWitnesses >= b.witNumWitnesses - && a.witUnitaryReward >= b.witUnitaryReward - && a.maxTallyResultSize <= b.maxTallyResultSize - ); - } - - function isValid(RadonSLA memory sla) internal pure returns (bool) { - return ( - sla.witUnitaryReward > 0 - && sla.witNumWitnesses > 0 && sla.witNumWitnesses <= 127 - && sla.maxTallyResultSize > 0 + root(self) == root(other) ); } - function toV1(RadonSLA memory self) internal pure returns (Witnet.RadonSLAv1 memory) { - return Witnet.RadonSLAv1({ - numWitnesses: self.witNumWitnesses, - minConsensusPercentage: 51, - witnessReward: self.witUnitaryReward, - witnessCollateral: self.witUnitaryReward * 100, - minerCommitRevealFee: self.witUnitaryReward / self.witNumWitnesses - }); + function root(Beacon calldata self) internal pure returns (bytes24) { + return bytes24(keccak256(abi.encode( + self.index, + self.prevIndex, + self.prevRoot, + self.ddrTalliesMerkleRoot, + self.droTalliesMerkleRoot, + self.nextCommitteeAggPubkey + ))); } - - /// Sum of all rewards in $nanoWit to be paid to nodes in the Wit/oracle blockchain that contribute to solve some data query. - function witTotalReward(RadonSLA storage self) internal view returns (uint64) { - return self.witUnitaryReward / (self.witNumWitnesses + 3); + + function root(Beacon storage self) internal view returns (bytes24) { + return bytes24(keccak256(abi.encode( + self.index, + self.prevIndex, + self.prevRoot, + self.ddrTalliesMerkleRoot, + self.droTalliesMerkleRoot, + self.nextCommitteeAggPubkey + ))); } - /// =============================================================================================================== - /// --- 'uint*' helper methods ------------------------------------------------------------------------------------ - - /// @notice Convert a `uint8` into a 2 characters long `string` representing its two less significant hexadecimal values. - function toHexString(uint8 _u) - internal pure - returns (string memory) - { - bytes memory b2 = new bytes(2); - uint8 d0 = uint8(_u / 16) + 48; - uint8 d1 = uint8(_u % 16) + 48; - if (d0 > 57) - d0 += 7; - if (d1 > 57) - d1 += 7; - b2[0] = bytes1(d0); - b2[1] = bytes1(d1); - return string(b2); - } + /// ======================================================================= + /// --- Witnet.FastForward helper functions ------------------------------- - /// @notice Convert a `uint8` into a 1, 2 or 3 characters long `string` representing its. - /// three less significant decimal values. - function toString(uint8 _u) - internal pure - returns (string memory) + function head(FastForward[] calldata rollup) + internal pure returns (Beacon calldata) { - if (_u < 10) { - bytes memory b1 = new bytes(1); - b1[0] = bytes1(uint8(_u) + 48); - return string(b1); - } else if (_u < 100) { - bytes memory b2 = new bytes(2); - b2[0] = bytes1(uint8(_u / 10) + 48); - b2[1] = bytes1(uint8(_u % 10) + 48); - return string(b2); - } else { - bytes memory b3 = new bytes(3); - b3[0] = bytes1(uint8(_u / 100) + 48); - b3[1] = bytes1(uint8(_u % 100 / 10) + 48); - b3[2] = bytes1(uint8(_u % 10) + 48); - return string(b3); - } - } - - /// @notice Convert a `uint` into a string` representing its value. - function toString(uint v) - internal pure - returns (string memory) - { - uint maxlength = 100; - bytes memory reversed = new bytes(maxlength); - uint i = 0; - do { - uint8 remainder = uint8(v % 10); - v = v / 10; - reversed[i ++] = bytes1(48 + remainder); - } while (v != 0); - bytes memory buf = new bytes(i); - for (uint j = 1; j <= i; j ++) { - buf[j - 1] = reversed[i - j]; - } - return string(buf); + return rollup[rollup.length - 1].beacon; } /// =============================================================================================================== - /// --- 'bytes' helper methods ------------------------------------------------------------------------------------ - - /// @dev Transform given bytes into a Witnet.Result instance. - /// @param cborBytes Raw bytes representing a CBOR-encoded value. - /// @return A `Witnet.Result` instance. - function toWitnetResult(bytes memory cborBytes) - internal pure - returns (Witnet.Result memory) - { - WitnetCBOR.CBOR memory cborValue = WitnetCBOR.fromBytes(cborBytes); - return _resultFromCborValue(cborValue); - } + /// --- Witnet.Query*Report helper methods ------------------------------------------------------------------------ - function toAddress(bytes memory _value) internal pure returns (address) { - return address(toBytes20(_value)); + function queryRelayer(QueryResponseReport calldata self) internal pure returns (address) { + return recoverAddr(self.witDrRelayerSignature, self.queryHash); } - function toBytes4(bytes memory _value) internal pure returns (bytes4) { - return bytes4(toFixedBytes(_value, 4)); - } - - function toBytes20(bytes memory _value) internal pure returns (bytes20) { - return bytes20(toFixedBytes(_value, 20)); - } - - function toBytes32(bytes memory _value) internal pure returns (bytes32) { - return toFixedBytes(_value, 32); + function tallyHash(QueryResponseReport calldata self) internal pure returns (bytes32) { + return keccak256(abi.encode( + self.queryHash, + self.witDrRelayerSignature, + self.witDrTxHash, + self.witDrResultEpoch, + self.witDrResultCborBytes + )); } - function toFixedBytes(bytes memory _value, uint8 _numBytes) - internal pure - returns (bytes32 _bytes32) - { - assert(_numBytes <= 32); - unchecked { - uint _len = _value.length > _numBytes ? _numBytes : _value.length; - for (uint _i = 0; _i < _len; _i ++) { - _bytes32 |= bytes32(_value[_i] & 0xff) >> (_i * 8); - } - } + function tallyHash(QueryReport calldata self) internal pure returns (bytes32) { + return keccak256(abi.encode( + self.witDrRadHash, + self.witDrSLA, + self.witDrTxHash, + self.witDrResultEpoch, + self.witDrResultCborBytes + )); } - /// =============================================================================================================== - /// --- 'string' helper methods ----------------------------------------------------------------------------------- - - function toLowerCase(string memory str) - internal pure - returns (string memory) - { - bytes memory lowered = new bytes(bytes(str).length); - unchecked { - for (uint i = 0; i < lowered.length; i ++) { - uint8 char = uint8(bytes(str)[i]); - if (char >= 65 && char <= 90) { - lowered[i] = bytes1(char + 32); - } else { - lowered[i] = bytes1(char); - } - } - } - return string(lowered); - } - - /// @notice Converts bytes32 into string. - function toString(bytes32 _bytes32) - internal pure - returns (string memory) - { - bytes memory _bytes = new bytes(_toStringLength(_bytes32)); - for (uint _i = 0; _i < _bytes.length;) { - _bytes[_i] = _bytes32[_i]; - unchecked { - _i ++; - } - } - return string(_bytes); - } - - function tryUint(string memory str) - internal pure - returns (uint res, bool) - { - unchecked { - for (uint256 i = 0; i < bytes(str).length; i++) { - if ( - (uint8(bytes(str)[i]) - 48) < 0 - || (uint8(bytes(str)[i]) - 48) > 9 - ) { - return (0, false); - } - res += (uint8(bytes(str)[i]) - 48) * 10 ** (bytes(str).length - i - 1); - } - return (res, true); - } - } - - /// =============================================================================================================== /// --- 'Witnet.Result' helper methods ---------------------------------------------------------------------------- @@ -615,7 +512,6 @@ library Witnet { if (result.value.majorType == uint8(WitnetCBOR.MAJOR_TYPE_BYTES)) { return toAddress(result.value.readBytes()); } else { - // TODO revert("WitnetLib: reading address from string not yet supported."); } } @@ -760,7 +656,263 @@ library Witnet { /// =============================================================================================================== - /// --- P-RNG generators ------------------------------------------------------------------------------------------ + /// --- Witnet.ResultErrorCodes helper methods -------------------------------------------------------------------- + + function isCircumstantial(ResultErrorCodes self) internal pure returns (bool) { + return (self == ResultErrorCodes.CircumstantialFailure); + } + + function isRetriable(ResultErrorCodes self) internal pure returns (bool) { + return ( + lackOfConsensus(self) + || isCircumstantial(self) + || poorIncentives(self) + ); + } + + function lackOfConsensus(ResultErrorCodes self) internal pure returns (bool) { + return ( + self == ResultErrorCodes.InsufficientCommits + || self == ResultErrorCodes.InsufficientMajority + || self == ResultErrorCodes.InsufficientReveals + ); + } + + function poorIncentives(ResultErrorCodes self) internal pure returns (bool) { + return ( + self == ResultErrorCodes.OversizedTallyResult + || self == ResultErrorCodes.InsufficientCommits + || self == ResultErrorCodes.BridgePoorIncentives + || self == ResultErrorCodes.BridgeOversizedTallyResult + ); + } + + + /// =============================================================================================================== + /// --- 'Witnet.RadonSLA' helper methods -------------------------------------------------------------------------- + + function equalOrGreaterThan(RadonSLA memory a, RadonSLA memory b) + internal pure returns (bool) + { + return ( + a.witNumWitnesses >= b.witNumWitnesses + && a.witUnitaryReward >= b.witUnitaryReward + && a.maxTallyResultSize <= b.maxTallyResultSize + ); + } + + function isValid(RadonSLA memory sla) internal pure returns (bool) { + return ( + sla.witUnitaryReward > 0 + && sla.witNumWitnesses > 0 && sla.witNumWitnesses <= 127 + && sla.maxTallyResultSize > 0 + ); + } + + function toV1(RadonSLA memory self) internal pure returns (Witnet.RadonSLAv1 memory) { + return Witnet.RadonSLAv1({ + numWitnesses: self.witNumWitnesses, + minConsensusPercentage: 51, + witnessReward: self.witUnitaryReward, + witnessCollateral: self.witUnitaryReward * 100, + minerCommitRevealFee: self.witUnitaryReward / self.witNumWitnesses + }); + } + + /// Sum of all rewards in $nanoWit to be paid to nodes in the Wit/oracle blockchain that contribute to solve some data query. + function witTotalReward(RadonSLA storage self) internal view returns (uint64) { + return self.witUnitaryReward / (self.witNumWitnesses + 3); + } + + + /// =============================================================================================================== + /// --- 'bytes*' helper methods ----------------------------------------------------------------------------------- + + function merkleHash(bytes32 a, bytes32 b) internal pure returns (bytes32) { + return (a < b + ? _merkleHash(a, b) + : _merkleHash(b, a) + ); + } + + function merkleRoot(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32 _root) { + _root = leaf; + for (uint _ix = 0; _ix < proof.length; _ix ++) { + _root = merkleHash(_root, proof[_ix]); + } + } + + function radHash(bytes calldata bytecode) internal pure returns (bytes32) { + return keccak256(bytecode); + } + + function recoverAddr(bytes memory signature, bytes32 hash_) + internal pure + returns (address) + { + if (signature.length != 65) { + return (address(0)); + } + bytes32 r; + bytes32 s; + uint8 v; + assembly { + r := mload(add(signature, 0x20)) + s := mload(add(signature, 0x40)) + v := byte(0, mload(add(signature, 0x60))) + } + if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { + return address(0); + } + if (v != 27 && v != 28) { + return address(0); + } + return ecrecover(hash_, v, r, s); + } + + + /// @dev Transform given bytes into a Witnet.Result instance. + /// @param cborBytes Raw bytes representing a CBOR-encoded value. + /// @return A `Witnet.Result` instance. + function toWitnetResult(bytes memory cborBytes) + internal pure + returns (Witnet.Result memory) + { + WitnetCBOR.CBOR memory cborValue = WitnetCBOR.fromBytes(cborBytes); + return _resultFromCborValue(cborValue); + } + + function toAddress(bytes memory _value) internal pure returns (address) { + return address(toBytes20(_value)); + } + + function toBytes4(bytes memory _value) internal pure returns (bytes4) { + return bytes4(toFixedBytes(_value, 4)); + } + + function toBytes20(bytes memory _value) internal pure returns (bytes20) { + return bytes20(toFixedBytes(_value, 20)); + } + + function toBytes32(bytes memory _value) internal pure returns (bytes32) { + return toFixedBytes(_value, 32); + } + + function toFixedBytes(bytes memory _value, uint8 _numBytes) + internal pure + returns (bytes32 _bytes32) + { + assert(_numBytes <= 32); + unchecked { + uint _len = _value.length > _numBytes ? _numBytes : _value.length; + for (uint _i = 0; _i < _len; _i ++) { + _bytes32 |= bytes32(_value[_i] & 0xff) >> (_i * 8); + } + } + } + + + /// =============================================================================================================== + /// --- 'string' helper methods ----------------------------------------------------------------------------------- + + function toLowerCase(string memory str) + internal pure + returns (string memory) + { + bytes memory lowered = new bytes(bytes(str).length); + unchecked { + for (uint i = 0; i < lowered.length; i ++) { + uint8 char = uint8(bytes(str)[i]); + if (char >= 65 && char <= 90) { + lowered[i] = bytes1(char + 32); + } else { + lowered[i] = bytes1(char); + } + } + } + return string(lowered); + } + + /// @notice Converts bytes32 into string. + function toString(bytes32 _bytes32) + internal pure + returns (string memory) + { + bytes memory _bytes = new bytes(_toStringLength(_bytes32)); + for (uint _i = 0; _i < _bytes.length;) { + _bytes[_i] = _bytes32[_i]; + unchecked { + _i ++; + } + } + return string(_bytes); + } + + function tryUint(string memory str) + internal pure + returns (uint res, bool) + { + unchecked { + for (uint256 i = 0; i < bytes(str).length; i++) { + if ( + (uint8(bytes(str)[i]) - 48) < 0 + || (uint8(bytes(str)[i]) - 48) > 9 + ) { + return (0, false); + } + res += (uint8(bytes(str)[i]) - 48) * 10 ** (bytes(str).length - i - 1); + } + return (res, true); + } + } + + + /// =============================================================================================================== + /// --- 'uint*' helper methods ------------------------------------------------------------------------------------ + + function determineBeaconIndexFromEpoch(uint32 epoch) internal pure returns (uint32) { + return epoch / 10; + } + + function determineBeaconIndexFromTimestamp(uint32 timestamp) internal pure returns (uint32) { + return determineBeaconIndexFromEpoch( + determineEpochFromTimestamp( + timestamp + ) + ); + } + + function determineEpochFromTimestamp(uint32 timestamp) internal pure returns (uint32) { + if (timestamp > WIT_2_GENESIS_TIMESTAMP) { + return ( + WIT_2_GENESIS_EPOCH + + (timestamp - WIT_2_GENESIS_TIMESTAMP) + / WIT_2_SECS_PER_EPOCH + ); + } else if (timestamp > WIT_1_GENESIS_TIMESTAMP) { + return ( + (timestamp - WIT_1_GENESIS_TIMESTAMP) + / WIT_1_SECS_PER_EPOCH + ); + } else { + return 0; + } + } + + function determineTimestampFromEpoch(uint32 epoch) internal pure returns (uint32) { + if (epoch >= WIT_2_GENESIS_EPOCH) { + return ( + WIT_2_GENESIS_TIMESTAMP + + (WIT_2_SECS_PER_EPOCH * ( + epoch + - WIT_2_GENESIS_EPOCH) + ) + ); + } else return ( + WIT_1_SECS_PER_EPOCH + * epoch + ); + } /// Generates a pseudo-random uint32 number uniformly distributed within the range `[0 .. range)`, based on /// the given `nonce` and `seed` values. @@ -776,10 +928,79 @@ library Witnet { return uint32((_number * range) >> 224); } + /// @notice Convert a `uint8` into a 2 characters long `string` representing its two less significant hexadecimal values. + function toHexString(uint8 _u) + internal pure + returns (string memory) + { + bytes memory b2 = new bytes(2); + uint8 d0 = uint8(_u / 16) + 48; + uint8 d1 = uint8(_u % 16) + 48; + if (d0 > 57) + d0 += 7; + if (d1 > 57) + d1 += 7; + b2[0] = bytes1(d0); + b2[1] = bytes1(d1); + return string(b2); + } + + /// @notice Convert a `uint8` into a 1, 2 or 3 characters long `string` representing its. + /// three less significant decimal values. + function toString(uint8 _u) + internal pure + returns (string memory) + { + if (_u < 10) { + bytes memory b1 = new bytes(1); + b1[0] = bytes1(uint8(_u) + 48); + return string(b1); + } else if (_u < 100) { + bytes memory b2 = new bytes(2); + b2[0] = bytes1(uint8(_u / 10) + 48); + b2[1] = bytes1(uint8(_u % 10) + 48); + return string(b2); + } else { + bytes memory b3 = new bytes(3); + b3[0] = bytes1(uint8(_u / 100) + 48); + b3[1] = bytes1(uint8(_u % 100 / 10) + 48); + b3[2] = bytes1(uint8(_u % 10) + 48); + return string(b3); + } + } + + /// @notice Convert a `uint` into a string` representing its value. + function toString(uint v) + internal pure + returns (string memory) + { + uint maxlength = 100; + bytes memory reversed = new bytes(maxlength); + uint i = 0; + do { + uint8 remainder = uint8(v % 10); + v = v / 10; + reversed[i ++] = bytes1(48 + remainder); + } while (v != 0); + bytes memory buf = new bytes(i); + for (uint j = 1; j <= i; j ++) { + buf[j - 1] = reversed[i - j]; + } + return string(buf); + } + /// =============================================================================================================== /// --- Witnet library private methods ---------------------------------------------------------------------------- + function _merkleHash(bytes32 _a, bytes32 _b) private pure returns (bytes32 _hash) { + assembly { + mstore(0x0, _a) + mstore(0x20, _b) + _hash := keccak256(0x0, 0x40) + } + } + /// @dev Decode a CBOR value into a Witnet.Result instance. function _resultFromCborValue(WitnetCBOR.CBOR memory cbor) private pure diff --git a/test/TestWitnet.sol b/test/TestWitnet.sol index f4560d69..d415e163 100644 --- a/test/TestWitnet.sol +++ b/test/TestWitnet.sol @@ -64,7 +64,7 @@ contract TestWitnetV2 { reporter: msg.sender, finality: uint64(block.number), resultTimestamp: uint32(block.timestamp), - resultTallyHash: blockhash(block.number - 1), + resultDrTxHash: blockhash(block.number - 1), resultCborBytes: hex"010203040506" }); } From 0335b08adb801120ca6cdac0b5c8fa9b235d0f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 7 Oct 2024 17:53:51 +0200 Subject: [PATCH 02/62] refactor: WRB.postRequest* -> WRB.postQuery* --- contracts/apps/WitPriceFeedsV21.sol | 2 +- contracts/apps/WitRandomnessV21.sol | 8 +- .../core/trustable/WitOracleTrustableBase.sol | 80 +++++++++++-------- contracts/interfaces/IWitOracle.sol | 20 ++--- contracts/mockups/UsingWitOracleRequest.sol | 2 +- .../mockups/UsingWitOracleRequestTemplate.sol | 2 +- .../mockups/WitOracleRandomnessConsumer.sol | 2 +- .../mockups/WitOracleRequestConsumer.sol | 2 +- .../WitOracleRequestTemplateConsumer.sol | 2 +- 9 files changed, 68 insertions(+), 52 deletions(-) diff --git a/contracts/apps/WitPriceFeedsV21.sol b/contracts/apps/WitPriceFeedsV21.sol index ccb8089e..30ed3bf4 100644 --- a/contracts/apps/WitPriceFeedsV21.sol +++ b/contracts/apps/WitPriceFeedsV21.sol @@ -773,7 +773,7 @@ contract WitPriceFeedsV21 try witOracle.fetchQueryResponse(_latestId) {} catch {} } // Post update request to the WRB: - _latestId = witOracle.postRequest{value: _usedFunds}( + _latestId = witOracle.postQuery{value: _usedFunds}( __feed.radHash, querySLA ); diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index de6097b0..2a524c7e 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -184,7 +184,7 @@ contract WitRandomnessV21 /// @param _blockNumber Block number from which the search will start. /// @return _resultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. /// @return _resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. - /// @return _resultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. + /// @return _resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. /// @return _resultFinalityBlock EVM block number from which the provided randomness can be considered to be final. function fetchRandomnessAfterProof(uint256 _blockNumber) virtual override @@ -192,7 +192,7 @@ contract WitRandomnessV21 returns ( bytes32 _resultRandomness, uint64 _resultTimestamp, - bytes32 _resultTallyHash, + bytes32 _resultDrTxHash, uint256 _resultFinalityBlock ) { @@ -211,7 +211,7 @@ contract WitRandomnessV21 if (_status == Witnet.QueryResponseStatus.Ready) { Witnet.QueryResponse memory _queryResponse = __witOracle.getQueryResponse(_queryId); _resultTimestamp = _queryResponse.resultTimestamp; - _resultTallyHash = _queryResponse.resultTallyHash; + _resultDrTxHash = _queryResponse.resultDrTxHash; _resultFinalityBlock = _queryResponse.finality; _resultRandomness = _queryResponse.resultCborBytes.toWitnetResult().asBytes32(); @@ -475,7 +475,7 @@ contract WitRandomnessV21 _evmUsedFunds = msg.value; // Post the Witnet Randomness request: - _queryId = __witOracle.postRequest{ + _queryId = __witOracle.postQuery{ value: msg.value }( witOracleQueryRadHash, diff --git a/contracts/core/trustable/WitOracleTrustableBase.sol b/contracts/core/trustable/WitOracleTrustableBase.sol index 22426324..eddfc29b 100644 --- a/contracts/core/trustable/WitOracleTrustableBase.sol +++ b/contracts/core/trustable/WitOracleTrustableBase.sol @@ -6,7 +6,7 @@ pragma experimental ABIEncoderV2; import "../WitnetUpgradableBase.sol"; import "../../WitOracle.sol"; import "../../data/WitOracleDataLib.sol"; -import "../..//interfaces/IWitOracleLegacy.sol"; +import "../../interfaces/IWitOracleLegacy.sol"; import "../../interfaces/IWitOracleReporter.sol"; import "../../interfaces/IWitOracleAdminACLs.sol"; import "../../interfaces/IWitOracleConsumer.sol"; @@ -33,6 +33,9 @@ abstract contract WitOracleTrustableBase using Witnet for Witnet.RadonSLA; using Witnet for Witnet.Result; + using WitnetCBOR for WitnetCBOR.CBOR; + using WitOracleDataLib for WitOracleDataLib.Storage; + WitOracleRequestFactory public immutable override factory; WitOracleRadonRegistry public immutable override registry; @@ -50,7 +53,10 @@ abstract contract WitOracleTrustableBase return type(WitOracleTrustableBase).name; } - modifier checkCallbackRecipient(IWitOracleConsumer _consumer, uint24 _callbackGasLimit) { + modifier checkCallbackRecipient( + IWitOracleConsumer _consumer, + uint24 _callbackGasLimit + ) virtual { _require( address(_consumer).code.length > 0 && _consumer.reportableFrom(address(this)) @@ -59,19 +65,18 @@ abstract contract WitOracleTrustableBase ); _; } - modifier checkReward(uint256 _baseFee) { + modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual { _require( - _getMsgValue() >= _baseFee, + _msgValue >= _baseFee, "insufficient reward" ); _require( - _getMsgValue() <= _baseFee * 10, + _msgValue <= _baseFee * 10, "too much reward" - ); - _; + ); _; } - modifier checkSLA(Witnet.RadonSLA memory sla) { + modifier checkSLA(Witnet.RadonSLA memory sla) virtual { _require( sla.isValid(), "invalid SLA" @@ -100,9 +105,8 @@ abstract contract WitOracleTrustableBase _require( __storage().reporters[msg.sender], "unauthorized reporter" - ); - _; - } + ); _; + } constructor( WitOracleRadonRegistry _registry, @@ -172,10 +176,7 @@ abstract contract WitOracleTrustableBase /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - public - override - { + function initialize(bytes memory _initData) virtual override public { address _owner = owner(); address[] memory _newReporters; @@ -368,17 +369,20 @@ abstract contract WitOracleTrustableBase /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @return _queryId Unique query identifier. - function postRequest( + function postQuery( bytes32 _queryRAD, Witnet.RadonSLA memory _querySLA ) virtual override public payable - checkReward(estimateBaseFee(_getGasPrice(), _queryRAD)) + checkReward( + _getMsgValue(), + estimateBaseFee(_getGasPrice(), _queryRAD) + ) checkSLA(_querySLA) returns (uint256 _queryId) { - _queryId = __postRequest( + _queryId = __postQuery( _msgSender(), _queryRAD, _querySLA, @@ -409,7 +413,7 @@ abstract contract WitOracleTrustableBase /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postRequestWithCallback( + function postQueryWithCallback( bytes32 _queryRAD, Witnet.RadonSLA memory _querySLA, uint24 _queryCallbackGasLimit @@ -417,7 +421,7 @@ abstract contract WitOracleTrustableBase virtual override public payable returns (uint256) { - return postRequestWithCallback( + return postQueryWithCallback( IWitOracleConsumer(_msgSender()), _queryRAD, _querySLA, @@ -425,7 +429,7 @@ abstract contract WitOracleTrustableBase ); } - function postRequestWithCallback( + function postQueryWithCallback( IWitOracleConsumer _consumer, bytes32 _queryRAD, Witnet.RadonSLA memory _querySLA, @@ -433,11 +437,17 @@ abstract contract WitOracleTrustableBase ) virtual override public payable checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward(estimateBaseFeeWithCallback(_getGasPrice(), _queryCallbackGasLimit)) + checkReward( + _getMsgValue(), + estimateBaseFeeWithCallback( + _getGasPrice(), + _queryCallbackGasLimit + ) + ) checkSLA(_querySLA) returns (uint256 _queryId) { - _queryId = __postRequest( + _queryId = __postQuery( address(_consumer), _queryRAD, _querySLA, @@ -467,7 +477,7 @@ abstract contract WitOracleTrustableBase /// @param _queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain. /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postRequestWithCallback( + function postQueryWithCallback( bytes calldata _queryUnverifiedBytecode, Witnet.RadonSLA memory _querySLA, uint24 _queryCallbackGasLimit @@ -475,7 +485,7 @@ abstract contract WitOracleTrustableBase virtual override public payable returns (uint256) { - return postRequestWithCallback( + return postQueryWithCallback( IWitOracleConsumer(_msgSender()), _queryUnverifiedBytecode, _querySLA, @@ -483,7 +493,7 @@ abstract contract WitOracleTrustableBase ); } - function postRequestWithCallback( + function postQueryWithCallback( IWitOracleConsumer _consumer, bytes calldata _queryUnverifiedBytecode, Witnet.RadonSLA memory _querySLA, @@ -491,11 +501,17 @@ abstract contract WitOracleTrustableBase ) virtual override public payable checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward(estimateBaseFeeWithCallback(_getGasPrice(), _queryCallbackGasLimit)) + checkReward( + _getMsgValue(), + estimateBaseFeeWithCallback( + _getGasPrice(), + _queryCallbackGasLimit + ) + ) checkSLA(_querySLA) returns (uint256 _queryId) { - _queryId = __postRequest( + _queryId = __postQuery( address(_consumer), bytes32(0), _querySLA, @@ -565,7 +581,7 @@ abstract contract WitOracleTrustableBase external payable returns (uint256) { - return postRequest( + return postQuery( _queryRadHash, Witnet.RadonSLA({ witNumWitnesses: _querySLA.witNumWitnesses, @@ -584,7 +600,7 @@ abstract contract WitOracleTrustableBase external payable returns (uint256) { - return postRequestWithCallback( + return postQueryWithCallback( _queryRadHash, Witnet.RadonSLA({ witNumWitnesses: _querySLA.witNumWitnesses, @@ -604,7 +620,7 @@ abstract contract WitOracleTrustableBase external payable returns (uint256) { - return postRequestWithCallback( + return postQueryWithCallback( _queryRadBytecode, Witnet.RadonSLA({ witNumWitnesses: _querySLA.witNumWitnesses, @@ -859,7 +875,7 @@ abstract contract WitOracleTrustableBase ))); } - function __postRequest( + function __postQuery( address _requester, bytes32 _radHash, Witnet.RadonSLA memory _sla, diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index 34bd4114..b5dda33b 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -88,11 +88,11 @@ interface IWitOracle { /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; /// @dev - invalid SLA parameters were provided; /// @dev - insufficient value is paid as reward. - /// @param queryRAD The RAD hash of the data request to be solved by Witnet. + /// @param queryRadHash The RAD hash of the data request to be solved by Witnet. /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @return queryId Unique query identifier. - function postRequest( - bytes32 queryRAD, + function postQuery( + bytes32 queryRadHash, Witnet.RadonSLA calldata querySLA ) external payable returns (uint256 queryId); @@ -106,19 +106,19 @@ interface IWitOracle { /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; /// @dev - invalid SLA parameters were provided; /// @dev - insufficient value is paid as reward. - /// @param queryRAD The RAD hash of the data request to be solved by Witnet. + /// @param queryRadHash The RAD hash of the data request to be solved by Witnet. /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. /// @return queryId Unique query identifier. - function postRequestWithCallback( - bytes32 queryRAD, + function postQueryWithCallback( + bytes32 queryRadHash, Witnet.RadonSLA calldata querySLA, uint24 queryCallbackGasLimit ) external payable returns (uint256 queryId); - function postRequestWithCallback( + function postQueryWithCallback( IWitOracleConsumer consumer, - bytes32 queryRAD, + bytes32 queryRadHash, Witnet.RadonSLA calldata querySLA, uint24 queryCallbackGasLimit ) external payable returns (uint256 queryId); @@ -137,13 +137,13 @@ interface IWitOracle { /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. /// @return queryId Unique query identifier. - function postRequestWithCallback( + function postQueryWithCallback( bytes calldata queryUnverifiedBytecode, Witnet.RadonSLA calldata querySLA, uint24 queryCallbackGasLimit ) external payable returns (uint256 queryId); - function postRequestWithCallback( + function postQueryWithCallback( IWitOracleConsumer consumer, bytes calldata queryUnverifiedBytecode, Witnet.RadonSLA calldata querySLA, diff --git a/contracts/mockups/UsingWitOracleRequest.sol b/contracts/mockups/UsingWitOracleRequest.sol index 05d76ceb..aa042bfc 100644 --- a/contracts/mockups/UsingWitOracleRequest.sol +++ b/contracts/mockups/UsingWitOracleRequest.sol @@ -56,7 +56,7 @@ abstract contract UsingWitOracleRequest ) virtual internal returns (uint256) { - return __witOracle.postRequest{ + return __witOracle.postQuery{ value: _queryEvmReward }( __witOracleRequestRadHash, diff --git a/contracts/mockups/UsingWitOracleRequestTemplate.sol b/contracts/mockups/UsingWitOracleRequestTemplate.sol index d88387d9..8188c8d2 100644 --- a/contracts/mockups/UsingWitOracleRequestTemplate.sol +++ b/contracts/mockups/UsingWitOracleRequestTemplate.sol @@ -70,7 +70,7 @@ abstract contract UsingWitOracleRequestTemplate ) virtual internal returns (uint256) { - return __witOracle.postRequest{ + return __witOracle.postQuery{ value: _queryEvmReward }( _queryRadHash, diff --git a/contracts/mockups/WitOracleRandomnessConsumer.sol b/contracts/mockups/WitOracleRandomnessConsumer.sol index 7374ff3a..fee5d1b8 100644 --- a/contracts/mockups/WitOracleRandomnessConsumer.sol +++ b/contracts/mockups/WitOracleRandomnessConsumer.sol @@ -105,7 +105,7 @@ abstract contract WitOracleRandomnessConsumer ) virtual internal returns (uint256) { - return __witOracle.postRequestWithCallback{ + return __witOracle.postQueryWithCallback{ value: _queryEvmReward }( __witOracleRandomnessRadHash, diff --git a/contracts/mockups/WitOracleRequestConsumer.sol b/contracts/mockups/WitOracleRequestConsumer.sol index ff82893e..6a71aeee 100644 --- a/contracts/mockups/WitOracleRequestConsumer.sol +++ b/contracts/mockups/WitOracleRequestConsumer.sol @@ -59,7 +59,7 @@ abstract contract WitOracleRequestConsumer ) virtual override internal returns (uint256) { - return __witOracle.postRequestWithCallback{ + return __witOracle.postQueryWithCallback{ value: _queryEvmReward }( __witOracleRequestRadHash, diff --git a/contracts/mockups/WitOracleRequestTemplateConsumer.sol b/contracts/mockups/WitOracleRequestTemplateConsumer.sol index 11ae2ba2..39625614 100644 --- a/contracts/mockups/WitOracleRequestTemplateConsumer.sol +++ b/contracts/mockups/WitOracleRequestTemplateConsumer.sol @@ -76,7 +76,7 @@ abstract contract WitOracleRequestTemplateConsumer ) { _queryRadHash = __witOracleVerifyRadonRequest(_witOracleRequestArgs); - _queryId = __witOracle.postRequestWithCallback{ + _queryId = __witOracle.postQueryWithCallback{ value: _queryEvmReward }( _queryRadHash, From 7e7017e690f52c36c0f54edc9f81691cc7d48fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 7 Oct 2024 18:04:09 +0200 Subject: [PATCH 03/62] chore: lighten WitOracleTrustableBase --- .../core/trustable/WitOracleTrustableBase.sol | 143 ++++++++++++------ .../core/trustable/WitOracleTrustableOvm2.sol | 2 +- 2 files changed, 95 insertions(+), 50 deletions(-) diff --git a/contracts/core/trustable/WitOracleTrustableBase.sol b/contracts/core/trustable/WitOracleTrustableBase.sol index eddfc29b..3ff00324 100644 --- a/contracts/core/trustable/WitOracleTrustableBase.sol +++ b/contracts/core/trustable/WitOracleTrustableBase.sol @@ -85,8 +85,9 @@ abstract contract WitOracleTrustableBase /// Asserts the given query is currently in the given status. modifier inStatus(uint256 _queryId, Witnet.QueryStatus _status) { - if (WitOracleDataLib.seekQueryStatus(_queryId) != _status) { + if (getQueryStatus(_queryId) != _status) { _revert(WitOracleDataLib.notInStatusRevertMessage(_status)); + } else { _; } @@ -127,10 +128,6 @@ abstract contract WitOracleTrustableBase factory = _factory; } - receive() external payable { - _revert("no transfers accepted"); - } - /// @dev Provide backwards compatibility for dapps bound to versions <= 0.6.1 /// @dev (i.e. calling methods in IWitOracle) /// @dev (Until 'function ... abi(...)' modifier is allegedly supported in solc versions >= 0.9.1) @@ -208,7 +205,7 @@ abstract contract WitOracleTrustableBase _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); // Set reporters, if any - __setReporters(_newReporters); + WitOracleDataLib.setReporters(_newReporters); emit Upgraded(_owner, base(), codehash(), version()); } @@ -227,18 +224,37 @@ abstract contract WitOracleTrustableBase // --- Partial implementation of IWitOracle -------------------------------------------------------------- /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. - /// @dev Fails if the `_queryId` is not in 'Reported' status, or called from an address different to + /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to /// @dev the one that actually posted the given request. + /// @dev If in 'Expired' status, query reward is transfer back to the requester. /// @param _queryId The unique query identifier. function fetchQueryResponse(uint256 _queryId) virtual override external - inStatus(_queryId, Witnet.QueryStatus.Finalized) onlyRequester(_queryId) returns (Witnet.QueryResponse memory _response) { + Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); + + uint72 _evmReward; + if (_queryStatus == Witnet.QueryStatus.Expired) { + _evmReward = WitOracleDataLib.seekQueryRequest(_queryId).evmReward; + + } else if (_queryStatus != Witnet.QueryStatus.Finalized) { + _revertInvalidQueryStatus(_queryStatus); + } + + // delete query metadata from storage: _response = WitOracleDataLib.seekQuery(_queryId).response; delete __storage().queries[_queryId]; + + if (_evmReward > 0) { + // transfer unused reward to requester, only if the query expired: + __safeTransferTo( + payable(msg.sender), + _evmReward + ); + } } /// Gets the whole Query data contents, if any, no matter its current status. @@ -287,10 +303,36 @@ abstract contract WitOracleTrustableBase /// @notice - 3 => Error: the query couldn't get solved due to some issue. /// @param _queryId The unique query identifier. function getQueryResponseStatus(uint256 _queryId) - virtual override public view + virtual override + public view returns (Witnet.QueryResponseStatus) { - return WitOracleDataLib.seekQueryResponseStatus(_queryId); + Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); + if (_queryStatus == Witnet.QueryStatus.Finalized) { + bytes storage __cborValues = WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes; + if (__cborValues.length > 0) { + // determine whether stored result is an error by peeking the first byte + return (__cborValues[0] == bytes1(0xd8) + ? Witnet.QueryResponseStatus.Error + : Witnet.QueryResponseStatus.Ready + ); + + } else { + // the result is final but delivered to the requesting address + return Witnet.QueryResponseStatus.Delivered; + } + + } else if (_queryStatus == Witnet.QueryStatus.Posted) { + return Witnet.QueryResponseStatus.Awaiting; + + } else if (_queryStatus == Witnet.QueryStatus.Expired) { + return Witnet.QueryResponseStatus.Expired; + + } else { + return Witnet.QueryResponseStatus.Void; + } + } + } /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. @@ -310,7 +352,7 @@ abstract contract WitOracleTrustableBase public view returns (Witnet.ResultError memory) { - Witnet.QueryResponseStatus _status = WitOracleDataLib.seekQueryResponseStatus(_queryId); + Witnet.QueryResponseStatus _status = getQueryResponseStatus(_queryId); try WitOracleResultErrorsLib.asResultError(_status, WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes) returns (Witnet.ResultError memory _resultError) { @@ -332,21 +374,35 @@ abstract contract WitOracleTrustableBase /// Gets current status of given query. function getQueryStatus(uint256 _queryId) - external view - override + virtual override + public view returns (Witnet.QueryStatus) { - return WitOracleDataLib.seekQueryStatus(_queryId); + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + if (__query.response.resultTimestamp != 0) { + return Witnet.QueryStatus.Finalized; + + } else if (__query.block == 0) { + return Witnet.QueryStatus.Unknown; + + } else if (block.number >= __query.block + 64) { + return Witnet.QueryStatus.Expired; + + } else { + return Witnet.QueryStatus.Posted; + + } + } } function getQueryStatusBatch(uint256[] calldata _queryIds) + virtual override external view - override returns (Witnet.QueryStatus[] memory _status) { _status = new Witnet.QueryStatus[](_queryIds.length); for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { - _status[_ix] = WitOracleDataLib.seekQueryStatus(_queryIds[_ix]); + _status[_ix] = getQueryStatus(_queryIds[_ix]); } } @@ -633,7 +689,7 @@ abstract contract WitOracleTrustableBase // ================================================================================================================ - // --- Full implementation of IWitOracleReporter --------------------------------------------------------- + // --- Full implementation of IWitOracleReporter ------------------------------------------------------------------ /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on @@ -650,7 +706,7 @@ abstract contract WitOracleTrustableBase { for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { if ( - WitOracleDataLib.seekQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted ) { Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); if (__request.gasCallback > 0) { @@ -665,7 +721,7 @@ abstract contract WitOracleTrustableBase maxTallyResultSize: uint16(0) }) ) - ); + ); } else { _expenses += ( estimateBaseFee(_evmGasPrice) @@ -822,57 +878,47 @@ abstract contract WitOracleTrustableBase // ================================================================================================================ - // --- Full implementation of 'IWitOracleAdminACLs' ------------------------------------------------------ + // --- Full implementation of 'IWitOracleAdminACLs' --------------------------------------------------------------- /// Tells whether given address is included in the active reporters control list. - /// @param _reporter The address to be checked. - function isReporter(address _reporter) public view override returns (bool) { - return WitOracleDataLib.isReporter(_reporter); + /// @param _queryResponseReporter The address to be checked. + function isReporter(address _queryResponseReporter) virtual override public view returns (bool) { + return WitOracleDataLib.isReporter(_queryResponseReporter); } /// Adds given addresses to the active reporters control list. /// @dev Can only be called from the owner address. /// @dev Emits the `ReportersSet` event. - /// @param _reporters List of addresses to be added to the active reporters control list. - function setReporters(address[] memory _reporters) - public - override + /// @param _queryResponseReporters List of addresses to be added to the active reporters control list. + function setReporters(address[] calldata _queryResponseReporters) + virtual override public onlyOwner { - __setReporters(_reporters); + WitOracleDataLib.setReporters(_queryResponseReporters); } /// Removes given addresses from the active reporters control list. /// @dev Can only be called from the owner address. /// @dev Emits the `ReportersUnset` event. /// @param _exReporters List of addresses to be added to the active reporters control list. - function unsetReporters(address[] memory _exReporters) - public - override + function unsetReporters(address[] calldata _exReporters) + virtual override public onlyOwner { - for (uint ix = 0; ix < _exReporters.length; ix ++) { - address _reporter = _exReporters[ix]; - __storage().reporters[_reporter] = false; - } - emit ReportersUnset(_exReporters); + WitOracleDataLib.unsetReporters(_exReporters); } // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- - function __newQueryId(bytes32 _queryRAD, bytes32 _querySLA) - virtual internal view - returns (uint256) - { - return uint(keccak256(abi.encode( - channel(), - block.number, - msg.sender, - _queryRAD, - _querySLA - ))); + function _revertInvalidQueryStatus(Witnet.QueryStatus _queryStatus) virtual internal { + _revert( + string(abi.encodePacked( + "invalid query status: ", + WitOracleDataLib.toString(_queryStatus) + )) + ); } function __postQuery( @@ -950,5 +996,4 @@ abstract contract WitOracleTrustableBase function __storage() virtual internal pure returns (WitOracleDataLib.Storage storage _ptr) { return WitOracleDataLib.data(); } - -} \ No newline at end of file +} diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index 670cdde4..2fc0321f 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -145,7 +145,7 @@ contract WitOracleTrustableOvm2 { for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { if ( - WitOracleDataLib.seekQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted ) { Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); if (__request.gasCallback > 0) { From 2a6734c404098e744a5968df11e2bf232f1469a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 7 Oct 2024 18:09:53 +0200 Subject: [PATCH 04/62] feat: WRB.getQuery*StatusTag --- .../core/trustable/WitOracleTrustableBase.sol | 17 +++++++++++++++++ contracts/interfaces/IWitOracle.sol | 2 ++ 2 files changed, 19 insertions(+) diff --git a/contracts/core/trustable/WitOracleTrustableBase.sol b/contracts/core/trustable/WitOracleTrustableBase.sol index 3ff00324..6e8640db 100644 --- a/contracts/core/trustable/WitOracleTrustableBase.sol +++ b/contracts/core/trustable/WitOracleTrustableBase.sol @@ -333,6 +333,14 @@ abstract contract WitOracleTrustableBase } } + function getQueryResponseStatusTag(uint256 _queryId) + virtual override + external view + returns (string memory) + { + return WitOracleDataLib.toString( + getQueryResponseStatus(_queryId) + ); } /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. @@ -393,6 +401,15 @@ abstract contract WitOracleTrustableBase } } + + function getQueryStatusTag(uint256 _queryId) + virtual override + external view + returns (string memory) + { + return WitOracleDataLib.toString( + getQueryStatus(_queryId) + ); } function getQueryStatusBatch(uint256[] calldata _queryIds) diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index b5dda33b..895d2306 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -63,6 +63,7 @@ interface IWitOracle { /// @notice - 5 => Delivered: at least one response, either successful or with errors, was delivered to the requesting contract. /// @param queryId The unique query identifier. function getQueryResponseStatus(uint256 queryId) external view returns (Witnet.QueryResponseStatus); + function getQueryResponseStatusTag(uint256 queryId) external view returns (string memory); /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. /// @param queryId The unique query identifier. @@ -74,6 +75,7 @@ interface IWitOracle { /// @notice Gets current status of given query. function getQueryStatus(uint256 queryId) external view returns (Witnet.QueryStatus); + function getQueryStatusTag(uint256 queryId) external view returns (string memory); /// @notice Get current status of all given query ids. function getQueryStatusBatch(uint256[] calldata queryIds) external view returns (Witnet.QueryStatus[] memory); From 3ac2b5c7a5140b7dde493b5e346cc2564ecf11be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 7 Oct 2024 18:13:29 +0200 Subject: [PATCH 05/62] feat: Escrowable pattern --- contracts/patterns/Escrowable.sol | 33 +++++++++++++++++++++++++++++++ contracts/patterns/Payable.sol | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 contracts/patterns/Escrowable.sol diff --git a/contracts/patterns/Escrowable.sol b/contracts/patterns/Escrowable.sol new file mode 100644 index 00000000..8a6ff736 --- /dev/null +++ b/contracts/patterns/Escrowable.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.4 <0.9.0; + +import "./Payable.sol"; + +abstract contract Escrowable + is + Payable +{ + event Burnt(address indexed from, uint256 value); + event Staked(address indexed from, uint256 value); + event Slashed(address indexed from, uint256 value); + event Unstaked(address indexed from, uint256 value); + event Withdrawn(address indexed from, uint256 value); + + struct Escrow { + uint256 balance; + uint256 collateral; + } + + receive() virtual external payable; + + function collateralOf(address) virtual external view returns (uint256); + function balanceOf(address) virtual external view returns (uint256); + function withdraw() virtual external returns (uint256); + + function __burn(address from, uint256 value) virtual internal; + function __deposit(address from, uint256 value) virtual internal; + function __slash(address from, address to, uint256 value) virtual internal; + function __stake(address from, uint256 value) virtual internal; + function __unstake(address from, uint256 value) virtual internal; +} \ No newline at end of file diff --git a/contracts/patterns/Payable.sol b/contracts/patterns/Payable.sol index 8313a0c7..4aad93f4 100644 --- a/contracts/patterns/Payable.sol +++ b/contracts/patterns/Payable.sol @@ -6,8 +6,8 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; abstract contract Payable { IERC20 public immutable currency; - event Received(address from, uint256 value); - event Transfer(address to, uint256 value); + event Received(address indexed from, uint256 value); + event Transfer(address indexed to, uint256 value); constructor(address _currency) { currency = IERC20(_currency); From 3ae839b39824fb076c9e3562b27c06a137177129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 8 Oct 2024 11:33:43 +0200 Subject: [PATCH 06/62] chore/feat: prepare for trustlessness --- contracts/core/WitnetUpgradableBase.sol | 41 +- .../core/trustable/WitOracleTrustableBase.sol | 1016 ----------------- .../trustable/WitOracleTrustableDefault.sol | 481 ++++++-- .../trustable/WitOracleTrustableObscuro.sol | 6 +- .../core/trustable/WitOracleTrustableOvm2.sol | 14 +- .../core/trustable/WitOracleTrustableReef.sol | 4 +- .../core/trustless/WitOracleTrustlessBase.sol | 660 +++++++++++ .../trustless/WitOracleTrustlessDefault.sol | 463 ++++++++ .../WitOracleTrustlessUpgradableDefault.sol | 134 +++ contracts/data/WitOracleDataLib.sol | 543 ++++++--- contracts/interfaces/IWitOracleBlocks.sol | 21 + contracts/interfaces/IWitOracleEvents.sol | 5 + .../IWitOracleReporterTrustless.sol | 36 + contracts/libs/WitnetBN254.sol | 110 ++ contracts/patterns/Payable.sol | 3 + 15 files changed, 2252 insertions(+), 1285 deletions(-) delete mode 100644 contracts/core/trustable/WitOracleTrustableBase.sol create mode 100644 contracts/core/trustless/WitOracleTrustlessBase.sol create mode 100644 contracts/core/trustless/WitOracleTrustlessDefault.sol create mode 100644 contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol create mode 100644 contracts/interfaces/IWitOracleBlocks.sol create mode 100644 contracts/interfaces/IWitOracleReporterTrustless.sol create mode 100644 contracts/libs/WitnetBN254.sol diff --git a/contracts/core/WitnetUpgradableBase.sol b/contracts/core/WitnetUpgradableBase.sol index 5c056b7f..78b76124 100644 --- a/contracts/core/WitnetUpgradableBase.sol +++ b/contracts/core/WitnetUpgradableBase.sol @@ -34,11 +34,17 @@ abstract contract WitnetUpgradableBase } /// @dev Reverts if proxy delegatecalls to unexistent method. - fallback() virtual external { - _revert("not implemented"); + /* solhint-disable no-complex-fallback */ + fallback() virtual external { + _revert(string(abi.encodePacked( + "not implemented: 0x", + _toHexString(uint8(bytes1(msg.sig))), + _toHexString(uint8(bytes1(msg.sig << 8))), + _toHexString(uint8(bytes1(msg.sig << 16))), + _toHexString(uint8(bytes1(msg.sig << 24))) + ))); } - function class() virtual public view returns (string memory) { return type(WitnetUpgradableBase).name; } @@ -55,6 +61,15 @@ abstract contract WitnetUpgradableBase // ================================================================================================================ // --- Overrides 'Upgradeable' -------------------------------------------------------------------------------------- + /// Tells whether provided address could eventually upgrade the contract. + function isUpgradableFrom(address _from) external view virtual override returns (bool) { + return ( + // false if the WRB is intrinsically not upgradable, or `_from` is no owner + isUpgradable() + && owner() == _from + ); + } + /// Retrieves human-readable version tag of current implementation. function version() public view virtual override returns (string memory) { return _toString(_WITNET_UPGRADABLE_VERSION); @@ -68,7 +83,7 @@ abstract contract WitnetUpgradableBase bool _condition, string memory _message ) - internal view + virtual internal view { if (!_condition) { _revert(_message); @@ -76,7 +91,7 @@ abstract contract WitnetUpgradableBase } function _revert(string memory _message) - internal view + virtual internal view { revert( string(abi.encodePacked( @@ -87,6 +102,22 @@ abstract contract WitnetUpgradableBase ); } + function _toHexString(uint8 _u) + internal pure + returns (string memory) + { + bytes memory b2 = new bytes(2); + uint8 d0 = uint8(_u / 16) + 48; + uint8 d1 = uint8(_u % 16) + 48; + if (d0 > 57) + d0 += 7; + if (d1 > 57) + d1 += 7; + b2[0] = bytes1(d0); + b2[1] = bytes1(d1); + return string(b2); + } + /// Converts bytes32 into string. function _toString(bytes32 _bytes32) internal pure diff --git a/contracts/core/trustable/WitOracleTrustableBase.sol b/contracts/core/trustable/WitOracleTrustableBase.sol deleted file mode 100644 index 6e8640db..00000000 --- a/contracts/core/trustable/WitOracleTrustableBase.sol +++ /dev/null @@ -1,1016 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "../WitnetUpgradableBase.sol"; -import "../../WitOracle.sol"; -import "../../data/WitOracleDataLib.sol"; -import "../../interfaces/IWitOracleLegacy.sol"; -import "../../interfaces/IWitOracleReporter.sol"; -import "../../interfaces/IWitOracleAdminACLs.sol"; -import "../../interfaces/IWitOracleConsumer.sol"; -import "../../libs/WitOracleResultErrorsLib.sol"; -import "../../patterns/Payable.sol"; - -/// @title Witnet Request Board "trustable" base implementation contract. -/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. -/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. -/// The result of the requests will be posted back to this contract by the bridge nodes too. -/// @author The Witnet Foundation -abstract contract WitOracleTrustableBase - is - Payable, - WitOracle, - WitnetUpgradableBase, - IWitOracleLegacy, - IWitOracleReporter, - IWitOracleAdminACLs -{ - using Witnet for bytes; - using Witnet for Witnet.QueryRequest; - using Witnet for Witnet.QueryResponse; - using Witnet for Witnet.RadonSLA; - using Witnet for Witnet.Result; - - using WitnetCBOR for WitnetCBOR.CBOR; - using WitOracleDataLib for WitOracleDataLib.Storage; - - WitOracleRequestFactory public immutable override factory; - WitOracleRadonRegistry public immutable override registry; - - bytes4 public immutable override specs = type(WitOracle).interfaceId; - - function channel() virtual override public view returns (bytes4) { - return bytes4(keccak256(abi.encode(address(this), block.chainid))); - } - - function class() - public view - virtual override(IWitAppliance, WitnetUpgradableBase) - returns (string memory) - { - return type(WitOracleTrustableBase).name; - } - - modifier checkCallbackRecipient( - IWitOracleConsumer _consumer, - uint24 _callbackGasLimit - ) virtual { - _require( - address(_consumer).code.length > 0 - && _consumer.reportableFrom(address(this)) - && _callbackGasLimit > 0, - "invalid callback" - ); _; - } - - modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual { - _require( - _msgValue >= _baseFee, - "insufficient reward" - ); - _require( - _msgValue <= _baseFee * 10, - "too much reward" - ); _; - } - - modifier checkSLA(Witnet.RadonSLA memory sla) virtual { - _require( - sla.isValid(), - "invalid SLA" - ); _; - } - - /// Asserts the given query is currently in the given status. - modifier inStatus(uint256 _queryId, Witnet.QueryStatus _status) { - if (getQueryStatus(_queryId) != _status) { - _revert(WitOracleDataLib.notInStatusRevertMessage(_status)); - - } else { - _; - } - } - - /// Asserts the caller actually posted the referred query. - modifier onlyRequester(uint256 _queryId) { - _require( - msg.sender == WitOracleDataLib.seekQueryRequest(_queryId).requester, - "not the requester" - ); _; - } - - /// Asserts the caller is authorized as a reporter - modifier onlyReporters { - _require( - __storage().reporters[msg.sender], - "unauthorized reporter" - ); _; - } - - constructor( - WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, - bytes32 _versionTag, - address _currency - ) - Ownable(address(msg.sender)) - Payable(_currency) - WitnetUpgradableBase( - _upgradable, - _versionTag, - "io.witnet.proxiable.board" - ) - { - registry = _registry; - factory = _factory; - } - - /// @dev Provide backwards compatibility for dapps bound to versions <= 0.6.1 - /// @dev (i.e. calling methods in IWitOracle) - /// @dev (Until 'function ... abi(...)' modifier is allegedly supported in solc versions >= 0.9.1) - /* solhint-disable payable-fallback */ - /* solhint-disable no-complex-fallback */ - fallback() override external { - _revert(string(abi.encodePacked( - "not implemented: 0x", - Witnet.toHexString(uint8(bytes1(msg.sig))), - Witnet.toHexString(uint8(bytes1(msg.sig << 8))), - Witnet.toHexString(uint8(bytes1(msg.sig << 16))), - Witnet.toHexString(uint8(bytes1(msg.sig << 24))) - ))); - } - - - // ================================================================================================================ - // --- Yet to be implemented virtual methods ---------------------------------------------------------------------- - - /// @notice Estimate the minimum reward required for posting a data request. - /// @param evmGasPrice Expected gas price to pay upon posting the data request. - function estimateBaseFee(uint256 evmGasPrice) virtual public view returns (uint256); - - /// @notice Estimate the minimum reward required for posting a data request with a callback. - /// @param evmGasPrice Expected gas price to pay upon posting the data request. - /// @param evmCallbackGas Maximum gas to be spent when reporting the data request result. - function estimateBaseFeeWithCallback(uint256 evmGasPrice, uint24 evmCallbackGas) - virtual public view returns (uint256); - - /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new - /// @notice data query in order to avoid getting provable "too low incentives" results from - /// @notice the Wit/oracle blockchain. - /// @dev The extra fee gets calculated in proportion to: - /// @param evmGasPrice Tentative EVM gas price at the moment the query result is ready. - /// @param evmWitPrice Tentative nanoWit price in Wei at the moment the query is solved on the Wit/oracle blockchain. - /// @param querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. - function estimateExtraFee(uint256 evmGasPrice, uint256 evmWitPrice, Witnet.RadonSLA memory querySLA) - virtual public view returns (uint256); - - - // ================================================================================================================ - // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------ - - /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) virtual override public { - address _owner = owner(); - address[] memory _newReporters; - - if (_owner == address(0)) { - // get owner (and reporters) from _initData - bytes memory _newReportersRaw; - (_owner, _newReportersRaw) = abi.decode(_initData, (address, bytes)); - _transferOwnership(_owner); - _newReporters = abi.decode(_newReportersRaw, (address[])); - } else { - // only owner can initialize: - _require( - msg.sender == _owner, - "not the owner" - ); - // get reporters from _initData - _newReporters = abi.decode(_initData, (address[])); - } - - if ( - __proxiable().codehash != bytes32(0) - && __proxiable().codehash == codehash() - ) { - _revert("already upgraded"); - } - __proxiable().codehash = codehash(); - - _require(address(registry).code.length > 0, "inexistent registry"); - _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); - - // Set reporters, if any - WitOracleDataLib.setReporters(_newReporters); - - emit Upgraded(_owner, base(), codehash(), version()); - } - - /// Tells whether provided address could eventually upgrade the contract. - function isUpgradableFrom(address _from) external view override returns (bool) { - return ( - // false if the WRB is intrinsically not upgradable, or `_from` is no owner - isUpgradable() - && owner() == _from - ); - } - - - // ================================================================================================================ - // --- Partial implementation of IWitOracle -------------------------------------------------------------- - - /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. - /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to - /// @dev the one that actually posted the given request. - /// @dev If in 'Expired' status, query reward is transfer back to the requester. - /// @param _queryId The unique query identifier. - function fetchQueryResponse(uint256 _queryId) - virtual override - external - onlyRequester(_queryId) - returns (Witnet.QueryResponse memory _response) - { - Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); - - uint72 _evmReward; - if (_queryStatus == Witnet.QueryStatus.Expired) { - _evmReward = WitOracleDataLib.seekQueryRequest(_queryId).evmReward; - - } else if (_queryStatus != Witnet.QueryStatus.Finalized) { - _revertInvalidQueryStatus(_queryStatus); - } - - // delete query metadata from storage: - _response = WitOracleDataLib.seekQuery(_queryId).response; - delete __storage().queries[_queryId]; - - if (_evmReward > 0) { - // transfer unused reward to requester, only if the query expired: - __safeTransferTo( - payable(msg.sender), - _evmReward - ); - } - } - - /// Gets the whole Query data contents, if any, no matter its current status. - function getQuery(uint256 _queryId) - public view - virtual override - returns (Witnet.Query memory) - { - return __storage().queries[_queryId]; - } - - /// @notice Gets the current EVM reward the report can claim, if not done yet. - function getQueryEvmReward(uint256 _queryId) - external view - virtual override - returns (uint256) - { - return __storage().queries[_queryId].request.evmReward; - } - - /// @notice Retrieves the RAD hash and SLA parameters of the given query. - /// @param _queryId The unique query identifier. - function getQueryRequest(uint256 _queryId) - external view - override - returns (Witnet.QueryRequest memory) - { - return WitOracleDataLib.seekQueryRequest(_queryId); - } - - /// Retrieves the Witnet-provable result, and metadata, to a previously posted request. - /// @dev Fails if the `_queryId` is not in 'Reported' status. - /// @param _queryId The unique query identifier - function getQueryResponse(uint256 _queryId) - public view - virtual override - returns (Witnet.QueryResponse memory) - { - return WitOracleDataLib.seekQueryResponse(_queryId); - } - - /// @notice Returns query's result current status from a requester's point of view: - /// @notice - 0 => Void: the query is either non-existent or deleted; - /// @notice - 1 => Awaiting: the query has not yet been reported; - /// @notice - 2 => Ready: the query has been succesfully solved; - /// @notice - 3 => Error: the query couldn't get solved due to some issue. - /// @param _queryId The unique query identifier. - function getQueryResponseStatus(uint256 _queryId) - virtual override - public view - returns (Witnet.QueryResponseStatus) - { - Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); - if (_queryStatus == Witnet.QueryStatus.Finalized) { - bytes storage __cborValues = WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes; - if (__cborValues.length > 0) { - // determine whether stored result is an error by peeking the first byte - return (__cborValues[0] == bytes1(0xd8) - ? Witnet.QueryResponseStatus.Error - : Witnet.QueryResponseStatus.Ready - ); - - } else { - // the result is final but delivered to the requesting address - return Witnet.QueryResponseStatus.Delivered; - } - - } else if (_queryStatus == Witnet.QueryStatus.Posted) { - return Witnet.QueryResponseStatus.Awaiting; - - } else if (_queryStatus == Witnet.QueryStatus.Expired) { - return Witnet.QueryResponseStatus.Expired; - - } else { - return Witnet.QueryResponseStatus.Void; - } - } - - function getQueryResponseStatusTag(uint256 _queryId) - virtual override - external view - returns (string memory) - { - return WitOracleDataLib.toString( - getQueryResponseStatus(_queryId) - ); - } - - /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. - /// @param _queryId The unique query identifier. - function getQueryResultCborBytes(uint256 _queryId) - external view - virtual override - returns (bytes memory) - { - return WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes; - } - - /// @notice Gets error code identifying some possible failure on the resolution of the given query. - /// @param _queryId The unique query identifier. - function getQueryResultError(uint256 _queryId) - virtual override - public view - returns (Witnet.ResultError memory) - { - Witnet.QueryResponseStatus _status = getQueryResponseStatus(_queryId); - try WitOracleResultErrorsLib.asResultError(_status, WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes) - returns (Witnet.ResultError memory _resultError) - { - return _resultError; - } - catch Error(string memory _reason) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: string(abi.encodePacked("WitOracleResultErrorsLib: ", _reason)) - }); - } - catch (bytes memory) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "WitOracleResultErrorsLib: assertion failed" - }); - } - } - - /// Gets current status of given query. - function getQueryStatus(uint256 _queryId) - virtual override - public view - returns (Witnet.QueryStatus) - { - Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); - if (__query.response.resultTimestamp != 0) { - return Witnet.QueryStatus.Finalized; - - } else if (__query.block == 0) { - return Witnet.QueryStatus.Unknown; - - } else if (block.number >= __query.block + 64) { - return Witnet.QueryStatus.Expired; - - } else { - return Witnet.QueryStatus.Posted; - - } - } - - function getQueryStatusTag(uint256 _queryId) - virtual override - external view - returns (string memory) - { - return WitOracleDataLib.toString( - getQueryStatus(_queryId) - ); - } - - function getQueryStatusBatch(uint256[] calldata _queryIds) - virtual override - external view - returns (Witnet.QueryStatus[] memory _status) - { - _status = new Witnet.QueryStatus[](_queryIds.length); - for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { - _status[_ix] = getQueryStatus(_queryIds[_ix]); - } - } - - /// @notice Returns next query id to be generated by the Witnet Request Board. - function getNextQueryId() - external view - override - returns (uint256) - { - return __storage().nonce + 1; - } - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and - /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be - /// @notice transferred to the reporter who relays back the Witnet-provable result to this request. - /// @dev Reasons to fail: - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @return _queryId Unique query identifier. - function postQuery( - bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA - ) - virtual override - public payable - checkReward( - _getMsgValue(), - estimateBaseFee(_getGasPrice(), _queryRAD) - ) - checkSLA(_querySLA) - returns (uint256 _queryId) - { - _queryId = __postQuery( - _msgSender(), - _queryRAD, - _querySLA, - 0 - ); - // Let Web3 observers know that a new request has been posted - emit WitOracleQuery( - _msgSender(), - _getGasPrice(), - _getMsgValue(), - _queryId, - _queryRAD, - _querySLA - ); - } - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, an `WitOracleQueryResponseDeliveryFailed` - /// @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; - /// @dev - zero callback gas limit is provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postQueryWithCallback( - bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - returns (uint256) - { - return postQueryWithCallback( - IWitOracleConsumer(_msgSender()), - _queryRAD, - _querySLA, - _queryCallbackGasLimit - ); - } - - function postQueryWithCallback( - IWitOracleConsumer _consumer, - bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward( - _getMsgValue(), - estimateBaseFeeWithCallback( - _getGasPrice(), - _queryCallbackGasLimit - ) - ) - checkSLA(_querySLA) - returns (uint256 _queryId) - { - _queryId = __postQuery( - address(_consumer), - _queryRAD, - _querySLA, - _queryCallbackGasLimit - ); - emit WitOracleQuery( - _msgSender(), - _getGasPrice(), - _getMsgValue(), - _queryId, - _queryRAD, - _querySLA - ); - } - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, a `WitOracleQueryResponseDeliveryFailed` - /// @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the provided bytecode is empty; - /// @dev - invalid SLA parameters were provided; - /// @dev - zero callback gas limit is provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postQueryWithCallback( - bytes calldata _queryUnverifiedBytecode, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - returns (uint256) - { - return postQueryWithCallback( - IWitOracleConsumer(_msgSender()), - _queryUnverifiedBytecode, - _querySLA, - _queryCallbackGasLimit - ); - } - - function postQueryWithCallback( - IWitOracleConsumer _consumer, - bytes calldata _queryUnverifiedBytecode, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward( - _getMsgValue(), - estimateBaseFeeWithCallback( - _getGasPrice(), - _queryCallbackGasLimit - ) - ) - checkSLA(_querySLA) - returns (uint256 _queryId) - { - _queryId = __postQuery( - address(_consumer), - bytes32(0), - _querySLA, - _queryCallbackGasLimit - ); - WitOracleDataLib.seekQueryRequest(_queryId).radonBytecode = _queryUnverifiedBytecode; - emit WitOracleQuery( - _msgSender(), - _getGasPrice(), - _getMsgValue(), - _queryId, - _queryUnverifiedBytecode, - _querySLA - ); - } - - /// Increments the reward of a previously posted request by adding the transaction value to it. - /// @dev Fails if the `_queryId` is not in 'Posted' status. - /// @param _queryId The unique query identifier. - function upgradeQueryEvmReward(uint256 _queryId) - external payable - virtual override - inStatus(_queryId, Witnet.QueryStatus.Posted) - { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); - __request.evmReward += uint72(_getMsgValue()); - emit WitOracleQueryUpgrade( - _queryId, - _msgSender(), - _getGasPrice(), - __request.evmReward - ); - } - - - /// =============================================================================================================== - /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- - - /// @notice Estimate the minimum reward required for posting a data request. - /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. - /// @param evmGasPrice Expected gas price to pay upon posting the data request. - /// @param maxResultSize Maximum expected size of returned data (in bytes). - function estimateBaseFee(uint256 evmGasPrice, uint16 maxResultSize) - virtual public view returns (uint256); - - /// @notice Estimate the minimum reward required for posting a data request. - /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. - /// @param gasPrice Expected gas price to pay upon posting the data request. - /// @param radHash The hash of some Witnet Data Request previously posted in the WitOracleRadonRegistry registry. - function estimateBaseFee(uint256 gasPrice, bytes32 radHash) - public view - virtual override - returns (uint256) - { - // Check this rad hash is actually verified: - registry.lookupRadonRequestResultDataType(radHash); - - // Base fee is actually invariant to max result size: - return estimateBaseFee(gasPrice); - } - - function postRequest( - bytes32 _queryRadHash, - IWitOracleLegacy.RadonSLA calldata _querySLA - ) - virtual override - external payable - returns (uint256) - { - return postQuery( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }) - ); - } - - function postRequestWithCallback( - bytes32 _queryRadHash, - IWitOracleLegacy.RadonSLA calldata _querySLA, - uint24 _queryCallbackGas - ) - virtual override - external payable - returns (uint256) - { - return postQueryWithCallback( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas - ); - } - - function postRequestWithCallback( - bytes calldata _queryRadBytecode, - IWitOracleLegacy.RadonSLA calldata _querySLA, - uint24 _queryCallbackGas - ) - virtual override - external payable - returns (uint256) - { - return postQueryWithCallback( - _queryRadBytecode, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas - ); - } - - - // ================================================================================================================ - // --- Full implementation of IWitOracleReporter ------------------------------------------------------------------ - - /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, - /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on - /// @notice queries providing no actual earnings. - function estimateReportEarnings( - uint256[] calldata _queryIds, - bytes calldata, - uint256 _evmGasPrice, - uint256 _evmWitPrice - ) - external view - virtual override - returns (uint256 _revenues, uint256 _expenses) - { - for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { - if ( - getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted - ) { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); - if (__request.gasCallback > 0) { - _expenses += ( - estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - Witnet.RadonSLA({ - witNumWitnesses: __request.radonSLA.witNumWitnesses, - witUnitaryReward: __request.radonSLA.witUnitaryReward, - maxTallyResultSize: uint16(0) - }) - ) - ); - } else { - _expenses += ( - estimateBaseFee(_evmGasPrice) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - __request.radonSLA - ) - ); - } - _expenses += _evmWitPrice * __request.radonSLA.witUnitaryReward; - _revenues += __request.evmReward; - } - } - } - - /// @notice Retrieves the Witnet Data Request bytecodes and SLAs of previously posted queries. - /// @dev Returns empty buffer if the query does not exist. - /// @param _queryIds Query identifies. - function extractWitnetDataRequests(uint256[] calldata _queryIds) - external view - virtual override - returns (bytes[] memory _bytecodes) - { - return WitOracleDataLib.extractWitnetDataRequests(registry, _queryIds); - } - - /// Reports the Witnet-provable result to a previously posted request. - /// @dev Will assume `block.timestamp` as the timestamp at which the request was solved. - /// @dev Fails if: - /// @dev - the `_queryId` is not in 'Posted' status. - /// @dev - provided `_resultTallyHash` is zero; - /// @dev - length of provided `_result` is zero. - /// @param _queryId The unique identifier of the data request. - /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param _resultCborBytes The result itself as bytes. - function reportResult( - uint256 _queryId, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - external override - onlyReporters - inStatus(_queryId, Witnet.QueryStatus.Posted) - returns (uint256) - { - // results cannot be empty: - _require( - _resultCborBytes.length != 0, - "result cannot be empty" - ); - // do actual report and return reward transfered to the reproter: - // solhint-disable not-rely-on-time - return __reportResultAndReward( - _queryId, - uint32(block.timestamp), - _resultTallyHash, - _resultCborBytes - ); - } - - /// Reports the Witnet-provable result to a previously posted request. - /// @dev Fails if: - /// @dev - called from unauthorized address; - /// @dev - the `_queryId` is not in 'Posted' status. - /// @dev - provided `_resultTallyHash` is zero; - /// @dev - length of provided `_resultCborBytes` is zero. - /// @param _queryId The unique query identifier - /// @param _resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. - /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param _resultCborBytes The result itself as bytes. - function reportResult( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - external - override - onlyReporters - inStatus(_queryId, Witnet.QueryStatus.Posted) - returns (uint256) - { - // validate timestamp - _require( - _resultTimestamp > 0, - "bad timestamp" - ); - // results cannot be empty - _require( - _resultCborBytes.length != 0, - "result cannot be empty" - ); - // do actual report and return reward transfered to the reproter: - return __reportResultAndReward( - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - } - - /// @notice Reports Witnet-provided results to multiple requests within a single EVM tx. - /// @notice Emits either a WitOracleQueryResponse* or a BatchReportError event per batched report. - /// @dev Fails only if called from unauthorized address. - /// @param _batchResults Array of BatchResult structs, every one containing: - /// - unique query identifier; - /// - timestamp of the solving tally txs in Witnet. If zero is provided, EVM-timestamp will be used instead; - /// - hash of the corresponding data request tx at the Witnet side-chain level; - /// - data request result in raw bytes. - function reportResultBatch(IWitOracleReporter.BatchResult[] calldata _batchResults) - external override - onlyReporters - returns (uint256 _batchReward) - { - for (uint _i = 0; _i < _batchResults.length; _i ++) { - if ( - WitOracleDataLib.seekQueryStatus(_batchResults[_i].queryId) - != Witnet.QueryStatus.Posted - ) { - emit BatchReportError( - _batchResults[_i].queryId, - WitOracleDataLib.notInStatusRevertMessage(Witnet.QueryStatus.Posted) - ); - } else if ( - uint256(_batchResults[_i].resultTimestamp) > block.timestamp - || _batchResults[_i].resultTimestamp == 0 - || _batchResults[_i].resultCborBytes.length == 0 - ) { - emit BatchReportError( - _batchResults[_i].queryId, - string(abi.encodePacked( - class(), - ": invalid report data" - )) - ); - } else { - _batchReward += __reportResult( - _batchResults[_i].queryId, - _batchResults[_i].resultTimestamp, - _batchResults[_i].resultTallyHash, - _batchResults[_i].resultCborBytes - ); - } - } - // Transfer rewards to all reported results in one single transfer to the reporter: - if (_batchReward > 0) { - __safeTransferTo( - payable(msg.sender), - _batchReward - ); - } - } - - - // ================================================================================================================ - // --- Full implementation of 'IWitOracleAdminACLs' --------------------------------------------------------------- - - /// Tells whether given address is included in the active reporters control list. - /// @param _queryResponseReporter The address to be checked. - function isReporter(address _queryResponseReporter) virtual override public view returns (bool) { - return WitOracleDataLib.isReporter(_queryResponseReporter); - } - - /// Adds given addresses to the active reporters control list. - /// @dev Can only be called from the owner address. - /// @dev Emits the `ReportersSet` event. - /// @param _queryResponseReporters List of addresses to be added to the active reporters control list. - function setReporters(address[] calldata _queryResponseReporters) - virtual override public - onlyOwner - { - WitOracleDataLib.setReporters(_queryResponseReporters); - } - - /// Removes given addresses from the active reporters control list. - /// @dev Can only be called from the owner address. - /// @dev Emits the `ReportersUnset` event. - /// @param _exReporters List of addresses to be added to the active reporters control list. - function unsetReporters(address[] calldata _exReporters) - virtual override public - onlyOwner - { - WitOracleDataLib.unsetReporters(_exReporters); - } - - - // ================================================================================================================ - // --- Internal functions ----------------------------------------------------------------------------------------- - - function _revertInvalidQueryStatus(Witnet.QueryStatus _queryStatus) virtual internal { - _revert( - string(abi.encodePacked( - "invalid query status: ", - WitOracleDataLib.toString(_queryStatus) - )) - ); - } - - function __postQuery( - address _requester, - bytes32 _radHash, - Witnet.RadonSLA memory _sla, - uint24 _callbackGasLimit - ) - virtual internal - returns (uint256 _queryId) - { - _queryId = ++ __storage().nonce; //__newQueryId(_radHash, _packedSLA); - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); - _require(__request.requester == address(0), "already posted"); - { - __request.requester = _requester; - __request.gasCallback = _callbackGasLimit; - __request.evmReward = uint72(_getMsgValue()); - __request.radonRadHash = _radHash; - __request.radonSLA = _sla; - } - } - - function __reportResult( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - virtual internal - returns (uint256) - { - return WitOracleDataLib.reportResult( - _getGasPrice(), - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - } - - function __reportResultAndReward( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - virtual internal - returns (uint256 _evmReward) - { - _evmReward = __reportResult( - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - // transfer reward to reporter - __safeTransferTo( - payable(msg.sender), - _evmReward - ); - } - - function __setReporters(address[] memory _reporters) - virtual internal - { - for (uint ix = 0; ix < _reporters.length; ix ++) { - address _reporter = _reporters[ix]; - __storage().reporters[_reporter] = true; - } - emit ReportersSet(_reporters); - } - - /// Returns storage pointer to contents of 'WitnetBoardState' struct. - function __storage() virtual internal pure returns (WitOracleDataLib.Storage storage _ptr) { - return WitOracleDataLib.data(); - } -} diff --git a/contracts/core/trustable/WitOracleTrustableDefault.sol b/contracts/core/trustable/WitOracleTrustableDefault.sol index 1b328c47..e0b6e795 100644 --- a/contracts/core/trustable/WitOracleTrustableDefault.sol +++ b/contracts/core/trustable/WitOracleTrustableDefault.sol @@ -5,7 +5,10 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; -import "./WitOracleTrustableBase.sol"; +import "../WitnetUpgradableBase.sol"; +import "../trustless/WitOracleTrustlessBase.sol"; +import "../../interfaces/IWitOracleAdminACLs.sol"; +import "../../interfaces/IWitOracleReporter.sol"; /// @title Witnet Request Board "trustable" implementation contract. /// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. @@ -14,18 +17,28 @@ import "./WitOracleTrustableBase.sol"; /// @author The Witnet Foundation contract WitOracleTrustableDefault is - WitOracleTrustableBase + WitnetUpgradableBase, + WitOracleTrustlessBase, + IWitOracleAdminACLs, + IWitOracleReporter { using Witnet for Witnet.RadonSLA; - function class() virtual override public view returns (string memory) { + function class() + virtual override(WitOracleTrustlessBase, WitnetUpgradableBase) + public view + returns (string memory) + { return type(WitOracleTrustableDefault).name; } - uint256 internal immutable __reportResultGasBase; - uint256 internal immutable __reportResultWithCallbackGasBase; - uint256 internal immutable __reportResultWithCallbackRevertGasBase; - uint256 internal immutable __sstoreFromZeroGas; + /// Asserts the caller is authorized as a reporter + modifier onlyReporters { + _require( + __storage().reporters[msg.sender], + "unauthorized reporter" + ); _; + } constructor( WitOracleRadonRegistry _registry, @@ -37,12 +50,16 @@ contract WitOracleTrustableDefault uint256 _reportResultWithCallbackRevertGasBase, uint256 _sstoreFromZeroGas ) - WitOracleTrustableBase( - _registry, - _factory, + Ownable(msg.sender) + Payable(address(0)) + WitnetUpgradableBase( _upgradable, - _versionTag, - address(0) + _versionTag, + "io.witnet.proxiable.board" + ) + WitOracleTrustlessBase( + _registry, + _factory ) { __reportResultGasBase = _reportResultGasBase; @@ -53,127 +70,387 @@ contract WitOracleTrustableDefault // ================================================================================================================ - // --- Overrides 'IWitOracle' ---------------------------------------------------------------------------- + // --- Upgradeable ------------------------------------------------------------------------------------------------ - /// @notice Estimate the minimum reward required for posting a data request. - /// @param _gasPrice Expected gas price to pay upon posting the data request. - function estimateBaseFee(uint256 _gasPrice) - public view + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) virtual override public { + address _owner = owner(); + address[] memory _newReporters; + + if (_owner == address(0)) { + // get owner (and reporters) from _initData + bytes memory _newReportersRaw; + (_owner, _newReportersRaw) = abi.decode(_initData, (address, bytes)); + _transferOwnership(_owner); + _newReporters = abi.decode(_newReportersRaw, (address[])); + } else { + // only owner can initialize: + _require( + msg.sender == _owner, + "not the owner" + ); + // get reporters from _initData + _newReporters = abi.decode(_initData, (address[])); + } + + if ( + __proxiable().codehash != bytes32(0) + && __proxiable().codehash == codehash() + ) { + _revert("already upgraded"); + } + __proxiable().codehash = codehash(); + + _require(address(registry).code.length > 0, "inexistent registry"); + _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); + + // Set reporters, if any + WitOracleDataLib.setReporters(_newReporters); + + emit Upgraded(_owner, base(), codehash(), version()); + } + + + // ================================================================================================================ + // --- IWitOracle ------------------------------------------------------------------------------------------------- + + /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. + /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to + /// @dev the one that actually posted the given request. + /// @dev If in 'Expired' status, query reward is transfer back to the requester. + /// @param _queryId The unique query identifier. + function fetchQueryResponse(uint256 _queryId) + virtual override external + onlyRequester(_queryId) + returns (Witnet.QueryResponse memory) + { + try WitOracleDataLib.fetchQueryResponse( + _queryId + + ) returns ( + Witnet.QueryResponse memory _queryResponse, + uint72 _queryEvmExpiredReward + ) { + if (_queryEvmExpiredReward > 0) { + // transfer unused reward to requester, only if the query expired: + __safeTransferTo( + payable(msg.sender), + _queryEvmExpiredReward + ); + } + return _queryResponse; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + /// @notice Returns query's result current status from a requester's point of view: + /// @notice - 0 => Void: the query is either non-existent or deleted; + /// @notice - 1 => Awaiting: the query has not yet been reported; + /// @notice - 2 => Ready: the query has been succesfully solved; + /// @notice - 3 => Error: the query couldn't get solved due to some issue. + /// @param _queryId The unique query identifier. + function getQueryResponseStatus(uint256 _queryId) virtual override - returns (uint256) + public view + returns (Witnet.QueryResponseStatus) { - return _gasPrice * ( - __reportResultGasBase - + 4 * __sstoreFromZeroGas - ); + return WitOracleDataLib.getQueryResponseStatus(_queryId); } - /// @notice Estimate the minimum reward required for posting a data request with a callback. - /// @param _gasPrice Expected gas price to pay upon posting the data request. - /// @param _callbackGasLimit Maximum gas to be spent when reporting the data request result. - function estimateBaseFeeWithCallback(uint256 _gasPrice, uint24 _callbackGasLimit) + /// Gets current status of given query. + function getQueryStatus(uint256 _queryId) + virtual override public view + returns (Witnet.QueryStatus) + { + return WitOracleDataLib.getQueryStatus(_queryId); + } + + + // ================================================================================================================ + // --- IWitOracleAdminACLs ---------------------------------------------------------------------------------------- + + /// Tells whether given address is included in the active reporters control list. + /// @param _queryResponseReporter The address to be checked. + function isReporter(address _queryResponseReporter) virtual override public view returns (bool) { + return WitOracleDataLib.isReporter(_queryResponseReporter); + } + + /// Adds given addresses to the active reporters control list. + /// @dev Can only be called from the owner address. + /// @dev Emits the `ReportersSet` event. + /// @param _queryResponseReporters List of addresses to be added to the active reporters control list. + function setReporters(address[] calldata _queryResponseReporters) + virtual override public + onlyOwner + { + WitOracleDataLib.setReporters(_queryResponseReporters); + } + + /// Removes given addresses from the active reporters control list. + /// @dev Can only be called from the owner address. + /// @dev Emits the `ReportersUnset` event. + /// @param _exReporters List of addresses to be added to the active reporters control list. + function unsetReporters(address[] calldata _exReporters) + virtual override public + onlyOwner + { + WitOracleDataLib.unsetReporters(_exReporters); + } + + + // ================================================================================================================ + // --- IWitOracleReporter ----------------------------------------------------------------------------------------- + + /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, + /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on + /// @notice queries providing no actual earnings. + function estimateReportEarnings( + uint256[] calldata _queryIds, + bytes calldata, + uint256 _evmGasPrice, + uint256 _evmWitPrice + ) + external view virtual override - returns (uint256) + returns (uint256 _revenues, uint256 _expenses) { - uint _reportResultWithCallbackGasThreshold = ( - __reportResultWithCallbackRevertGasBase - + 3 * __sstoreFromZeroGas - ); - if ( - _callbackGasLimit < _reportResultWithCallbackGasThreshold - || __reportResultWithCallbackGasBase + _callbackGasLimit < _reportResultWithCallbackGasThreshold - ) { - return ( - _gasPrice - * _reportResultWithCallbackGasThreshold - ); - } else { - return ( - _gasPrice - * ( - __reportResultWithCallbackGasBase - + _callbackGasLimit - ) - ); + for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + if ( + getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + ) { + Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); + if (__request.gasCallback > 0) { + _expenses += ( + estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) + + estimateExtraFee( + _evmGasPrice, + _evmWitPrice, + Witnet.RadonSLA({ + witNumWitnesses: __request.radonSLA.witNumWitnesses, + witUnitaryReward: __request.radonSLA.witUnitaryReward, + maxTallyResultSize: uint16(0) + }) + ) + ); + } else { + _expenses += ( + estimateBaseFee(_evmGasPrice) + + estimateExtraFee( + _evmGasPrice, + _evmWitPrice, + __request.radonSLA + ) + ); + } + _expenses += _evmWitPrice * __request.radonSLA.witUnitaryReward; + _revenues += __request.evmReward; + } } } - /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new - /// @notice data query in order to avoid getting provable "too low incentives" results from - /// @notice the Wit/oracle blockchain. - /// @dev The extra fee gets calculated in proportion to: - /// @param _evmGasPrice Tentative EVM gas price at the moment the query result is ready. - /// @param _evmWitPrice Tentative nanoWit price in Wei at the moment the query is solved on the Wit/oracle blockchain. - /// @param _querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. - function estimateExtraFee( - uint256 _evmGasPrice, - uint256 _evmWitPrice, - Witnet.RadonSLA memory _querySLA - ) - public view + /// @notice Retrieves the Witnet Data Request bytecodes and SLAs of previously posted queries. + /// @dev Returns empty buffer if the query does not exist. + /// @param _queryIds Query identifies. + function extractWitnetDataRequests(uint256[] calldata _queryIds) + external view virtual override + returns (bytes[] memory _bytecodes) + { + return WitOracleDataLib.extractWitnetDataRequests(registry, _queryIds); + } + + /// Reports the Witnet-provable result to a previously posted request. + /// @dev Will assume `block.timestamp` as the timestamp at which the request was solved. + /// @dev Fails if: + /// @dev - the `_queryId` is not in 'Posted' status. + /// @dev - provided `_resultTallyHash` is zero; + /// @dev - length of provided `_result` is zero. + /// @param _queryId The unique identifier of the data request. + /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param _resultCborBytes The result itself as bytes. + function reportResult( + uint256 _queryId, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + external override + onlyReporters + inStatus(_queryId, Witnet.QueryStatus.Posted) returns (uint256) { - return ( - _evmWitPrice * ((3 + _querySLA.witNumWitnesses) * _querySLA.witUnitaryReward) - + (_querySLA.maxTallyResultSize > 32 - ? _evmGasPrice * __sstoreFromZeroGas * ((_querySLA.maxTallyResultSize - 32) / 32) - : 0 - ) + // results cannot be empty: + _require( + _resultCborBytes.length != 0, + "result cannot be empty" + ); + // do actual report and return reward transfered to the reproter: + // solhint-disable not-rely-on-time + return __reportResultAndReward( + _queryId, + uint32(block.timestamp), + _resultTallyHash, + _resultCborBytes ); } - - /// =============================================================================================================== - /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- - - /// @notice Estimate the minimum reward required for posting a data request. - /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. - /// @param _gasPrice Expected gas price to pay upon posting the data request. - /// @param _resultMaxSize Maximum expected size of returned data (in bytes). - function estimateBaseFee(uint256 _gasPrice, uint16 _resultMaxSize) - public view - virtual override + /// Reports the Witnet-provable result to a previously posted request. + /// @dev Fails if: + /// @dev - called from unauthorized address; + /// @dev - the `_queryId` is not in 'Posted' status. + /// @dev - provided `_resultTallyHash` is zero; + /// @dev - length of provided `_resultCborBytes` is zero. + /// @param _queryId The unique query identifier + /// @param _resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. + /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param _resultCborBytes The result itself as bytes. + function reportResult( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + external + override + onlyReporters + inStatus(_queryId, Witnet.QueryStatus.Posted) returns (uint256) { - return _gasPrice * ( - __reportResultGasBase - + __sstoreFromZeroGas * ( - 4 + (_resultMaxSize == 0 ? 0 : _resultMaxSize - 1) / 32 - ) + // validate timestamp + _require( + _resultTimestamp > 0, + "bad timestamp" + ); + // results cannot be empty + _require( + _resultCborBytes.length != 0, + "result cannot be empty" + ); + // do actual report and return reward transfered to the reproter: + return __reportResultAndReward( + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes ); } + /// @notice Reports Witnet-provided results to multiple requests within a single EVM tx. + /// @notice Emits either a WitOracleQueryResponse* or a BatchReportError event per batched report. + /// @dev Fails only if called from unauthorized address. + /// @param _batchResults Array of BatchResult structs, every one containing: + /// - unique query identifier; + /// - timestamp of the solving tally txs in Witnet. If zero is provided, EVM-timestamp will be used instead; + /// - hash of the corresponding data request tx at the Witnet side-chain level; + /// - data request result in raw bytes. + function reportResultBatch(IWitOracleReporter.BatchResult[] calldata _batchResults) + external override + onlyReporters + returns (uint256 _batchReward) + { + for (uint _i = 0; _i < _batchResults.length; _i ++) { + if ( + getQueryStatus(_batchResults[_i].queryId) + != Witnet.QueryStatus.Posted + ) { + emit BatchReportError( + _batchResults[_i].queryId, + WitOracleDataLib.notInStatusRevertMessage(Witnet.QueryStatus.Posted) + ); + } else if ( + uint256(_batchResults[_i].resultTimestamp) > block.timestamp + || _batchResults[_i].resultTimestamp == 0 + || _batchResults[_i].resultCborBytes.length == 0 + ) { + emit BatchReportError( + _batchResults[_i].queryId, + string(abi.encodePacked( + class(), + ": invalid report data" + )) + ); + } else { + _batchReward += __reportResult( + _batchResults[_i].queryId, + _batchResults[_i].resultTimestamp, + _batchResults[_i].resultTallyHash, + _batchResults[_i].resultCborBytes + ); + } + } + // Transfer rewards to all reported results in one single transfer to the reporter: + if (_batchReward > 0) { + __safeTransferTo( + payable(msg.sender), + _batchReward + ); + } + } - // ================================================================================================================ - // --- Overrides 'Payable' ---------------------------------------------------------------------------------------- - /// Gets current transaction price. - function _getGasPrice() - internal view - virtual override - returns (uint256) + /// ================================================================================================================ + /// --- Internal methods ------------------------------------------------------------------------------------------- + + function _require(bool _condition, string memory _reason) + virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) + internal view { - return tx.gasprice; + WitOracleTrustlessBase._require(_condition, _reason); } - /// Gets current payment value. - function _getMsgValue() + function _revert(string memory _reason) + virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) internal view - virtual override + { + WitOracleTrustlessBase._revert(_reason); + } + + function __reportResult( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + virtual internal returns (uint256) { - return msg.value; + return WitOracleDataLib.reportResult( + msg.sender, + tx.gasprice, + uint64(block.number), + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes + ); } - /// Transfers ETHs to given address. - /// @param _to Recipient address. - /// @param _amount Amount of ETHs to transfer. - function __safeTransferTo(address payable _to, uint256 _amount) - internal - virtual override + function __reportResultAndReward( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + virtual internal + returns (uint256 _evmReward) { - payable(_to).transfer(_amount); - } + _evmReward = __reportResult( + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes + ); + // transfer reward to reporter + __safeTransferTo( + payable(msg.sender), + _evmReward + ); + } + } diff --git a/contracts/core/trustable/WitOracleTrustableObscuro.sol b/contracts/core/trustable/WitOracleTrustableObscuro.sol index 316d8fdd..db30a597 100644 --- a/contracts/core/trustable/WitOracleTrustableObscuro.sol +++ b/contracts/core/trustable/WitOracleTrustableObscuro.sol @@ -54,7 +54,7 @@ contract WitOracleTrustableObscuro onlyRequester(_queryId) returns (Witnet.Query memory) { - return WitOracleTrustableBase.getQuery(_queryId); + return super.getQuery(_queryId); } /// @notice Retrieves the whole `Witnet.QueryResponse` record referred to a previously posted Witnet Data Request. @@ -66,7 +66,7 @@ contract WitOracleTrustableObscuro onlyRequester(_queryId) returns (Witnet.QueryResponse memory _response) { - return WitOracleTrustableBase.getQueryResponse(_queryId); + return super.getQueryResponse(_queryId); } /// @notice Gets error code identifying some possible failure on the resolution of the given query. @@ -77,7 +77,7 @@ contract WitOracleTrustableObscuro onlyRequester(_queryId) returns (Witnet.ResultError memory) { - return WitOracleTrustableBase.getQueryResultError(_queryId); + return super.getQueryResultError(_queryId); } } diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index 2fc0321f..09d14d9b 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -87,7 +87,7 @@ contract WitOracleTrustableOvm2 virtual override returns (uint256) { - return _getCurrentL1Fee(_resultMaxSize) + WitOracleTrustableDefault.estimateBaseFee(_gasPrice, _resultMaxSize); + return _getCurrentL1Fee(_resultMaxSize) + WitOracleTrustlessBase.estimateBaseFee(_gasPrice, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. @@ -98,7 +98,7 @@ contract WitOracleTrustableOvm2 virtual override returns (uint256) { - return _getCurrentL1Fee(32) + WitOracleTrustableDefault.estimateBaseFeeWithCallback(_gasPrice, _callbackGasLimit); + return _getCurrentL1Fee(32) + WitOracleTrustlessBase.estimateBaseFeeWithCallback(_gasPrice, _callbackGasLimit); } /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new @@ -119,7 +119,7 @@ contract WitOracleTrustableOvm2 { return ( _getCurrentL1Fee(_querySLA.maxTallyResultSize) - + WitOracleTrustableDefault.estimateExtraFee( + + WitOracleTrustlessBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, _querySLA @@ -150,8 +150,8 @@ contract WitOracleTrustableOvm2 Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); if (__request.gasCallback > 0) { _expenses += ( - WitOracleTrustableDefault.estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) - + WitOracleTrustableDefault.estimateExtraFee( + WitOracleTrustlessBase.estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) + + WitOracleTrustlessBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, Witnet.RadonSLA({ @@ -163,8 +163,8 @@ contract WitOracleTrustableOvm2 ); } else { _expenses += ( - WitOracleTrustableDefault.estimateBaseFee(_evmGasPrice) - + WitOracleTrustableDefault.estimateExtraFee( + WitOracleTrustlessBase.estimateBaseFee(_evmGasPrice) + + WitOracleTrustlessBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, __request.radonSLA diff --git a/contracts/core/trustable/WitOracleTrustableReef.sol b/contracts/core/trustable/WitOracleTrustableReef.sol index f6067b04..5a65ffa8 100644 --- a/contracts/core/trustable/WitOracleTrustableReef.sol +++ b/contracts/core/trustable/WitOracleTrustableReef.sol @@ -54,7 +54,7 @@ contract WitOracleTrustableReef virtual override returns (uint256) { - return WitOracleTrustableDefault.estimateBaseFee(1, _resultMaxSize); + return WitOracleTrustlessBase.estimateBaseFee(1, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. @@ -64,7 +64,7 @@ contract WitOracleTrustableReef virtual override returns (uint256) { - return WitOracleTrustableDefault.estimateBaseFeeWithCallback(1, _callbackGasLimit); + return WitOracleTrustlessBase.estimateBaseFeeWithCallback(1, _callbackGasLimit); } diff --git a/contracts/core/trustless/WitOracleTrustlessBase.sol b/contracts/core/trustless/WitOracleTrustlessBase.sol new file mode 100644 index 00000000..21cd53fa --- /dev/null +++ b/contracts/core/trustless/WitOracleTrustlessBase.sol @@ -0,0 +1,660 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +import "../../WitOracle.sol"; +import "../../data/WitOracleDataLib.sol"; +import "../../interfaces/IWitOracleLegacy.sol"; +import "../../interfaces/IWitOracleConsumer.sol"; +import "../../libs/WitOracleResultErrorsLib.sol"; +import "../../patterns/Payable.sol"; + +/// @title Witnet Request Board "trustless" base implementation contract. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +abstract contract WitOracleTrustlessBase + is + Payable, + WitOracle, + IWitOracleLegacy +{ + using Witnet for Witnet.RadonSLA; + using WitOracleDataLib for WitOracleDataLib.Storage; + + function channel() virtual override public view returns (bytes4) { + return WitOracleDataLib.channel(); + } + + WitOracleRequestFactory public immutable override factory; + WitOracleRadonRegistry public immutable override registry; + + bytes4 public immutable override specs = type(WitOracle).interfaceId; + + uint256 internal immutable __reportResultGasBase; + uint256 internal immutable __reportResultWithCallbackGasBase; + uint256 internal immutable __reportResultWithCallbackRevertGasBase; + uint256 internal immutable __sstoreFromZeroGas; + + modifier checkCallbackRecipient( + IWitOracleConsumer _consumer, + uint24 _evmCallbackGasLimit + ) virtual { + _require( + address(_consumer).code.length > 0 + && _consumer.reportableFrom(address(this)) + && _evmCallbackGasLimit > 0, + "invalid callback" + ); _; + } + + modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual { + _require( + _msgValue >= _baseFee, + "insufficient reward" + ); + _require( + _msgValue <= _baseFee * 10, + "too much reward" + ); _; + } + + modifier checkSLA(Witnet.RadonSLA memory sla) virtual { + _require( + sla.isValid(), + "invalid SLA" + ); _; + } + + /// Asserts the given query is currently in the given status. + modifier inStatus(uint256 _queryId, Witnet.QueryStatus _status) { + if (getQueryStatus(_queryId) != _status) { + _revert(WitOracleDataLib.notInStatusRevertMessage(_status)); + + } else { + _; + } + } + + /// Asserts the caller actually posted the referred query. + modifier onlyRequester(uint256 _queryId) { + _require( + msg.sender == WitOracleDataLib.seekQueryRequest(_queryId).requester, + "not the requester" + ); _; + } + + constructor( + WitOracleRadonRegistry _registry, + WitOracleRequestFactory _factory + ) + { + registry = _registry; + factory = _factory; + } + + function class() virtual public view returns (string memory); + function getQueryStatus(uint256) virtual public view returns (Witnet.QueryStatus); + function getQueryResponseStatus(uint256) virtual public view returns (Witnet.QueryResponseStatus); + + + // ================================================================================================================ + // --- Payable ---------------------------------------------------------------------------------------------------- + + /// Gets current transaction price. + function _getGasPrice() internal view virtual override returns (uint256) { + return tx.gasprice; + } + + /// Gets message actual sender. + function _getMsgSender() internal view virtual override returns (address) { + return msg.sender; + } + + /// Gets current payment value. + function _getMsgValue() internal view virtual override returns (uint256) { + return msg.value; + } + + /// Transfers ETHs to given address. + /// @param _to Recipient address. + /// @param _amount Amount of ETHs to transfer. + function __safeTransferTo(address payable _to, uint256 _amount) virtual override internal { + payable(_to).transfer(_amount); + } + + + // ================================================================================================================ + // --- IWitOracle (partial) --------------------------------------------------------------------------------------- + + /// @notice Estimate the minimum reward required for posting a data request. + /// @param _evmGasPrice Expected gas price to pay upon posting the data request. + function estimateBaseFee(uint256 _evmGasPrice) + public view + virtual override + returns (uint256) + { + return _evmGasPrice * ( + __reportResultGasBase + + 4 * __sstoreFromZeroGas + ); + } + + /// @notice Estimate the minimum reward required for posting a data request with a callback. + /// @param _evmGasPrice Expected gas price to pay upon posting the data request. + /// @param _evmCallbackGasLimit Maximum gas to be spent when reporting the data request result. + function estimateBaseFeeWithCallback(uint256 _evmGasPrice, uint24 _evmCallbackGasLimit) + public view + virtual override + returns (uint256) + { + uint _reportResultWithCallbackGasThreshold = ( + __reportResultWithCallbackRevertGasBase + + 3 * __sstoreFromZeroGas + ); + if ( + _evmCallbackGasLimit < _reportResultWithCallbackGasThreshold + || __reportResultWithCallbackGasBase + _evmCallbackGasLimit < _reportResultWithCallbackGasThreshold + ) { + return ( + _evmGasPrice + * _reportResultWithCallbackGasThreshold + ); + } else { + return ( + _evmGasPrice + * ( + __reportResultWithCallbackGasBase + + _evmCallbackGasLimit + ) + ); + } + } + + /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new + /// @notice data query in order to avoid getting provable "too low incentives" results from + /// @notice the Wit/oracle blockchain. + /// @dev The extra fee gets calculated in proportion to: + /// @param _evmGasPrice Tentative EVM gas price at the moment the query result is ready. + /// @param _evmWitPrice Tentative nanoWit price in Wei at the moment the query is solved on the Wit/oracle blockchain. + /// @param _querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. + function estimateExtraFee( + uint256 _evmGasPrice, + uint256 _evmWitPrice, + Witnet.RadonSLA memory _querySLA + ) + public view + virtual override + returns (uint256) + { + return ( + _evmWitPrice * ((3 + _querySLA.witNumWitnesses) * _querySLA.witUnitaryReward) + + (_querySLA.maxTallyResultSize > 32 + ? _evmGasPrice * __sstoreFromZeroGas * ((_querySLA.maxTallyResultSize - 32) / 32) + : 0 + ) + ); + } + + /// Gets the whole Query data contents, if any, no matter its current status. + function getQuery(uint256 _queryId) + public view + virtual override + returns (Witnet.Query memory) + { + return __storage().queries[_queryId]; + } + + /// @notice Gets the current EVM reward the report can claim, if not done yet. + function getQueryEvmReward(uint256 _queryId) + external view + virtual override + returns (uint256) + { + return __storage().queries[_queryId].request.evmReward; + } + + /// @notice Retrieves the RAD hash and SLA parameters of the given query. + /// @param _queryId The unique query identifier. + function getQueryRequest(uint256 _queryId) + external view + override + returns (Witnet.QueryRequest memory) + { + return WitOracleDataLib.seekQueryRequest(_queryId); + } + + /// Retrieves the Witnet-provable result, and metadata, to a previously posted request. + /// @dev Fails if the `_queryId` is not in 'Reported' status. + /// @param _queryId The unique query identifier + function getQueryResponse(uint256 _queryId) + public view + virtual override + returns (Witnet.QueryResponse memory) + { + return WitOracleDataLib.seekQueryResponse(_queryId); + } + + function getQueryResponseStatusTag(uint256 _queryId) + virtual override + external view + returns (string memory) + { + return WitOracleDataLib.toString( + getQueryResponseStatus(_queryId) + ); + } + + /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. + /// @param _queryId The unique query identifier. + function getQueryResultCborBytes(uint256 _queryId) + external view + virtual override + returns (bytes memory) + { + return WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes; + } + + /// @notice Gets error code identifying some possible failure on the resolution of the given query. + /// @param _queryId The unique query identifier. + function getQueryResultError(uint256 _queryId) + virtual override + public view + returns (Witnet.ResultError memory) + { + Witnet.QueryResponseStatus _status = getQueryResponseStatus(_queryId); + try WitOracleResultErrorsLib.asResultError(_status, WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes) + returns (Witnet.ResultError memory _resultError) + { + return _resultError; + } + catch Error(string memory _reason) { + return Witnet.ResultError({ + code: Witnet.ResultErrorCodes.Unknown, + reason: string(abi.encodePacked("WitOracleResultErrorsLib: ", _reason)) + }); + } + catch (bytes memory) { + return Witnet.ResultError({ + code: Witnet.ResultErrorCodes.Unknown, + reason: "WitOracleResultErrorsLib: assertion failed" + }); + } + } + + function getQueryStatusTag(uint256 _queryId) + virtual override + external view + returns (string memory) + { + return WitOracleDataLib.toString( + getQueryStatus(_queryId) + ); + } + + function getQueryStatusBatch(uint256[] calldata _queryIds) + virtual override + external view + returns (Witnet.QueryStatus[] memory _status) + { + _status = new Witnet.QueryStatus[](_queryIds.length); + for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + _status[_ix] = getQueryStatus(_queryIds[_ix]); + } + } + + /// @notice Returns next query id to be generated by the Witnet Request Board. + function getNextQueryId() + external view + override + returns (uint256) + { + return __storage().nonce + 1; + } + + /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and + /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be + /// @notice transferred to the reporter who relays back the Witnet-provable result to this request. + /// @dev Reasons to fail: + /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; + /// @dev - invalid SLA parameters were provided; + /// @dev - insufficient value is paid as reward. + /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. + /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. + /// @return _queryId Unique query identifier. + function postQuery( + bytes32 _queryRAD, + Witnet.RadonSLA memory _querySLA + ) + virtual override + public payable + checkReward( + _getMsgValue(), + estimateBaseFee(_getGasPrice(), _queryRAD) + ) + checkSLA(_querySLA) + returns (uint256 _queryId) + { + _queryId = __postQuery( + _getMsgSender(), + 0, + uint72(_getMsgValue()), + _queryRAD, + _querySLA + + ); + // Let Web3 observers know that a new request has been posted + emit WitOracleQuery( + _getMsgSender(), + _getGasPrice(), + _getMsgValue(), + _queryId, + _queryRAD, + _querySLA + ); + } + + /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by + /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the + /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported + /// @notice directly to the requesting contract. If the report callback fails for any reason, an `WitOracleQueryResponseDeliveryFailed` + /// @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result. + /// @dev Reasons to fail: + /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; + /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; + /// @dev - invalid SLA parameters were provided; + /// @dev - zero callback gas limit is provided; + /// @dev - insufficient value is paid as reward. + /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. + /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. + /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. + function postQueryWithCallback( + bytes32 _queryRAD, + Witnet.RadonSLA memory _querySLA, + uint24 _queryCallbackGasLimit + ) + virtual override public payable + returns (uint256) + { + return postQueryWithCallback( + IWitOracleConsumer(_getMsgSender()), + _queryRAD, + _querySLA, + _queryCallbackGasLimit + ); + } + + function postQueryWithCallback( + IWitOracleConsumer _consumer, + bytes32 _queryRAD, + Witnet.RadonSLA memory _querySLA, + uint24 _queryCallbackGasLimit + ) + virtual override public payable + checkCallbackRecipient(_consumer, _queryCallbackGasLimit) + checkReward( + _getMsgValue(), + estimateBaseFeeWithCallback( + _getGasPrice(), + _queryCallbackGasLimit + ) + ) + checkSLA(_querySLA) + returns (uint256 _queryId) + { + _queryId = __postQuery( + address(_consumer), + _queryCallbackGasLimit, + uint72(_getMsgValue()), + _queryRAD, + _querySLA + ); + emit WitOracleQuery( + _getMsgSender(), + _getGasPrice(), + _getMsgValue(), + _queryId, + _queryRAD, + _querySLA + ); + } + + /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by + /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the + /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported + /// @notice directly to the requesting contract. If the report callback fails for any reason, a `WitOracleQueryResponseDeliveryFailed` + /// @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result. + /// @dev Reasons to fail: + /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; + /// @dev - the provided bytecode is empty; + /// @dev - invalid SLA parameters were provided; + /// @dev - zero callback gas limit is provided; + /// @dev - insufficient value is paid as reward. + /// @param _queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain. + /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. + /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. + function postQueryWithCallback( + bytes calldata _queryUnverifiedBytecode, + Witnet.RadonSLA memory _querySLA, + uint24 _queryCallbackGasLimit + ) + virtual override public payable + returns (uint256) + { + return postQueryWithCallback( + IWitOracleConsumer(_getMsgSender()), + _queryUnverifiedBytecode, + _querySLA, + _queryCallbackGasLimit + ); + } + + function postQueryWithCallback( + IWitOracleConsumer _consumer, + bytes calldata _queryUnverifiedBytecode, + Witnet.RadonSLA memory _querySLA, + uint24 _queryCallbackGasLimit + ) + virtual override public payable + checkCallbackRecipient(_consumer, _queryCallbackGasLimit) + checkReward( + _getMsgValue(), + estimateBaseFeeWithCallback( + _getGasPrice(), + _queryCallbackGasLimit + ) + ) + checkSLA(_querySLA) + returns (uint256 _queryId) + { + _queryId = __postQuery( + address(_consumer), + _queryCallbackGasLimit, + uint72(_getMsgValue()), + bytes32(0), + _querySLA + ); + WitOracleDataLib.seekQueryRequest(_queryId).radonBytecode = _queryUnverifiedBytecode; + emit WitOracleQuery( + _getMsgSender(), + _getGasPrice(), + _getMsgValue(), + _queryId, + _queryUnverifiedBytecode, + _querySLA + ); + } + + /// Increments the reward of a previously posted request by adding the transaction value to it. + /// @dev Fails if the `_queryId` is not in 'Posted' status. + /// @param _queryId The unique query identifier. + function upgradeQueryEvmReward(uint256 _queryId) + external payable + virtual override + inStatus(_queryId, Witnet.QueryStatus.Posted) + { + Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); + __request.evmReward += uint72(_getMsgValue()); + emit WitOracleQueryUpgrade( + _queryId, + _getMsgSender(), + _getGasPrice(), + __request.evmReward + ); + } + + + /// =============================================================================================================== + /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- + + /// @notice Estimate the minimum reward required for posting a data request. + /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. + /// @param _gasPrice Expected gas price to pay upon posting the data request. + /// @param _resultMaxSize Maximum expected size of returned data (in bytes). + function estimateBaseFee(uint256 _gasPrice, uint16 _resultMaxSize) + public view + virtual override + returns (uint256) + { + return _gasPrice * ( + __reportResultGasBase + + __sstoreFromZeroGas * ( + 4 + (_resultMaxSize == 0 ? 0 : _resultMaxSize - 1) / 32 + ) + ); + } + + /// @notice Estimate the minimum reward required for posting a data request. + /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. + /// @param gasPrice Expected gas price to pay upon posting the data request. + /// @param radHash The hash of some Witnet Data Request previously posted in the WitOracleRadonRegistry registry. + function estimateBaseFee(uint256 gasPrice, bytes32 radHash) + public view + virtual override + returns (uint256) + { + // Check this rad hash is actually verified: + registry.lookupRadonRequestResultDataType(radHash); + + // Base fee is actually invariant to max result size: + return estimateBaseFee(gasPrice); + } + + function postRequest( + bytes32 _queryRadHash, + IWitOracleLegacy.RadonSLA calldata _querySLA + ) + virtual override + external payable + returns (uint256) + { + return postQuery( + _queryRadHash, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }) + ); + } + + function postRequestWithCallback( + bytes32 _queryRadHash, + IWitOracleLegacy.RadonSLA calldata _querySLA, + uint24 _queryCallbackGas + ) + virtual override + external payable + returns (uint256) + { + return postQueryWithCallback( + _queryRadHash, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }), + _queryCallbackGas + ); + } + + function postRequestWithCallback( + bytes calldata _queryRadBytecode, + IWitOracleLegacy.RadonSLA calldata _querySLA, + uint24 _queryCallbackGas + ) + virtual override + external payable + returns (uint256) + { + return postQueryWithCallback( + _queryRadBytecode, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }), + _queryCallbackGas + ); + } + + + // ================================================================================================================ + // --- Internal functions ----------------------------------------------------------------------------------------- + + function _require(bool _condition, string memory _message) virtual internal view { + if (!_condition) { + _revert(_message); + } + } + + function _revert(string memory _message) virtual internal view { + revert( + string(abi.encodePacked( + class(), + ": ", + _message + )) + ); + } + + function _revertWitOracleDataLibUnhandledException() internal view { + _revert(_revertWitOracleDataLibUnhandledExceptionReason()); + } + + function _revertWitOracleDataLibUnhandledExceptionReason() internal pure returns (string memory) { + return string(abi.encodePacked( + type(WitOracleDataLib).name, + ": unhandled assertion" + )); + } + + function __postQuery( + address _requester, + uint24 _evmCallbackGasLimit, + uint72 _evmReward, + bytes32 _radHash, + Witnet.RadonSLA memory _sla + ) + virtual internal + returns (uint256 _queryId) + { + _queryId = ++ __storage().nonce; + Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); + _require(__request.requester == address(0), "already posted"); + { + __request.requester = _requester; + __request.gasCallback = _evmCallbackGasLimit; + __request.evmReward = _evmReward; + __request.radonRadHash = _radHash; + __request.radonSLA = _sla; + } + } + + /// Returns storage pointer to contents of 'WitOracleDataLib.Storage' struct. + function __storage() virtual internal pure returns (WitOracleDataLib.Storage storage _ptr) { + return WitOracleDataLib.data(); + } +} diff --git a/contracts/core/trustless/WitOracleTrustlessDefault.sol b/contracts/core/trustless/WitOracleTrustlessDefault.sol new file mode 100644 index 00000000..ebfa7f75 --- /dev/null +++ b/contracts/core/trustless/WitOracleTrustlessDefault.sol @@ -0,0 +1,463 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +import "./WitOracleTrustlessBase.sol"; + +import "../../interfaces/IWitOracleBlocks.sol"; +import "../../interfaces/IWitOracleReporterTrustless.sol"; +import "../../patterns/Escrowable.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +contract WitOracleTrustlessDefault + is + Escrowable, + WitOracleTrustlessBase, + IWitOracleBlocks, + IWitOracleReporterTrustless +{ + using Witnet for Witnet.QueryResponseReport; + + function class() virtual override public view returns (string memory) { + return type(WitOracleTrustlessDefault).name; + } + + /// @notice Number of blocks to await for either a dispute or a proven response to some query. + uint256 immutable public QUERY_AWAITING_BLOCKS; + + /// @notice Amount in wei to be staked upon reporting or disputing some query. + uint256 immutable public QUERY_REPORTING_STAKE; + + modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual override { + if (_msgValue < _baseFee) { + __burn(msg.sender, _baseFee - _msgValue); + + } else if (_msgValue > _baseFee * 10) { + _revert("too much reward"); + + } _; + } + + constructor( + WitOracleRadonRegistry _registry, + WitOracleRequestFactory _factory, + uint256 _reportResultGasBase, + uint256 _reportResultWithCallbackGasBase, + uint256 _reportResultWithCallbackRevertGasBase, + uint256 _sstoreFromZeroGas, + uint256 _queryAwaitingBlocks, + uint256 _queryReportingStake + ) + Payable(address(0)) + WitOracleTrustlessBase( + _registry, + _factory + ) + { + __reportResultGasBase = _reportResultGasBase; + __reportResultWithCallbackGasBase = _reportResultWithCallbackGasBase; + __reportResultWithCallbackRevertGasBase = _reportResultWithCallbackRevertGasBase; + __sstoreFromZeroGas = _sstoreFromZeroGas; + + _require(_queryAwaitingBlocks < 64, "too many awaiting blocks"); + _require(_queryReportingStake > 0, "no reporting stake?"); + + QUERY_AWAITING_BLOCKS = _queryAwaitingBlocks; + QUERY_REPORTING_STAKE = _queryReportingStake; + + // store genesis beacon: + __storage().beacons[ + Witnet.WIT_2_GENESIS_BEACON_INDEX + ] = Witnet.Beacon({ + index: Witnet.WIT_2_GENESIS_BEACON_INDEX, + prevIndex: Witnet.WIT_2_GENESIS_BEACON_PREV_INDEX, + prevRoot: Witnet.WIT_2_GENESIS_BEACON_PREV_ROOT, + ddrTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DDR_TALLIES_MERKLE_ROOT, + droTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DRO_TALLIES_MERKLE_ROOT, + nextCommitteeAggPubkey: [ + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_0, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_1, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_2, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 + ] + }); + } + + + // ================================================================================================================ + // --- Escrowable ------------------------------------------------------------------------------------------------- + + receive() external payable virtual override { + __deposit(msg.sender, _getMsgValue()); + } + + function collateralOf(address tenant) + public view + virtual override + returns (uint256) + { + return __storage().escrows[tenant].collateral; + } + + function balanceOf(address tenant) + public view + virtual override + returns (uint256) + { + return __storage().escrows[tenant].balance; + } + + function withdraw() + external + virtual override + returns (uint256 _withdrawn) + { + _withdrawn = WitOracleDataLib.withdraw(msg.sender); + __safeTransferTo( + payable(msg.sender), + _withdrawn + ); + } + + function __burn(address from, uint256 value) + virtual override + internal + { + WitOracleDataLib.burn(from, value); + } + + function __deposit(address from, uint256 value) + virtual override + internal + { + WitOracleDataLib.deposit(from, value); + } + + function __stake(address from, uint256 value) + virtual override + internal + { + WitOracleDataLib.stake(from, value); + } + + function __slash(address from, address to, uint256 value) + virtual override + internal + { + WitOracleDataLib.slash(from, to, value); + } + + function __unstake(address from, uint256 value) + virtual override + internal + { + WitOracleDataLib.unstake(from, value); + } + + + // ================================================================================================================ + // --- IWitOracle (trustlessly) ----------------------------------------------------------------------------------- + + function fetchQueryResponse(uint256 _queryId) + virtual override + external + onlyRequester(_queryId) + returns (Witnet.QueryResponse memory) + { + try WitOracleDataLib.fetchQueryResponseTrustlessly( + _queryId, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns ( + Witnet.QueryResponse memory _queryResponse + ) { + return _queryResponse; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + function getQueryStatus(uint256 _queryId) + virtual override + public view + returns (Witnet.QueryStatus) + { + return WitOracleDataLib.getQueryStatusTrustlessly(_queryId, QUERY_AWAITING_BLOCKS); + } + + /// @notice Returns query's result current status from a requester's point of view: + /// @notice - 0 => Void: the query is either non-existent or deleted; + /// @notice - 1 => Awaiting: the query has not yet been reported; + /// @notice - 2 => Ready: the query has been succesfully solved; + /// @notice - 3 => Error: the query couldn't get solved due to some issue. + /// @param _queryId The unique query identifier. + function getQueryResponseStatus(uint256 _queryId) + virtual override + public view + returns (Witnet.QueryResponseStatus) + { + return WitOracleDataLib.getQueryResponseStatusTrustlessly(_queryId, QUERY_AWAITING_BLOCKS); + } + + + // ================================================================================================================ + // --- IWitOracleBlocks ------------------------------------------------------------------------------------------- + + function determineBeaconIndexFromTimestamp(uint32 timestamp) + virtual override + external pure + returns (uint32) + { + return Witnet.determineBeaconIndexFromTimestamp(timestamp); + } + + function determineEpochFromTimestamp(uint32 timestamp) + virtual override + external pure + returns (uint32) + { + return Witnet.determineEpochFromTimestamp(timestamp); + } + + function getBeaconByIndex(uint32 index) + virtual override + public view + returns (Witnet.Beacon memory) + { + return WitOracleDataLib.seekBeacon(index); + } + + function getGenesisBeacon() + virtual override + external pure + returns (Witnet.Beacon memory) + { + return Witnet.Beacon({ + index: Witnet.WIT_2_GENESIS_BEACON_INDEX, + prevIndex: Witnet.WIT_2_GENESIS_BEACON_PREV_INDEX, + prevRoot: Witnet.WIT_2_GENESIS_BEACON_PREV_ROOT, + ddrTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DDR_TALLIES_MERKLE_ROOT, + droTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DRO_TALLIES_MERKLE_ROOT, + nextCommitteeAggPubkey: [ + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_0, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_1, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_2, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 + ] + }); + } + + function getLastKnownBeacon() + virtual override + public view + returns (Witnet.Beacon memory) + { + return WitOracleDataLib.getLastKnownBeacon(); + } + + function getLastKnownBeaconIndex() + virtual override + public view + returns (uint32) + { + return uint32(WitOracleDataLib.getLastKnownBeaconIndex()); + } + + function rollupBeacons(Witnet.FastForward[] calldata _witOracleRollup) + virtual override public + returns (Witnet.Beacon memory) + { + try WitOracleDataLib.rollupBeacons( + _witOracleRollup + ) returns ( + Witnet.Beacon memory _witOracleHead + ) { + return _witOracleHead; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + + // ================================================================================================================ + // --- IWitOracleReporterTrustless -------------------------------------------------------------------------------- + + function claimQueryReward(uint256 _queryId) + virtual override external + returns (uint256) + { + try WitOracleDataLib.claimQueryReward( + _queryId, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns ( + uint256 _evmReward + ) { + return _evmReward; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + function claimQueryRewardsBatch(uint256[] calldata _queryIds) + virtual override external + returns (uint256 _evmTotalReward) + { + for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + try WitOracleDataLib.claimQueryReward( + _queryIds[_ix], + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns (uint256 _evmReward) { + _evmTotalReward += _evmReward; + + } catch Error(string memory _reason) { + emit BatchReportError( + _queryIds[_ix], + _reason + ); + + } catch (bytes memory) { + emit BatchReportError( + _queryIds[_ix], + _revertWitOracleDataLibUnhandledExceptionReason() + ); + } + } + } + + function disputeQueryResponse(uint256 _queryId) + virtual override external + inStatus(_queryId, Witnet.QueryStatus.Reported) + returns (uint256) + { + return WitOracleDataLib.disputeQueryResponse( + _queryId, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + ); + } + + function reportQueryResponse(Witnet.QueryResponseReport calldata _responseReport) + virtual override public + returns (uint256) + { + try WitOracleDataLib.reportQueryResponseTrustlessly( + _responseReport, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns (uint256 _evmReward) { + return _evmReward; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + function reportQueryResponseBatch(Witnet.QueryResponseReport[] calldata _responseReports) + virtual override external + returns (uint256 _evmTotalReward) + { + for (uint _ix = 0; _ix < _responseReports.length; _ix ++) { + Witnet.QueryResponseReport calldata _responseReport = _responseReports[_ix]; + try WitOracleDataLib.reportQueryResponseTrustlessly( + _responseReport, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns (uint256 _evmPartialReward) { + _evmTotalReward += _evmPartialReward; + + } catch Error(string memory _reason) { + emit BatchReportError( + _responseReport.queryId, + _reason + ); + + } catch (bytes memory) { + emit BatchReportError( + _responseReport.queryId, + _revertWitOracleDataLibUnhandledExceptionReason() + ); + } + } + } + + function rollupQueryResponseProof( + Witnet.FastForward[] calldata _witOracleRollup, + Witnet.QueryResponseReport calldata _responseReport, + bytes32[] calldata _queryResponseReportMerkleProof + ) + virtual override external + returns (uint256) + { + try WitOracleDataLib.rollupQueryResponseProof( + _witOracleRollup, + _responseReport, + _queryResponseReportMerkleProof, + QUERY_AWAITING_BLOCKS, + QUERY_REPORTING_STAKE + + ) returns ( + uint256 _evmReward + ) { + return _evmReward; + } + catch Error(string memory _reason) { + _revert(_reason); + } + catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + function rollupQueryResultProof( + Witnet.FastForward[] calldata _witOracleRollup, + Witnet.QueryReport calldata _queryReport, + bytes32[] calldata _queryReportMerkleProof + ) + virtual override external + returns (Witnet.Result memory) + { + try WitOracleDataLib.rollupQueryResultProof( + _witOracleRollup, + _queryReport, + _queryReportMerkleProof + + ) returns ( + Witnet.Result memory _queryResult + ) { + return _queryResult; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } +} diff --git a/contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol b/contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol new file mode 100644 index 00000000..e43a9612 --- /dev/null +++ b/contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +import "./WitOracleTrustlessDefault.sol"; +import "../WitnetUpgradableBase.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +contract WitOracleTrustlessUpgradableDefault + is + WitOracleTrustlessDefault, + WitnetUpgradableBase +{ + function class() + virtual override(WitOracleTrustlessDefault, WitnetUpgradableBase) + public view + returns (string memory) + { + return type(WitOracleTrustlessUpgradableDefault).name; + } + + constructor( + WitOracleRadonRegistry _registry, + WitOracleRequestFactory _factory, + bool _upgradable, + bytes32 _versionTag, + uint256 _reportResultGasBase, + uint256 _reportResultWithCallbackGasBase, + uint256 _reportResultWithCallbackRevertGasBase, + uint256 _sstoreFromZeroGas, + uint256 _queryAwaitingBlocks, + uint256 _queryReportingStake + ) + Ownable(msg.sender) + WitnetUpgradableBase( + _upgradable, + _versionTag, + "io.witnet.proxiable.board" + ) + WitOracleTrustlessDefault( + _registry, + _factory, + _reportResultGasBase, + _reportResultWithCallbackGasBase, + _reportResultWithCallbackRevertGasBase, + _sstoreFromZeroGas, + _queryAwaitingBlocks, + _queryReportingStake + ) + {} + + + // ================================================================================================================ + // ---Upgradeable ------------------------------------------------------------------------------------------------- + + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) virtual override public { + address _owner = owner(); + + if (_owner == address(0)) { + // initializing for the first time... + + // transfer ownership to first initializer + _transferOwnership(_owner); + + // save into storage genesis beacon + __storage().beacons[ + Witnet.WIT_2_GENESIS_BEACON_INDEX + ] = Witnet.Beacon({ + index: Witnet.WIT_2_GENESIS_BEACON_INDEX, + prevIndex: Witnet.WIT_2_GENESIS_BEACON_PREV_INDEX, + prevRoot: Witnet.WIT_2_GENESIS_BEACON_PREV_ROOT, + ddrTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DDR_TALLIES_MERKLE_ROOT, + droTalliesMerkleRoot: Witnet.WIT_2_GENESIS_BEACON_DRO_TALLIES_MERKLE_ROOT, + nextCommitteeAggPubkey: [ + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_0, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_1, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_2, + Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 + ] + }); + + } else { + // only owner can initialize a new upgrade: + _require( + msg.sender == _owner, + "not the owner" + ); + } + + if ( + __proxiable().codehash != bytes32(0) + && __proxiable().codehash == codehash() + ) { + _revert("already upgraded"); + } + __proxiable().codehash = codehash(); + + _require(address(registry).code.length > 0, "inexistent registry"); + _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); + + // Settle given beacon, if any: + if (_initData.length > 0) { + Witnet.Beacon memory _beacon = abi.decode(_initData, (Witnet.Beacon)); + __storage().beacons[_beacon.index] = _beacon; + } + + emit Upgraded(_owner, base(), codehash(), version()); + } + + + /// ================================================================================================================ + /// --- Internal methods ------------------------------------------------------------------------------------------- + + function _require(bool _condition, string memory _reason) + virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) + internal view + { + WitOracleTrustlessBase._require(_condition, _reason); + } + + function _revert(string memory _reason) + virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) + internal view + { + WitOracleTrustlessBase._revert(_reason); + } +} diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 1bd903d0..e78a262c 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -39,6 +39,11 @@ library WitOracleDataLib { // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- + /// Unique relay channel identifying the sidechain and request board instance from where data queries are requested. + function channel() internal view returns (bytes4) { + return bytes4(keccak256(abi.encode(address(this), block.chainid))); + } + /// Returns storage pointer to contents of 'WitnetBoardState' struct. function data() internal pure returns (Storage storage _ptr) { @@ -47,12 +52,12 @@ library WitOracleDataLib { } } - function queryHashOf(Storage storage self, bytes4 channel, uint256 queryId) + function queryHashOf(Storage storage self, uint256 queryId) internal view returns (bytes32) { Witnet.Query storage __query = self.queries[queryId]; return keccak256(abi.encode( - channel, + channel(), queryId, blockhash(__query.block), __query.request.radonRadHash != bytes32(0) @@ -62,26 +67,6 @@ library WitOracleDataLib { )); } - /// Saves query response into storage. - function saveQueryResponse( - address evmReporter, - uint64 evmFinalityBlock, - uint256 queryId, - uint32 resultTimestamp, - bytes32 resultDrTxHash, - bytes memory resultCborBytes - ) internal - { - seekQuery(queryId).response = Witnet.QueryResponse({ - reporter: evmReporter, - finality: evmFinalityBlock, - resultTimestamp: resultTimestamp, - resultDrTxHash: resultDrTxHash, - resultCborBytes: resultCborBytes, - disputer: address(0) - }); - } - /// Gets query storage by query id. function seekQuery(uint256 queryId) internal view returns (Witnet.Query storage) { return data().queries[queryId]; @@ -182,20 +167,46 @@ library WitOracleDataLib { /// ======================================================================= /// --- IWitOracle -------------------------------------------------------- + + function fetchQueryResponse(uint256 queryId) public returns ( + Witnet.QueryResponse memory _queryResponse, + uint72 _queryEvmExpiredReward + ) + { + Witnet.Query storage __query = seekQuery(queryId); + Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); + + _queryEvmExpiredReward = __query.request.evmReward; + __query.request.evmReward = 0; + + if ( + _queryStatus != Witnet.QueryStatus.Expired + && _queryStatus != Witnet.QueryStatus.Finalized + ) { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(_queryStatus) + ))); + } + + _queryResponse = __query.response; + delete data().queries[queryId]; + } function fetchQueryResponseTrustlessly( - uint256 evmQueryReportingStake, uint256 queryId, - Witnet.QueryStatus queryStatus + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake ) public returns (Witnet.QueryResponse memory _queryResponse) { Witnet.Query storage __query = seekQuery(queryId); + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly(queryId, evmQueryAwaitingBlocks); uint72 _evmReward = __query.request.evmReward; __query.request.evmReward = 0; - if (queryStatus == Witnet.QueryStatus.Expired) { + if (_queryStatus == Witnet.QueryStatus.Expired) { if (_evmReward > 0) { if (__query.response.disputer != address(0)) { // transfer reporter's stake to the disputer @@ -212,10 +223,10 @@ library WitOracleDataLib { } } - } else if (queryStatus != Witnet.QueryStatus.Finalized) { + } else if (_queryStatus != Witnet.QueryStatus.Finalized) { revert(string(abi.encodePacked( "invalid query status: ", - toString(queryStatus) + toString(_queryStatus) ))); } @@ -226,7 +237,24 @@ library WitOracleDataLib { // transfer unused reward to requester: if (_evmReward > 0) { deposit(msg.sender, _evmReward); - } + } + } + + function getQueryStatus(uint256 queryId) public view returns (Witnet.QueryStatus) { + Witnet.Query storage __query = seekQuery(queryId); + + if (__query.response.resultTimestamp != 0) { + return Witnet.QueryStatus.Finalized; + + } else if (__query.block == 0) { + return Witnet.QueryStatus.Unknown; + + } else if (block.number >= __query.block + 64) { + return Witnet.QueryStatus.Expired; + + } else { + return Witnet.QueryStatus.Posted; + } } function getQueryStatusTrustlessly( @@ -236,6 +264,7 @@ library WitOracleDataLib { public view returns (Witnet.QueryStatus) { Witnet.Query storage __query = seekQuery(queryId); + if (__query.response.resultTimestamp != 0) { if (block.number >= __query.response.finality) { if (__query.response.disputer != address(0)) { @@ -266,6 +295,34 @@ library WitOracleDataLib { } } + function getQueryResponseStatus(uint256 queryId) public view returns (Witnet.QueryResponseStatus) { + Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); + + if (_queryStatus == Witnet.QueryStatus.Finalized) { + bytes storage __cborValues = WitOracleDataLib.seekQueryResponse(queryId).resultCborBytes; + if (__cborValues.length > 0) { + // determine whether stored result is an error by peeking the first byte + return (__cborValues[0] == bytes1(0xd8) + ? Witnet.QueryResponseStatus.Error + : Witnet.QueryResponseStatus.Ready + ); + + } else { + // the result is final but delivered to the requesting address + return Witnet.QueryResponseStatus.Delivered; + } + + } else if (_queryStatus == Witnet.QueryStatus.Posted) { + return Witnet.QueryResponseStatus.Awaiting; + + } else if (_queryStatus == Witnet.QueryStatus.Expired) { + return Witnet.QueryResponseStatus.Expired; + + } else { + return Witnet.QueryResponseStatus.Void; + } + } + function getQueryResponseStatusTrustlessly( uint256 queryId, uint256 evmQueryAwaitingBlocks @@ -365,22 +422,24 @@ library WitOracleDataLib { } } } - - function reportQueryResponse( + + function reportResult( address evmReporter, uint256 evmGasPrice, uint64 evmFinalityBlock, - Witnet.QueryResponseReport calldata report + uint256 queryId, + uint32 witDrResultTimestamp, + bytes32 witDrTxHash, + bytes calldata witDrResultCborBytes ) public returns (uint256 evmReward) - // todo: turn into private { // read requester address and whether a callback was requested: - Witnet.QueryRequest storage __request = seekQueryRequest(report.queryId); - + Witnet.QueryRequest storage __request = seekQueryRequest(queryId); + // read query EVM reward: evmReward = __request.evmReward; - + // set EVM reward right now as to avoid re-entrancy attacks: __request.evmReward = 0; @@ -390,81 +449,86 @@ library WitOracleDataLib { uint256 evmCallbackActualGas, bool evmCallbackSuccess, string memory evmCallbackRevertMessage - ) = reportQueryResponseCallback( + ) = __reportResultCallback( __request.requester, __request.gasCallback, evmFinalityBlock, - report + queryId, + witDrResultTimestamp, + witDrTxHash, + witDrResultCborBytes ); if (evmCallbackSuccess) { // => the callback run successfully emit IWitOracleEvents.WitOracleQueryReponseDelivered( - report.queryId, + queryId, evmGasPrice, evmCallbackActualGas ); } else { // => the callback reverted emit IWitOracleEvents.WitOracleQueryResponseDeliveryFailed( - report.queryId, + queryId, evmGasPrice, evmCallbackActualGas, bytes(evmCallbackRevertMessage).length > 0 ? evmCallbackRevertMessage : "WitOracleDataLib: callback exceeded gas limit", - report.witDrResultCborBytes + witDrResultCborBytes ); } // upon delivery, successfull or not, the audit trail is saved into storage, // but not the actual result which was intended to be passed over to the requester: - saveQueryResponse( + __saveQueryResponse( evmReporter, evmFinalityBlock, - report.queryId, - Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - report.witDrTxHash, + queryId, + witDrResultTimestamp, + witDrTxHash, hex"" ); } else { // => no callback is involved emit IWitOracleEvents.WitOracleQueryResponse( - report.queryId, + queryId, evmGasPrice ); // write query result and audit trail data into storage - saveQueryResponse( + __saveQueryResponse( evmReporter, evmFinalityBlock, - report.queryId, - Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - report.witDrTxHash, - report.witDrResultCborBytes + queryId, + witDrResultTimestamp, + witDrTxHash, + witDrResultCborBytes ); } } - function reportQueryResponseCallback( + function __reportResultCallback( address evmRequester, uint24 evmCallbackGasLimit, uint64 evmFinalityBlock, - Witnet.QueryResponseReport calldata report + uint256 queryId, + uint32 witDrResultTimestamp, + bytes32 witDrTxHash, + bytes calldata witDrResultCborBytes ) - public returns ( + private returns ( uint256 evmCallbackActualGas, bool evmCallbackSuccess, string memory evmCallbackRevertMessage ) - // todo: turn into private { evmCallbackActualGas = gasleft(); - if (report.witDrResultCborBytes[0] == bytes1(0xd8)) { - WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(report.witDrResultCborBytes).readArray(); + if (witDrResultCborBytes[0] == bytes1(0xd8)) { + WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(witDrResultCborBytes).readArray(); if (_errors.length < 2) { // try to report result with unknown error: try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - report.queryId, - Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - report.witDrTxHash, + queryId, + witDrResultTimestamp, + witDrTxHash, evmFinalityBlock, Witnet.ResultErrorCodes.Unknown, WitnetCBOR.CBOR({ @@ -477,91 +541,63 @@ library WitOracleDataLib { }) ) { evmCallbackSuccess = true; + } catch Error(string memory err) { evmCallbackRevertMessage = err; } - } else { // try to report result with parsable error: try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - report.queryId, - Witnet.determineEpochFromTimestamp(report.witDrResultEpoch), - report.witDrTxHash, + queryId, + witDrResultTimestamp, + witDrTxHash, evmFinalityBlock, Witnet.ResultErrorCodes(_errors[0].readUint()), _errors[0] ) { evmCallbackSuccess = true; + } catch Error(string memory err) { evmCallbackRevertMessage = err; } } - } else { // try to report result result with no error : try IWitOracleConsumer(evmRequester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( - report.queryId, - Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - report.witDrTxHash, + queryId, + witDrResultTimestamp, + witDrTxHash, evmFinalityBlock, - WitnetCBOR.fromBytes(report.witDrResultCborBytes) + WitnetCBOR.fromBytes(witDrResultCborBytes) ) { evmCallbackSuccess = true; + } catch Error(string memory err) { evmCallbackRevertMessage = err; + } catch (bytes memory) {} } evmCallbackActualGas -= gasleft(); } - function reportQueryResponseTrustlessly( - bytes4 channel, - uint256 evmGasPrice, - uint256 evmQueryAwaitingBlocks, - uint256 evmQueryReportingStake, - Witnet.QueryStatus queryStatus, - Witnet.QueryResponseReport calldata queryResponseReport - ) - public returns (uint256) + /// Saves query response into storage. + function __saveQueryResponse( + address evmReporter, + uint64 evmFinalityBlock, + uint256 queryId, + uint32 witDrResultTimestamp, + bytes32 witDrTxHash, + bytes memory witDrResultCborBytes + ) private { - (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( - channel, - queryResponseReport - ); - require( - _isValidQueryResponseReport, - _queryResponseReportInvalidError - ); - - address _queryReporter; - if (queryStatus == Witnet.QueryStatus.Posted) { - _queryReporter = queryResponseReport.queryRelayer(); - require( - _queryReporter == msg.sender, - "unauthorized query reporter" - ); - } - - else if (queryStatus == Witnet.QueryStatus.Delayed) { - _queryReporter = msg.sender; - - } else { - revert(string(abi.encodePacked( - "invalid query status: ", - toString(queryStatus) - ))); - } - - // stake from caller's balance: - stake(msg.sender, evmQueryReportingStake); - - // save query response into storage: - return reportQueryResponse( - _queryReporter, - evmGasPrice, - uint64(block.number + evmQueryAwaitingBlocks), - queryResponseReport - ); + seekQuery(queryId).response = Witnet.QueryResponse({ + reporter: evmReporter, + finality: evmFinalityBlock, + resultTimestamp: witDrResultTimestamp, + resultDrTxHash: witDrTxHash, + resultCborBytes: witDrResultCborBytes, + disputer: address(0) + }); } @@ -569,9 +605,9 @@ library WitOracleDataLib { /// --- IWitOracleReporterTrustless --------------------------------------- function claimQueryReward( - uint256 evmQueryReportingStake, - uint256 queryId, - Witnet.QueryStatus queryStatus + uint256 queryId, + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake ) public returns (uint256 evmReward) { @@ -592,7 +628,11 @@ library WitOracleDataLib { evmReward ); - if (queryStatus == Witnet.QueryStatus.Finalized) { + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( + queryId, + evmQueryAwaitingBlocks + ); + if (_queryStatus == Witnet.QueryStatus.Finalized) { // only the reporter can claim, require( msg.sender == __query.request.requester, @@ -604,7 +644,7 @@ library WitOracleDataLib { evmQueryReportingStake ); - } else if (queryStatus == Witnet.QueryStatus.Expired) { + } else if (_queryStatus == Witnet.QueryStatus.Expired) { if (__query.response.disputer != address(0)) { // only the disputer can claim, require( @@ -635,15 +675,15 @@ library WitOracleDataLib { } else { revert(string(abi.encodePacked( "invalid query status: ", - toString(queryStatus) + toString(_queryStatus) ))); } } function disputeQueryResponse( + uint256 queryId, uint256 evmQueryAwaitingBlocks, - uint256 evmQueryReportingStake, - uint256 queryId + uint256 evmQueryReportingStake ) public returns (uint256 evmPotentialReward) { @@ -661,20 +701,71 @@ library WitOracleDataLib { ); } + function reportQueryResponseTrustlessly( + Witnet.QueryResponseReport calldata responseReport, + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake + ) + public returns (uint256) + { + (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( + responseReport + ); + require( + _isValidQueryResponseReport, + _queryResponseReportInvalidError + ); + + address _queryReporter; + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( + responseReport.queryId, + evmQueryAwaitingBlocks + ); + if (_queryStatus == Witnet.QueryStatus.Posted) { + _queryReporter = responseReport.queryRelayer(); + require( + _queryReporter == msg.sender, + "unauthorized query reporter" + ); + } + + else if (_queryStatus == Witnet.QueryStatus.Delayed) { + _queryReporter = msg.sender; + + } else { + revert(string(abi.encodePacked( + "invalid query status: ", + toString(_queryStatus) + ))); + } + + // stake from caller's balance: + stake(msg.sender, evmQueryReportingStake); + + // save query response into storage: + return reportResult( + _queryReporter, + tx.gasprice, + uint64(block.number + evmQueryAwaitingBlocks), + responseReport.queryId, + Witnet.determineTimestampFromEpoch(responseReport.witDrResultEpoch), + responseReport.witDrTxHash, + responseReport.witDrResultCborBytes + ); + } + function rollupQueryResponseProof( - bytes4 channel, - uint256 evmQueryReportingStake, - Witnet.QueryResponseReport calldata queryResponseReport, - Witnet.QueryStatus queryStatus, Witnet.FastForward[] calldata witOracleRollup, - bytes32[] calldata ddrTalliesMerkleTrie + Witnet.QueryResponseReport calldata responseReport, + bytes32[] calldata ddrTalliesMerkleTrie, + uint256 evmQueryAwaitingBlocks, + uint256 evmQueryReportingStake ) public returns (uint256 evmTotalReward) { // validate query response report (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( - channel, - queryResponseReport + responseReport ); require(_isValidQueryResponseReport, _queryResponseReportInvalidError); @@ -682,28 +773,32 @@ library WitOracleDataLib { Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); require( _witOracleHead.index == Witnet.determineBeaconIndexFromEpoch( - queryResponseReport.witDrResultEpoch - ) + 1, "mismatching head beacon" + responseReport.witDrResultEpoch + ) + 1, "misleading head beacon" ); // validate merkle proof require( _witOracleHead.ddrTalliesMerkleRoot == Witnet.merkleRoot( ddrTalliesMerkleTrie, - queryResponseReport.tallyHash() + responseReport.tallyHash() ), "invalid merkle proof" ); - Witnet.Query storage __query = seekQuery(queryResponseReport.queryId); + Witnet.Query storage __query = seekQuery(responseReport.queryId); // process query response report depending on query's current status ... { - if (queryStatus == Witnet.QueryStatus.Reported) { + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( + responseReport.queryId, + evmQueryAwaitingBlocks + ); + if (_queryStatus == Witnet.QueryStatus.Reported) { // check that proven report actually differs from what was formerly reported require( keccak256(abi.encode( - queryResponseReport.witDrTxHash, - queryResponseReport.witDrResultEpoch, - queryResponseReport.witDrResultCborBytes + responseReport.witDrTxHash, + responseReport.witDrResultEpoch, + responseReport.witDrResultCborBytes )) != keccak256(abi.encode( __query.response.resultDrTxHash, Witnet.determineEpochFromTimestamp(__query.response.resultTimestamp), @@ -724,17 +819,17 @@ library WitOracleDataLib { // update query's response data into storage: __query.response.reporter = msg.sender; - __query.response.resultCborBytes = queryResponseReport.witDrResultCborBytes; - __query.response.resultDrTxHash = queryResponseReport.witDrTxHash; - __query.response.resultTimestamp = Witnet.determineTimestampFromEpoch(queryResponseReport.witDrResultEpoch); + __query.response.resultCborBytes = responseReport.witDrResultCborBytes; + __query.response.resultDrTxHash = responseReport.witDrTxHash; + __query.response.resultTimestamp = Witnet.determineTimestampFromEpoch(responseReport.witDrResultEpoch); - } else if (queryStatus == Witnet.QueryStatus.Disputed) { + } else if (_queryStatus == Witnet.QueryStatus.Disputed) { // check that proven report actually matches what was formerly reported require( keccak256(abi.encode( - queryResponseReport.witDrTxHash, - queryResponseReport.witDrResultEpoch, - queryResponseReport.witDrResultCborBytes + responseReport.witDrTxHash, + responseReport.witDrResultEpoch, + responseReport.witDrResultCborBytes )) == keccak256(abi.encode( __query.response.resultDrTxHash, Witnet.determineEpochFromTimestamp(__query.response.resultTimestamp), @@ -759,7 +854,7 @@ library WitOracleDataLib { } else { revert(string(abi.encodePacked( "invalid query status: ", - toString(queryStatus) + toString(_queryStatus) ))); } @@ -771,8 +866,8 @@ library WitOracleDataLib { } function rollupQueryResultProof( - Witnet.QueryReport calldata queryReport, Witnet.FastForward[] calldata witOracleRollup, + Witnet.QueryReport calldata queryReport, bytes32[] calldata droTalliesMerkleTrie ) public returns (Witnet.Result memory) @@ -792,7 +887,7 @@ library WitOracleDataLib { require( _witOracleHead.index == Witnet.determineBeaconIndexFromEpoch( queryReport.witDrResultEpoch - ) + 1, "mismatching head beacon" + ) + 1, "misleading head beacon" ); // validate merkle proof @@ -813,12 +908,12 @@ library WitOracleDataLib { /// ======================================================================= /// --- Other public helper methods --------------------------------------- - function isValidQueryResponseReport(bytes4 channel, Witnet.QueryResponseReport calldata report) + function isValidQueryResponseReport(Witnet.QueryResponseReport calldata report) public view // todo: turn into private returns (bool, string memory) { - if (queryHashOf(data(), channel, report.queryId) != report.queryHash) { + if (queryHashOf(data(), report.queryId) != report.queryHash) { return (false, "invalid query hash"); } else if (report.witDrResultEpoch == 0) { @@ -885,6 +980,154 @@ library WitOracleDataLib { /// ======================================================================= /// --- Private library methods ------------------------------------------- + // function __reportQueryResponse( + // address evmReporter, + // uint256 evmGasPrice, + // uint64 evmFinalityBlock, + // Witnet.QueryResponseReport calldata report + // ) + // private returns (uint256 evmReward) + // { + // // read requester address and whether a callback was requested: + // Witnet.QueryRequest storage __request = seekQueryRequest(report.queryId); + + // // read query EVM reward: + // evmReward = __request.evmReward; + + // // set EVM reward right now as to avoid re-entrancy attacks: + // __request.evmReward = 0; + + // // determine whether a callback is required + // if (__request.gasCallback > 0) { + // ( + // uint256 evmCallbackActualGas, + // bool evmCallbackSuccess, + // string memory evmCallbackRevertMessage + // ) = __reportQueryResponseCallback( + // __request.requester, + // __request.gasCallback, + // evmFinalityBlock, + // report + // ); + // if (evmCallbackSuccess) { + // // => the callback run successfully + // emit IWitOracleEvents.WitOracleQueryReponseDelivered( + // report.queryId, + // evmGasPrice, + // evmCallbackActualGas + // ); + // } else { + // // => the callback reverted + // emit IWitOracleEvents.WitOracleQueryResponseDeliveryFailed( + // report.queryId, + // evmGasPrice, + // evmCallbackActualGas, + // bytes(evmCallbackRevertMessage).length > 0 + // ? evmCallbackRevertMessage + // : "WitOracleDataLib: callback exceeded gas limit", + // report.witDrResultCborBytes + // ); + // } + // // upon delivery, successfull or not, the audit trail is saved into storage, + // // but not the actual result which was intended to be passed over to the requester: + // saveQueryResponse( + // evmReporter, + // evmFinalityBlock, + // report.queryId, + // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + // report.witDrTxHash, + // hex"" + // ); + // } else { + // // => no callback is involved + // emit IWitOracleEvents.WitOracleQueryResponse( + // report.queryId, + // evmGasPrice + // ); + // // write query result and audit trail data into storage + // saveQueryResponse( + // evmReporter, + // evmFinalityBlock, + // report.queryId, + // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + // report.witDrTxHash, + // report.witDrResultCborBytes + // ); + // } + // } + + // function __reportQueryResponseCallback( + // address evmRequester, + // uint24 evmCallbackGasLimit, + // uint64 evmFinalityBlock, + // Witnet.QueryResponseReport calldata report + // ) + // private returns ( + // uint256 evmCallbackActualGas, + // bool evmCallbackSuccess, + // string memory evmCallbackRevertMessage + // ) + // { + // evmCallbackActualGas = gasleft(); + // if (report.witDrResultCborBytes[0] == bytes1(0xd8)) { + // WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(report.witDrResultCborBytes).readArray(); + // if (_errors.length < 2) { + // // try to report result with unknown error: + // try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( + // report.queryId, + // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + // report.witDrTxHash, + // evmFinalityBlock, + // Witnet.ResultErrorCodes.Unknown, + // WitnetCBOR.CBOR({ + // buffer: WitnetBuffer.Buffer({ data: hex"", cursor: 0}), + // initialByte: 0, + // majorType: 0, + // additionalInformation: 0, + // len: 0, + // tag: 0 + // }) + // ) { + // evmCallbackSuccess = true; + // } catch Error(string memory err) { + // evmCallbackRevertMessage = err; + // } + + // } else { + // // try to report result with parsable error: + // try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( + // report.queryId, + // Witnet.determineEpochFromTimestamp(report.witDrResultEpoch), + // report.witDrTxHash, + // evmFinalityBlock, + // Witnet.ResultErrorCodes(_errors[0].readUint()), + // _errors[0] + // ) { + // evmCallbackSuccess = true; + // } catch Error(string memory err) { + // evmCallbackRevertMessage = err; + // } + // } + + // } else { + // // try to report result result with no error : + // try IWitOracleConsumer(evmRequester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( + // report.queryId, + // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), + // report.witDrTxHash, + // evmFinalityBlock, + // WitnetCBOR.fromBytes(report.witDrResultCborBytes) + // ) { + // evmCallbackSuccess = true; + + // } catch Error(string memory err) { + // evmCallbackRevertMessage = err; + + // } catch (bytes memory) {} + // } + // evmCallbackActualGas -= gasleft(); + // } + function _verifyFastForwards(Witnet.FastForward[] calldata ff) private pure returns (Witnet.Beacon calldata) diff --git a/contracts/interfaces/IWitOracleBlocks.sol b/contracts/interfaces/IWitOracleBlocks.sol new file mode 100644 index 00000000..5cc5eabb --- /dev/null +++ b/contracts/interfaces/IWitOracleBlocks.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +import "../libs/Witnet.sol"; + +interface IWitOracleBlocks { + + event Rollup(Witnet.Beacon head); + + function determineBeaconIndexFromTimestamp(uint32 timestamp) external pure returns (uint32); + function determineEpochFromTimestamp(uint32 timestamp) external pure returns (uint32); + + function getBeaconByIndex(uint32 index) external view returns (Witnet.Beacon memory); + function getGenesisBeacon() external pure returns (Witnet.Beacon memory); + function getLastKnownBeacon() external view returns (Witnet.Beacon memory); + function getLastKnownBeaconIndex() external view returns (uint32); + + function rollupBeacons(Witnet.FastForward[] calldata ff) external returns (Witnet.Beacon memory); +} diff --git a/contracts/interfaces/IWitOracleEvents.sol b/contracts/interfaces/IWitOracleEvents.sol index ce7f3e48..0800c2a8 100644 --- a/contracts/interfaces/IWitOracleEvents.sol +++ b/contracts/interfaces/IWitOracleEvents.sol @@ -25,6 +25,11 @@ interface IWitOracleEvents { Witnet.RadonSLA querySLA ); + event WitOracleQueryResponseDispute( + uint256 queryId, + address evmDisputer + ); + /// Emitted when the reward of some not-yet reported query gets upgraded. event WitOracleQueryUpgrade( uint256 queryId, diff --git a/contracts/interfaces/IWitOracleReporterTrustless.sol b/contracts/interfaces/IWitOracleReporterTrustless.sol new file mode 100644 index 00000000..0e6f1c64 --- /dev/null +++ b/contracts/interfaces/IWitOracleReporterTrustless.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; + +import "../libs/Witnet.sol"; + +/// @title The Witnet Request Board Reporter trustless interface. +/// @author The Witnet Foundation. +interface IWitOracleReporterTrustless { + + event BatchReportError(uint256 queryId, string reason); + + function claimQueryReward(uint256 queryId) external returns (uint256); + function claimQueryRewardsBatch(uint256[] calldata queryIds) external returns (uint256); + + function disputeQueryResponse(uint256 queryId) external returns (uint256); + + function reportQueryResponse(Witnet.QueryResponseReport calldata report) external returns (uint256); + function reportQueryResponseBatch(Witnet.QueryResponseReport[] calldata reports) external returns (uint256); + + function rollupQueryResponseProof( + Witnet.FastForward[] calldata witOracleRollup, + Witnet.QueryResponseReport calldata queryResponseReport, + bytes32[] calldata witOracleDdrTalliesProof + ) external returns ( + uint256 evmTotalReward + ); + + function rollupQueryResultProof( + Witnet.FastForward[] calldata witOracleRollup, + Witnet.QueryReport calldata queryReport, + bytes32[] calldata witOracleDroTalliesTrie + ) external returns ( + Witnet.Result memory queryResult + ); +} diff --git a/contracts/libs/WitnetBN254.sol b/contracts/libs/WitnetBN254.sol new file mode 100644 index 00000000..8fde29e7 --- /dev/null +++ b/contracts/libs/WitnetBN254.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: MIT +// solium-disable security/no-assign-params + +pragma solidity >=0.8.0 <0.9.0; + +/// @title Elliptic curve operations on twist points on BN254-G2 +/// @dev Adaptation of https://github.com/musalbas/solidity-BN256G2 +library WitnetBN254 { + + using WitnetBN254 for Fq2; + using WitnetBN254 for Point; + + uint256 internal constant F_MODULUS = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47; + + uint256 internal constant TWIST_BX = 0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5; + uint256 internal constant TWIST_BY = 0x009713b03af0fed4cd2cafadeed8fdf4a74fa084e52d1852e4a2bd0685c315d2; + + // This is the generator negated, to use for pairing + uint256 public constant G2_NEG_X_RE = 0x198E9393920D483A7260BFB731FB5D25F1AA493335A9E71297E485B7AEF312C2; + uint256 public constant G2_NEG_X_IM = 0x1800DEEF121F1E76426A00665E5C4479674322D4F75EDADD46DEBD5CD992F6ED; + uint256 public constant G2_NEG_Y_RE = 0x275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec; + uint256 public constant G2_NEG_Y_IM = 0x1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d; + + struct Fq2 { + uint256 real; + uint256 imag; + } + + struct Point { + Fq2 x; + Fq2 y; + } + + function _addmod(uint256 a, uint256 b) private pure returns (uint256) { + return uint256(addmod(a, b, F_MODULUS)); + } + + function _invmod(uint256 a) private view returns (uint256 _result) { + bool _success; + assembly { + let _freemem := mload(0x40) + mstore(_freemem, 0x20) + mstore(add(_freemem,0x20), 0x20) + mstore(add(_freemem,0x40), 0x20) + mstore(add(_freemem,0x60), a) + mstore(add(_freemem,0x80), sub(F_MODULUS, 2)) + mstore(add(_freemem,0xA0), F_MODULUS) + _success := staticcall(sub(gas(), 2000), 5, _freemem, 0xC0, _freemem, 0x20) + _result := mload(_freemem) + } + assert(_success); + } + + function _mulmod(uint256 a, uint256 b) private pure returns (uint256) { + return uint256(mulmod(a, b, F_MODULUS)); + } + + function _submod(uint256 a, uint256 b) private pure returns (uint256) { + return uint256(addmod(a, F_MODULUS - b, F_MODULUS)); + } + + function add(Fq2 memory a, Fq2 memory b) internal pure returns (Fq2 memory) { + return Fq2( + _addmod(a.real, b.real), + _addmod(a.imag, b.imag) + ); + } + + function div(Fq2 memory d, Fq2 memory c) internal view returns (Fq2 memory) { + return mul(d, inv(c)); + } + + function equals(Fq2 memory a, Fq2 memory b) internal pure returns (bool) { + return ( + a.real == b.real + && a.imag == b.imag + ); + } + + function inv(Fq2 memory a) internal view returns (Fq2 memory) { + uint256 _inv = _invmod(_addmod(_mulmod(a.imag, a.imag), _mulmod(a.real, a.real))); + return Fq2( + _mulmod(a.real, _inv), + F_MODULUS - mulmod(a.imag, _inv, F_MODULUS) + ); + } + + function mul(Fq2 memory a, Fq2 memory b) internal pure returns (Fq2 memory) { + return Fq2( + _submod(_mulmod(a.real, b.real), _mulmod(a.imag, b.imag)), + _addmod(_mulmod(a.real, b.imag), _mulmod(a.imag, b.real)) + ); + } + + function mul(Fq2 memory a, uint256 k) internal pure returns (Fq2 memory) { + return Fq2( + _mulmod(a.real, k), + _mulmod(a.imag, k) + ); + } + + function sub(Fq2 memory a, Fq2 memory b) internal pure returns (Fq2 memory) { + return Fq2( + _submod(a.real, b.real), + _submod(a.imag, b.imag) + ); + } + + // WIP ... +} \ No newline at end of file diff --git a/contracts/patterns/Payable.sol b/contracts/patterns/Payable.sol index 4aad93f4..888418a1 100644 --- a/contracts/patterns/Payable.sol +++ b/contracts/patterns/Payable.sol @@ -16,6 +16,9 @@ abstract contract Payable { /// Gets current transaction price. function _getGasPrice() internal view virtual returns (uint256); + /// Gets message actual sender. + function _getMsgSender() internal view virtual returns (address); + /// Gets current payment value. function _getMsgValue() internal view virtual returns (uint256); From 753644e7834416537489eb08aa9c5c6980246716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 8 Oct 2024 11:40:52 +0200 Subject: [PATCH 07/62] chore: fmt! --- contracts/core/WitnetDeployer.sol | 1 + contracts/libs/Witnet.sol | 112 ++++++++++++++-------------- scripts/vanity2gen.js | 2 +- test/witOracleRadonRegistry.spec.js | 17 ++--- 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/contracts/core/WitnetDeployer.sol b/contracts/core/WitnetDeployer.sol index 827298ce..b4fd312f 100644 --- a/contracts/core/WitnetDeployer.sol +++ b/contracts/core/WitnetDeployer.sol @@ -3,6 +3,7 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitnetProxy.sol"; + import "../libs/Create3.sol"; /// @notice WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 0a3b8c79..ab900da2 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -10,8 +10,8 @@ library Witnet { using WitnetCBOR for WitnetCBOR.CBOR; using WitnetCBOR for WitnetCBOR.CBOR[]; - uint32 constant internal WIT_1_GENESIS_TIMESTAMP = 0; // TBD - uint32 constant internal WIT_1_SECS_PER_EPOCH = 45; + uint32 constant internal WIT_1_GENESIS_TIMESTAMP = 0; // TBD + uint32 constant internal WIT_1_SECS_PER_EPOCH = 45; uint32 constant internal WIT_2_GENESIS_BEACON_INDEX = 0; // TBD uint32 constant internal WIT_2_GENESIS_BEACON_PREV_INDEX = 0; // TBD @@ -424,7 +424,7 @@ library Witnet { /// ======================================================================= - /// --- Witnet.Beacon helper functions ------------------------------------ + /// --- Beacon helper functions ------------------------------------ function equals(Beacon storage self, Beacon calldata other) internal view returns (bool) @@ -458,7 +458,7 @@ library Witnet { /// ======================================================================= - /// --- Witnet.FastForward helper functions ------------------------------- + /// --- FastForward helper functions ------------------------------- function head(FastForward[] calldata rollup) internal pure returns (Beacon calldata) @@ -468,7 +468,7 @@ library Witnet { /// =============================================================================================================== - /// --- Witnet.Query*Report helper methods ------------------------------------------------------------------------ + /// --- Query*Report helper methods ------------------------------------------------------------------------ function queryRelayer(QueryResponseReport calldata self) internal pure returns (address) { return recoverAddr(self.witDrRelayerSignature, self.queryHash); @@ -496,15 +496,15 @@ library Witnet { /// =============================================================================================================== - /// --- 'Witnet.Result' helper methods ---------------------------------------------------------------------------- + /// --- 'Result' helper methods ---------------------------------------------------------------------------- modifier _isReady(Result memory result) { require(result.success, "Witnet: tried to decode value from errored result."); _; } - /// @dev Decode an address from the Witnet.Result's CBOR value. - function asAddress(Witnet.Result memory result) + /// @dev Decode an address from the Result's CBOR value. + function asAddress(Result memory result) internal pure _isReady(result) returns (address) @@ -516,8 +516,8 @@ library Witnet { } } - /// @dev Decode a `bool` value from the Witnet.Result's CBOR value. - function asBool(Witnet.Result memory result) + /// @dev Decode a `bool` value from the Result's CBOR value. + function asBool(Result memory result) internal pure _isReady(result) returns (bool) @@ -525,8 +525,8 @@ library Witnet { return result.value.readBool(); } - /// @dev Decode a `bytes` value from the Witnet.Result's CBOR value. - function asBytes(Witnet.Result memory result) + /// @dev Decode a `bytes` value from the Result's CBOR value. + function asBytes(Result memory result) internal pure _isReady(result) returns(bytes memory) @@ -534,8 +534,8 @@ library Witnet { return result.value.readBytes(); } - /// @dev Decode a `bytes4` value from the Witnet.Result's CBOR value. - function asBytes4(Witnet.Result memory result) + /// @dev Decode a `bytes4` value from the Result's CBOR value. + function asBytes4(Result memory result) internal pure _isReady(result) returns (bytes4) @@ -543,8 +543,8 @@ library Witnet { return toBytes4(asBytes(result)); } - /// @dev Decode a `bytes32` value from the Witnet.Result's CBOR value. - function asBytes32(Witnet.Result memory result) + /// @dev Decode a `bytes32` value from the Result's CBOR value. + function asBytes32(Result memory result) internal pure _isReady(result) returns (bytes32) @@ -552,8 +552,8 @@ library Witnet { return toBytes32(asBytes(result)); } - /// @notice Returns the Witnet.Result's unread CBOR value. - function asCborValue(Witnet.Result memory result) + /// @notice Returns the Result's unread CBOR value. + function asCborValue(Result memory result) internal pure _isReady(result) returns (WitnetCBOR.CBOR memory) @@ -561,8 +561,8 @@ library Witnet { return result.value; } - /// @notice Decode array of CBOR values from the Witnet.Result's CBOR value. - function asCborArray(Witnet.Result memory result) + /// @notice Decode array of CBOR values from the Result's CBOR value. + function asCborArray(Result memory result) internal pure _isReady(result) returns (WitnetCBOR.CBOR[] memory) @@ -570,11 +570,11 @@ library Witnet { return result.value.readArray(); } - /// @dev Decode a fixed16 (half-precision) numeric value from the Witnet.Result's CBOR value. + /// @dev Decode a fixed16 (half-precision) numeric value from the Result's CBOR value. /// @dev Due to the lack of support for floating or fixed point arithmetic in the EVM, this method offsets all values. /// by 5 decimal orders so as to get a fixed precision of 5 decimal positions, which should be OK for most `fixed16`. /// use cases. In other words, the output of this method is 10,000 times the actual value, encoded into an `int32`. - function asFixed16(Witnet.Result memory result) + function asFixed16(Result memory result) internal pure _isReady(result) returns (int32) @@ -582,8 +582,8 @@ library Witnet { return result.value.readFloat16(); } - /// @dev Decode an array of fixed16 values from the Witnet.Result's CBOR value. - function asFixed16Array(Witnet.Result memory result) + /// @dev Decode an array of fixed16 values from the Result's CBOR value. + function asFixed16Array(Result memory result) internal pure _isReady(result) returns (int32[] memory) @@ -591,8 +591,8 @@ library Witnet { return result.value.readFloat16Array(); } - /// @dev Decode an `int64` value from the Witnet.Result's CBOR value. - function asInt(Witnet.Result memory result) + /// @dev Decode an `int64` value from the Result's CBOR value. + function asInt(Result memory result) internal pure _isReady(result) returns (int) @@ -600,10 +600,10 @@ library Witnet { return result.value.readInt(); } - /// @dev Decode an array of integer numeric values from a Witnet.Result as an `int[]` array. - /// @param result An instance of Witnet.Result. - /// @return The `int[]` decoded from the Witnet.Result. - function asIntArray(Witnet.Result memory result) + /// @dev Decode an array of integer numeric values from a Result as an `int[]` array. + /// @param result An instance of Result. + /// @return The `int[]` decoded from the Result. + function asIntArray(Result memory result) internal pure _isReady(result) returns (int[] memory) @@ -611,10 +611,10 @@ library Witnet { return result.value.readIntArray(); } - /// @dev Decode a `string` value from the Witnet.Result's CBOR value. - /// @param result An instance of Witnet.Result. - /// @return The `string` decoded from the Witnet.Result. - function asText(Witnet.Result memory result) + /// @dev Decode a `string` value from the Result's CBOR value. + /// @param result An instance of Result. + /// @return The `string` decoded from the Result. + function asText(Result memory result) internal pure _isReady(result) returns(string memory) @@ -622,10 +622,10 @@ library Witnet { return result.value.readString(); } - /// @dev Decode an array of strings from the Witnet.Result's CBOR value. - /// @param result An instance of Witnet.Result. - /// @return The `string[]` decoded from the Witnet.Result. - function asTextArray(Witnet.Result memory result) + /// @dev Decode an array of strings from the Result's CBOR value. + /// @param result An instance of Result. + /// @return The `string[]` decoded from the Result. + function asTextArray(Result memory result) internal pure _isReady(result) returns (string[] memory) @@ -633,10 +633,10 @@ library Witnet { return result.value.readStringArray(); } - /// @dev Decode a `uint64` value from the Witnet.Result's CBOR value. - /// @param result An instance of Witnet.Result. - /// @return The `uint` decoded from the Witnet.Result. - function asUint(Witnet.Result memory result) + /// @dev Decode a `uint64` value from the Result's CBOR value. + /// @param result An instance of Result. + /// @return The `uint` decoded from the Result. + function asUint(Result memory result) internal pure _isReady(result) returns (uint) @@ -644,10 +644,10 @@ library Witnet { return result.value.readUint(); } - /// @dev Decode an array of `uint64` values from the Witnet.Result's CBOR value. - /// @param result An instance of Witnet.Result. - /// @return The `uint[]` decoded from the Witnet.Result. - function asUintArray(Witnet.Result memory result) + /// @dev Decode an array of `uint64` values from the Result's CBOR value. + /// @param result An instance of Result. + /// @return The `uint[]` decoded from the Result. + function asUintArray(Result memory result) internal pure returns (uint[] memory) { @@ -656,7 +656,7 @@ library Witnet { /// =============================================================================================================== - /// --- Witnet.ResultErrorCodes helper methods -------------------------------------------------------------------- + /// --- ResultErrorCodes helper methods -------------------------------------------------------------------- function isCircumstantial(ResultErrorCodes self) internal pure returns (bool) { return (self == ResultErrorCodes.CircumstantialFailure); @@ -689,7 +689,7 @@ library Witnet { /// =============================================================================================================== - /// --- 'Witnet.RadonSLA' helper methods -------------------------------------------------------------------------- + /// --- 'RadonSLA' helper methods -------------------------------------------------------------------------- function equalOrGreaterThan(RadonSLA memory a, RadonSLA memory b) internal pure returns (bool) @@ -709,8 +709,8 @@ library Witnet { ); } - function toV1(RadonSLA memory self) internal pure returns (Witnet.RadonSLAv1 memory) { - return Witnet.RadonSLAv1({ + function toV1(RadonSLA memory self) internal pure returns (RadonSLAv1 memory) { + return RadonSLAv1({ numWitnesses: self.witNumWitnesses, minConsensusPercentage: 51, witnessReward: self.witUnitaryReward, @@ -771,12 +771,12 @@ library Witnet { } - /// @dev Transform given bytes into a Witnet.Result instance. + /// @dev Transform given bytes into a Result instance. /// @param cborBytes Raw bytes representing a CBOR-encoded value. - /// @return A `Witnet.Result` instance. + /// @return A `Result` instance. function toWitnetResult(bytes memory cborBytes) internal pure - returns (Witnet.Result memory) + returns (Result memory) { WitnetCBOR.CBOR memory cborValue = WitnetCBOR.fromBytes(cborBytes); return _resultFromCborValue(cborValue); @@ -1001,15 +1001,15 @@ library Witnet { } } - /// @dev Decode a CBOR value into a Witnet.Result instance. + /// @dev Decode a CBOR value into a Result instance. function _resultFromCborValue(WitnetCBOR.CBOR memory cbor) private pure - returns (Witnet.Result memory) + returns (Result memory) { // Witnet uses CBOR tag 39 to represent RADON error code identifiers. // [CBOR tag 39] Identifiers for CBOR: https://github.com/lucas-clemente/cbor-specs/blob/master/id.md bool success = cbor.tag != 39; - return Witnet.Result(success, cbor); + return Result(success, cbor); } /// @dev Calculate length of string-equivalent to given bytes32. diff --git a/scripts/vanity2gen.js b/scripts/vanity2gen.js index c05cb8ec..05597990 100644 --- a/scripts/vanity2gen.js +++ b/scripts/vanity2gen.js @@ -32,7 +32,7 @@ module.exports = async function () { } else if (argv === "--hits") { hits = parseInt(args[index + 1]) } else if (argv === "--network") { - [ecosystem, network] = utils.getRealmNetworkFromString(args[index + 1].toLowerCase()) + [, network] = utils.getRealmNetworkFromString(args[index + 1].toLowerCase()) } else if (argv === "--hexArgs") { hexArgs = args[index + 1].toLowerCase() if (hexArgs.startsWith("0x")) hexArgs = hexArgs.slice(2) diff --git a/test/witOracleRadonRegistry.spec.js b/test/witOracleRadonRegistry.spec.js index 4b59e74e..b2231163 100644 --- a/test/witOracleRadonRegistry.spec.js +++ b/test/witOracleRadonRegistry.spec.js @@ -2,11 +2,9 @@ import("chai") const utils = require("../src/utils") const { expectEvent, expectRevert } = require("@openzeppelin/test-helpers") -const { expectRevertCustomError } = require("custom-error-test-helper") const WitOracleRadonRegistry = artifacts.require("WitOracleRadonRegistryDefault") const WitOracleRadonEncodingLib = artifacts.require("WitOracleRadonEncodingLib") -const Witnet = artifacts.require("Witnet") contract("WitOracleRadonRegistry", (accounts) => { const creatorAddress = accounts[0] @@ -87,8 +85,6 @@ contract("WitOracleRadonRegistry", (accounts) => { }) context("IWitOracleRadonRegistry", async () => { - let slaHash - let concathashReducerHash let modeNoFiltersReducerHash let stdev15ReducerHash @@ -146,7 +142,7 @@ contract("WitOracleRadonRegistry", (accounts) => { "emits new data provider and source events when verifying a new http-get source for the first time", async () => { const tx = await radonRegistry.verifyRadonRetrieval( 1, // requestMethod - "https://api.binance.us/api/v3/ticker/price?symbol=\\0\\\\1\\", + "https://api.binance.us/api/v3/ticker/price?symbol=\\0\\\\1\\", "", // requestBody [], // requestHeaders "0x841877821864696c61737450726963658218571a000f4240185b", // requestRadonScript @@ -188,7 +184,7 @@ contract("WitOracleRadonRegistry", (accounts) => { it("fork existing retrieval by settling one out of two parameters", async () => { const tx = await radonRegistry.verifyRadonRetrieval( binanceTickerHash, - "USD" + "USD" ) assert.equal(tx.logs.length, 1) expectEvent( @@ -242,7 +238,10 @@ contract("WitOracleRadonRegistry", (accounts) => { assert.equal(ds.headers[0][1], "witnet-rust") assert.equal(ds.headers[1][0], "content-type") assert.equal(ds.headers[1][1], "text/html; charset=utf-8") - assert.equal(ds.radonScript, "0x861877821866646461746182186664706f6f6c8218646b746f6b656e3150726963658218571a000f4240185b") + assert.equal( + ds.radonScript, + "0x861877821866646461746182186664706f6f6c8218646b746f6b656e3150726963658218571a000f4240185b" + ) }) }) }) @@ -369,7 +368,7 @@ contract("WitOracleRadonRegistry", (accounts) => { assert(tx.logs.length === 0) }) it("generates same hash when verifying same randomness request offchain", async () => { - const hash = await radonRegistry.methods['verifyRadonRequest(bytes32[],bytes32,bytes32,uint16,string[][])'].call( + const hash = await radonRegistry.methods["verifyRadonRequest(bytes32[],bytes32,bytes32,uint16,string[][])"].call( [ // sources rngSourceHash, ], @@ -513,7 +512,7 @@ contract("WitOracleRadonRegistry", (accounts) => { tx.receipt, "NewRadonRequest" ) - heavyRetrievalHash = tx.logs[0].args.radHash + // heavyRetrievalHash = tx.logs[0].args.radHash }) }) }) From e8f8ba4853f8ccf5013251b5f4ab3e52a0c86433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 9 Oct 2024 12:27:12 +0200 Subject: [PATCH 08/62] feat: IWOReporterTrustless.extractQueryRelayData* --- .../trustless/WitOracleTrustlessDefault.sol | 33 +++++++++++++--- contracts/data/WitOracleDataLib.sol | 39 +++++++++++++------ contracts/interfaces/IWitOracleReporter.sol | 8 ++-- .../IWitOracleReporterTrustless.sol | 22 ++++++++--- test/mocks/WitMockedOracle.sol | 2 +- 5 files changed, 77 insertions(+), 27 deletions(-) diff --git a/contracts/core/trustless/WitOracleTrustlessDefault.sol b/contracts/core/trustless/WitOracleTrustlessDefault.sol index ebfa7f75..f48aa7e1 100644 --- a/contracts/core/trustless/WitOracleTrustlessDefault.sol +++ b/contracts/core/trustless/WitOracleTrustlessDefault.sol @@ -318,7 +318,7 @@ contract WitOracleTrustlessDefault } } - function claimQueryRewardsBatch(uint256[] calldata _queryIds) + function claimQueryRewardBatch(uint256[] calldata _queryIds) virtual override external returns (uint256 _evmTotalReward) { @@ -332,13 +332,13 @@ contract WitOracleTrustlessDefault _evmTotalReward += _evmReward; } catch Error(string memory _reason) { - emit BatchReportError( + emit BatchQueryError( _queryIds[_ix], _reason ); } catch (bytes memory) { - emit BatchReportError( + emit BatchQueryError( _queryIds[_ix], _revertWitOracleDataLibUnhandledExceptionReason() ); @@ -346,6 +346,29 @@ contract WitOracleTrustlessDefault } } + function extractQueryRelayData(uint256 _queryId) + virtual override public view + returns (QueryRelayData memory _queryRelayData) + { + Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); + if ( + _queryStatus == Witnet.QueryStatus.Posted + || _queryStatus == Witnet.QueryStatus.Delayed + ) { + _queryRelayData = WitOracleDataLib.extractQueryRelayData(registry, _queryId); + } + } + + function extractQueryRelayDataBatch(uint256[] calldata _queryIds) + virtual override external view + returns (QueryRelayData[] memory _relays) + { + _relays = new QueryRelayData[](_queryIds.length); + for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + _relays[_ix] = extractQueryRelayData(_queryIds[_ix]); + } + } + function disputeQueryResponse(uint256 _queryId) virtual override external inStatus(_queryId, Witnet.QueryStatus.Reported) @@ -393,13 +416,13 @@ contract WitOracleTrustlessDefault _evmTotalReward += _evmPartialReward; } catch Error(string memory _reason) { - emit BatchReportError( + emit BatchQueryError( _responseReport.queryId, _reason ); } catch (bytes memory) { - emit BatchReportError( + emit BatchQueryError( _responseReport.queryId, _revertWitOracleDataLibUnhandledExceptionReason() ); diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index e78a262c..16d92cc0 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -8,6 +8,7 @@ import "../interfaces/IWitOracleBlocks.sol"; import "../interfaces/IWitOracleConsumer.sol"; import "../interfaces/IWitOracleEvents.sol"; import "../interfaces/IWitOracleReporter.sol"; +import "../interfaces/IWitOracleReporterTrustless.sol"; import "../libs/Witnet.sol"; import "../patterns/Escrowable.sol"; @@ -408,18 +409,11 @@ library WitOracleDataLib { { bytecodes = new bytes[](queryIds.length); for (uint _ix = 0; _ix < queryIds.length; _ix ++) { - Witnet.QueryRequest storage __request = data().queries[queryIds[_ix]].request; - if (__request.radonRadHash != bytes32(0)) { - bytecodes[_ix] = registry.bytecodeOf( - __request.radonRadHash, - __request.radonSLA - ); - } else { - bytecodes[_ix] = registry.bytecodeOf( - __request.radonBytecode, - __request.radonSLA - ); - } + Witnet.QueryRequest storage __request = seekQueryRequest(queryIds[_ix]); + bytecodes[_ix] = (__request.radonRadHash != bytes32(0) + ? registry.bytecodeOf(__request.radonRadHash, __request.radonSLA) + : registry.bytecodeOf(__request.radonBytecode,__request.radonSLA) + ); } } @@ -604,6 +598,27 @@ library WitOracleDataLib { /// ======================================================================= /// --- IWitOracleReporterTrustless --------------------------------------- + function extractQueryRelayData( + WitOracleRadonRegistry registry, + uint256 queryId + ) + public view + returns (IWitOracleReporterTrustless.QueryRelayData memory _queryRelayData) + { + Witnet.QueryRequest storage __request = seekQueryRequest(queryId); + return IWitOracleReporterTrustless.QueryRelayData({ + queryId: queryId, + queryEvmBlock: seekQuery(queryId).block, + queryEvmHash: queryHashOf(data(), queryId), + queryEvmReward: __request.evmReward, + queryWitDrBytecodes: (__request.radonRadHash != bytes32(0) + ? registry.bytecodeOf(__request.radonRadHash, __request.radonSLA) + : registry.bytecodeOf(__request.radonBytecode,__request.radonSLA) + ), + queryWitDrSLA: __request.radonSLA + }); + } + function claimQueryReward( uint256 queryId, uint256 evmQueryAwaitingBlocks, diff --git a/contracts/interfaces/IWitOracleReporter.sol b/contracts/interfaces/IWitOracleReporter.sol index 54264dc8..e8ac839f 100644 --- a/contracts/interfaces/IWitOracleReporter.sol +++ b/contracts/interfaces/IWitOracleReporter.sol @@ -13,10 +13,10 @@ interface IWitOracleReporter { /// @notice queries providing no actual earnings. function estimateReportEarnings( uint256[] calldata queryIds, - bytes calldata reportTxMsgData, - uint256 reportTxGasPrice, - uint256 nanoWitPrice - ) external view returns (uint256, uint256); + bytes calldata evmReportTxMsgData, + uint256 evmReportTxGasPrice, + uint256 witEthPrice9 + ) external view returns (uint256 evmRevenues, uint256 evmExpenses); /// @notice Retrieves the Witnet Data Request bytecodes and SLAs of previously posted queries. /// @dev Returns empty buffer if the query does not exist. diff --git a/contracts/interfaces/IWitOracleReporterTrustless.sol b/contracts/interfaces/IWitOracleReporterTrustless.sol index 0e6f1c64..2a47ea69 100644 --- a/contracts/interfaces/IWitOracleReporterTrustless.sol +++ b/contracts/interfaces/IWitOracleReporterTrustless.sol @@ -7,13 +7,25 @@ import "../libs/Witnet.sol"; /// @title The Witnet Request Board Reporter trustless interface. /// @author The Witnet Foundation. interface IWitOracleReporterTrustless { - - event BatchReportError(uint256 queryId, string reason); - + + event BatchQueryError(uint256 queryId, string reason); + + function extractQueryRelayData(uint256 queryId) external view returns (QueryRelayData memory); + function extractQueryRelayDataBatch(uint256[] calldata queryIds) external view returns (QueryRelayData[] memory); + struct QueryRelayData { + uint256 queryId; + uint256 queryEvmBlock; + bytes32 queryEvmHash; + uint256 queryEvmReward; + bytes queryWitDrBytecodes; + Witnet.RadonSLA queryWitDrSLA; + } + function claimQueryReward(uint256 queryId) external returns (uint256); - function claimQueryRewardsBatch(uint256[] calldata queryIds) external returns (uint256); + function claimQueryRewardBatch(uint256[] calldata queryIds) external returns (uint256); + - function disputeQueryResponse(uint256 queryId) external returns (uint256); + function disputeQueryResponse (uint256 queryId) external returns (uint256); function reportQueryResponse(Witnet.QueryResponseReport calldata report) external returns (uint256); function reportQueryResponseBatch(Witnet.QueryResponseReport[] calldata reports) external returns (uint256); diff --git a/test/mocks/WitMockedOracle.sol b/test/mocks/WitMockedOracle.sol index fa2c56a8..6578cadf 100644 --- a/test/mocks/WitMockedOracle.sol +++ b/test/mocks/WitMockedOracle.sol @@ -30,6 +30,6 @@ contract WitMockedOracle { address[] memory _reporters = new address[](1); _reporters[0] = msg.sender; - __setReporters(_reporters); + WitOracleDataLib.setReporters(_reporters); } } From 776c9f14f5302ee875b60b87e76826e5bce9f9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 07:48:11 +0200 Subject: [PATCH 09/62] refactor: rearrange core into base, trustable, upgradable and trustless implementations --- contracts/core/WitnetUpgradableBase.sol | 35 +- .../WitOracleBase.sol} | 77 ++- .../core/base/WitOracleBaseTrustable.sol | 417 ++++++++++++++++ .../WitOracleBaseTrustless.sol} | 56 +-- .../WitOracleBaseUpgradable.sol} | 69 +-- .../WitOracleRadonRegistryBase.sol} | 117 +---- .../WitOracleRadonRegistryBaseUpgradable.sol | 107 +++++ .../WitOracleRequestFactoryBase.sol} | 208 ++------ .../WitOracleRequestFactoryBaseUpgradable.sol | 231 +++++++++ .../trustable/WitOracleTrustableDefault.sol | 449 +----------------- .../trustable/WitOracleTrustableObscuro.sol | 41 +- .../core/trustable/WitOracleTrustableOvm2.sol | 49 +- .../core/trustable/WitOracleTrustableReef.sol | 65 ++- .../WitOracleRadonRegistryDefaultV21.sol | 19 + .../WitOracleRadonRegistryNoSha256.sol | 23 - .../WitOracleRequestFactoryCfxCore.sol | 31 -- .../WitOracleRequestFactoryDefaultV21.sol | 18 + .../WitOracleTrustlessDefaultV21.sol | 44 ++ ...itOracleRadonRegistryUpgradableDefault.sol | 29 ++ ...tOracleRadonRegistryUpgradableNoSha256.sol | 28 ++ ...cleRequestFactoryUpgradableConfluxCore.sol | 41 ++ ...tOracleRequestFactoryUpgradableDefault.sol | 29 ++ .../WitOracleTrustlessUpgradableDefault.sol | 44 ++ contracts/data/WitOracleDataLib.sol | 27 +- contracts/interfaces/IWitAppliance.sol | 22 +- contracts/interfaces/IWitOracle.sol | 6 +- 26 files changed, 1242 insertions(+), 1040 deletions(-) rename contracts/core/{trustless/WitOracleTrustlessBase.sol => base/WitOracleBase.sol} (96%) create mode 100644 contracts/core/base/WitOracleBaseTrustable.sol rename contracts/core/{trustless/WitOracleTrustlessDefault.sol => base/WitOracleBaseTrustless.sol} (91%) rename contracts/core/{trustless/WitOracleTrustlessUpgradableDefault.sol => base/WitOracleBaseUpgradable.sol} (60%) rename contracts/core/{trustless/WitOracleRadonRegistryDefault.sol => base/WitOracleRadonRegistryBase.sol} (82%) create mode 100644 contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol rename contracts/core/{trustless/WitOracleRequestFactoryDefault.sol => base/WitOracleRequestFactoryBase.sol} (75%) create mode 100644 contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol create mode 100644 contracts/core/trustless/WitOracleRadonRegistryDefaultV21.sol delete mode 100644 contracts/core/trustless/WitOracleRadonRegistryNoSha256.sol delete mode 100644 contracts/core/trustless/WitOracleRequestFactoryCfxCore.sol create mode 100644 contracts/core/trustless/WitOracleRequestFactoryDefaultV21.sol create mode 100644 contracts/core/trustless/WitOracleTrustlessDefaultV21.sol create mode 100644 contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol create mode 100644 contracts/core/upgradable/WitOracleRadonRegistryUpgradableNoSha256.sol create mode 100644 contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol create mode 100644 contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol create mode 100644 contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol diff --git a/contracts/core/WitnetUpgradableBase.sol b/contracts/core/WitnetUpgradableBase.sol index 78b76124..df162530 100644 --- a/contracts/core/WitnetUpgradableBase.sol +++ b/contracts/core/WitnetUpgradableBase.sol @@ -36,19 +36,16 @@ abstract contract WitnetUpgradableBase /// @dev Reverts if proxy delegatecalls to unexistent method. /* solhint-disable no-complex-fallback */ fallback() virtual external { - _revert(string(abi.encodePacked( - "not implemented: 0x", + revert(string(abi.encodePacked( + "WitnetUpgradableBase: not implemented: 0x", _toHexString(uint8(bytes1(msg.sig))), _toHexString(uint8(bytes1(msg.sig << 8))), _toHexString(uint8(bytes1(msg.sig << 16))), _toHexString(uint8(bytes1(msg.sig << 24))) ))); } - - function class() virtual public view returns (string memory) { - return type(WitnetUpgradableBase).name; - } + // ================================================================================================================ // --- Overrides 'Proxiable' -------------------------------------------------------------------------------------- @@ -79,29 +76,6 @@ abstract contract WitnetUpgradableBase // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- - function _require( - bool _condition, - string memory _message - ) - virtual internal view - { - if (!_condition) { - _revert(_message); - } - } - - function _revert(string memory _message) - virtual internal view - { - revert( - string(abi.encodePacked( - class(), - ": ", - _message - )) - ); - } - function _toHexString(uint8 _u) internal pure returns (string memory) @@ -147,5 +121,4 @@ abstract contract WitnetUpgradableBase } } } - -} \ No newline at end of file +} diff --git a/contracts/core/trustless/WitOracleTrustlessBase.sol b/contracts/core/base/WitOracleBase.sol similarity index 96% rename from contracts/core/trustless/WitOracleTrustlessBase.sol rename to contracts/core/base/WitOracleBase.sol index 21cd53fa..685ed710 100644 --- a/contracts/core/trustless/WitOracleTrustlessBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../../WitOracle.sol"; import "../../data/WitOracleDataLib.sol"; @@ -15,9 +14,9 @@ import "../../patterns/Payable.sol"; /// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. /// The result of the requests will be posted back to this contract by the bridge nodes too. /// @author The Witnet Foundation -abstract contract WitOracleTrustlessBase +abstract contract WitOracleBase is - Payable, + Payable, WitOracle, IWitOracleLegacy { @@ -28,10 +27,8 @@ abstract contract WitOracleTrustlessBase return WitOracleDataLib.channel(); } - WitOracleRequestFactory public immutable override factory; + // WitOracleRequestFactory public immutable override factory; WitOracleRadonRegistry public immutable override registry; - - bytes4 public immutable override specs = type(WitOracle).interfaceId; uint256 internal immutable __reportResultGasBase; uint256 internal immutable __reportResultWithCallbackGasBase; @@ -85,21 +82,33 @@ abstract contract WitOracleTrustlessBase "not the requester" ); _; } + + struct EvmImmutables { + uint32 reportResultGasBase; + uint32 reportResultWithCallbackGasBase; + uint32 reportResultWithCallbackRevertGasBase; + uint32 sstoreFromZeroGas; + } constructor( - WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory + EvmImmutables memory _immutables, + WitOracleRadonRegistry _registry + // WitOracleRequestFactory _factory ) { registry = _registry; - factory = _factory; + // factory = _factory; + + __reportResultGasBase = _immutables.reportResultGasBase; + __reportResultWithCallbackGasBase = _immutables.reportResultWithCallbackGasBase; + __reportResultWithCallbackRevertGasBase = _immutables.reportResultWithCallbackRevertGasBase; + __sstoreFromZeroGas = _immutables.sstoreFromZeroGas; } - function class() virtual public view returns (string memory); function getQueryStatus(uint256) virtual public view returns (Witnet.QueryStatus); function getQueryResponseStatus(uint256) virtual public view returns (Witnet.QueryResponseStatus); - + // ================================================================================================================ // --- Payable ---------------------------------------------------------------------------------------------------- @@ -123,9 +132,9 @@ abstract contract WitOracleTrustlessBase /// @param _amount Amount of ETHs to transfer. function __safeTransferTo(address payable _to, uint256 _amount) virtual override internal { payable(_to).transfer(_amount); - } - - + } + + // ================================================================================================================ // --- IWitOracle (partial) --------------------------------------------------------------------------------------- @@ -604,33 +613,6 @@ abstract contract WitOracleTrustlessBase // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- - function _require(bool _condition, string memory _message) virtual internal view { - if (!_condition) { - _revert(_message); - } - } - - function _revert(string memory _message) virtual internal view { - revert( - string(abi.encodePacked( - class(), - ": ", - _message - )) - ); - } - - function _revertWitOracleDataLibUnhandledException() internal view { - _revert(_revertWitOracleDataLibUnhandledExceptionReason()); - } - - function _revertWitOracleDataLibUnhandledExceptionReason() internal pure returns (string memory) { - return string(abi.encodePacked( - type(WitOracleDataLib).name, - ": unhandled assertion" - )); - } - function __postQuery( address _requester, uint24 _evmCallbackGasLimit, @@ -657,4 +639,15 @@ abstract contract WitOracleTrustlessBase function __storage() virtual internal pure returns (WitOracleDataLib.Storage storage _ptr) { return WitOracleDataLib.data(); } + + function _revertWitOracleDataLibUnhandledException() internal view { + _revert(_revertWitOracleDataLibUnhandledExceptionReason()); + } + + function _revertWitOracleDataLibUnhandledExceptionReason() internal pure returns (string memory) { + return string(abi.encodePacked( + type(WitOracleDataLib).name, + ": unhandled assertion" + )); + } } diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol new file mode 100644 index 00000000..95c4e868 --- /dev/null +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -0,0 +1,417 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "./WitOracleBase.sol"; +import "../WitnetUpgradableBase.sol"; +import "../../interfaces/IWitOracleAdminACLs.sol"; +import "../../interfaces/IWitOracleReporter.sol"; + +/// @title Witnet Request Board "trustable" implementation contract. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +abstract contract WitOracleBaseTrustable + is + WitOracleBase, + WitnetUpgradableBase, + IWitOracleAdminACLs, + IWitOracleReporter +{ + using Witnet for Witnet.RadonSLA; + + /// Asserts the caller is authorized as a reporter + modifier onlyReporters virtual { + _require( + WitOracleDataLib.data().reporters[msg.sender], + "unauthorized reporter" + ); _; + } + + constructor(bytes32 _versionTag) + Ownable(msg.sender) + Payable(address(0)) + WitnetUpgradableBase( + true, + _versionTag, + "io.witnet.proxiable.board" + ) + {} + + + // ================================================================================================================ + // --- Upgradeable ------------------------------------------------------------------------------------------------ + + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) virtual override public { + address _owner = owner(); + address[] memory _newReporters; + + if (_owner == address(0)) { + // get owner (and reporters) from _initData + bytes memory _newReportersRaw; + (_owner, _newReportersRaw) = abi.decode(_initData, (address, bytes)); + _transferOwnership(_owner); + _newReporters = abi.decode(_newReportersRaw, (address[])); + } else { + // only owner can initialize: + _require( + msg.sender == _owner, + "not the owner" + ); + // get reporters from _initData + _newReporters = abi.decode(_initData, (address[])); + } + + if ( + __proxiable().codehash != bytes32(0) + && __proxiable().codehash == codehash() + ) { + _revert("already upgraded"); + } + __proxiable().codehash = codehash(); + + _require(address(registry).code.length > 0, "inexistent registry"); + _require( + registry.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracleRadonRegistry).interfaceId + ), "uncompliant registry" + ); + + // Set reporters, if any + WitOracleDataLib.setReporters(_newReporters); + + emit Upgraded(_owner, base(), codehash(), version()); + } + + + // ================================================================================================================ + // --- IWitOracle ------------------------------------------------------------------------------------------------- + + /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. + /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to + /// @dev the one that actually posted the given request. + /// @dev If in 'Expired' status, query reward is transfer back to the requester. + /// @param _queryId The unique query identifier. + function fetchQueryResponse(uint256 _queryId) + virtual override external + returns (Witnet.QueryResponse memory) + { + try WitOracleDataLib.fetchQueryResponse( + _queryId + + ) returns ( + Witnet.QueryResponse memory _queryResponse, + uint72 _queryEvmExpiredReward + ) { + if (_queryEvmExpiredReward > 0) { + // transfer unused reward to requester, only if the query expired: + __safeTransferTo( + payable(msg.sender), + _queryEvmExpiredReward + ); + } + return _queryResponse; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + /// Gets current status of given query. + function getQueryStatus(uint256 _queryId) + virtual override + public view + returns (Witnet.QueryStatus) + { + return WitOracleDataLib.getQueryStatus(_queryId); + } + + /// @notice Returns query's result current status from a requester's point of view: + /// @notice - 0 => Void: the query is either non-existent or deleted; + /// @notice - 1 => Awaiting: the query has not yet been reported; + /// @notice - 2 => Ready: the query has been succesfully solved; + /// @notice - 3 => Error: the query couldn't get solved due to some issue. + /// @param _queryId The unique query identifier. + function getQueryResponseStatus(uint256 _queryId) + virtual override public view + returns (Witnet.QueryResponseStatus) + { + return WitOracleDataLib.getQueryResponseStatus(_queryId); + } + + + // ================================================================================================================ + // --- Implements IWitOracleAdminACLs ----------------------------------------------------------------------------- + + /// Tells whether given address is included in the active reporters control list. + /// @param _queryResponseReporter The address to be checked. + function isReporter(address _queryResponseReporter) virtual override public view returns (bool) { + return WitOracleDataLib.isReporter(_queryResponseReporter); + } + + /// Adds given addresses to the active reporters control list. + /// @dev Can only be called from the owner address. + /// @dev Emits the `ReportersSet` event. + /// @param _queryResponseReporters List of addresses to be added to the active reporters control list. + function setReporters(address[] calldata _queryResponseReporters) + virtual override public + onlyOwner + { + WitOracleDataLib.setReporters(_queryResponseReporters); + } + + /// Removes given addresses from the active reporters control list. + /// @dev Can only be called from the owner address. + /// @dev Emits the `ReportersUnset` event. + /// @param _exReporters List of addresses to be added to the active reporters control list. + function unsetReporters(address[] calldata _exReporters) + virtual override public + onlyOwner + { + WitOracleDataLib.unsetReporters(_exReporters); + } + + + // ================================================================================================================ + // --- Implements IWitOracleReporter ------------------------------------------------------------------------------ + + /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, + /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on + /// @notice queries providing no actual earnings. + function estimateReportEarnings( + uint256[] calldata _queryIds, + bytes calldata, + uint256 _evmGasPrice, + uint256 _evmWitPrice + ) + external view + virtual override + returns (uint256 _revenues, uint256 _expenses) + { + for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + if ( + getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + ) { + Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); + if (__request.gasCallback > 0) { + _expenses += ( + estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) + + estimateExtraFee( + _evmGasPrice, + _evmWitPrice, + Witnet.RadonSLA({ + witNumWitnesses: __request.radonSLA.witNumWitnesses, + witUnitaryReward: __request.radonSLA.witUnitaryReward, + maxTallyResultSize: uint16(0) + }) + ) + ); + } else { + _expenses += ( + estimateBaseFee(_evmGasPrice) + + estimateExtraFee( + _evmGasPrice, + _evmWitPrice, + __request.radonSLA + ) + ); + } + _expenses += _evmWitPrice * __request.radonSLA.witUnitaryReward; + _revenues += __request.evmReward; + } + } + } + + /// @notice Retrieves the Witnet Data Request bytecodes and SLAs of previously posted queries. + /// @dev Returns empty buffer if the query does not exist. + /// @param _queryIds Query identifies. + function extractWitnetDataRequests(uint256[] calldata _queryIds) + external view + virtual override + returns (bytes[] memory _bytecodes) + { + return WitOracleDataLib.extractWitnetDataRequests(registry, _queryIds); + } + + /// Reports the Witnet-provable result to a previously posted request. + /// @dev Will assume `block.timestamp` as the timestamp at which the request was solved. + /// @dev Fails if: + /// @dev - the `_queryId` is not in 'Posted' status. + /// @dev - provided `_resultTallyHash` is zero; + /// @dev - length of provided `_result` is zero. + /// @param _queryId The unique identifier of the data request. + /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param _resultCborBytes The result itself as bytes. + function reportResult( + uint256 _queryId, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + external override + onlyReporters + returns (uint256) + { + // results cannot be empty: + _require( + _resultCborBytes.length != 0, + "result cannot be empty" + ); + // do actual report and return reward transfered to the reproter: + // solhint-disable not-rely-on-time + return __reportResultAndReward( + _queryId, + uint32(block.timestamp), + _resultTallyHash, + _resultCborBytes + ); + } + + /// Reports the Witnet-provable result to a previously posted request. + /// @dev Fails if: + /// @dev - called from unauthorized address; + /// @dev - the `_queryId` is not in 'Posted' status. + /// @dev - provided `_resultTallyHash` is zero; + /// @dev - length of provided `_resultCborBytes` is zero. + /// @param _queryId The unique query identifier + /// @param _resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. + /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param _resultCborBytes The result itself as bytes. + function reportResult( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + external + override + onlyReporters + returns (uint256) + { + // validate timestamp + _require( + _resultTimestamp > 0, + "bad timestamp" + ); + // results cannot be empty + _require( + _resultCborBytes.length != 0, + "result cannot be empty" + ); + // do actual report and return reward transfered to the reproter: + return __reportResultAndReward( + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes + ); + } + + /// @notice Reports Witnet-provided results to multiple requests within a single EVM tx. + /// @notice Emits either a WitOracleQueryResponse* or a BatchReportError event per batched report. + /// @dev Fails only if called from unauthorized address. + /// @param _batchResults Array of BatchResult structs, every one containing: + /// - unique query identifier; + /// - timestamp of the solving tally txs in Witnet. If zero is provided, EVM-timestamp will be used instead; + /// - hash of the corresponding data request tx at the Witnet side-chain level; + /// - data request result in raw bytes. + function reportResultBatch(IWitOracleReporter.BatchResult[] calldata _batchResults) + external override + onlyReporters + returns (uint256 _batchReward) + { + for (uint _i = 0; _i < _batchResults.length; _i ++) { + if ( + getQueryStatus(_batchResults[_i].queryId) + != Witnet.QueryStatus.Posted + ) { + emit BatchReportError( + _batchResults[_i].queryId, + WitOracleDataLib.notInStatusRevertMessage(Witnet.QueryStatus.Posted) + ); + } else if ( + uint256(_batchResults[_i].resultTimestamp) > block.timestamp + || _batchResults[_i].resultTimestamp == 0 + || _batchResults[_i].resultCborBytes.length == 0 + ) { + emit BatchReportError( + _batchResults[_i].queryId, + string(abi.encodePacked( + class(), + ": invalid report data" + )) + ); + } else { + _batchReward += __reportResult( + _batchResults[_i].queryId, + _batchResults[_i].resultTimestamp, + _batchResults[_i].resultTallyHash, + _batchResults[_i].resultCborBytes + ); + } + } + // Transfer rewards to all reported results in one single transfer to the reporter: + if (_batchReward > 0) { + __safeTransferTo( + payable(msg.sender), + _batchReward + ); + } + } + + + /// ================================================================================================================ + /// --- Internal methods ------------------------------------------------------------------------------------------- + + function __reportResult( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + virtual internal + returns (uint256) + { + _require( + WitOracleDataLib.getQueryStatus(_queryId) == Witnet.QueryStatus.Posted, + "not in Posted status" + ); + return WitOracleDataLib.reportResult( + msg.sender, + tx.gasprice, + uint64(block.number), + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes + ); + } + + function __reportResultAndReward( + uint256 _queryId, + uint32 _resultTimestamp, + bytes32 _resultTallyHash, + bytes calldata _resultCborBytes + ) + virtual internal + returns (uint256 _evmReward) + { + _evmReward = __reportResult( + _queryId, + _resultTimestamp, + _resultTallyHash, + _resultCborBytes + ); + // transfer reward to reporter + __safeTransferTo( + payable(msg.sender), + _evmReward + ); + } +} diff --git a/contracts/core/trustless/WitOracleTrustlessDefault.sol b/contracts/core/base/WitOracleBaseTrustless.sol similarity index 91% rename from contracts/core/trustless/WitOracleTrustlessDefault.sol rename to contracts/core/base/WitOracleBaseTrustless.sol index f48aa7e1..d88c5ed6 100644 --- a/contracts/core/trustless/WitOracleTrustlessDefault.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -1,10 +1,9 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +// SPDX-License-Identifier: MIT -import "./WitOracleTrustlessBase.sol"; +pragma solidity >=0.8.0 <0.9.0; +import "./WitOracleBase.sol"; import "../../interfaces/IWitOracleBlocks.sol"; import "../../interfaces/IWitOracleReporterTrustless.sol"; import "../../patterns/Escrowable.sol"; @@ -14,19 +13,15 @@ import "../../patterns/Escrowable.sol"; /// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. /// The result of the requests will be posted back to this contract by the bridge nodes too. /// @author The Witnet Foundation -contract WitOracleTrustlessDefault +abstract contract WitOracleBaseTrustless is Escrowable, - WitOracleTrustlessBase, + WitOracleBase, IWitOracleBlocks, IWitOracleReporterTrustless { using Witnet for Witnet.QueryResponseReport; - function class() virtual override public view returns (string memory) { - return type(WitOracleTrustlessDefault).name; - } - /// @notice Number of blocks to await for either a dispute or a proven response to some query. uint256 immutable public QUERY_AWAITING_BLOCKS; @@ -44,26 +39,11 @@ contract WitOracleTrustlessDefault } constructor( - WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas, uint256 _queryAwaitingBlocks, uint256 _queryReportingStake ) Payable(address(0)) - WitOracleTrustlessBase( - _registry, - _factory - ) { - __reportResultGasBase = _reportResultGasBase; - __reportResultWithCallbackGasBase = _reportResultWithCallbackGasBase; - __reportResultWithCallbackRevertGasBase = _reportResultWithCallbackRevertGasBase; - __sstoreFromZeroGas = _sstoreFromZeroGas; - _require(_queryAwaitingBlocks < 64, "too many awaiting blocks"); _require(_queryReportingStake > 0, "no reporting stake?"); @@ -71,7 +51,7 @@ contract WitOracleTrustlessDefault QUERY_REPORTING_STAKE = _queryReportingStake; // store genesis beacon: - __storage().beacons[ + WitOracleDataLib.data().beacons[ Witnet.WIT_2_GENESIS_BEACON_INDEX ] = Witnet.Beacon({ index: Witnet.WIT_2_GENESIS_BEACON_INDEX, @@ -86,8 +66,7 @@ contract WitOracleTrustlessDefault Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 ] }); - } - + } // ================================================================================================================ // --- Escrowable ------------------------------------------------------------------------------------------------- @@ -101,7 +80,7 @@ contract WitOracleTrustlessDefault virtual override returns (uint256) { - return __storage().escrows[tenant].collateral; + return WitOracleDataLib.data().escrows[tenant].collateral; } function balanceOf(address tenant) @@ -109,7 +88,7 @@ contract WitOracleTrustlessDefault virtual override returns (uint256) { - return __storage().escrows[tenant].balance; + return WitOracleDataLib.data().escrows[tenant].balance; } function withdraw() @@ -161,12 +140,11 @@ contract WitOracleTrustlessDefault // ================================================================================================================ - // --- IWitOracle (trustlessly) ----------------------------------------------------------------------------------- + // --- Overrides IWitOracle (trustlessly) ------------------------------------------------------------------------- function fetchQueryResponse(uint256 _queryId) virtual override external - onlyRequester(_queryId) returns (Witnet.QueryResponse memory) { try WitOracleDataLib.fetchQueryResponseTrustlessly( @@ -359,6 +337,7 @@ contract WitOracleTrustlessDefault } } + function extractQueryRelayDataBatch(uint256[] calldata _queryIds) virtual override external view returns (QueryRelayData[] memory _relays) @@ -371,14 +350,21 @@ contract WitOracleTrustlessDefault function disputeQueryResponse(uint256 _queryId) virtual override external - inStatus(_queryId, Witnet.QueryStatus.Reported) returns (uint256) { - return WitOracleDataLib.disputeQueryResponse( + try WitOracleDataLib.disputeQueryResponse( _queryId, QUERY_AWAITING_BLOCKS, QUERY_REPORTING_STAKE - ); + ) returns (uint256 _evmPotentialReward) { + return _evmPotentialReward; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } } function reportQueryResponse(Witnet.QueryResponseReport calldata _responseReport) diff --git a/contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol b/contracts/core/base/WitOracleBaseUpgradable.sol similarity index 60% rename from contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol rename to contracts/core/base/WitOracleBaseUpgradable.sol index e43a9612..19ed3ada 100644 --- a/contracts/core/trustless/WitOracleTrustlessUpgradableDefault.sol +++ b/contracts/core/base/WitOracleBaseUpgradable.sol @@ -1,9 +1,8 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; -import "./WitOracleTrustlessDefault.sol"; +import "./WitOracleBaseTrustless.sol"; import "../WitnetUpgradableBase.sol"; /// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. @@ -11,30 +10,14 @@ import "../WitnetUpgradableBase.sol"; /// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. /// The result of the requests will be posted back to this contract by the bridge nodes too. /// @author The Witnet Foundation -contract WitOracleTrustlessUpgradableDefault +abstract contract WitOracleBaseUpgradable is - WitOracleTrustlessDefault, + WitOracleBaseTrustless, WitnetUpgradableBase -{ - function class() - virtual override(WitOracleTrustlessDefault, WitnetUpgradableBase) - public view - returns (string memory) - { - return type(WitOracleTrustlessUpgradableDefault).name; - } - +{ constructor( - WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, bytes32 _versionTag, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas, - uint256 _queryAwaitingBlocks, - uint256 _queryReportingStake + bool _upgradable ) Ownable(msg.sender) WitnetUpgradableBase( @@ -42,19 +25,8 @@ contract WitOracleTrustlessUpgradableDefault _versionTag, "io.witnet.proxiable.board" ) - WitOracleTrustlessDefault( - _registry, - _factory, - _reportResultGasBase, - _reportResultWithCallbackGasBase, - _reportResultWithCallbackRevertGasBase, - _sstoreFromZeroGas, - _queryAwaitingBlocks, - _queryReportingStake - ) {} - // ================================================================================================================ // ---Upgradeable ------------------------------------------------------------------------------------------------- @@ -70,7 +42,7 @@ contract WitOracleTrustlessUpgradableDefault _transferOwnership(_owner); // save into storage genesis beacon - __storage().beacons[ + WitOracleDataLib.data().beacons[ Witnet.WIT_2_GENESIS_BEACON_INDEX ] = Witnet.Beacon({ index: Witnet.WIT_2_GENESIS_BEACON_INDEX, @@ -103,32 +75,19 @@ contract WitOracleTrustlessUpgradableDefault __proxiable().codehash = codehash(); _require(address(registry).code.length > 0, "inexistent registry"); - _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); + _require( + registry.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracleRadonRegistry).interfaceId + ), "uncompliant registry" + ); // Settle given beacon, if any: if (_initData.length > 0) { Witnet.Beacon memory _beacon = abi.decode(_initData, (Witnet.Beacon)); - __storage().beacons[_beacon.index] = _beacon; + WitOracleDataLib.data().beacons[_beacon.index] = _beacon; } emit Upgraded(_owner, base(), codehash(), version()); } - - - /// ================================================================================================================ - /// --- Internal methods ------------------------------------------------------------------------------------------- - - function _require(bool _condition, string memory _reason) - virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) - internal view - { - WitOracleTrustlessBase._require(_condition, _reason); - } - - function _revert(string memory _reason) - virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) - internal view - { - WitOracleTrustlessBase._revert(_reason); - } } diff --git a/contracts/core/trustless/WitOracleRadonRegistryDefault.sol b/contracts/core/base/WitOracleRadonRegistryBase.sol similarity index 82% rename from contracts/core/trustless/WitOracleRadonRegistryDefault.sol rename to contracts/core/base/WitOracleRadonRegistryBase.sol index c47f2a5e..81f1ea0e 100644 --- a/contracts/core/trustless/WitOracleRadonRegistryDefault.sol +++ b/contracts/core/base/WitOracleRadonRegistryBase.sol @@ -2,7 +2,6 @@ pragma solidity >=0.8.4 <0.9.0; -import "../WitnetUpgradableBase.sol"; import "../../WitOracleRadonRegistry.sol"; import "../../data/WitOracleRadonRegistryData.sol"; import "../../interfaces/IWitOracleRadonRegistryLegacy.sol"; @@ -13,11 +12,10 @@ import "../../libs/WitOracleRadonEncodingLib.sol"; /// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. /// The result of the requests will be posted back to this contract by the bridge nodes too. /// @author The Witnet Foundation -contract WitOracleRadonRegistryDefault +abstract contract WitOracleRadonRegistryBase is WitOracleRadonRegistry, WitOracleRadonRegistryData, - WitnetUpgradableBase, IWitOracleRadonRegistryLegacy { using Witnet for bytes; @@ -31,12 +29,6 @@ contract WitOracleRadonRegistryDefault using WitOracleRadonEncodingLib for Witnet.RadonRetrievalMethods; using WitOracleRadonEncodingLib for Witnet.RadonSLAv1; - function class() public view virtual override(IWitAppliance, WitnetUpgradableBase) returns (string memory) { - return type(WitOracleRadonRegistryDefault).name; - } - - bytes4 public immutable override specs = type(WitOracleRadonRegistry).interfaceId; - modifier radonRequestExists(bytes32 _radHash) { _require( __database().requests[_radHash].aggregateTallyHashes != bytes32(0), @@ -51,15 +43,6 @@ contract WitOracleRadonRegistryDefault ); _; } - constructor(bool _upgradable, bytes32 _versionTag) - Ownable(address(msg.sender)) - WitnetUpgradableBase( - _upgradable, - _versionTag, - "io.witnet.proxiable.bytecodes" - ) - {} - function _witOracleHash(bytes memory chunk) virtual internal pure returns (bytes32) { return sha256(chunk); } @@ -68,101 +51,6 @@ contract WitOracleRadonRegistryDefault _revert("no transfers"); } - - // ================================================================================================================ - // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- - - /// Returns the address of the pending owner. - function pendingOwner() - public view - virtual override - returns (address) - { - return __bytecodes().pendingOwner; - } - - /// Returns the address of the current owner. - function owner() - public view - virtual override - returns (address) - { - return __bytecodes().owner; - } - - /// Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. - /// @dev Can only be called by the current owner. - function transferOwnership(address _newOwner) - public - virtual override - onlyOwner - { - __bytecodes().pendingOwner = _newOwner; - emit OwnershipTransferStarted(owner(), _newOwner); - } - - /// @dev Transfers ownership of the contract to a new account (`_newOwner`) and deletes any pending owner. - /// @dev Internal function without access restriction. - function _transferOwnership(address _newOwner) - internal - virtual override - { - delete __bytecodes().pendingOwner; - address _oldOwner = owner(); - if (_newOwner != _oldOwner) { - __bytecodes().owner = _newOwner; - emit OwnershipTransferred(_oldOwner, _newOwner); - } - } - - - // ================================================================================================================ - // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- - - /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - public - override - { - address _owner = __bytecodes().owner; - if (_owner == address(0)) { - // set owner from the one specified in _initData - _owner = abi.decode(_initData, (address)); - __bytecodes().owner = _owner; - } else { - // only owner can initialize: - if (msg.sender != _owner) { - _revert("not the owner"); - } - } - - if (__bytecodes().base != address(0)) { - // current implementation cannot be initialized more than once: - if(__bytecodes().base == base()) { - _revert("already initialized"); - } - } - __bytecodes().base = base(); - - emit Upgraded( - _owner, - base(), - codehash(), - version() - ); - } - - /// Tells whether provided address could eventually upgrade the contract. - function isUpgradableFrom(address _from) external view override returns (bool) { - address _owner = __bytecodes().owner; - return ( - // false if the WRB is intrinsically not upgradable, or `_from` is no owner - isUpgradable() - && _owner == _from - ); - } - // ================================================================================================================ // --- Implementation of 'IWitOracleRadonRegistry' ----------------------------------------------------------------------- @@ -637,5 +525,4 @@ contract WitOracleRadonRegistryDefault __reducer.filters.push(_filters[_ix]); } } - -} \ No newline at end of file +} diff --git a/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol b/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol new file mode 100644 index 00000000..98555b2e --- /dev/null +++ b/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.4 <0.9.0; + +import "../WitnetUpgradableBase.sol"; +import "../base/WitOracleRadonRegistryBase.sol"; + +/// @title Witnet Request Board EVM-default implementation contract. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +abstract contract WitOracleRadonRegistryBaseUpgradable + is + WitOracleRadonRegistryBase, + WitnetUpgradableBase +{ + constructor( + bytes32 _versionTag, + bool _upgradable + ) + Ownable(address(msg.sender)) + WitnetUpgradableBase( + _upgradable, + _versionTag, + "io.witnet.proxiable.bytecodes" + ) + {} + + // ================================================================================================================ + // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- + + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) + public + override + { + address _owner = __bytecodes().owner; + if (_owner == address(0)) { + // set owner from the one specified in _initData + _owner = abi.decode(_initData, (address)); + __bytecodes().owner = _owner; + } else { + // only owner can initialize: + if (msg.sender != _owner) { + _revert("not the owner"); + } + } + + if (__bytecodes().base != address(0)) { + // current implementation cannot be initialized more than once: + if(__bytecodes().base == base()) { + _revert("already initialized"); + } + } + __bytecodes().base = base(); + + emit Upgraded(_owner, base(), codehash(), version()); + } + + // ================================================================================================================ + // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- + + /// Returns the address of the pending owner. + function pendingOwner() + public view + virtual override + returns (address) + { + return __bytecodes().pendingOwner; + } + + /// Returns the address of the current owner. + function owner() + public view + virtual override + returns (address) + { + return __bytecodes().owner; + } + + /// Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + /// @dev Can only be called by the current owner. + function transferOwnership(address _newOwner) + public + virtual override + onlyOwner + { + __bytecodes().pendingOwner = _newOwner; + emit OwnershipTransferStarted(owner(), _newOwner); + } + + /// @dev Transfers ownership of the contract to a new account (`_newOwner`) and deletes any pending owner. + /// @dev Internal function without access restriction. + function _transferOwnership(address _newOwner) + internal + virtual override + { + delete __bytecodes().pendingOwner; + address _oldOwner = owner(); + if (_newOwner != _oldOwner) { + __bytecodes().owner = _newOwner; + emit OwnershipTransferred(_oldOwner, _newOwner); + } + } +} diff --git a/contracts/core/trustless/WitOracleRequestFactoryDefault.sol b/contracts/core/base/WitOracleRequestFactoryBase.sol similarity index 75% rename from contracts/core/trustless/WitOracleRequestFactoryDefault.sol rename to contracts/core/base/WitOracleRequestFactoryBase.sol index 8242d392..116f4b17 100644 --- a/contracts/core/trustless/WitOracleRequestFactoryDefault.sol +++ b/contracts/core/base/WitOracleRequestFactoryBase.sol @@ -1,46 +1,34 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; -import "../WitnetUpgradableBase.sol"; import "../../WitOracleRadonRegistry.sol"; import "../../WitOracleRequestFactory.sol"; import "../../data/WitOracleRequestFactoryData.sol"; -import "../../interfaces/IWitOracleRadonRegistryLegacy.sol"; +import "../../interfaces/IWitOracle.sol"; import "../../patterns/Clonable.sol"; -contract WitOracleRequestFactoryDefault +abstract contract WitOracleRequestFactoryBase is Clonable, WitOracleRequest, WitOracleRequestFactory, WitOracleRequestFactoryData, - WitOracleRequestTemplate, - WitnetUpgradableBase + WitOracleRequestTemplate { /// @notice Reference to the Witnet Request Board that all templates built out from this factory will refer to. WitOracle immutable public override witOracle; - modifier notOnFactory { + modifier notOnFactory virtual { _require( - address(this) != __proxy() - && address(this) != base(), + address(this) != self(), "not on factory" ); _; } - modifier onlyDelegateCalls override(Clonable, Upgradeable) { + modifier onlyOnFactory virtual { _require( - address(this) != _BASE, - "not a delegate call" - ); _; - } - - modifier onlyOnFactory { - _require( - address(this) == __proxy() - || address(this) == base(), + address(this) == self(), "not the factory" ); _; } @@ -59,23 +47,8 @@ contract WitOracleRequestFactoryDefault ); _; } - constructor( - WitOracle _witOracle, - bool _upgradable, - bytes32 _versionTag - ) - Ownable(address(msg.sender)) - WitnetUpgradableBase( - _upgradable, - _versionTag, - "io.witnet.requests.factory" - ) - { + constructor(WitOracle _witOracle) { witOracle = _witOracle; - // let logic contract be used as a factory, while avoiding further initializations: - __proxiable().proxy = address(this); - __proxiable().implementation = address(this); - __witOracleRequestFactory().owner = address(0); } function _getWitOracleRadonRegistry() virtual internal view returns (WitOracleRadonRegistry) { @@ -110,107 +83,8 @@ contract WitOracleRequestFactoryDefault return address(this); } - // ================================================================================================================ - // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- - - /// @notice Returns the address of the pending owner. - function pendingOwner() - public view - virtual override - returns (address) - { - return __witOracleRequestFactory().pendingOwner; - } - - /// @notice Returns the address of the current owner. - function owner() - virtual override - public view - returns (address) - { - return __witOracleRequestFactory().owner; - } - - /// @notice Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. - /// @dev Can only be called by the current owner. - function transferOwnership(address _newOwner) - virtual override public - onlyOwner - { - __witOracleRequestFactory().pendingOwner = _newOwner; - emit OwnershipTransferStarted(owner(), _newOwner); - } - - /// @dev Transfers ownership of the contract to a new account (`_newOwner`) and deletes any pending owner. - /// @dev Internal function without access restriction. - function _transferOwnership(address _newOwner) - internal - virtual override - { - delete __witOracleRequestFactory().pendingOwner; - address _oldOwner = owner(); - if (_newOwner != _oldOwner) { - __witOracleRequestFactory().owner = _newOwner; - emit OwnershipTransferred(_oldOwner, _newOwner); - } - } - - - // ================================================================================================================ - // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- - - /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - virtual override public - onlyDelegateCalls - { - _require(!initialized(), "already initialized"); - - // Trying to intialize an upgradable factory instance... - { - address _owner = __witOracleRequestFactory().owner; - if (_owner == address(0)) { - // Upon first initialization of an upgradable factory, - // set owner from the one specified in _initData - _owner = abi.decode(_initData, (address)); - __witOracleRequestFactory().owner = _owner; - } else { - // only the owner can upgrade an upgradable factory - _require( - msg.sender == _owner, - "not the owner" - ); - } - - if (__proxiable().proxy == address(0)) { - // first initialization of the proxy - __proxiable().proxy = address(this); - } - __proxiable().implementation = base(); - - _require(address(witOracle).code.length > 0, "inexistent request board"); - _require(witOracle.specs() == type(WitOracle).interfaceId, "uncompliant request board"); - - emit Upgraded(msg.sender, base(), codehash(), version()); - } - } - - /// Tells whether provided address could eventually upgrade the contract. - function isUpgradableFrom(address _from) external view override returns (bool) { - address _owner = __witOracleRequestFactory().owner; - return ( - // false if the logic contract is intrinsically not upgradable, or `_from` is no owner - isUpgradable() - && _owner == _from - && _owner != address(0) - ); - } - - - // ================================================================================================================ - /// --- Clonable implementation and override ---------------------------------------------------------------------- + /// --- Overrides Clonable ---------------------------------------------------------------------------------------- /// @notice Tells whether a WitOracleRequest or a WitOracleRequestTemplate has been properly initialized. function initialized() @@ -221,31 +95,26 @@ contract WitOracleRequestFactoryDefault return ( __witOracleRequestTemplate().tallyReduceHash != bytes16(0) || __witOracleRequest().radHash != bytes32(0) - || __implementation() == base() ); } - /// @notice Contract address to which clones will be re-directed. - function self() - virtual override - public view - returns (address) - { - return (__proxy() != address(0) - ? __implementation() - : base() - ); - } + // /// @notice Contract address to which clones will be re-directed. + // function self() + // virtual override + // public view + // returns (address) + // { + // return (__proxy() != address(0) + // ? __implementation() + // : base() + // ); + // } /// =============================================================================================================== - /// --- IWitOracleRequestFactory, IWitOracleRequestTemplate, IWitOracleRequest polymorphic methods ------------------------- + /// --- IWitOracleRequestFactory, IWitOracleRequestTemplate, IWitOracleRequest polymorphic methods ---------------- - function class() - virtual override(IWitAppliance, WitnetUpgradableBase) - public view - returns (string memory) - { + function class() virtual override public view returns (string memory) { if (__witOracleRequest().radHash != bytes32(0)) { return type(WitOracleRequest).name; } else if (__witOracleRequestTemplate().tallyReduceHash != bytes16(0)) { @@ -261,17 +130,26 @@ contract WitOracleRequestFactoryDefault returns (bytes4) { if (__witOracleRequest().radHash != bytes32(0)) { - return type(WitOracleRequest).interfaceId; + return ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitOracleRequest).interfaceId + ); } else if (__witOracleRequestTemplate().tallyReduceHash != bytes16(0)) { - return type(WitOracleRequestTemplate).interfaceId; + return ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitOracleRequestTemplate).interfaceId + ); } else { - return type(WitOracleRequestFactory).interfaceId; + return ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitOracleRequestFactory).interfaceId + ); } } /// =============================================================================================================== - /// --- IWitOracleRequestTemplate, IWitOracleRequest polymorphic methods ------------------------------------------------ + /// --- IWitOracleRequestTemplate, IWitOracleRequest polymorphic methods ------------------------------------------ function getRadonReducers() virtual override (IWitOracleRequest, IWitOracleRequestTemplate) @@ -354,11 +232,11 @@ contract WitOracleRequestFactoryDefault } function version() - virtual override(IWitOracleRequest, IWitOracleRequestTemplate, WitnetUpgradableBase) + virtual override(IWitOracleRequest, IWitOracleRequestTemplate) public view returns (string memory) { - return WitnetUpgradableBase.version(); + return IWitAppliance(address(this)).class(); } @@ -588,7 +466,7 @@ contract WitOracleRequestFactoryDefault // Create and initialize counter-factual request just once: if (_requestAddr.code.length == 0) { - _requestAddr = WitOracleRequestFactoryDefault(_cloneDeterministic(_requestSalt)) + _requestAddr = WitOracleRequestFactoryBase(_cloneDeterministic(_requestSalt)) .initializeWitOracleRequest( _radHash ); @@ -617,7 +495,7 @@ contract WitOracleRequestFactoryDefault // Create and initialize counter-factual template just once: if (_templateAddr.code.length == 0) { _templateAddr = address( - WitOracleRequestFactoryDefault(_cloneDeterministic(_templateSalt)) + WitOracleRequestFactoryBase(_cloneDeterministic(_templateSalt)) .initializeWitOracleRequestTemplate( _retrieveHashes, _aggregateReducerHash, @@ -658,7 +536,7 @@ contract WitOracleRequestFactoryDefault bytes32 _salt = keccak256( abi.encodePacked( _radHash, - bytes4(_WITNET_UPGRADABLE_VERSION) + class() ) ); return ( @@ -684,8 +562,8 @@ contract WitOracleRequestFactoryDefault bytes32 _salt = keccak256( // As to avoid template address collisions from: abi.encodePacked( - // - different factory major or mid versions: - bytes4(_WITNET_UPGRADABLE_VERSION), + // - different factory implementation class + class(), // - different templates params: _retrieveHashes, _aggregateReducerHash, diff --git a/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol b/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol new file mode 100644 index 00000000..f836a9b5 --- /dev/null +++ b/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol @@ -0,0 +1,231 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.4 <0.9.0; + +import "./WitOracleRequestFactoryBase.sol"; +import "../WitnetUpgradableBase.sol"; + +/// @title Witnet Request Board EVM-default implementation contract. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +abstract contract WitOracleRequestFactoryBaseUpgradable + is + WitOracleRequestFactoryBase, + WitnetUpgradableBase +{ + modifier onlyDelegateCalls override(Clonable, Upgradeable) { + _require( + address(this) != _BASE, + "not a delegate call" + ); _; + } + + modifier notOnFactory virtual override { + _require( + address(this) != __proxy() + && address(this) != base(), + "not on factory" + ); _; + } + + modifier onlyOnFactory virtual override { + _require( + address(this) == __proxy() + || address(this) == base(), + "not the factory" + ); _; + } + + constructor( + bytes32 _versionTag, + bool _upgradable + ) + Ownable(address(msg.sender)) + WitnetUpgradableBase( + _upgradable, + _versionTag, + "io.witnet.requests.factory" + ) + { + // let logic contract be used as a factory, while avoiding further initializations: + __proxiable().proxy = address(this); + __proxiable().implementation = address(this); + __witOracleRequestFactory().owner = address(0); + } + + function version() + virtual override(WitOracleRequestFactoryBase, WitnetUpgradableBase) + public view + returns (string memory) + { + return WitnetUpgradableBase.version(); + } + + // ================================================================================================================ + // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- + + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) + virtual override public + onlyDelegateCalls + { + _require(!initialized(), "already initialized"); + + // Trying to intialize an upgradable factory instance... + { + address _owner = __witOracleRequestFactory().owner; + if (_owner == address(0)) { + // Upon first initialization of an upgradable factory, + // set owner from the one specified in _initData + _owner = abi.decode(_initData, (address)); + __witOracleRequestFactory().owner = _owner; + } else { + // only the owner can upgrade an upgradable factory + _require( + msg.sender == _owner, + "not the owner" + ); + } + + if (__proxiable().proxy == address(0)) { + // first initialization of the proxy + __proxiable().proxy = address(this); + } + __proxiable().implementation = base(); + + _require(address(witOracle).code.length > 0, "inexistent request board"); + _require( + witOracle.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ), "uncompliant request board" + ); + + emit Upgraded(msg.sender, base(), codehash(), version()); + } + } + + // ================================================================================================================ + // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- + + /// @notice Returns the address of the pending owner. + function pendingOwner() + public view + virtual override + returns (address) + { + return __witOracleRequestFactory().pendingOwner; + } + + /// @notice Returns the address of the current owner. + function owner() + virtual override + public view + returns (address) + { + return __witOracleRequestFactory().owner; + } + + /// @notice Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + /// @dev Can only be called by the current owner. + function transferOwnership(address _newOwner) + virtual override public + onlyOwner + { + __witOracleRequestFactory().pendingOwner = _newOwner; + emit OwnershipTransferStarted(owner(), _newOwner); + } + + /// @dev Transfers ownership of the contract to a new account (`_newOwner`) and deletes any pending owner. + /// @dev Internal function without access restriction. + function _transferOwnership(address _newOwner) + internal + virtual override + { + delete __witOracleRequestFactory().pendingOwner; + address _oldOwner = owner(); + if (_newOwner != _oldOwner) { + __witOracleRequestFactory().owner = _newOwner; + emit OwnershipTransferred(_oldOwner, _newOwner); + } + } + + // ================================================================================================================ + /// --- Overrides Clonable ---------------------------------------------------------------------------------------- + + /// @notice Tells whether a WitOracleRequest or a WitOracleRequestTemplate has been properly initialized. + function initialized() virtual override public view returns (bool) { + return ( + super.initialized() + || __implementation() == base() + ); + } + + /// @notice Contract address to which clones will be re-directed. + function self() + virtual override + public view + returns (address) + { + return (__proxy() != address(0) + ? __implementation() + : base() + ); + } + + function _determineWitOracleRequestAddressAndSalt(bytes32 _radHash) + virtual override internal view + returns (address, bytes32) + { + bytes32 _salt = keccak256( + abi.encodePacked( + _radHash, + bytes4(_WITNET_UPGRADABLE_VERSION) + ) + ); + return ( + address(uint160(uint256(keccak256( + abi.encodePacked( + bytes1(0xff), + address(this), + _salt, + keccak256(_cloneBytecode()) + ) + )))), _salt + ); + } + + function _determineWitOracleRequestTemplateAddressAndSalt( + bytes32[] memory _retrieveHashes, + bytes16 _aggregateReducerHash, + bytes16 _tallyReducerHash + ) + virtual override internal view + returns (address, bytes32) + { + bytes32 _salt = keccak256( + // As to avoid template address collisions from: + abi.encodePacked( + // - different factory major or mid versions: + bytes4(_WITNET_UPGRADABLE_VERSION), + // - different templates params: + _retrieveHashes, + _aggregateReducerHash, + _tallyReducerHash + ) + ); + return ( + address(uint160(uint256(keccak256( + abi.encodePacked( + bytes1(0xff), + address(this), + _salt, + keccak256(_cloneBytecode()) + ) + )))), _salt + ); + } +} diff --git a/contracts/core/trustable/WitOracleTrustableDefault.sol b/contracts/core/trustable/WitOracleTrustableDefault.sol index e0b6e795..8fb08ff8 100644 --- a/contracts/core/trustable/WitOracleTrustableDefault.sol +++ b/contracts/core/trustable/WitOracleTrustableDefault.sol @@ -1,14 +1,8 @@ // SPDX-License-Identifier: MIT -/* solhint-disable var-name-mixedcase */ +pragma solidity >=0.8.0 <0.9.0; -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "../WitnetUpgradableBase.sol"; -import "../trustless/WitOracleTrustlessBase.sol"; -import "../../interfaces/IWitOracleAdminACLs.sol"; -import "../../interfaces/IWitOracleReporter.sol"; +import "../base/WitOracleBaseTrustable.sol"; /// @title Witnet Request Board "trustable" implementation contract. /// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. @@ -17,440 +11,23 @@ import "../../interfaces/IWitOracleReporter.sol"; /// @author The Witnet Foundation contract WitOracleTrustableDefault is - WitnetUpgradableBase, - WitOracleTrustlessBase, - IWitOracleAdminACLs, - IWitOracleReporter + WitOracleBaseTrustable { - using Witnet for Witnet.RadonSLA; - - function class() - virtual override(WitOracleTrustlessBase, WitnetUpgradableBase) - public view - returns (string memory) - { + function class() virtual override public view returns (string memory) { return type(WitOracleTrustableDefault).name; } - /// Asserts the caller is authorized as a reporter - modifier onlyReporters { - _require( - __storage().reporters[msg.sender], - "unauthorized reporter" - ); _; - } - constructor( + EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, - bytes32 _versionTag, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas + // WitOracleRequestFactory _factory, + bytes32 _versionTag ) - Ownable(msg.sender) - Payable(address(0)) - WitnetUpgradableBase( - _upgradable, - _versionTag, - "io.witnet.proxiable.board" + WitOracleBase( + _immutables, + _registry + // _factory ) - WitOracleTrustlessBase( - _registry, - _factory - ) - { - __reportResultGasBase = _reportResultGasBase; - __reportResultWithCallbackGasBase = _reportResultWithCallbackGasBase; - __reportResultWithCallbackRevertGasBase = _reportResultWithCallbackRevertGasBase; - __sstoreFromZeroGas = _sstoreFromZeroGas; - } - - - // ================================================================================================================ - // --- Upgradeable ------------------------------------------------------------------------------------------------ - - /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) virtual override public { - address _owner = owner(); - address[] memory _newReporters; - - if (_owner == address(0)) { - // get owner (and reporters) from _initData - bytes memory _newReportersRaw; - (_owner, _newReportersRaw) = abi.decode(_initData, (address, bytes)); - _transferOwnership(_owner); - _newReporters = abi.decode(_newReportersRaw, (address[])); - } else { - // only owner can initialize: - _require( - msg.sender == _owner, - "not the owner" - ); - // get reporters from _initData - _newReporters = abi.decode(_initData, (address[])); - } - - if ( - __proxiable().codehash != bytes32(0) - && __proxiable().codehash == codehash() - ) { - _revert("already upgraded"); - } - __proxiable().codehash = codehash(); - - _require(address(registry).code.length > 0, "inexistent registry"); - _require(registry.specs() == type(WitOracleRadonRegistry).interfaceId, "uncompliant registry"); - - // Set reporters, if any - WitOracleDataLib.setReporters(_newReporters); - - emit Upgraded(_owner, base(), codehash(), version()); - } - - - // ================================================================================================================ - // --- IWitOracle ------------------------------------------------------------------------------------------------- - - /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. - /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to - /// @dev the one that actually posted the given request. - /// @dev If in 'Expired' status, query reward is transfer back to the requester. - /// @param _queryId The unique query identifier. - function fetchQueryResponse(uint256 _queryId) - virtual override external - onlyRequester(_queryId) - returns (Witnet.QueryResponse memory) - { - try WitOracleDataLib.fetchQueryResponse( - _queryId - - ) returns ( - Witnet.QueryResponse memory _queryResponse, - uint72 _queryEvmExpiredReward - ) { - if (_queryEvmExpiredReward > 0) { - // transfer unused reward to requester, only if the query expired: - __safeTransferTo( - payable(msg.sender), - _queryEvmExpiredReward - ); - } - return _queryResponse; - - } catch Error(string memory _reason) { - _revert(_reason); - - } catch (bytes memory) { - _revertWitOracleDataLibUnhandledException(); - } - } - - /// @notice Returns query's result current status from a requester's point of view: - /// @notice - 0 => Void: the query is either non-existent or deleted; - /// @notice - 1 => Awaiting: the query has not yet been reported; - /// @notice - 2 => Ready: the query has been succesfully solved; - /// @notice - 3 => Error: the query couldn't get solved due to some issue. - /// @param _queryId The unique query identifier. - function getQueryResponseStatus(uint256 _queryId) - virtual override - public view - returns (Witnet.QueryResponseStatus) - { - return WitOracleDataLib.getQueryResponseStatus(_queryId); - } - - /// Gets current status of given query. - function getQueryStatus(uint256 _queryId) - virtual override - public view - returns (Witnet.QueryStatus) - { - return WitOracleDataLib.getQueryStatus(_queryId); - } - - - // ================================================================================================================ - // --- IWitOracleAdminACLs ---------------------------------------------------------------------------------------- - - /// Tells whether given address is included in the active reporters control list. - /// @param _queryResponseReporter The address to be checked. - function isReporter(address _queryResponseReporter) virtual override public view returns (bool) { - return WitOracleDataLib.isReporter(_queryResponseReporter); - } - - /// Adds given addresses to the active reporters control list. - /// @dev Can only be called from the owner address. - /// @dev Emits the `ReportersSet` event. - /// @param _queryResponseReporters List of addresses to be added to the active reporters control list. - function setReporters(address[] calldata _queryResponseReporters) - virtual override public - onlyOwner - { - WitOracleDataLib.setReporters(_queryResponseReporters); - } - - /// Removes given addresses from the active reporters control list. - /// @dev Can only be called from the owner address. - /// @dev Emits the `ReportersUnset` event. - /// @param _exReporters List of addresses to be added to the active reporters control list. - function unsetReporters(address[] calldata _exReporters) - virtual override public - onlyOwner - { - WitOracleDataLib.unsetReporters(_exReporters); - } - - - // ================================================================================================================ - // --- IWitOracleReporter ----------------------------------------------------------------------------------------- - - /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, - /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on - /// @notice queries providing no actual earnings. - function estimateReportEarnings( - uint256[] calldata _queryIds, - bytes calldata, - uint256 _evmGasPrice, - uint256 _evmWitPrice - ) - external view - virtual override - returns (uint256 _revenues, uint256 _expenses) - { - for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { - if ( - getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted - ) { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); - if (__request.gasCallback > 0) { - _expenses += ( - estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - Witnet.RadonSLA({ - witNumWitnesses: __request.radonSLA.witNumWitnesses, - witUnitaryReward: __request.radonSLA.witUnitaryReward, - maxTallyResultSize: uint16(0) - }) - ) - ); - } else { - _expenses += ( - estimateBaseFee(_evmGasPrice) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - __request.radonSLA - ) - ); - } - _expenses += _evmWitPrice * __request.radonSLA.witUnitaryReward; - _revenues += __request.evmReward; - } - } - } - - /// @notice Retrieves the Witnet Data Request bytecodes and SLAs of previously posted queries. - /// @dev Returns empty buffer if the query does not exist. - /// @param _queryIds Query identifies. - function extractWitnetDataRequests(uint256[] calldata _queryIds) - external view - virtual override - returns (bytes[] memory _bytecodes) - { - return WitOracleDataLib.extractWitnetDataRequests(registry, _queryIds); - } - - /// Reports the Witnet-provable result to a previously posted request. - /// @dev Will assume `block.timestamp` as the timestamp at which the request was solved. - /// @dev Fails if: - /// @dev - the `_queryId` is not in 'Posted' status. - /// @dev - provided `_resultTallyHash` is zero; - /// @dev - length of provided `_result` is zero. - /// @param _queryId The unique identifier of the data request. - /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param _resultCborBytes The result itself as bytes. - function reportResult( - uint256 _queryId, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - external override - onlyReporters - inStatus(_queryId, Witnet.QueryStatus.Posted) - returns (uint256) - { - // results cannot be empty: - _require( - _resultCborBytes.length != 0, - "result cannot be empty" - ); - // do actual report and return reward transfered to the reproter: - // solhint-disable not-rely-on-time - return __reportResultAndReward( - _queryId, - uint32(block.timestamp), - _resultTallyHash, - _resultCborBytes - ); - } - - /// Reports the Witnet-provable result to a previously posted request. - /// @dev Fails if: - /// @dev - called from unauthorized address; - /// @dev - the `_queryId` is not in 'Posted' status. - /// @dev - provided `_resultTallyHash` is zero; - /// @dev - length of provided `_resultCborBytes` is zero. - /// @param _queryId The unique query identifier - /// @param _resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. - /// @param _resultTallyHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param _resultCborBytes The result itself as bytes. - function reportResult( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - external - override - onlyReporters - inStatus(_queryId, Witnet.QueryStatus.Posted) - returns (uint256) - { - // validate timestamp - _require( - _resultTimestamp > 0, - "bad timestamp" - ); - // results cannot be empty - _require( - _resultCborBytes.length != 0, - "result cannot be empty" - ); - // do actual report and return reward transfered to the reproter: - return __reportResultAndReward( - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - } - - /// @notice Reports Witnet-provided results to multiple requests within a single EVM tx. - /// @notice Emits either a WitOracleQueryResponse* or a BatchReportError event per batched report. - /// @dev Fails only if called from unauthorized address. - /// @param _batchResults Array of BatchResult structs, every one containing: - /// - unique query identifier; - /// - timestamp of the solving tally txs in Witnet. If zero is provided, EVM-timestamp will be used instead; - /// - hash of the corresponding data request tx at the Witnet side-chain level; - /// - data request result in raw bytes. - function reportResultBatch(IWitOracleReporter.BatchResult[] calldata _batchResults) - external override - onlyReporters - returns (uint256 _batchReward) - { - for (uint _i = 0; _i < _batchResults.length; _i ++) { - if ( - getQueryStatus(_batchResults[_i].queryId) - != Witnet.QueryStatus.Posted - ) { - emit BatchReportError( - _batchResults[_i].queryId, - WitOracleDataLib.notInStatusRevertMessage(Witnet.QueryStatus.Posted) - ); - } else if ( - uint256(_batchResults[_i].resultTimestamp) > block.timestamp - || _batchResults[_i].resultTimestamp == 0 - || _batchResults[_i].resultCborBytes.length == 0 - ) { - emit BatchReportError( - _batchResults[_i].queryId, - string(abi.encodePacked( - class(), - ": invalid report data" - )) - ); - } else { - _batchReward += __reportResult( - _batchResults[_i].queryId, - _batchResults[_i].resultTimestamp, - _batchResults[_i].resultTallyHash, - _batchResults[_i].resultCborBytes - ); - } - } - // Transfer rewards to all reported results in one single transfer to the reporter: - if (_batchReward > 0) { - __safeTransferTo( - payable(msg.sender), - _batchReward - ); - } - } - - - /// ================================================================================================================ - /// --- Internal methods ------------------------------------------------------------------------------------------- - - function _require(bool _condition, string memory _reason) - virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) - internal view - { - WitOracleTrustlessBase._require(_condition, _reason); - } - - function _revert(string memory _reason) - virtual override (WitOracleTrustlessBase, WitnetUpgradableBase) - internal view - { - WitOracleTrustlessBase._revert(_reason); - } - - function __reportResult( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - virtual internal - returns (uint256) - { - return WitOracleDataLib.reportResult( - msg.sender, - tx.gasprice, - uint64(block.number), - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - } - - function __reportResultAndReward( - uint256 _queryId, - uint32 _resultTimestamp, - bytes32 _resultTallyHash, - bytes calldata _resultCborBytes - ) - virtual internal - returns (uint256 _evmReward) - { - _evmReward = __reportResult( - _queryId, - _resultTimestamp, - _resultTallyHash, - _resultCborBytes - ); - // transfer reward to reporter - __safeTransferTo( - payable(msg.sender), - _evmReward - ); - } - + WitOracleBaseTrustable(_versionTag) + {} } diff --git a/contracts/core/trustable/WitOracleTrustableObscuro.sol b/contracts/core/trustable/WitOracleTrustableObscuro.sol index db30a597..cdb506b8 100644 --- a/contracts/core/trustable/WitOracleTrustableObscuro.sol +++ b/contracts/core/trustable/WitOracleTrustableObscuro.sol @@ -1,11 +1,8 @@ // SPDX-License-Identifier: MIT -/* solhint-disable var-name-mixedcase */ +pragma solidity >=0.8.0 <0.9.0; -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "./WitOracleTrustableDefault.sol"; +import "../base/WitOracleBaseTrustable.sol"; /// @title Witnet Request Board "trustable" implementation contract. /// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. @@ -14,37 +11,28 @@ import "./WitOracleTrustableDefault.sol"; /// @author The Witnet Foundation contract WitOracleTrustableObscuro is - WitOracleTrustableDefault + WitOracleBaseTrustable { function class() virtual override public view returns (string memory) { - return type(WitOracleTrustableObscuro).name; + return type(WitOracleBaseTrustable).name; } constructor( + EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, - bytes32 _versionTag, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas + // WitOracleRequestFactory _factory, + bytes32 _versionTag ) - WitOracleTrustableDefault( - _registry, - _factory, - _upgradable, - _versionTag, - _reportResultGasBase, - _reportResultWithCallbackGasBase, - _reportResultWithCallbackRevertGasBase, - _sstoreFromZeroGas + WitOracleBase( + _immutables, + _registry + // _factory ) + WitOracleBaseTrustable(_versionTag) {} - // ================================================================================================================ - // --- Overrides implementation of 'IWitOracleView' ------------------------------------------------------ + // --- Overrides 'IWitOracle' ------------------------------------------------------------------------------------- /// @notice Gets the whole Query data contents, if any, no matter its current status. /// @dev Fails if or if `msg.sender` is not the actual requester. @@ -78,6 +66,5 @@ contract WitOracleTrustableObscuro returns (Witnet.ResultError memory) { return super.getQueryResultError(_queryId); - } - + } } diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index 09d14d9b..76bdaa71 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -1,11 +1,8 @@ // SPDX-License-Identifier: MIT -/* solhint-disable var-name-mixedcase */ +pragma solidity >=0.8.0 <0.9.0; -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "./WitOracleTrustableDefault.sol"; +import "../base/WitOracleBaseTrustable.sol"; // solhint-disable-next-line interface OVM_GasPriceOracle { @@ -19,34 +16,24 @@ interface OVM_GasPriceOracle { /// @author The Witnet Foundation contract WitOracleTrustableOvm2 is - WitOracleTrustableDefault + WitOracleBaseTrustable { - using Witnet for Witnet.RadonSLA; - function class() virtual override public view returns (string memory) { return type(WitOracleTrustableOvm2).name; } constructor( + EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, - bytes32 _versionTag, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas + // WitOracleRequestFactory _factory, + bytes32 _versionTag ) - WitOracleTrustableDefault( - _registry, - _factory, - _upgradable, - _versionTag, - _reportResultGasBase, - _reportResultWithCallbackGasBase, - _reportResultWithCallbackRevertGasBase, - _sstoreFromZeroGas + WitOracleBase( + _immutables, + _registry + // _factory ) + WitOracleBaseTrustable(_versionTag) { __gasPriceOracleL1 = OVM_GasPriceOracle(0x420000000000000000000000000000000000000F); } @@ -87,7 +74,7 @@ contract WitOracleTrustableOvm2 virtual override returns (uint256) { - return _getCurrentL1Fee(_resultMaxSize) + WitOracleTrustlessBase.estimateBaseFee(_gasPrice, _resultMaxSize); + return _getCurrentL1Fee(_resultMaxSize) + WitOracleBase.estimateBaseFee(_gasPrice, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. @@ -98,7 +85,7 @@ contract WitOracleTrustableOvm2 virtual override returns (uint256) { - return _getCurrentL1Fee(32) + WitOracleTrustlessBase.estimateBaseFeeWithCallback(_gasPrice, _callbackGasLimit); + return _getCurrentL1Fee(32) + WitOracleBase.estimateBaseFeeWithCallback(_gasPrice, _callbackGasLimit); } /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new @@ -119,7 +106,7 @@ contract WitOracleTrustableOvm2 { return ( _getCurrentL1Fee(_querySLA.maxTallyResultSize) - + WitOracleTrustlessBase.estimateExtraFee( + + WitOracleBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, _querySLA @@ -150,8 +137,8 @@ contract WitOracleTrustableOvm2 Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); if (__request.gasCallback > 0) { _expenses += ( - WitOracleTrustlessBase.estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) - + WitOracleTrustlessBase.estimateExtraFee( + WitOracleBase.estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) + + WitOracleBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, Witnet.RadonSLA({ @@ -163,8 +150,8 @@ contract WitOracleTrustableOvm2 ); } else { _expenses += ( - WitOracleTrustlessBase.estimateBaseFee(_evmGasPrice) - + WitOracleTrustlessBase.estimateExtraFee( + WitOracleBase.estimateBaseFee(_evmGasPrice) + + WitOracleBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, __request.radonSLA diff --git a/contracts/core/trustable/WitOracleTrustableReef.sol b/contracts/core/trustable/WitOracleTrustableReef.sol index 5a65ffa8..def29053 100644 --- a/contracts/core/trustable/WitOracleTrustableReef.sol +++ b/contracts/core/trustable/WitOracleTrustableReef.sol @@ -2,11 +2,9 @@ /* solhint-disable var-name-mixedcase */ -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; -// Inherits from: -import "./WitOracleTrustableDefault.sol"; +import "../base/WitOracleBaseTrustable.sol"; /// @title Witnet Request Board OVM-compatible (Optimism) "trustable" implementation. /// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. @@ -15,34 +13,38 @@ import "./WitOracleTrustableDefault.sol"; /// @author The Witnet Foundation contract WitOracleTrustableReef is - WitOracleTrustableDefault + WitOracleBaseTrustable { - function class() virtual override public view returns (string memory) { + function class() virtual override public view returns (string memory) { return type(WitOracleTrustableReef).name; } constructor( + EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - WitOracleRequestFactory _factory, - bool _upgradable, - bytes32 _versionTag, - uint256 _reportResultGasBase, - uint256 _reportResultWithCallbackGasBase, - uint256 _reportResultWithCallbackRevertGasBase, - uint256 _sstoreFromZeroGas + // WitOracleRequestFactory _factory, + bytes32 _versionTag ) - WitOracleTrustableDefault( - _registry, - _factory, - _upgradable, - _versionTag, - _reportResultGasBase, - _reportResultWithCallbackGasBase, - _reportResultWithCallbackRevertGasBase, - _sstoreFromZeroGas + WitOracleBase( + _immutables, + _registry + // _factory ) + WitOracleBaseTrustable(_versionTag) {} - + + // ================================================================================================================ + // --- Overrides 'Payable' ---------------------------------------------------------------------------------------- + + /// Gets current transaction price. + function _getGasPrice() + internal pure + virtual override + returns (uint256) + { + return 1; + } + // ================================================================================================================ // --- Overrides 'IWitOracle' ---------------------------------------------------------------------------- @@ -54,7 +56,7 @@ contract WitOracleTrustableReef virtual override returns (uint256) { - return WitOracleTrustlessBase.estimateBaseFee(1, _resultMaxSize); + return WitOracleBase.estimateBaseFee(1, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. @@ -64,19 +66,6 @@ contract WitOracleTrustableReef virtual override returns (uint256) { - return WitOracleTrustlessBase.estimateBaseFeeWithCallback(1, _callbackGasLimit); - } - - - // ================================================================================================================ - // --- Overrides 'Payable' ---------------------------------------------------------------------------------------- - - /// Gets current transaction price. - function _getGasPrice() - internal pure - virtual override - returns (uint256) - { - return 1; + return WitOracleBase.estimateBaseFeeWithCallback(1, _callbackGasLimit); } } diff --git a/contracts/core/trustless/WitOracleRadonRegistryDefaultV21.sol b/contracts/core/trustless/WitOracleRadonRegistryDefaultV21.sol new file mode 100644 index 00000000..986edc6f --- /dev/null +++ b/contracts/core/trustless/WitOracleRadonRegistryDefaultV21.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleRadonRegistryBase.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +contract WitOracleRadonRegistryDefaultV21 + is + WitOracleRadonRegistryBase +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRadonRegistryDefaultV21).name; + } +} diff --git a/contracts/core/trustless/WitOracleRadonRegistryNoSha256.sol b/contracts/core/trustless/WitOracleRadonRegistryNoSha256.sol deleted file mode 100644 index 9987c174..00000000 --- a/contracts/core/trustless/WitOracleRadonRegistryNoSha256.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "./WitOracleRadonRegistryDefault.sol"; - -contract WitOracleRadonRegistryNoSha256 - is - WitOracleRadonRegistryDefault -{ - function class() virtual override public view returns (string memory) { - return type(WitOracleRadonRegistryNoSha256).name; - } - - constructor(bool _upgradable, bytes32 _versionTag) - WitOracleRadonRegistryDefault(_upgradable, _versionTag) - {} - - function _witOracleHash(bytes memory chunk) virtual override internal pure returns (bytes32) { - return keccak256(chunk); - } -} \ No newline at end of file diff --git a/contracts/core/trustless/WitOracleRequestFactoryCfxCore.sol b/contracts/core/trustless/WitOracleRequestFactoryCfxCore.sol deleted file mode 100644 index 7f5df49a..00000000 --- a/contracts/core/trustless/WitOracleRequestFactoryCfxCore.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "./WitOracleRequestFactoryDefault.sol"; - -contract WitOracleRequestFactoryCfxCore - is - WitOracleRequestFactoryDefault -{ - constructor( - WitOracle _witOracle, - bool _upgradable, - bytes32 _versionTag - ) - WitOracleRequestFactoryDefault(_witOracle, _upgradable, _versionTag) - {} - - function _cloneDeterministic(bytes32 _salt) - override internal - returns (address _instance) - { - bytes memory ptr = _cloneBytecodePtr(); - assembly { - // CREATE2 new instance: - _instance := create2(0, ptr, 0x37, _salt) - } - emit Cloned(msg.sender, self(), _instance); - } -} \ No newline at end of file diff --git a/contracts/core/trustless/WitOracleRequestFactoryDefaultV21.sol b/contracts/core/trustless/WitOracleRequestFactoryDefaultV21.sol new file mode 100644 index 00000000..940c0905 --- /dev/null +++ b/contracts/core/trustless/WitOracleRequestFactoryDefaultV21.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleRequestFactoryBase.sol"; + +contract WitOracleRequestFactoryDefaultV21 + is + WitOracleRequestFactoryBase +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRequestFactoryDefaultV21).name; + } + + constructor(WitOracle _witOracle) + WitOracleRequestFactoryBase(_witOracle) + {} +} diff --git a/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol b/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol new file mode 100644 index 00000000..2ae1edfe --- /dev/null +++ b/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleBaseTrustless.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +contract WitOracleTrustlessDefaultV21 + is + WitOracleBaseTrustless +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleTrustlessDefaultV21).name; + } + + constructor( + EvmImmutables memory _immutables, + uint256 _queryAwaitingBlocks, + uint256 _queryReportingStake, + WitOracleRadonRegistry _registry + // WitOracleRequestFactory _factory + ) + WitOracleBase( + _immutables, + _registry + // _factory + ) + WitOracleBaseTrustless( + _queryAwaitingBlocks, + _queryReportingStake + ) + { + // _require( + // _registry.specs() == ( + // type(IWitAppliance).interfaceId + // ^ type(IWitOracleRadonRegistry).interfaceId + // ), "uncompliant registry" + // ); + } +} diff --git a/contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol b/contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol new file mode 100644 index 00000000..5a0df43c --- /dev/null +++ b/contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleRadonRegistryBaseUpgradable.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +contract WitOracleRadonRegistryUpgradableDefault + is + WitOracleRadonRegistryBaseUpgradable +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRadonRegistryUpgradableDefault).name; + } + + constructor( + bytes32 _versionTag, + bool _upgradable + ) + WitOracleRadonRegistryBaseUpgradable( + _versionTag, + _upgradable + ) + {} +} diff --git a/contracts/core/upgradable/WitOracleRadonRegistryUpgradableNoSha256.sol b/contracts/core/upgradable/WitOracleRadonRegistryUpgradableNoSha256.sol new file mode 100644 index 00000000..a6867bc7 --- /dev/null +++ b/contracts/core/upgradable/WitOracleRadonRegistryUpgradableNoSha256.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleRadonRegistryBaseUpgradable.sol"; + +contract WitOracleRadonRegistryUpgradableNoSha256 + is + WitOracleRadonRegistryBaseUpgradable +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRadonRegistryUpgradableNoSha256).name; + } + + function _witOracleHash(bytes memory chunk) virtual override internal pure returns (bytes32) { + return keccak256(chunk); + } + + constructor( + bytes32 _versionTag, + bool _upgradable + ) + WitOracleRadonRegistryBaseUpgradable( + _versionTag, + _upgradable + ) + {} +} diff --git a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol new file mode 100644 index 00000000..5d34804a --- /dev/null +++ b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +pragma solidity >=0.8.0 <0.9.0; + +import "./WitOracleRequestFactoryUpgradableDefault.sol"; + +contract WitOracleRequestFactoryUpgradableConfluxCore + is + WitOracleRequestFactoryUpgradableDefault +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRequestFactoryUpgradableConfluxCore).name; + } + + constructor( + WitOracle _witOracle, + bytes32 _versionTag, + bool _upgradable + ) + WitOracleRequestFactoryUpgradableDefault( + _witOracle, + _versionTag, + _upgradable + ) + {} + + function _cloneDeterministic(bytes32 _salt) + override internal + returns (address _instance) + { + bytes memory ptr = _cloneBytecodePtr(); + assembly { + // CREATE2 new instance: + _instance := create2(0, ptr, 0x37, _salt) + } + emit Cloned(msg.sender, self(), _instance); + } +} diff --git a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol new file mode 100644 index 00000000..9a7ef6c1 --- /dev/null +++ b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +pragma solidity >=0.8.0 <0.9.0; + +import "../base/WitOracleRequestFactoryBaseUpgradable.sol"; + +contract WitOracleRequestFactoryUpgradableDefault + is + WitOracleRequestFactoryBaseUpgradable +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleRequestFactoryUpgradableDefault).name; + } + + constructor( + WitOracle _witOracle, + bytes32 _versionTag, + bool _upgradable + ) + WitOracleRequestFactoryBase(_witOracle) + WitOracleRequestFactoryBaseUpgradable( + _versionTag, + _upgradable + ) + {} +} diff --git a/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol new file mode 100644 index 00000000..3f9e70e7 --- /dev/null +++ b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; +pragma experimental ABIEncoderV2; + +import "../base/WitOracleBaseUpgradable.sol"; + +/// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. +/// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. +/// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. +/// The result of the requests will be posted back to this contract by the bridge nodes too. +/// @author The Witnet Foundation +abstract contract WitOracleTrustlessUpgradableDefault + is + WitOracleBaseUpgradable +{ + function class() virtual override public view returns (string memory) { + return type(WitOracleTrustlessUpgradableDefault).name; + } + + constructor( + EvmImmutables memory _immutables, + uint256 _queryAwaitingBlocks, + uint256 _queryReportingStake, + WitOracleRadonRegistry _registry, + // WitOracleRequestFactory _factory, + bytes32 _versionTag, + bool _upgradable + ) + WitOracleBase( + _immutables, + _registry + // _factory + ) + WitOracleBaseTrustless( + _queryAwaitingBlocks, + _queryReportingStake + ) + WitOracleBaseUpgradable( + _versionTag, + _upgradable + ) + {} +} diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 16d92cc0..0b522351 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -175,11 +175,15 @@ library WitOracleDataLib { ) { Witnet.Query storage __query = seekQuery(queryId); - Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); + require( + msg.sender == __query.request.requester, + "not the requester" + ); _queryEvmExpiredReward = __query.request.evmReward; __query.request.evmReward = 0; + Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); if ( _queryStatus != Witnet.QueryStatus.Expired && _queryStatus != Witnet.QueryStatus.Finalized @@ -202,11 +206,15 @@ library WitOracleDataLib { public returns (Witnet.QueryResponse memory _queryResponse) { Witnet.Query storage __query = seekQuery(queryId); - Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly(queryId, evmQueryAwaitingBlocks); - + require( + msg.sender == __query.request.requester, + "not the requester" + ); + uint72 _evmReward = __query.request.evmReward; __query.request.evmReward = 0; - + + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly(queryId, evmQueryAwaitingBlocks); if (_queryStatus == Witnet.QueryStatus.Expired) { if (_evmReward > 0) { if (__query.response.disputer != address(0)) { @@ -702,7 +710,16 @@ library WitOracleDataLib { ) public returns (uint256 evmPotentialReward) { - stake(msg.sender, evmQueryReportingStake); + require( + getQueryStatusTrustlessly( + queryId, + evmQueryAwaitingBlocks + ) == Witnet.QueryStatus.Reported, "not in Reported status" + ); + stake( + msg.sender, + evmQueryReportingStake + ); Witnet.Query storage __query = seekQuery(queryId); __query.response.disputer = msg.sender; __query.response.finality = uint64(block.number + evmQueryAwaitingBlocks); diff --git a/contracts/interfaces/IWitAppliance.sol b/contracts/interfaces/IWitAppliance.sol index 813722e8..94858c40 100644 --- a/contracts/interfaces/IWitAppliance.sol +++ b/contracts/interfaces/IWitAppliance.sol @@ -1,12 +1,28 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -interface IWitAppliance { +abstract contract IWitAppliance { /// @notice Returns the name of the actual contract implementing the logic of this Witnet appliance. - function class() external view returns (string memory); + function class() virtual public view returns (string memory); /// @notice Returns the ERC-165 id of the minimal functionality expected for this appliance. - function specs() external view returns (bytes4); + function specs() virtual external view returns (bytes4); + + function _require(bool _condition, string memory _message) virtual internal view { + if (!_condition) { + _revert(_message); + } + } + + function _revert(string memory _message) virtual internal view { + revert( + string(abi.encodePacked( + class(), + ": ", + _message + )) + ); + } } diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index 895d2306..f1f55030 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -29,9 +29,9 @@ interface IWitOracle { /// @param querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. function estimateExtraFee(uint256 evmGasPrice, uint256 evmWitPrice, Witnet.RadonSLA calldata querySLA) external view returns (uint256); - /// @notice Returns the address of the WitOracleRequestFactory appliance capable of building compliant data request - /// @notice templates verified into the same WitOracleRadonRegistry instance returned by registry(). - function factory() external view returns (WitOracleRequestFactory); + // /// @notice Returns the address of the WitOracleRequestFactory appliance capable of building compliant data request + // /// @notice templates verified into the same WitOracleRadonRegistry instance returned by registry(). + // function factory() external view returns (WitOracleRequestFactory); /// @notice Retrieves a copy of all Witnet-provable data related to a previously posted request, /// removing the whole query from the WRB storage. From 7554f00968445c6056f5d6972062b298262bb848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 08:54:48 +0200 Subject: [PATCH 10/62] feat(libs): into mem array helper methods --- contracts/apps/WitRandomnessV21.sol | 52 ++++--------------- contracts/libs/Witnet.sol | 33 +++++++++++- .../mockups/WitOracleRandomnessConsumer.sol | 21 ++++---- 3 files changed, 50 insertions(+), 56 deletions(-) diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index 2a524c7e..6592d25e 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -42,25 +42,18 @@ contract WitRandomnessV21 Ownable(_operator) UsingWitOracle(_witOracle) { - _require( - address(_witOracle) == address(0) - || _witOracle.specs() == type(WitOracle).interfaceId, - "uncompliant oracle" - ); // Build Witnet-compliant randomness request: WitOracleRadonRegistry _registry = witOracle().registry(); witOracleQueryRadHash = _registry.verifyRadonRequest( - abi.decode( - abi.encode([ - _registry.verifyRadonRetrieval( - Witnet.RadonRetrievalMethods.RNG, - "", // no request url - "", // no request body - new string[2][](0), // no request headers - hex"80" // no request Radon script - ) - ]), (bytes32[]) - ), + Witnet.intoMemArray([ + _registry.verifyRadonRetrieval( + Witnet.RadonRetrievalMethods.RNG, + "", // no request url + "", // no request body + new string[2][](0), // no request headers + hex"80" // no request Radon script + ) + ]), Witnet.RadonReducer({ opcode: Witnet.RadonReduceOpcodes.Mode, filters: new Witnet.RadonFilter[](0) @@ -91,10 +84,6 @@ contract WitRandomnessV21 return type(WitRandomnessV21).name; } - function specs() virtual override external pure returns (bytes4) { - return type(WitRandomness).interfaceId; - } - function witOracle() override (IWitOracleAppliance, UsingWitOracle) public view returns (WitOracle) { @@ -502,29 +491,6 @@ contract WitRandomnessV21 emit Randomizing(tx.origin, _msgSender(), _queryId); } - function _require( - bool _condition, - string memory _message - ) - internal pure - { - if (!_condition) { - _revert(_message); - } - } - - function _revert(string memory _message) - internal pure - { - revert( - string(abi.encodePacked( - class(), - ": ", - _message - )) - ); - } - /// @dev Recursively searches for the number of the first block after the given one in which a Witnet /// @dev randomness request was posted. Returns 0 if none found. function _searchNextBlock(uint256 _target, uint256 _latest) internal view returns (uint256) { diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index ab900da2..34d6caf2 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -373,7 +373,6 @@ library Witnet { /* 0x0A */ Reserved0x10, //MaximumDeviation, /* 0x0B */ ConcatenateAndHash } - /// Structure containing the Retrieve-Attestation-Delivery parts of a Witnet-compliant Data Request. struct RadonRequest { @@ -798,6 +797,38 @@ library Witnet { return toFixedBytes(_value, 32); } + function intoMemArray(bytes32[1] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 1, _values), (bytes32[])); + } + + function intoMemArray(bytes32[2] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 2, _values), (bytes32[])); + } + + function intoMemArray(bytes32[3] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 3, _values), (bytes32[])); + } + + function intoMemArray(bytes32[4] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 4, _values), (bytes32[])); + } + + function intoMemArray(bytes32[5] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 5, _values), (bytes32[])); + } + + function intoMemArray(bytes32[6] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 6, _values), (bytes32[])); + } + + function intoMemArray(bytes32[7] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 7, _values), (bytes32[])); + } + + function intoMemArray(bytes32[8] memory _values) internal pure returns (bytes32[] memory) { + return abi.decode(abi.encode(uint256(32), 8, _values), (bytes32[])); + } + function toFixedBytes(bytes memory _value, uint8 _numBytes) internal pure returns (bytes32 _bytes32) diff --git a/contracts/mockups/WitOracleRandomnessConsumer.sol b/contracts/mockups/WitOracleRandomnessConsumer.sol index fee5d1b8..0e655780 100644 --- a/contracts/mockups/WitOracleRandomnessConsumer.sol +++ b/contracts/mockups/WitOracleRandomnessConsumer.sol @@ -33,17 +33,15 @@ abstract contract WitOracleRandomnessConsumer WitOracleRadonRegistry _registry = witOracle().registry(); // Build own Witnet Randomness Request: __witOracleRandomnessRadHash = _registry.verifyRadonRequest( - abi.decode( - abi.encode([ - _registry.verifyRadonRetrieval( - Witnet.RadonRetrievalMethods.RNG, - "", // no url - "", // no body - new string[2][](0), // no headers - hex"80" // no retrieval script - ) - ]), (bytes32[]) - ), + Witnet.intoMemArray([ + _registry.verifyRadonRetrieval( + Witnet.RadonRetrievalMethods.RNG, + "", // no url + "", // no body + new string[2][](0), // no headers + hex"80" // no retrieval script + ) + ]), Witnet.RadonReducer({ opcode: Witnet.RadonReduceOpcodes.Mode, filters: new Witnet.RadonFilter[](0) @@ -56,7 +54,6 @@ abstract contract WitOracleRandomnessConsumer } __witOracleBaseFeeOverheadPercentage = _baseFeeOverheadPercentage; __witOracleDefaultQuerySLA.maxTallyResultSize = 34; - } /// @dev Pure P-RNG generator returning uniformly distributed `_range` values based on From 5ed07c62148beccea946b6c84de5d9f025a7095a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 08:55:56 +0200 Subject: [PATCH 11/62] fix(wsb): way specs() is calculated --- contracts/WitOracle.sol | 9 ++++++++- contracts/WitOracleRadonRegistry.sol | 9 ++++++++- contracts/WitPriceFeeds.sol | 9 +++++++++ contracts/WitRandomness.sol | 9 ++++++++- contracts/mockups/UsingWitOracle.sol | 6 ++++-- contracts/mockups/UsingWitPriceFeeds.sol | 5 ++++- contracts/mockups/UsingWitRandomness.sol | 5 ++++- 7 files changed, 45 insertions(+), 7 deletions(-) diff --git a/contracts/WitOracle.sol b/contracts/WitOracle.sol index 0ffef52e..6b5f64b5 100644 --- a/contracts/WitOracle.sol +++ b/contracts/WitOracle.sol @@ -16,4 +16,11 @@ abstract contract WitOracle IWitAppliance, IWitOracle, IWitOracleEvents -{} +{ + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ); + } +} diff --git a/contracts/WitOracleRadonRegistry.sol b/contracts/WitOracleRadonRegistry.sol index f928082a..b5eb41e3 100644 --- a/contracts/WitOracleRadonRegistry.sol +++ b/contracts/WitOracleRadonRegistry.sol @@ -12,4 +12,11 @@ abstract contract WitOracleRadonRegistry IWitAppliance, IWitOracleRadonRegistry, IWitOracleRadonRegistryEvents -{} +{ + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitAppliance).interfaceId + ^ type(IWitOracleRadonRegistry).interfaceId + ); + } +} diff --git a/contracts/WitPriceFeeds.sol b/contracts/WitPriceFeeds.sol index 94c4908e..a4796d9a 100644 --- a/contracts/WitPriceFeeds.sol +++ b/contracts/WitPriceFeeds.sol @@ -18,4 +18,13 @@ abstract contract WitPriceFeeds "Price-" ) {} + + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitOracleAppliance).interfaceId + ^ type(IERC2362).interfaceId + ^ type(IWitFeeds).interfaceId + ^ type(IWitPriceFeeds).interfaceId + ); + } } diff --git a/contracts/WitRandomness.sol b/contracts/WitRandomness.sol index 25502574..4c34163d 100644 --- a/contracts/WitRandomness.sol +++ b/contracts/WitRandomness.sol @@ -13,4 +13,11 @@ abstract contract WitRandomness IWitOracleEvents, IWitRandomness, IWitRandomnessEvents -{} +{ + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitRandomness).interfaceId + ); + } +} diff --git a/contracts/mockups/UsingWitOracle.sol b/contracts/mockups/UsingWitOracle.sol index 6cc3dea5..7690799c 100644 --- a/contracts/mockups/UsingWitOracle.sol +++ b/contracts/mockups/UsingWitOracle.sol @@ -42,8 +42,10 @@ abstract contract UsingWitOracle /// @param _witOracle Address of the WitOracle bridging contract. constructor(WitOracle _witOracle) { require( - _witOracle.specs() == type(WitOracle).interfaceId, - "UsingWitOracle: uncompliant WitOracle" + _witOracle.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ), "UsingWitOracle: uncompliant WitOracle" ); __witOracle = _witOracle; __witOracleDefaultQuerySLA = Witnet.RadonSLA({ diff --git a/contracts/mockups/UsingWitPriceFeeds.sol b/contracts/mockups/UsingWitPriceFeeds.sol index 5fbc438c..d8c6b0ae 100644 --- a/contracts/mockups/UsingWitPriceFeeds.sol +++ b/contracts/mockups/UsingWitPriceFeeds.sol @@ -18,7 +18,10 @@ abstract contract UsingWitPriceFeeds constructor(WitPriceFeeds _witPriceFeeds) { require( address(_witPriceFeeds).code.length > 0 - && _witPriceFeeds.specs() == type(WitPriceFeeds).interfaceId, + && _witPriceFeeds.specs() == ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitPriceFeeds).interfaceId + ), "UsingWitPriceFeeds: uncompliant WitPriceFeeds appliance" ); witPriceFeeds = _witPriceFeeds; diff --git a/contracts/mockups/UsingWitRandomness.sol b/contracts/mockups/UsingWitRandomness.sol index 11e98fc5..fede0b78 100644 --- a/contracts/mockups/UsingWitRandomness.sol +++ b/contracts/mockups/UsingWitRandomness.sol @@ -18,7 +18,10 @@ abstract contract UsingWitRandomness constructor(WitRandomness _witRandomness) { require( address(_witRandomness).code.length > 0 - && _witRandomness.specs() == type(WitRandomness).interfaceId, + && _witRandomness.specs() == ( + type(IWitOracleAppliance).interfaceId + ^ type(IWitRandomness).interfaceId + ), "UsingWitRandomness: uncompliant WitRandomness appliance" ); witRandomness = _witRandomness; From 92859b4284132761e7572953f586f36334dac8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 08:56:32 +0200 Subject: [PATCH 12/62] refactor: appss/WitnetPriceFeedsV21 -> apps/WitnetPriceFeedsUpgradable --- ...FeedsV21.sol => WitPriceFeedsUpgradable.sol} | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename contracts/apps/{WitPriceFeedsV21.sol => WitPriceFeedsUpgradable.sol} (98%) diff --git a/contracts/apps/WitPriceFeedsV21.sol b/contracts/apps/WitPriceFeedsUpgradable.sol similarity index 98% rename from contracts/apps/WitPriceFeedsV21.sol rename to contracts/apps/WitPriceFeedsUpgradable.sol index 30ed3bf4..285b72d6 100644 --- a/contracts/apps/WitPriceFeedsV21.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -16,7 +16,7 @@ import "../patterns/Ownable2Step.sol"; /// @title WitPriceFeeds: Price Feeds live repository reliant on the Witnet Oracle blockchain. /// @author Guillermo Díaz -contract WitPriceFeedsV21 +contract WitPriceFeedsUpgradable is Ownable2Step, WitPriceFeeds, @@ -31,11 +31,10 @@ contract WitPriceFeedsV21 using Witnet for Witnet.RadonSLA; using Witnet for Witnet.Result; - function class() virtual override(IWitAppliance, WitnetUpgradableBase) public view returns (string memory) { - return type(WitPriceFeedsV21).name; + function class() virtual override public view returns (string memory) { + return type(WitPriceFeedsUpgradable).name; } - bytes4 immutable public override specs = type(WitPriceFeeds).interfaceId; WitOracle immutable public override witOracle; WitOracleRadonRegistry immutable internal __registry; @@ -44,8 +43,8 @@ contract WitPriceFeedsV21 constructor( WitOracle _witOracle, - bool _upgradable, - bytes32 _versionTag + bytes32 _versionTag, + bool _upgradable ) Ownable(address(msg.sender)) WitnetUpgradableBase( @@ -131,8 +130,10 @@ contract WitPriceFeedsV21 "inexistent oracle" ); _require( - witOracle.specs() == type(WitOracle).interfaceId, - "uncompliant oracle" + witOracle.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ), "uncompliant oracle" ); emit Upgraded(_owner, base(), codehash(), version()); } From 9ece9907ef7acc7612a4ed3f8095faf3373bb371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 08:56:52 +0200 Subject: [PATCH 13/62] refactor: WitnetDeployerCfxCore -> WitnetDeployerConfluxCore --- ...netDeployerCfxCore.sol => WitnetDeployerConfluxCore.sol} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename contracts/core/{WitnetDeployerCfxCore.sol => WitnetDeployerConfluxCore.sol} (90%) diff --git a/contracts/core/WitnetDeployerCfxCore.sol b/contracts/core/WitnetDeployerConfluxCore.sol similarity index 90% rename from contracts/core/WitnetDeployerCfxCore.sol rename to contracts/core/WitnetDeployerConfluxCore.sol index b29583b6..5c7fb4d1 100644 --- a/contracts/core/WitnetDeployerCfxCore.sol +++ b/contracts/core/WitnetDeployerConfluxCore.sol @@ -4,11 +4,11 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitnetDeployer.sol"; -/// @notice WitnetDeployerCfxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, +/// @notice WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, /// @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem. /// @author Guillermo Díaz -contract WitnetDeployerCfxCore is WitnetDeployer { +contract WitnetDeployerConfluxCore is WitnetDeployer { /// @notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`. /// @param _initCode Creation code, including construction logic and input parameters. @@ -61,7 +61,7 @@ contract WitnetDeployerCfxCore is WitnetDeployer { ); return WitnetProxy(payable(_proxyAddr)); } else { - revert("WitnetDeployerCfxCore: already proxified"); + revert("WitnetDeployerConfluxCore: already proxified"); } } From e73a905e2b6d54c1b07c9fc36d90b7e6d7c80dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 08:58:06 +0200 Subject: [PATCH 14/62] feat(migrations): defrost WitnetDeployer + WitnetProxy artifacs --- migrations/frosts/WitnetDeployer.json | 8329 ++++++++++++++ .../frosts/WitnetDeployerConfluxCore.json | 6485 +++++++++++ migrations/frosts/WitnetDeployerMeter.json | 5755 ++++++++++ migrations/frosts/WitnetProxy.json | 9535 +++++++++++++++++ migrations/scripts/1_base.js | 59 + migrations/scripts/1_deployer.js | 51 - 6 files changed, 30163 insertions(+), 51 deletions(-) create mode 100644 migrations/frosts/WitnetDeployer.json create mode 100644 migrations/frosts/WitnetDeployerConfluxCore.json create mode 100644 migrations/frosts/WitnetDeployerMeter.json create mode 100644 migrations/frosts/WitnetProxy.json create mode 100644 migrations/scripts/1_base.js delete mode 100644 migrations/scripts/1_deployer.js diff --git a/migrations/frosts/WitnetDeployer.json b/migrations/frosts/WitnetDeployer.json new file mode 100644 index 00000000..ac9d4b83 --- /dev/null +++ b/migrations/frosts/WitnetDeployer.json @@ -0,0 +1,8329 @@ +{ + "contractName": "WitnetDeployer", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "_deployed", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineProxyAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_proxySalt", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_firstImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_initData", + "type": "bytes" + } + ], + "name": "proxify", + "outputs": [ + { + "internalType": "contract WitnetProxy", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_deployed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineProxyAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proxySalt\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_firstImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initData\",\"type\":\"bytes\"}],\"name\":\"proxify\",\"outputs\":[{\"internalType\":\"contract WitnetProxy\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Guillermo D\\u00edaz \",\"kind\":\"dev\",\"methods\":{\"deploy(bytes,bytes32)\":{\"details\":\"The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). \",\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_deployed\":\"Just deployed contract address.\"}},\"determineAddr(bytes,bytes32)\":{\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_0\":\"Deterministic contract address.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deploy(bytes,bytes32)\":{\"notice\":\"Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \"},\"determineAddr(bytes,bytes32)\":{\"notice\":\"Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\"}},\"notice\":\"WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, and CREATE3 (EIP-3171) factory for Witnet proxies.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/core/WitnetDeployer.sol\":\"WitnetDeployer\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xddce8e17e3d3f9ed818b4f4c4478a8262aab8b11ed322f1bf5ed705bb4bd97fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8084aa71a4cc7d2980972412a88fe4f114869faea3fefa5436431644eb5c0287\",\"dweb:/ipfs/Qmbqfs5dRdPvHVKY8kTaeyc65NdqXRQwRK7h9s5UJEhD1p\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621\",\"dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL\"]},\"project:/contracts/core/WitnetDeployer.sol\":{\"keccak256\":\"0x00866ae27649212bdb7aacfc69d3302325ff82c1302993c1043e6f6ad2b507bc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://62fbada06d1352d79663f0c4ec26598e60e8a6b8b1015ff821b38d4f76580533\",\"dweb:/ipfs/QmYhDCsKjUPbKJLABxSUNQHsZKwPEVr41GGXV7MpThWvcL\"]},\"project:/contracts/core/WitnetProxy.sol\":{\"keccak256\":\"0x2b2f56fc69bf0e01f6f1062202d1682cd394fa3b3d9ff2f8f833ab51c9e866cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8017f76a71e4a52a5a5e249081c92510bac5b91f03f727e66ff4406238521337\",\"dweb:/ipfs/QmdWcPAL3MGtxGdpX5CMfgzz4YzxYEeCiFRoGHVCr8rLEL\"]},\"project:/contracts/libs/Create3.sol\":{\"keccak256\":\"0xfbda4c773f859bef9d7878ca9412f244da85f7bd49df07c49a17544f4708d718\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://0f83b72ad1c35c707cc6daa4e8266d9d711f561a188fbb0be1885d3f08146ca6\",\"dweb:/ipfs/QmPJwdieqkxoSvqmczAtRMfb5EN8uWiabqMKj4yVqsUncv\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]},\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]},\"project:/contracts/patterns/Upgradeable.sol\":{\"keccak256\":\"0xbeb025c71f037acb1a668174eb6930631bf397129beb825f2660e5d8cf19614f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fe6ce4dcd500093ae069d35b91829ccb471e1ca33ed0851fb053fbfe76c78aba\",\"dweb:/ipfs/QmT7huvCFS6bHDxt7HhEogJmyvYNbeb6dFTJudsVSX6nEs\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b506111df8061001f6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f36600461059b565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e366004610657565b6100ca565b6100646100a136600461069c565b61015b565b6100646100b4366004610657565b61029b565b60006100c4826102f7565b92915050565b60006100d6838361029b565b9050806001600160a01b03163b6000036100c457818351602085016000f590506001600160a01b0381166100c45760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b600080610167856100b9565b9050806001600160a01b03163b600003610242576101a7856040518060200161018f9061058e565b601f1982820381018352601f909101166040526103ca565b50806001600160a01b0316636fbc15e98533866040516020016101cb929190610725565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016101f7929190610725565b6020604051808303816000875af1158015610216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023a9190610767565b509050610294565b60405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a20616c72656164792070726f78696669656044820152601960fa1b6064820152608401610152565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012090565b604080518082018252601081526f67363d3d37363d34f03d5260086018f360801b60209182015281516001600160f81b03198183015230606090811b6bffffffffffffffffffffffff19908116602184015260358301959095527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f605580840191909152845180840390910181526075830185528051908401206135a560f21b6095840152901b9093166097840152600160f81b60ab8401528151608c81850301815260ac909301909152815191012090565b600061029483836000806103dd846102f7565b90506001600160a01b0381163b156104375760405162461bcd60e51b815260206004820152601e60248201527f437265617465333a2074617267657420616c72656164792065786973747300006044820152606401610152565b6040805180820190915260108082526f67363d3d37363d34f03d5260086018f360801b6020830190815260009291879184f591506001600160a01b0382166104c15760405162461bcd60e51b815260206004820152601f60248201527f437265617465333a206572726f72206372656174696e6720666163746f7279006044820152606401610152565b6000826001600160a01b031685876040516104dc9190610789565b60006040518083038185875af1925050503d8060008114610519576040519150601f19603f3d011682016040523d82523d6000602084013e61051e565b606091505b5050905080801561053857506001600160a01b0384163b15155b6105845760405162461bcd60e51b815260206004820152601e60248201527f437265617465333a206572726f72206372656174696e672074617267657400006044820152606401610152565b5050509392505050565b610a04806107a683390190565b6000602082840312156105ad57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126105db57600080fd5b813567ffffffffffffffff808211156105f6576105f66105b4565b604051601f8301601f19908116603f0116810190828211818310171561061e5761061e6105b4565b8160405283815286602085880101111561063757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561066a57600080fd5b823567ffffffffffffffff81111561068157600080fd5b61068d858286016105ca565b95602094909401359450505050565b6000806000606084860312156106b157600080fd5b8335925060208401356001600160a01b03811681146106cf57600080fd5b9150604084013567ffffffffffffffff8111156106eb57600080fd5b6106f7868287016105ca565b9150509250925092565b60005b8381101561071c578181015183820152602001610704565b50506000910152565b60018060a01b03831681526040602082015260008251806040840152610752816060850160208701610701565b601f01601f1916919091016060019392505050565b60006020828403121561077957600080fd5b8151801515811461029457600080fd5b6000825161079b818460208701610701565b919091019291505056fe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a2646970667358221220c25a2780a8ba38f33425ed136eb8d9b9a006afab4a18bf7dc2f7ee7a6665d2b364736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f36600461059b565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e366004610657565b6100ca565b6100646100a136600461069c565b61015b565b6100646100b4366004610657565b61029b565b60006100c4826102f7565b92915050565b60006100d6838361029b565b9050806001600160a01b03163b6000036100c457818351602085016000f590506001600160a01b0381166100c45760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b600080610167856100b9565b9050806001600160a01b03163b600003610242576101a7856040518060200161018f9061058e565b601f1982820381018352601f909101166040526103ca565b50806001600160a01b0316636fbc15e98533866040516020016101cb929190610725565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016101f7929190610725565b6020604051808303816000875af1158015610216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023a9190610767565b509050610294565b60405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a20616c72656164792070726f78696669656044820152601960fa1b6064820152608401610152565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012090565b604080518082018252601081526f67363d3d37363d34f03d5260086018f360801b60209182015281516001600160f81b03198183015230606090811b6bffffffffffffffffffffffff19908116602184015260358301959095527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f605580840191909152845180840390910181526075830185528051908401206135a560f21b6095840152901b9093166097840152600160f81b60ab8401528151608c81850301815260ac909301909152815191012090565b600061029483836000806103dd846102f7565b90506001600160a01b0381163b156104375760405162461bcd60e51b815260206004820152601e60248201527f437265617465333a2074617267657420616c72656164792065786973747300006044820152606401610152565b6040805180820190915260108082526f67363d3d37363d34f03d5260086018f360801b6020830190815260009291879184f591506001600160a01b0382166104c15760405162461bcd60e51b815260206004820152601f60248201527f437265617465333a206572726f72206372656174696e6720666163746f7279006044820152606401610152565b6000826001600160a01b031685876040516104dc9190610789565b60006040518083038185875af1925050503d8060008114610519576040519150601f19603f3d011682016040523d82523d6000602084013e61051e565b606091505b5050905080801561053857506001600160a01b0384163b15155b6105845760405162461bcd60e51b815260206004820152601e60248201527f437265617465333a206572726f72206372656174696e672074617267657400006044820152606401610152565b5050509392505050565b610a04806107a683390190565b6000602082840312156105ad57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126105db57600080fd5b813567ffffffffffffffff808211156105f6576105f66105b4565b604051601f8301601f19908116603f0116810190828211818310171561061e5761061e6105b4565b8160405283815286602085880101111561063757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561066a57600080fd5b823567ffffffffffffffff81111561068157600080fd5b61068d858286016105ca565b95602094909401359450505050565b6000806000606084860312156106b157600080fd5b8335925060208401356001600160a01b03811681146106cf57600080fd5b9150604084013567ffffffffffffffff8111156106eb57600080fd5b6106f7868287016105ca565b9150509250925092565b60005b8381101561071c578181015183820152602001610704565b50506000910152565b60018060a01b03831681526040602082015260008251806040840152610752816060850160208701610701565b601f01601f1916919091016060019392505050565b60006020828403121561077957600080fd5b8151801515811461029457600080fd5b6000825161079b818460208701610701565b919091019291505056fe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a2646970667358221220c25a2780a8ba38f33425ed136eb8d9b9a006afab4a18bf7dc2f7ee7a6665d2b364736f6c63430008190033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [ + { + "ast": { + "nativeSrc": "0:7139:103", + "nodeType": "YulBlock", + "src": "0:7139:103", + "statements": [ + { + "nativeSrc": "6:3:103", + "nodeType": "YulBlock", + "src": "6:3:103", + "statements": [] + }, + { + "body": { + "nativeSrc": "84:110:103", + "nodeType": "YulBlock", + "src": "84:110:103", + "statements": [ + { + "body": { + "nativeSrc": "130:16:103", + "nodeType": "YulBlock", + "src": "130:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "139:1:103", + "nodeType": "YulLiteral", + "src": "139:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "142:1:103", + "nodeType": "YulLiteral", + "src": "142:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "132:6:103", + "nodeType": "YulIdentifier", + "src": "132:6:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulFunctionCall", + "src": "132:12:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulExpressionStatement", + "src": "132:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "105:7:103", + "nodeType": "YulIdentifier", + "src": "105:7:103" + }, + { + "name": "headStart", + "nativeSrc": "114:9:103", + "nodeType": "YulIdentifier", + "src": "114:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "101:3:103", + "nodeType": "YulIdentifier", + "src": "101:3:103" + }, + "nativeSrc": "101:23:103", + "nodeType": "YulFunctionCall", + "src": "101:23:103" + }, + { + "kind": "number", + "nativeSrc": "126:2:103", + "nodeType": "YulLiteral", + "src": "126:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "97:3:103", + "nodeType": "YulIdentifier", + "src": "97:3:103" + }, + "nativeSrc": "97:32:103", + "nodeType": "YulFunctionCall", + "src": "97:32:103" + }, + "nativeSrc": "94:52:103", + "nodeType": "YulIf", + "src": "94:52:103" + }, + { + "nativeSrc": "155:33:103", + "nodeType": "YulAssignment", + "src": "155:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "178:9:103", + "nodeType": "YulIdentifier", + "src": "178:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "165:12:103", + "nodeType": "YulIdentifier", + "src": "165:12:103" + }, + "nativeSrc": "165:23:103", + "nodeType": "YulFunctionCall", + "src": "165:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "155:6:103", + "nodeType": "YulIdentifier", + "src": "155:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32", + "nativeSrc": "14:180:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "50:9:103", + "nodeType": "YulTypedName", + "src": "50:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "61:7:103", + "nodeType": "YulTypedName", + "src": "61:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "73:6:103", + "nodeType": "YulTypedName", + "src": "73:6:103", + "type": "" + } + ], + "src": "14:180:103" + }, + { + "body": { + "nativeSrc": "300:102:103", + "nodeType": "YulBlock", + "src": "300:102:103", + "statements": [ + { + "nativeSrc": "310:26:103", + "nodeType": "YulAssignment", + "src": "310:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "322:9:103", + "nodeType": "YulIdentifier", + "src": "322:9:103" + }, + { + "kind": "number", + "nativeSrc": "333:2:103", + "nodeType": "YulLiteral", + "src": "333:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "318:3:103", + "nodeType": "YulIdentifier", + "src": "318:3:103" + }, + "nativeSrc": "318:18:103", + "nodeType": "YulFunctionCall", + "src": "318:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "310:4:103", + "nodeType": "YulIdentifier", + "src": "310:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "352:9:103", + "nodeType": "YulIdentifier", + "src": "352:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "367:6:103", + "nodeType": "YulIdentifier", + "src": "367:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "383:3:103", + "nodeType": "YulLiteral", + "src": "383:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "388:1:103", + "nodeType": "YulLiteral", + "src": "388:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "379:3:103", + "nodeType": "YulIdentifier", + "src": "379:3:103" + }, + "nativeSrc": "379:11:103", + "nodeType": "YulFunctionCall", + "src": "379:11:103" + }, + { + "kind": "number", + "nativeSrc": "392:1:103", + "nodeType": "YulLiteral", + "src": "392:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "375:3:103", + "nodeType": "YulIdentifier", + "src": "375:3:103" + }, + "nativeSrc": "375:19:103", + "nodeType": "YulFunctionCall", + "src": "375:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "363:3:103", + "nodeType": "YulIdentifier", + "src": "363:3:103" + }, + "nativeSrc": "363:32:103", + "nodeType": "YulFunctionCall", + "src": "363:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "345:6:103", + "nodeType": "YulIdentifier", + "src": "345:6:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulFunctionCall", + "src": "345:51:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulExpressionStatement", + "src": "345:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "199:203:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "269:9:103", + "nodeType": "YulTypedName", + "src": "269:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "280:6:103", + "nodeType": "YulTypedName", + "src": "280:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "291:4:103", + "nodeType": "YulTypedName", + "src": "291:4:103", + "type": "" + } + ], + "src": "199:203:103" + }, + { + "body": { + "nativeSrc": "439:95:103", + "nodeType": "YulBlock", + "src": "439:95:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "456:1:103", + "nodeType": "YulLiteral", + "src": "456:1:103", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "463:3:103", + "nodeType": "YulLiteral", + "src": "463:3:103", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "468:10:103", + "nodeType": "YulLiteral", + "src": "468:10:103", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "459:3:103", + "nodeType": "YulIdentifier", + "src": "459:3:103" + }, + "nativeSrc": "459:20:103", + "nodeType": "YulFunctionCall", + "src": "459:20:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "449:6:103", + "nodeType": "YulIdentifier", + "src": "449:6:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulFunctionCall", + "src": "449:31:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulExpressionStatement", + "src": "449:31:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "496:1:103", + "nodeType": "YulLiteral", + "src": "496:1:103", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "499:4:103", + "nodeType": "YulLiteral", + "src": "499:4:103", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "489:6:103", + "nodeType": "YulIdentifier", + "src": "489:6:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulFunctionCall", + "src": "489:15:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulExpressionStatement", + "src": "489:15:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "520:1:103", + "nodeType": "YulLiteral", + "src": "520:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "523:4:103", + "nodeType": "YulLiteral", + "src": "523:4:103", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "513:6:103", + "nodeType": "YulIdentifier", + "src": "513:6:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulFunctionCall", + "src": "513:15:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulExpressionStatement", + "src": "513:15:103" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "407:127:103", + "nodeType": "YulFunctionDefinition", + "src": "407:127:103" + }, + { + "body": { + "nativeSrc": "591:666:103", + "nodeType": "YulBlock", + "src": "591:666:103", + "statements": [ + { + "body": { + "nativeSrc": "640:16:103", + "nodeType": "YulBlock", + "src": "640:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "649:1:103", + "nodeType": "YulLiteral", + "src": "649:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "652:1:103", + "nodeType": "YulLiteral", + "src": "652:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "642:6:103", + "nodeType": "YulIdentifier", + "src": "642:6:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulFunctionCall", + "src": "642:12:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulExpressionStatement", + "src": "642:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "619:6:103", + "nodeType": "YulIdentifier", + "src": "619:6:103" + }, + { + "kind": "number", + "nativeSrc": "627:4:103", + "nodeType": "YulLiteral", + "src": "627:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "615:3:103", + "nodeType": "YulIdentifier", + "src": "615:3:103" + }, + "nativeSrc": "615:17:103", + "nodeType": "YulFunctionCall", + "src": "615:17:103" + }, + { + "name": "end", + "nativeSrc": "634:3:103", + "nodeType": "YulIdentifier", + "src": "634:3:103" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "611:3:103", + "nodeType": "YulIdentifier", + "src": "611:3:103" + }, + "nativeSrc": "611:27:103", + "nodeType": "YulFunctionCall", + "src": "611:27:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "604:6:103", + "nodeType": "YulIdentifier", + "src": "604:6:103" + }, + "nativeSrc": "604:35:103", + "nodeType": "YulFunctionCall", + "src": "604:35:103" + }, + "nativeSrc": "601:55:103", + "nodeType": "YulIf", + "src": "601:55:103" + }, + { + "nativeSrc": "665:30:103", + "nodeType": "YulVariableDeclaration", + "src": "665:30:103", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "688:6:103", + "nodeType": "YulIdentifier", + "src": "688:6:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "675:12:103", + "nodeType": "YulIdentifier", + "src": "675:12:103" + }, + "nativeSrc": "675:20:103", + "nodeType": "YulFunctionCall", + "src": "675:20:103" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "669:2:103", + "nodeType": "YulTypedName", + "src": "669:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "704:28:103", + "nodeType": "YulVariableDeclaration", + "src": "704:28:103", + "value": { + "kind": "number", + "nativeSrc": "714:18:103", + "nodeType": "YulLiteral", + "src": "714:18:103", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "708:2:103", + "nodeType": "YulTypedName", + "src": "708:2:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "755:22:103", + "nodeType": "YulBlock", + "src": "755:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "757:16:103", + "nodeType": "YulIdentifier", + "src": "757:16:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulFunctionCall", + "src": "757:18:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulExpressionStatement", + "src": "757:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "747:2:103", + "nodeType": "YulIdentifier", + "src": "747:2:103" + }, + { + "name": "_2", + "nativeSrc": "751:2:103", + "nodeType": "YulIdentifier", + "src": "751:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "744:2:103", + "nodeType": "YulIdentifier", + "src": "744:2:103" + }, + "nativeSrc": "744:10:103", + "nodeType": "YulFunctionCall", + "src": "744:10:103" + }, + "nativeSrc": "741:36:103", + "nodeType": "YulIf", + "src": "741:36:103" + }, + { + "nativeSrc": "786:17:103", + "nodeType": "YulVariableDeclaration", + "src": "786:17:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "800:2:103", + "nodeType": "YulLiteral", + "src": "800:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "796:3:103", + "nodeType": "YulIdentifier", + "src": "796:3:103" + }, + "nativeSrc": "796:7:103", + "nodeType": "YulFunctionCall", + "src": "796:7:103" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "790:2:103", + "nodeType": "YulTypedName", + "src": "790:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "812:23:103", + "nodeType": "YulVariableDeclaration", + "src": "812:23:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "832:2:103", + "nodeType": "YulLiteral", + "src": "832:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "826:5:103", + "nodeType": "YulIdentifier", + "src": "826:5:103" + }, + "nativeSrc": "826:9:103", + "nodeType": "YulFunctionCall", + "src": "826:9:103" + }, + "variables": [ + { + "name": "memPtr", + "nativeSrc": "816:6:103", + "nodeType": "YulTypedName", + "src": "816:6:103", + "type": "" + } + ] + }, + { + "nativeSrc": "844:71:103", + "nodeType": "YulVariableDeclaration", + "src": "844:71:103", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "866:6:103", + "nodeType": "YulIdentifier", + "src": "866:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "890:2:103", + "nodeType": "YulIdentifier", + "src": "890:2:103" + }, + { + "kind": "number", + "nativeSrc": "894:4:103", + "nodeType": "YulLiteral", + "src": "894:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "886:3:103", + "nodeType": "YulIdentifier", + "src": "886:3:103" + }, + "nativeSrc": "886:13:103", + "nodeType": "YulFunctionCall", + "src": "886:13:103" + }, + { + "name": "_3", + "nativeSrc": "901:2:103", + "nodeType": "YulIdentifier", + "src": "901:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "882:3:103", + "nodeType": "YulIdentifier", + "src": "882:3:103" + }, + "nativeSrc": "882:22:103", + "nodeType": "YulFunctionCall", + "src": "882:22:103" + }, + { + "kind": "number", + "nativeSrc": "906:2:103", + "nodeType": "YulLiteral", + "src": "906:2:103", + "type": "", + "value": "63" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "878:3:103", + "nodeType": "YulIdentifier", + "src": "878:3:103" + }, + "nativeSrc": "878:31:103", + "nodeType": "YulFunctionCall", + "src": "878:31:103" + }, + { + "name": "_3", + "nativeSrc": "911:2:103", + "nodeType": "YulIdentifier", + "src": "911:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "874:3:103", + "nodeType": "YulIdentifier", + "src": "874:3:103" + }, + "nativeSrc": "874:40:103", + "nodeType": "YulFunctionCall", + "src": "874:40:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "862:3:103", + "nodeType": "YulIdentifier", + "src": "862:3:103" + }, + "nativeSrc": "862:53:103", + "nodeType": "YulFunctionCall", + "src": "862:53:103" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "848:10:103", + "nodeType": "YulTypedName", + "src": "848:10:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "974:22:103", + "nodeType": "YulBlock", + "src": "974:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "976:16:103", + "nodeType": "YulIdentifier", + "src": "976:16:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulFunctionCall", + "src": "976:18:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulExpressionStatement", + "src": "976:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "933:10:103", + "nodeType": "YulIdentifier", + "src": "933:10:103" + }, + { + "name": "_2", + "nativeSrc": "945:2:103", + "nodeType": "YulIdentifier", + "src": "945:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "930:2:103", + "nodeType": "YulIdentifier", + "src": "930:2:103" + }, + "nativeSrc": "930:18:103", + "nodeType": "YulFunctionCall", + "src": "930:18:103" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "953:10:103", + "nodeType": "YulIdentifier", + "src": "953:10:103" + }, + { + "name": "memPtr", + "nativeSrc": "965:6:103", + "nodeType": "YulIdentifier", + "src": "965:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "950:2:103", + "nodeType": "YulIdentifier", + "src": "950:2:103" + }, + "nativeSrc": "950:22:103", + "nodeType": "YulFunctionCall", + "src": "950:22:103" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "927:2:103", + "nodeType": "YulIdentifier", + "src": "927:2:103" + }, + "nativeSrc": "927:46:103", + "nodeType": "YulFunctionCall", + "src": "927:46:103" + }, + "nativeSrc": "924:72:103", + "nodeType": "YulIf", + "src": "924:72:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1012:2:103", + "nodeType": "YulLiteral", + "src": "1012:2:103", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "1016:10:103", + "nodeType": "YulIdentifier", + "src": "1016:10:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1005:6:103", + "nodeType": "YulIdentifier", + "src": "1005:6:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulFunctionCall", + "src": "1005:22:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulExpressionStatement", + "src": "1005:22:103" + }, + { + "expression": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1043:6:103", + "nodeType": "YulIdentifier", + "src": "1043:6:103" + }, + { + "name": "_1", + "nativeSrc": "1051:2:103", + "nodeType": "YulIdentifier", + "src": "1051:2:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1036:6:103", + "nodeType": "YulIdentifier", + "src": "1036:6:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulFunctionCall", + "src": "1036:18:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulExpressionStatement", + "src": "1036:18:103" + }, + { + "body": { + "nativeSrc": "1102:16:103", + "nodeType": "YulBlock", + "src": "1102:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1111:1:103", + "nodeType": "YulLiteral", + "src": "1111:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1114:1:103", + "nodeType": "YulLiteral", + "src": "1114:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1104:6:103", + "nodeType": "YulIdentifier", + "src": "1104:6:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulFunctionCall", + "src": "1104:12:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulExpressionStatement", + "src": "1104:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1077:6:103", + "nodeType": "YulIdentifier", + "src": "1077:6:103" + }, + { + "name": "_1", + "nativeSrc": "1085:2:103", + "nodeType": "YulIdentifier", + "src": "1085:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1073:3:103", + "nodeType": "YulIdentifier", + "src": "1073:3:103" + }, + "nativeSrc": "1073:15:103", + "nodeType": "YulFunctionCall", + "src": "1073:15:103" + }, + { + "kind": "number", + "nativeSrc": "1090:4:103", + "nodeType": "YulLiteral", + "src": "1090:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1069:3:103", + "nodeType": "YulIdentifier", + "src": "1069:3:103" + }, + "nativeSrc": "1069:26:103", + "nodeType": "YulFunctionCall", + "src": "1069:26:103" + }, + { + "name": "end", + "nativeSrc": "1097:3:103", + "nodeType": "YulIdentifier", + "src": "1097:3:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1066:2:103", + "nodeType": "YulIdentifier", + "src": "1066:2:103" + }, + "nativeSrc": "1066:35:103", + "nodeType": "YulFunctionCall", + "src": "1066:35:103" + }, + "nativeSrc": "1063:55:103", + "nodeType": "YulIf", + "src": "1063:55:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1144:6:103", + "nodeType": "YulIdentifier", + "src": "1144:6:103" + }, + { + "kind": "number", + "nativeSrc": "1152:4:103", + "nodeType": "YulLiteral", + "src": "1152:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1140:3:103", + "nodeType": "YulIdentifier", + "src": "1140:3:103" + }, + "nativeSrc": "1140:17:103", + "nodeType": "YulFunctionCall", + "src": "1140:17:103" + }, + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1163:6:103", + "nodeType": "YulIdentifier", + "src": "1163:6:103" + }, + { + "kind": "number", + "nativeSrc": "1171:4:103", + "nodeType": "YulLiteral", + "src": "1171:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1159:3:103", + "nodeType": "YulIdentifier", + "src": "1159:3:103" + }, + "nativeSrc": "1159:17:103", + "nodeType": "YulFunctionCall", + "src": "1159:17:103" + }, + { + "name": "_1", + "nativeSrc": "1178:2:103", + "nodeType": "YulIdentifier", + "src": "1178:2:103" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "1127:12:103", + "nodeType": "YulIdentifier", + "src": "1127:12:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulFunctionCall", + "src": "1127:54:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulExpressionStatement", + "src": "1127:54:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1205:6:103", + "nodeType": "YulIdentifier", + "src": "1205:6:103" + }, + { + "name": "_1", + "nativeSrc": "1213:2:103", + "nodeType": "YulIdentifier", + "src": "1213:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1201:3:103", + "nodeType": "YulIdentifier", + "src": "1201:3:103" + }, + "nativeSrc": "1201:15:103", + "nodeType": "YulFunctionCall", + "src": "1201:15:103" + }, + { + "kind": "number", + "nativeSrc": "1218:4:103", + "nodeType": "YulLiteral", + "src": "1218:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1197:3:103", + "nodeType": "YulIdentifier", + "src": "1197:3:103" + }, + "nativeSrc": "1197:26:103", + "nodeType": "YulFunctionCall", + "src": "1197:26:103" + }, + { + "kind": "number", + "nativeSrc": "1225:1:103", + "nodeType": "YulLiteral", + "src": "1225:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1190:6:103", + "nodeType": "YulIdentifier", + "src": "1190:6:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulFunctionCall", + "src": "1190:37:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulExpressionStatement", + "src": "1190:37:103" + }, + { + "nativeSrc": "1236:15:103", + "nodeType": "YulAssignment", + "src": "1236:15:103", + "value": { + "name": "memPtr", + "nativeSrc": "1245:6:103", + "nodeType": "YulIdentifier", + "src": "1245:6:103" + }, + "variableNames": [ + { + "name": "array", + "nativeSrc": "1236:5:103", + "nodeType": "YulIdentifier", + "src": "1236:5:103" + } + ] + } + ] + }, + "name": "abi_decode_bytes", + "nativeSrc": "539:718:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "565:6:103", + "nodeType": "YulTypedName", + "src": "565:6:103", + "type": "" + }, + { + "name": "end", + "nativeSrc": "573:3:103", + "nodeType": "YulTypedName", + "src": "573:3:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nativeSrc": "581:5:103", + "nodeType": "YulTypedName", + "src": "581:5:103", + "type": "" + } + ], + "src": "539:718:103" + }, + { + "body": { + "nativeSrc": "1358:292:103", + "nodeType": "YulBlock", + "src": "1358:292:103", + "statements": [ + { + "body": { + "nativeSrc": "1404:16:103", + "nodeType": "YulBlock", + "src": "1404:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1413:1:103", + "nodeType": "YulLiteral", + "src": "1413:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1416:1:103", + "nodeType": "YulLiteral", + "src": "1416:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1406:6:103", + "nodeType": "YulIdentifier", + "src": "1406:6:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulFunctionCall", + "src": "1406:12:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulExpressionStatement", + "src": "1406:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1379:7:103", + "nodeType": "YulIdentifier", + "src": "1379:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1388:9:103", + "nodeType": "YulIdentifier", + "src": "1388:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1375:3:103", + "nodeType": "YulIdentifier", + "src": "1375:3:103" + }, + "nativeSrc": "1375:23:103", + "nodeType": "YulFunctionCall", + "src": "1375:23:103" + }, + { + "kind": "number", + "nativeSrc": "1400:2:103", + "nodeType": "YulLiteral", + "src": "1400:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1371:3:103", + "nodeType": "YulIdentifier", + "src": "1371:3:103" + }, + "nativeSrc": "1371:32:103", + "nodeType": "YulFunctionCall", + "src": "1371:32:103" + }, + "nativeSrc": "1368:52:103", + "nodeType": "YulIf", + "src": "1368:52:103" + }, + { + "nativeSrc": "1429:37:103", + "nodeType": "YulVariableDeclaration", + "src": "1429:37:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1456:9:103", + "nodeType": "YulIdentifier", + "src": "1456:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1443:12:103", + "nodeType": "YulIdentifier", + "src": "1443:12:103" + }, + "nativeSrc": "1443:23:103", + "nodeType": "YulFunctionCall", + "src": "1443:23:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "1433:6:103", + "nodeType": "YulTypedName", + "src": "1433:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1509:16:103", + "nodeType": "YulBlock", + "src": "1509:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1518:1:103", + "nodeType": "YulLiteral", + "src": "1518:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1521:1:103", + "nodeType": "YulLiteral", + "src": "1521:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1511:6:103", + "nodeType": "YulIdentifier", + "src": "1511:6:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulFunctionCall", + "src": "1511:12:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulExpressionStatement", + "src": "1511:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1481:6:103", + "nodeType": "YulIdentifier", + "src": "1481:6:103" + }, + { + "kind": "number", + "nativeSrc": "1489:18:103", + "nodeType": "YulLiteral", + "src": "1489:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1478:2:103", + "nodeType": "YulIdentifier", + "src": "1478:2:103" + }, + "nativeSrc": "1478:30:103", + "nodeType": "YulFunctionCall", + "src": "1478:30:103" + }, + "nativeSrc": "1475:50:103", + "nodeType": "YulIf", + "src": "1475:50:103" + }, + { + "nativeSrc": "1534:59:103", + "nodeType": "YulAssignment", + "src": "1534:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1565:9:103", + "nodeType": "YulIdentifier", + "src": "1565:9:103" + }, + { + "name": "offset", + "nativeSrc": "1576:6:103", + "nodeType": "YulIdentifier", + "src": "1576:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1561:3:103", + "nodeType": "YulIdentifier", + "src": "1561:3:103" + }, + "nativeSrc": "1561:22:103", + "nodeType": "YulFunctionCall", + "src": "1561:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "1585:7:103", + "nodeType": "YulIdentifier", + "src": "1585:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "1544:16:103", + "nodeType": "YulIdentifier", + "src": "1544:16:103" + }, + "nativeSrc": "1544:49:103", + "nodeType": "YulFunctionCall", + "src": "1544:49:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1534:6:103", + "nodeType": "YulIdentifier", + "src": "1534:6:103" + } + ] + }, + { + "nativeSrc": "1602:42:103", + "nodeType": "YulAssignment", + "src": "1602:42:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1629:9:103", + "nodeType": "YulIdentifier", + "src": "1629:9:103" + }, + { + "kind": "number", + "nativeSrc": "1640:2:103", + "nodeType": "YulLiteral", + "src": "1640:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1625:3:103", + "nodeType": "YulIdentifier", + "src": "1625:3:103" + }, + "nativeSrc": "1625:18:103", + "nodeType": "YulFunctionCall", + "src": "1625:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1612:12:103", + "nodeType": "YulIdentifier", + "src": "1612:12:103" + }, + "nativeSrc": "1612:32:103", + "nodeType": "YulFunctionCall", + "src": "1612:32:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "1602:6:103", + "nodeType": "YulIdentifier", + "src": "1602:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes_memory_ptrt_bytes32", + "nativeSrc": "1262:388:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1316:9:103", + "nodeType": "YulTypedName", + "src": "1316:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1327:7:103", + "nodeType": "YulTypedName", + "src": "1327:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1339:6:103", + "nodeType": "YulTypedName", + "src": "1339:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1347:6:103", + "nodeType": "YulTypedName", + "src": "1347:6:103", + "type": "" + } + ], + "src": "1262:388:103" + }, + { + "body": { + "nativeSrc": "1768:449:103", + "nodeType": "YulBlock", + "src": "1768:449:103", + "statements": [ + { + "body": { + "nativeSrc": "1814:16:103", + "nodeType": "YulBlock", + "src": "1814:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1823:1:103", + "nodeType": "YulLiteral", + "src": "1823:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1826:1:103", + "nodeType": "YulLiteral", + "src": "1826:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1816:6:103", + "nodeType": "YulIdentifier", + "src": "1816:6:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulFunctionCall", + "src": "1816:12:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulExpressionStatement", + "src": "1816:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1789:7:103", + "nodeType": "YulIdentifier", + "src": "1789:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1798:9:103", + "nodeType": "YulIdentifier", + "src": "1798:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1785:3:103", + "nodeType": "YulIdentifier", + "src": "1785:3:103" + }, + "nativeSrc": "1785:23:103", + "nodeType": "YulFunctionCall", + "src": "1785:23:103" + }, + { + "kind": "number", + "nativeSrc": "1810:2:103", + "nodeType": "YulLiteral", + "src": "1810:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1781:3:103", + "nodeType": "YulIdentifier", + "src": "1781:3:103" + }, + "nativeSrc": "1781:32:103", + "nodeType": "YulFunctionCall", + "src": "1781:32:103" + }, + "nativeSrc": "1778:52:103", + "nodeType": "YulIf", + "src": "1778:52:103" + }, + { + "nativeSrc": "1839:33:103", + "nodeType": "YulAssignment", + "src": "1839:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1862:9:103", + "nodeType": "YulIdentifier", + "src": "1862:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1849:12:103", + "nodeType": "YulIdentifier", + "src": "1849:12:103" + }, + "nativeSrc": "1849:23:103", + "nodeType": "YulFunctionCall", + "src": "1849:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1839:6:103", + "nodeType": "YulIdentifier", + "src": "1839:6:103" + } + ] + }, + { + "nativeSrc": "1881:45:103", + "nodeType": "YulVariableDeclaration", + "src": "1881:45:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1911:9:103", + "nodeType": "YulIdentifier", + "src": "1911:9:103" + }, + { + "kind": "number", + "nativeSrc": "1922:2:103", + "nodeType": "YulLiteral", + "src": "1922:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1907:3:103", + "nodeType": "YulIdentifier", + "src": "1907:3:103" + }, + "nativeSrc": "1907:18:103", + "nodeType": "YulFunctionCall", + "src": "1907:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1894:12:103", + "nodeType": "YulIdentifier", + "src": "1894:12:103" + }, + "nativeSrc": "1894:32:103", + "nodeType": "YulFunctionCall", + "src": "1894:32:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "1885:5:103", + "nodeType": "YulTypedName", + "src": "1885:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1989:16:103", + "nodeType": "YulBlock", + "src": "1989:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1998:1:103", + "nodeType": "YulLiteral", + "src": "1998:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2001:1:103", + "nodeType": "YulLiteral", + "src": "2001:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1991:6:103", + "nodeType": "YulIdentifier", + "src": "1991:6:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulFunctionCall", + "src": "1991:12:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulExpressionStatement", + "src": "1991:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1948:5:103", + "nodeType": "YulIdentifier", + "src": "1948:5:103" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1959:5:103", + "nodeType": "YulIdentifier", + "src": "1959:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1974:3:103", + "nodeType": "YulLiteral", + "src": "1974:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1979:1:103", + "nodeType": "YulLiteral", + "src": "1979:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1970:3:103", + "nodeType": "YulIdentifier", + "src": "1970:3:103" + }, + "nativeSrc": "1970:11:103", + "nodeType": "YulFunctionCall", + "src": "1970:11:103" + }, + { + "kind": "number", + "nativeSrc": "1983:1:103", + "nodeType": "YulLiteral", + "src": "1983:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1966:3:103", + "nodeType": "YulIdentifier", + "src": "1966:3:103" + }, + "nativeSrc": "1966:19:103", + "nodeType": "YulFunctionCall", + "src": "1966:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1955:3:103", + "nodeType": "YulIdentifier", + "src": "1955:3:103" + }, + "nativeSrc": "1955:31:103", + "nodeType": "YulFunctionCall", + "src": "1955:31:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1945:2:103", + "nodeType": "YulIdentifier", + "src": "1945:2:103" + }, + "nativeSrc": "1945:42:103", + "nodeType": "YulFunctionCall", + "src": "1945:42:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1938:6:103", + "nodeType": "YulIdentifier", + "src": "1938:6:103" + }, + "nativeSrc": "1938:50:103", + "nodeType": "YulFunctionCall", + "src": "1938:50:103" + }, + "nativeSrc": "1935:70:103", + "nodeType": "YulIf", + "src": "1935:70:103" + }, + { + "nativeSrc": "2014:15:103", + "nodeType": "YulAssignment", + "src": "2014:15:103", + "value": { + "name": "value", + "nativeSrc": "2024:5:103", + "nodeType": "YulIdentifier", + "src": "2024:5:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2014:6:103", + "nodeType": "YulIdentifier", + "src": "2014:6:103" + } + ] + }, + { + "nativeSrc": "2038:46:103", + "nodeType": "YulVariableDeclaration", + "src": "2038:46:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2069:9:103", + "nodeType": "YulIdentifier", + "src": "2069:9:103" + }, + { + "kind": "number", + "nativeSrc": "2080:2:103", + "nodeType": "YulLiteral", + "src": "2080:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2065:3:103", + "nodeType": "YulIdentifier", + "src": "2065:3:103" + }, + "nativeSrc": "2065:18:103", + "nodeType": "YulFunctionCall", + "src": "2065:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2052:12:103", + "nodeType": "YulIdentifier", + "src": "2052:12:103" + }, + "nativeSrc": "2052:32:103", + "nodeType": "YulFunctionCall", + "src": "2052:32:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "2042:6:103", + "nodeType": "YulTypedName", + "src": "2042:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2127:16:103", + "nodeType": "YulBlock", + "src": "2127:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2136:1:103", + "nodeType": "YulLiteral", + "src": "2136:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2139:1:103", + "nodeType": "YulLiteral", + "src": "2139:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2129:6:103", + "nodeType": "YulIdentifier", + "src": "2129:6:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulFunctionCall", + "src": "2129:12:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulExpressionStatement", + "src": "2129:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2099:6:103", + "nodeType": "YulIdentifier", + "src": "2099:6:103" + }, + { + "kind": "number", + "nativeSrc": "2107:18:103", + "nodeType": "YulLiteral", + "src": "2107:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2096:2:103", + "nodeType": "YulIdentifier", + "src": "2096:2:103" + }, + "nativeSrc": "2096:30:103", + "nodeType": "YulFunctionCall", + "src": "2096:30:103" + }, + "nativeSrc": "2093:50:103", + "nodeType": "YulIf", + "src": "2093:50:103" + }, + { + "nativeSrc": "2152:59:103", + "nodeType": "YulAssignment", + "src": "2152:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2183:9:103", + "nodeType": "YulIdentifier", + "src": "2183:9:103" + }, + { + "name": "offset", + "nativeSrc": "2194:6:103", + "nodeType": "YulIdentifier", + "src": "2194:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2179:3:103", + "nodeType": "YulIdentifier", + "src": "2179:3:103" + }, + "nativeSrc": "2179:22:103", + "nodeType": "YulFunctionCall", + "src": "2179:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "2203:7:103", + "nodeType": "YulIdentifier", + "src": "2203:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "2162:16:103", + "nodeType": "YulIdentifier", + "src": "2162:16:103" + }, + "nativeSrc": "2162:49:103", + "nodeType": "YulFunctionCall", + "src": "2162:49:103" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "2152:6:103", + "nodeType": "YulIdentifier", + "src": "2152:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr", + "nativeSrc": "1655:562:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1718:9:103", + "nodeType": "YulTypedName", + "src": "1718:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1729:7:103", + "nodeType": "YulTypedName", + "src": "1729:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1741:6:103", + "nodeType": "YulTypedName", + "src": "1741:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1749:6:103", + "nodeType": "YulTypedName", + "src": "1749:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1757:6:103", + "nodeType": "YulTypedName", + "src": "1757:6:103", + "type": "" + } + ], + "src": "1655:562:103" + }, + { + "body": { + "nativeSrc": "2351:102:103", + "nodeType": "YulBlock", + "src": "2351:102:103", + "statements": [ + { + "nativeSrc": "2361:26:103", + "nodeType": "YulAssignment", + "src": "2361:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2373:9:103", + "nodeType": "YulIdentifier", + "src": "2373:9:103" + }, + { + "kind": "number", + "nativeSrc": "2384:2:103", + "nodeType": "YulLiteral", + "src": "2384:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2369:3:103", + "nodeType": "YulIdentifier", + "src": "2369:3:103" + }, + "nativeSrc": "2369:18:103", + "nodeType": "YulFunctionCall", + "src": "2369:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2361:4:103", + "nodeType": "YulIdentifier", + "src": "2361:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2403:9:103", + "nodeType": "YulIdentifier", + "src": "2403:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2418:6:103", + "nodeType": "YulIdentifier", + "src": "2418:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2434:3:103", + "nodeType": "YulLiteral", + "src": "2434:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2439:1:103", + "nodeType": "YulLiteral", + "src": "2439:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2430:3:103", + "nodeType": "YulIdentifier", + "src": "2430:3:103" + }, + "nativeSrc": "2430:11:103", + "nodeType": "YulFunctionCall", + "src": "2430:11:103" + }, + { + "kind": "number", + "nativeSrc": "2443:1:103", + "nodeType": "YulLiteral", + "src": "2443:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2426:3:103", + "nodeType": "YulIdentifier", + "src": "2426:3:103" + }, + "nativeSrc": "2426:19:103", + "nodeType": "YulFunctionCall", + "src": "2426:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2414:3:103", + "nodeType": "YulIdentifier", + "src": "2414:3:103" + }, + "nativeSrc": "2414:32:103", + "nodeType": "YulFunctionCall", + "src": "2414:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2396:6:103", + "nodeType": "YulIdentifier", + "src": "2396:6:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulFunctionCall", + "src": "2396:51:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulExpressionStatement", + "src": "2396:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed", + "nativeSrc": "2222:231:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2320:9:103", + "nodeType": "YulTypedName", + "src": "2320:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2331:6:103", + "nodeType": "YulTypedName", + "src": "2331:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2342:4:103", + "nodeType": "YulTypedName", + "src": "2342:4:103", + "type": "" + } + ], + "src": "2222:231:103" + }, + { + "body": { + "nativeSrc": "2632:223:103", + "nodeType": "YulBlock", + "src": "2632:223:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2649:9:103", + "nodeType": "YulIdentifier", + "src": "2649:9:103" + }, + { + "kind": "number", + "nativeSrc": "2660:2:103", + "nodeType": "YulLiteral", + "src": "2660:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2642:6:103", + "nodeType": "YulIdentifier", + "src": "2642:6:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulFunctionCall", + "src": "2642:21:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulExpressionStatement", + "src": "2642:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2683:9:103", + "nodeType": "YulIdentifier", + "src": "2683:9:103" + }, + { + "kind": "number", + "nativeSrc": "2694:2:103", + "nodeType": "YulLiteral", + "src": "2694:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2679:3:103", + "nodeType": "YulIdentifier", + "src": "2679:3:103" + }, + "nativeSrc": "2679:18:103", + "nodeType": "YulFunctionCall", + "src": "2679:18:103" + }, + { + "kind": "number", + "nativeSrc": "2699:2:103", + "nodeType": "YulLiteral", + "src": "2699:2:103", + "type": "", + "value": "33" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2672:6:103", + "nodeType": "YulIdentifier", + "src": "2672:6:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulFunctionCall", + "src": "2672:30:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulExpressionStatement", + "src": "2672:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2722:9:103", + "nodeType": "YulIdentifier", + "src": "2722:9:103" + }, + { + "kind": "number", + "nativeSrc": "2733:2:103", + "nodeType": "YulLiteral", + "src": "2733:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2718:3:103", + "nodeType": "YulIdentifier", + "src": "2718:3:103" + }, + "nativeSrc": "2718:18:103", + "nodeType": "YulFunctionCall", + "src": "2718:18:103" + }, + { + "hexValue": "5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c65", + "kind": "string", + "nativeSrc": "2738:34:103", + "nodeType": "YulLiteral", + "src": "2738:34:103", + "type": "", + "value": "WitnetDeployer: deployment faile" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2711:6:103", + "nodeType": "YulIdentifier", + "src": "2711:6:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulFunctionCall", + "src": "2711:62:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulExpressionStatement", + "src": "2711:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2793:9:103", + "nodeType": "YulIdentifier", + "src": "2793:9:103" + }, + { + "kind": "number", + "nativeSrc": "2804:2:103", + "nodeType": "YulLiteral", + "src": "2804:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2789:3:103", + "nodeType": "YulIdentifier", + "src": "2789:3:103" + }, + "nativeSrc": "2789:18:103", + "nodeType": "YulFunctionCall", + "src": "2789:18:103" + }, + { + "hexValue": "64", + "kind": "string", + "nativeSrc": "2809:3:103", + "nodeType": "YulLiteral", + "src": "2809:3:103", + "type": "", + "value": "d" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2782:6:103", + "nodeType": "YulIdentifier", + "src": "2782:6:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulFunctionCall", + "src": "2782:31:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulExpressionStatement", + "src": "2782:31:103" + }, + { + "nativeSrc": "2822:27:103", + "nodeType": "YulAssignment", + "src": "2822:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2834:9:103", + "nodeType": "YulIdentifier", + "src": "2834:9:103" + }, + { + "kind": "number", + "nativeSrc": "2845:3:103", + "nodeType": "YulLiteral", + "src": "2845:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2830:3:103", + "nodeType": "YulIdentifier", + "src": "2830:3:103" + }, + "nativeSrc": "2830:19:103", + "nodeType": "YulFunctionCall", + "src": "2830:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2822:4:103", + "nodeType": "YulIdentifier", + "src": "2822:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "2458:397:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2609:9:103", + "nodeType": "YulTypedName", + "src": "2609:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2623:4:103", + "nodeType": "YulTypedName", + "src": "2623:4:103", + "type": "" + } + ], + "src": "2458:397:103" + }, + { + "body": { + "nativeSrc": "2926:184:103", + "nodeType": "YulBlock", + "src": "2926:184:103", + "statements": [ + { + "nativeSrc": "2936:10:103", + "nodeType": "YulVariableDeclaration", + "src": "2936:10:103", + "value": { + "kind": "number", + "nativeSrc": "2945:1:103", + "nodeType": "YulLiteral", + "src": "2945:1:103", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "2940:1:103", + "nodeType": "YulTypedName", + "src": "2940:1:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3005:63:103", + "nodeType": "YulBlock", + "src": "3005:63:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "3030:3:103", + "nodeType": "YulIdentifier", + "src": "3030:3:103" + }, + { + "name": "i", + "nativeSrc": "3035:1:103", + "nodeType": "YulIdentifier", + "src": "3035:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3026:3:103", + "nodeType": "YulIdentifier", + "src": "3026:3:103" + }, + "nativeSrc": "3026:11:103", + "nodeType": "YulFunctionCall", + "src": "3026:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3049:3:103", + "nodeType": "YulIdentifier", + "src": "3049:3:103" + }, + { + "name": "i", + "nativeSrc": "3054:1:103", + "nodeType": "YulIdentifier", + "src": "3054:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3045:3:103", + "nodeType": "YulIdentifier", + "src": "3045:3:103" + }, + "nativeSrc": "3045:11:103", + "nodeType": "YulFunctionCall", + "src": "3045:11:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3039:5:103", + "nodeType": "YulIdentifier", + "src": "3039:5:103" + }, + "nativeSrc": "3039:18:103", + "nodeType": "YulFunctionCall", + "src": "3039:18:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3019:6:103", + "nodeType": "YulIdentifier", + "src": "3019:6:103" + }, + "nativeSrc": "3019:39:103", + "nodeType": "YulFunctionCall", + "src": "3019:39:103" + }, + "nativeSrc": "3019:39:103", + "nodeType": "YulExpressionStatement", + "src": "3019:39:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2966:1:103", + "nodeType": "YulIdentifier", + "src": "2966:1:103" + }, + { + "name": "length", + "nativeSrc": "2969:6:103", + "nodeType": "YulIdentifier", + "src": "2969:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2963:2:103", + "nodeType": "YulIdentifier", + "src": "2963:2:103" + }, + "nativeSrc": "2963:13:103", + "nodeType": "YulFunctionCall", + "src": "2963:13:103" + }, + "nativeSrc": "2955:113:103", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "2977:19:103", + "nodeType": "YulBlock", + "src": "2977:19:103", + "statements": [ + { + "nativeSrc": "2979:15:103", + "nodeType": "YulAssignment", + "src": "2979:15:103", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2988:1:103", + "nodeType": "YulIdentifier", + "src": "2988:1:103" + }, + { + "kind": "number", + "nativeSrc": "2991:2:103", + "nodeType": "YulLiteral", + "src": "2991:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2984:3:103", + "nodeType": "YulIdentifier", + "src": "2984:3:103" + }, + "nativeSrc": "2984:10:103", + "nodeType": "YulFunctionCall", + "src": "2984:10:103" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "2979:1:103", + "nodeType": "YulIdentifier", + "src": "2979:1:103" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "2959:3:103", + "nodeType": "YulBlock", + "src": "2959:3:103", + "statements": [] + }, + "src": "2955:113:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "3088:3:103", + "nodeType": "YulIdentifier", + "src": "3088:3:103" + }, + { + "name": "length", + "nativeSrc": "3093:6:103", + "nodeType": "YulIdentifier", + "src": "3093:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3084:3:103", + "nodeType": "YulIdentifier", + "src": "3084:3:103" + }, + "nativeSrc": "3084:16:103", + "nodeType": "YulFunctionCall", + "src": "3084:16:103" + }, + { + "kind": "number", + "nativeSrc": "3102:1:103", + "nodeType": "YulLiteral", + "src": "3102:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3077:6:103", + "nodeType": "YulIdentifier", + "src": "3077:6:103" + }, + "nativeSrc": "3077:27:103", + "nodeType": "YulFunctionCall", + "src": "3077:27:103" + }, + "nativeSrc": "3077:27:103", + "nodeType": "YulExpressionStatement", + "src": "3077:27:103" + } + ] + }, + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "2860:250:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nativeSrc": "2904:3:103", + "nodeType": "YulTypedName", + "src": "2904:3:103", + "type": "" + }, + { + "name": "dst", + "nativeSrc": "2909:3:103", + "nodeType": "YulTypedName", + "src": "2909:3:103", + "type": "" + }, + { + "name": "length", + "nativeSrc": "2914:6:103", + "nodeType": "YulTypedName", + "src": "2914:6:103", + "type": "" + } + ], + "src": "2860:250:103" + }, + { + "body": { + "nativeSrc": "3262:344:103", + "nodeType": "YulBlock", + "src": "3262:344:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3279:9:103", + "nodeType": "YulIdentifier", + "src": "3279:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3294:6:103", + "nodeType": "YulIdentifier", + "src": "3294:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3310:3:103", + "nodeType": "YulLiteral", + "src": "3310:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3315:1:103", + "nodeType": "YulLiteral", + "src": "3315:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3306:3:103", + "nodeType": "YulIdentifier", + "src": "3306:3:103" + }, + "nativeSrc": "3306:11:103", + "nodeType": "YulFunctionCall", + "src": "3306:11:103" + }, + { + "kind": "number", + "nativeSrc": "3319:1:103", + "nodeType": "YulLiteral", + "src": "3319:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3302:3:103", + "nodeType": "YulIdentifier", + "src": "3302:3:103" + }, + "nativeSrc": "3302:19:103", + "nodeType": "YulFunctionCall", + "src": "3302:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3290:3:103", + "nodeType": "YulIdentifier", + "src": "3290:3:103" + }, + "nativeSrc": "3290:32:103", + "nodeType": "YulFunctionCall", + "src": "3290:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3272:6:103", + "nodeType": "YulIdentifier", + "src": "3272:6:103" + }, + "nativeSrc": "3272:51:103", + "nodeType": "YulFunctionCall", + "src": "3272:51:103" + }, + "nativeSrc": "3272:51:103", + "nodeType": "YulExpressionStatement", + "src": "3272:51:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3343:9:103", + "nodeType": "YulIdentifier", + "src": "3343:9:103" + }, + { + "kind": "number", + "nativeSrc": "3354:2:103", + "nodeType": "YulLiteral", + "src": "3354:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3339:3:103", + "nodeType": "YulIdentifier", + "src": "3339:3:103" + }, + "nativeSrc": "3339:18:103", + "nodeType": "YulFunctionCall", + "src": "3339:18:103" + }, + { + "kind": "number", + "nativeSrc": "3359:2:103", + "nodeType": "YulLiteral", + "src": "3359:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3332:6:103", + "nodeType": "YulIdentifier", + "src": "3332:6:103" + }, + "nativeSrc": "3332:30:103", + "nodeType": "YulFunctionCall", + "src": "3332:30:103" + }, + "nativeSrc": "3332:30:103", + "nodeType": "YulExpressionStatement", + "src": "3332:30:103" + }, + { + "nativeSrc": "3371:27:103", + "nodeType": "YulVariableDeclaration", + "src": "3371:27:103", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3391:6:103", + "nodeType": "YulIdentifier", + "src": "3391:6:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3385:5:103", + "nodeType": "YulIdentifier", + "src": "3385:5:103" + }, + "nativeSrc": "3385:13:103", + "nodeType": "YulFunctionCall", + "src": "3385:13:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "3375:6:103", + "nodeType": "YulTypedName", + "src": "3375:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3418:9:103", + "nodeType": "YulIdentifier", + "src": "3418:9:103" + }, + { + "kind": "number", + "nativeSrc": "3429:2:103", + "nodeType": "YulLiteral", + "src": "3429:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3414:3:103", + "nodeType": "YulIdentifier", + "src": "3414:3:103" + }, + "nativeSrc": "3414:18:103", + "nodeType": "YulFunctionCall", + "src": "3414:18:103" + }, + { + "name": "length", + "nativeSrc": "3434:6:103", + "nodeType": "YulIdentifier", + "src": "3434:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3407:6:103", + "nodeType": "YulIdentifier", + "src": "3407:6:103" + }, + "nativeSrc": "3407:34:103", + "nodeType": "YulFunctionCall", + "src": "3407:34:103" + }, + "nativeSrc": "3407:34:103", + "nodeType": "YulExpressionStatement", + "src": "3407:34:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3489:6:103", + "nodeType": "YulIdentifier", + "src": "3489:6:103" + }, + { + "kind": "number", + "nativeSrc": "3497:2:103", + "nodeType": "YulLiteral", + "src": "3497:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3485:3:103", + "nodeType": "YulIdentifier", + "src": "3485:3:103" + }, + "nativeSrc": "3485:15:103", + "nodeType": "YulFunctionCall", + "src": "3485:15:103" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3506:9:103", + "nodeType": "YulIdentifier", + "src": "3506:9:103" + }, + { + "kind": "number", + "nativeSrc": "3517:2:103", + "nodeType": "YulLiteral", + "src": "3517:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3502:3:103", + "nodeType": "YulIdentifier", + "src": "3502:3:103" + }, + "nativeSrc": "3502:18:103", + "nodeType": "YulFunctionCall", + "src": "3502:18:103" + }, + { + "name": "length", + "nativeSrc": "3522:6:103", + "nodeType": "YulIdentifier", + "src": "3522:6:103" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "3450:34:103", + "nodeType": "YulIdentifier", + "src": "3450:34:103" + }, + "nativeSrc": "3450:79:103", + "nodeType": "YulFunctionCall", + "src": "3450:79:103" + }, + "nativeSrc": "3450:79:103", + "nodeType": "YulExpressionStatement", + "src": "3450:79:103" + }, + { + "nativeSrc": "3538:62:103", + "nodeType": "YulAssignment", + "src": "3538:62:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3554:9:103", + "nodeType": "YulIdentifier", + "src": "3554:9:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "3573:6:103", + "nodeType": "YulIdentifier", + "src": "3573:6:103" + }, + { + "kind": "number", + "nativeSrc": "3581:2:103", + "nodeType": "YulLiteral", + "src": "3581:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3569:3:103", + "nodeType": "YulIdentifier", + "src": "3569:3:103" + }, + "nativeSrc": "3569:15:103", + "nodeType": "YulFunctionCall", + "src": "3569:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3590:2:103", + "nodeType": "YulLiteral", + "src": "3590:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3586:3:103", + "nodeType": "YulIdentifier", + "src": "3586:3:103" + }, + "nativeSrc": "3586:7:103", + "nodeType": "YulFunctionCall", + "src": "3586:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3565:3:103", + "nodeType": "YulIdentifier", + "src": "3565:3:103" + }, + "nativeSrc": "3565:29:103", + "nodeType": "YulFunctionCall", + "src": "3565:29:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3550:3:103", + "nodeType": "YulIdentifier", + "src": "3550:3:103" + }, + "nativeSrc": "3550:45:103", + "nodeType": "YulFunctionCall", + "src": "3550:45:103" + }, + { + "kind": "number", + "nativeSrc": "3597:2:103", + "nodeType": "YulLiteral", + "src": "3597:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3546:3:103", + "nodeType": "YulIdentifier", + "src": "3546:3:103" + }, + "nativeSrc": "3546:54:103", + "nodeType": "YulFunctionCall", + "src": "3546:54:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3538:4:103", + "nodeType": "YulIdentifier", + "src": "3538:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "3115:491:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3223:9:103", + "nodeType": "YulTypedName", + "src": "3223:9:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "3234:6:103", + "nodeType": "YulTypedName", + "src": "3234:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3242:6:103", + "nodeType": "YulTypedName", + "src": "3242:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3253:4:103", + "nodeType": "YulTypedName", + "src": "3253:4:103", + "type": "" + } + ], + "src": "3115:491:103" + }, + { + "body": { + "nativeSrc": "3689:199:103", + "nodeType": "YulBlock", + "src": "3689:199:103", + "statements": [ + { + "body": { + "nativeSrc": "3735:16:103", + "nodeType": "YulBlock", + "src": "3735:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3744:1:103", + "nodeType": "YulLiteral", + "src": "3744:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3747:1:103", + "nodeType": "YulLiteral", + "src": "3747:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3737:6:103", + "nodeType": "YulIdentifier", + "src": "3737:6:103" + }, + "nativeSrc": "3737:12:103", + "nodeType": "YulFunctionCall", + "src": "3737:12:103" + }, + "nativeSrc": "3737:12:103", + "nodeType": "YulExpressionStatement", + "src": "3737:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3710:7:103", + "nodeType": "YulIdentifier", + "src": "3710:7:103" + }, + { + "name": "headStart", + "nativeSrc": "3719:9:103", + "nodeType": "YulIdentifier", + "src": "3719:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3706:3:103", + "nodeType": "YulIdentifier", + "src": "3706:3:103" + }, + "nativeSrc": "3706:23:103", + "nodeType": "YulFunctionCall", + "src": "3706:23:103" + }, + { + "kind": "number", + "nativeSrc": "3731:2:103", + "nodeType": "YulLiteral", + "src": "3731:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3702:3:103", + "nodeType": "YulIdentifier", + "src": "3702:3:103" + }, + "nativeSrc": "3702:32:103", + "nodeType": "YulFunctionCall", + "src": "3702:32:103" + }, + "nativeSrc": "3699:52:103", + "nodeType": "YulIf", + "src": "3699:52:103" + }, + { + "nativeSrc": "3760:29:103", + "nodeType": "YulVariableDeclaration", + "src": "3760:29:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3779:9:103", + "nodeType": "YulIdentifier", + "src": "3779:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3773:5:103", + "nodeType": "YulIdentifier", + "src": "3773:5:103" + }, + "nativeSrc": "3773:16:103", + "nodeType": "YulFunctionCall", + "src": "3773:16:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3764:5:103", + "nodeType": "YulTypedName", + "src": "3764:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3842:16:103", + "nodeType": "YulBlock", + "src": "3842:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3851:1:103", + "nodeType": "YulLiteral", + "src": "3851:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3854:1:103", + "nodeType": "YulLiteral", + "src": "3854:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3844:6:103", + "nodeType": "YulIdentifier", + "src": "3844:6:103" + }, + "nativeSrc": "3844:12:103", + "nodeType": "YulFunctionCall", + "src": "3844:12:103" + }, + "nativeSrc": "3844:12:103", + "nodeType": "YulExpressionStatement", + "src": "3844:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3811:5:103", + "nodeType": "YulIdentifier", + "src": "3811:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3832:5:103", + "nodeType": "YulIdentifier", + "src": "3832:5:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3825:6:103", + "nodeType": "YulIdentifier", + "src": "3825:6:103" + }, + "nativeSrc": "3825:13:103", + "nodeType": "YulFunctionCall", + "src": "3825:13:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3818:6:103", + "nodeType": "YulIdentifier", + "src": "3818:6:103" + }, + "nativeSrc": "3818:21:103", + "nodeType": "YulFunctionCall", + "src": "3818:21:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "3808:2:103", + "nodeType": "YulIdentifier", + "src": "3808:2:103" + }, + "nativeSrc": "3808:32:103", + "nodeType": "YulFunctionCall", + "src": "3808:32:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3801:6:103", + "nodeType": "YulIdentifier", + "src": "3801:6:103" + }, + "nativeSrc": "3801:40:103", + "nodeType": "YulFunctionCall", + "src": "3801:40:103" + }, + "nativeSrc": "3798:60:103", + "nodeType": "YulIf", + "src": "3798:60:103" + }, + { + "nativeSrc": "3867:15:103", + "nodeType": "YulAssignment", + "src": "3867:15:103", + "value": { + "name": "value", + "nativeSrc": "3877:5:103", + "nodeType": "YulIdentifier", + "src": "3877:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3867:6:103", + "nodeType": "YulIdentifier", + "src": "3867:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nativeSrc": "3611:277:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3655:9:103", + "nodeType": "YulTypedName", + "src": "3655:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3666:7:103", + "nodeType": "YulTypedName", + "src": "3666:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3678:6:103", + "nodeType": "YulTypedName", + "src": "3678:6:103", + "type": "" + } + ], + "src": "3611:277:103" + }, + { + "body": { + "nativeSrc": "4067:223:103", + "nodeType": "YulBlock", + "src": "4067:223:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4084:9:103", + "nodeType": "YulIdentifier", + "src": "4084:9:103" + }, + { + "kind": "number", + "nativeSrc": "4095:2:103", + "nodeType": "YulLiteral", + "src": "4095:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4077:6:103", + "nodeType": "YulIdentifier", + "src": "4077:6:103" + }, + "nativeSrc": "4077:21:103", + "nodeType": "YulFunctionCall", + "src": "4077:21:103" + }, + "nativeSrc": "4077:21:103", + "nodeType": "YulExpressionStatement", + "src": "4077:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4118:9:103", + "nodeType": "YulIdentifier", + "src": "4118:9:103" + }, + { + "kind": "number", + "nativeSrc": "4129:2:103", + "nodeType": "YulLiteral", + "src": "4129:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4114:3:103", + "nodeType": "YulIdentifier", + "src": "4114:3:103" + }, + "nativeSrc": "4114:18:103", + "nodeType": "YulFunctionCall", + "src": "4114:18:103" + }, + { + "kind": "number", + "nativeSrc": "4134:2:103", + "nodeType": "YulLiteral", + "src": "4134:2:103", + "type": "", + "value": "33" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4107:6:103", + "nodeType": "YulIdentifier", + "src": "4107:6:103" + }, + "nativeSrc": "4107:30:103", + "nodeType": "YulFunctionCall", + "src": "4107:30:103" + }, + "nativeSrc": "4107:30:103", + "nodeType": "YulExpressionStatement", + "src": "4107:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4157:9:103", + "nodeType": "YulIdentifier", + "src": "4157:9:103" + }, + { + "kind": "number", + "nativeSrc": "4168:2:103", + "nodeType": "YulLiteral", + "src": "4168:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4153:3:103", + "nodeType": "YulIdentifier", + "src": "4153:3:103" + }, + "nativeSrc": "4153:18:103", + "nodeType": "YulFunctionCall", + "src": "4153:18:103" + }, + { + "hexValue": "5769746e65744465706c6f7965723a20616c72656164792070726f7869666965", + "kind": "string", + "nativeSrc": "4173:34:103", + "nodeType": "YulLiteral", + "src": "4173:34:103", + "type": "", + "value": "WitnetDeployer: already proxifie" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4146:6:103", + "nodeType": "YulIdentifier", + "src": "4146:6:103" + }, + "nativeSrc": "4146:62:103", + "nodeType": "YulFunctionCall", + "src": "4146:62:103" + }, + "nativeSrc": "4146:62:103", + "nodeType": "YulExpressionStatement", + "src": "4146:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4228:9:103", + "nodeType": "YulIdentifier", + "src": "4228:9:103" + }, + { + "kind": "number", + "nativeSrc": "4239:2:103", + "nodeType": "YulLiteral", + "src": "4239:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4224:3:103", + "nodeType": "YulIdentifier", + "src": "4224:3:103" + }, + "nativeSrc": "4224:18:103", + "nodeType": "YulFunctionCall", + "src": "4224:18:103" + }, + { + "hexValue": "64", + "kind": "string", + "nativeSrc": "4244:3:103", + "nodeType": "YulLiteral", + "src": "4244:3:103", + "type": "", + "value": "d" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4217:6:103", + "nodeType": "YulIdentifier", + "src": "4217:6:103" + }, + "nativeSrc": "4217:31:103", + "nodeType": "YulFunctionCall", + "src": "4217:31:103" + }, + "nativeSrc": "4217:31:103", + "nodeType": "YulExpressionStatement", + "src": "4217:31:103" + }, + { + "nativeSrc": "4257:27:103", + "nodeType": "YulAssignment", + "src": "4257:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4269:9:103", + "nodeType": "YulIdentifier", + "src": "4269:9:103" + }, + { + "kind": "number", + "nativeSrc": "4280:3:103", + "nodeType": "YulLiteral", + "src": "4280:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4265:3:103", + "nodeType": "YulIdentifier", + "src": "4265:3:103" + }, + "nativeSrc": "4265:19:103", + "nodeType": "YulFunctionCall", + "src": "4265:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4257:4:103", + "nodeType": "YulIdentifier", + "src": "4257:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_07010c659982893c2bfaa9066955408f5c67d963251677f65ceecaf6871b6734__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3893:397:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4044:9:103", + "nodeType": "YulTypedName", + "src": "4044:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4058:4:103", + "nodeType": "YulTypedName", + "src": "4058:4:103", + "type": "" + } + ], + "src": "3893:397:103" + }, + { + "body": { + "nativeSrc": "4496:240:103", + "nodeType": "YulBlock", + "src": "4496:240:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4513:3:103", + "nodeType": "YulIdentifier", + "src": "4513:3:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4522:6:103", + "nodeType": "YulIdentifier", + "src": "4522:6:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4534:3:103", + "nodeType": "YulLiteral", + "src": "4534:3:103", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "4539:3:103", + "nodeType": "YulLiteral", + "src": "4539:3:103", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4530:3:103", + "nodeType": "YulIdentifier", + "src": "4530:3:103" + }, + "nativeSrc": "4530:13:103", + "nodeType": "YulFunctionCall", + "src": "4530:13:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4518:3:103", + "nodeType": "YulIdentifier", + "src": "4518:3:103" + }, + "nativeSrc": "4518:26:103", + "nodeType": "YulFunctionCall", + "src": "4518:26:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4506:6:103", + "nodeType": "YulIdentifier", + "src": "4506:6:103" + }, + "nativeSrc": "4506:39:103", + "nodeType": "YulFunctionCall", + "src": "4506:39:103" + }, + "nativeSrc": "4506:39:103", + "nodeType": "YulExpressionStatement", + "src": "4506:39:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4565:3:103", + "nodeType": "YulIdentifier", + "src": "4565:3:103" + }, + { + "kind": "number", + "nativeSrc": "4570:1:103", + "nodeType": "YulLiteral", + "src": "4570:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4561:3:103", + "nodeType": "YulIdentifier", + "src": "4561:3:103" + }, + "nativeSrc": "4561:11:103", + "nodeType": "YulFunctionCall", + "src": "4561:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4582:2:103", + "nodeType": "YulLiteral", + "src": "4582:2:103", + "type": "", + "value": "96" + }, + { + "name": "value1", + "nativeSrc": "4586:6:103", + "nodeType": "YulIdentifier", + "src": "4586:6:103" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4578:3:103", + "nodeType": "YulIdentifier", + "src": "4578:3:103" + }, + "nativeSrc": "4578:15:103", + "nodeType": "YulFunctionCall", + "src": "4578:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4599:26:103", + "nodeType": "YulLiteral", + "src": "4599:26:103", + "type": "", + "value": "0xffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4595:3:103", + "nodeType": "YulIdentifier", + "src": "4595:3:103" + }, + "nativeSrc": "4595:31:103", + "nodeType": "YulFunctionCall", + "src": "4595:31:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4574:3:103", + "nodeType": "YulIdentifier", + "src": "4574:3:103" + }, + "nativeSrc": "4574:53:103", + "nodeType": "YulFunctionCall", + "src": "4574:53:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4554:6:103", + "nodeType": "YulIdentifier", + "src": "4554:6:103" + }, + "nativeSrc": "4554:74:103", + "nodeType": "YulFunctionCall", + "src": "4554:74:103" + }, + "nativeSrc": "4554:74:103", + "nodeType": "YulExpressionStatement", + "src": "4554:74:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4648:3:103", + "nodeType": "YulIdentifier", + "src": "4648:3:103" + }, + { + "kind": "number", + "nativeSrc": "4653:2:103", + "nodeType": "YulLiteral", + "src": "4653:2:103", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4644:3:103", + "nodeType": "YulIdentifier", + "src": "4644:3:103" + }, + "nativeSrc": "4644:12:103", + "nodeType": "YulFunctionCall", + "src": "4644:12:103" + }, + { + "name": "value2", + "nativeSrc": "4658:6:103", + "nodeType": "YulIdentifier", + "src": "4658:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4637:6:103", + "nodeType": "YulIdentifier", + "src": "4637:6:103" + }, + "nativeSrc": "4637:28:103", + "nodeType": "YulFunctionCall", + "src": "4637:28:103" + }, + "nativeSrc": "4637:28:103", + "nodeType": "YulExpressionStatement", + "src": "4637:28:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4685:3:103", + "nodeType": "YulIdentifier", + "src": "4685:3:103" + }, + { + "kind": "number", + "nativeSrc": "4690:2:103", + "nodeType": "YulLiteral", + "src": "4690:2:103", + "type": "", + "value": "53" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4681:3:103", + "nodeType": "YulIdentifier", + "src": "4681:3:103" + }, + "nativeSrc": "4681:12:103", + "nodeType": "YulFunctionCall", + "src": "4681:12:103" + }, + { + "name": "value3", + "nativeSrc": "4695:6:103", + "nodeType": "YulIdentifier", + "src": "4695:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4674:6:103", + "nodeType": "YulIdentifier", + "src": "4674:6:103" + }, + "nativeSrc": "4674:28:103", + "nodeType": "YulFunctionCall", + "src": "4674:28:103" + }, + "nativeSrc": "4674:28:103", + "nodeType": "YulExpressionStatement", + "src": "4674:28:103" + }, + { + "nativeSrc": "4711:19:103", + "nodeType": "YulAssignment", + "src": "4711:19:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4722:3:103", + "nodeType": "YulIdentifier", + "src": "4722:3:103" + }, + { + "kind": "number", + "nativeSrc": "4727:2:103", + "nodeType": "YulLiteral", + "src": "4727:2:103", + "type": "", + "value": "85" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4718:3:103", + "nodeType": "YulIdentifier", + "src": "4718:3:103" + }, + "nativeSrc": "4718:12:103", + "nodeType": "YulFunctionCall", + "src": "4718:12:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "4711:3:103", + "nodeType": "YulIdentifier", + "src": "4711:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "4295:441:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "4448:3:103", + "nodeType": "YulTypedName", + "src": "4448:3:103", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "4453:6:103", + "nodeType": "YulTypedName", + "src": "4453:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "4461:6:103", + "nodeType": "YulTypedName", + "src": "4461:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4469:6:103", + "nodeType": "YulTypedName", + "src": "4469:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4477:6:103", + "nodeType": "YulTypedName", + "src": "4477:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "4488:3:103", + "nodeType": "YulTypedName", + "src": "4488:3:103", + "type": "" + } + ], + "src": "4295:441:103" + }, + { + "body": { + "nativeSrc": "5017:227:103", + "nodeType": "YulBlock", + "src": "5017:227:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5034:3:103", + "nodeType": "YulIdentifier", + "src": "5034:3:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5043:3:103", + "nodeType": "YulLiteral", + "src": "5043:3:103", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "5048:3:103", + "nodeType": "YulLiteral", + "src": "5048:3:103", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5039:3:103", + "nodeType": "YulIdentifier", + "src": "5039:3:103" + }, + "nativeSrc": "5039:13:103", + "nodeType": "YulFunctionCall", + "src": "5039:13:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5027:6:103", + "nodeType": "YulIdentifier", + "src": "5027:6:103" + }, + "nativeSrc": "5027:26:103", + "nodeType": "YulFunctionCall", + "src": "5027:26:103" + }, + "nativeSrc": "5027:26:103", + "nodeType": "YulExpressionStatement", + "src": "5027:26:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5073:3:103", + "nodeType": "YulIdentifier", + "src": "5073:3:103" + }, + { + "kind": "number", + "nativeSrc": "5078:1:103", + "nodeType": "YulLiteral", + "src": "5078:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5069:3:103", + "nodeType": "YulIdentifier", + "src": "5069:3:103" + }, + "nativeSrc": "5069:11:103", + "nodeType": "YulFunctionCall", + "src": "5069:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5090:2:103", + "nodeType": "YulLiteral", + "src": "5090:2:103", + "type": "", + "value": "96" + }, + { + "name": "value0", + "nativeSrc": "5094:6:103", + "nodeType": "YulIdentifier", + "src": "5094:6:103" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5086:3:103", + "nodeType": "YulIdentifier", + "src": "5086:3:103" + }, + "nativeSrc": "5086:15:103", + "nodeType": "YulFunctionCall", + "src": "5086:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5107:26:103", + "nodeType": "YulLiteral", + "src": "5107:26:103", + "type": "", + "value": "0xffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "5103:3:103", + "nodeType": "YulIdentifier", + "src": "5103:3:103" + }, + "nativeSrc": "5103:31:103", + "nodeType": "YulFunctionCall", + "src": "5103:31:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5082:3:103", + "nodeType": "YulIdentifier", + "src": "5082:3:103" + }, + "nativeSrc": "5082:53:103", + "nodeType": "YulFunctionCall", + "src": "5082:53:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5062:6:103", + "nodeType": "YulIdentifier", + "src": "5062:6:103" + }, + "nativeSrc": "5062:74:103", + "nodeType": "YulFunctionCall", + "src": "5062:74:103" + }, + "nativeSrc": "5062:74:103", + "nodeType": "YulExpressionStatement", + "src": "5062:74:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5156:3:103", + "nodeType": "YulIdentifier", + "src": "5156:3:103" + }, + { + "kind": "number", + "nativeSrc": "5161:2:103", + "nodeType": "YulLiteral", + "src": "5161:2:103", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5152:3:103", + "nodeType": "YulIdentifier", + "src": "5152:3:103" + }, + "nativeSrc": "5152:12:103", + "nodeType": "YulFunctionCall", + "src": "5152:12:103" + }, + { + "name": "value1", + "nativeSrc": "5166:6:103", + "nodeType": "YulIdentifier", + "src": "5166:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5145:6:103", + "nodeType": "YulIdentifier", + "src": "5145:6:103" + }, + "nativeSrc": "5145:28:103", + "nodeType": "YulFunctionCall", + "src": "5145:28:103" + }, + "nativeSrc": "5145:28:103", + "nodeType": "YulExpressionStatement", + "src": "5145:28:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5193:3:103", + "nodeType": "YulIdentifier", + "src": "5193:3:103" + }, + { + "kind": "number", + "nativeSrc": "5198:2:103", + "nodeType": "YulLiteral", + "src": "5198:2:103", + "type": "", + "value": "53" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5189:3:103", + "nodeType": "YulIdentifier", + "src": "5189:3:103" + }, + "nativeSrc": "5189:12:103", + "nodeType": "YulFunctionCall", + "src": "5189:12:103" + }, + { + "name": "value2", + "nativeSrc": "5203:6:103", + "nodeType": "YulIdentifier", + "src": "5203:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5182:6:103", + "nodeType": "YulIdentifier", + "src": "5182:6:103" + }, + "nativeSrc": "5182:28:103", + "nodeType": "YulFunctionCall", + "src": "5182:28:103" + }, + "nativeSrc": "5182:28:103", + "nodeType": "YulExpressionStatement", + "src": "5182:28:103" + }, + { + "nativeSrc": "5219:19:103", + "nodeType": "YulAssignment", + "src": "5219:19:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5230:3:103", + "nodeType": "YulIdentifier", + "src": "5230:3:103" + }, + { + "kind": "number", + "nativeSrc": "5235:2:103", + "nodeType": "YulLiteral", + "src": "5235:2:103", + "type": "", + "value": "85" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5226:3:103", + "nodeType": "YulIdentifier", + "src": "5226:3:103" + }, + "nativeSrc": "5226:12:103", + "nodeType": "YulFunctionCall", + "src": "5226:12:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "5219:3:103", + "nodeType": "YulIdentifier", + "src": "5219:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9_t_address_t_bytes32_t_bytes32__to_t_string_memory_ptr_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "4741:503:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "4977:3:103", + "nodeType": "YulTypedName", + "src": "4977:3:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "4982:6:103", + "nodeType": "YulTypedName", + "src": "4982:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4990:6:103", + "nodeType": "YulTypedName", + "src": "4990:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4998:6:103", + "nodeType": "YulTypedName", + "src": "4998:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "5009:3:103", + "nodeType": "YulTypedName", + "src": "5009:3:103", + "type": "" + } + ], + "src": "4741:503:103" + }, + { + "body": { + "nativeSrc": "5570:197:103", + "nodeType": "YulBlock", + "src": "5570:197:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5587:3:103", + "nodeType": "YulIdentifier", + "src": "5587:3:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5596:3:103", + "nodeType": "YulLiteral", + "src": "5596:3:103", + "type": "", + "value": "242" + }, + { + "kind": "number", + "nativeSrc": "5601:5:103", + "nodeType": "YulLiteral", + "src": "5601:5:103", + "type": "", + "value": "13733" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5592:3:103", + "nodeType": "YulIdentifier", + "src": "5592:3:103" + }, + "nativeSrc": "5592:15:103", + "nodeType": "YulFunctionCall", + "src": "5592:15:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5580:6:103", + "nodeType": "YulIdentifier", + "src": "5580:6:103" + }, + "nativeSrc": "5580:28:103", + "nodeType": "YulFunctionCall", + "src": "5580:28:103" + }, + "nativeSrc": "5580:28:103", + "nodeType": "YulExpressionStatement", + "src": "5580:28:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5628:3:103", + "nodeType": "YulIdentifier", + "src": "5628:3:103" + }, + { + "kind": "number", + "nativeSrc": "5633:1:103", + "nodeType": "YulLiteral", + "src": "5633:1:103", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5624:3:103", + "nodeType": "YulIdentifier", + "src": "5624:3:103" + }, + "nativeSrc": "5624:11:103", + "nodeType": "YulFunctionCall", + "src": "5624:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5645:2:103", + "nodeType": "YulLiteral", + "src": "5645:2:103", + "type": "", + "value": "96" + }, + { + "name": "value0", + "nativeSrc": "5649:6:103", + "nodeType": "YulIdentifier", + "src": "5649:6:103" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5641:3:103", + "nodeType": "YulIdentifier", + "src": "5641:3:103" + }, + "nativeSrc": "5641:15:103", + "nodeType": "YulFunctionCall", + "src": "5641:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5662:26:103", + "nodeType": "YulLiteral", + "src": "5662:26:103", + "type": "", + "value": "0xffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "5658:3:103", + "nodeType": "YulIdentifier", + "src": "5658:3:103" + }, + "nativeSrc": "5658:31:103", + "nodeType": "YulFunctionCall", + "src": "5658:31:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5637:3:103", + "nodeType": "YulIdentifier", + "src": "5637:3:103" + }, + "nativeSrc": "5637:53:103", + "nodeType": "YulFunctionCall", + "src": "5637:53:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5617:6:103", + "nodeType": "YulIdentifier", + "src": "5617:6:103" + }, + "nativeSrc": "5617:74:103", + "nodeType": "YulFunctionCall", + "src": "5617:74:103" + }, + "nativeSrc": "5617:74:103", + "nodeType": "YulExpressionStatement", + "src": "5617:74:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5711:3:103", + "nodeType": "YulIdentifier", + "src": "5711:3:103" + }, + { + "kind": "number", + "nativeSrc": "5716:2:103", + "nodeType": "YulLiteral", + "src": "5716:2:103", + "type": "", + "value": "22" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5707:3:103", + "nodeType": "YulIdentifier", + "src": "5707:3:103" + }, + "nativeSrc": "5707:12:103", + "nodeType": "YulFunctionCall", + "src": "5707:12:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5725:3:103", + "nodeType": "YulLiteral", + "src": "5725:3:103", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "5730:1:103", + "nodeType": "YulLiteral", + "src": "5730:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5721:3:103", + "nodeType": "YulIdentifier", + "src": "5721:3:103" + }, + "nativeSrc": "5721:11:103", + "nodeType": "YulFunctionCall", + "src": "5721:11:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5700:6:103", + "nodeType": "YulIdentifier", + "src": "5700:6:103" + }, + "nativeSrc": "5700:33:103", + "nodeType": "YulFunctionCall", + "src": "5700:33:103" + }, + "nativeSrc": "5700:33:103", + "nodeType": "YulExpressionStatement", + "src": "5700:33:103" + }, + { + "nativeSrc": "5742:19:103", + "nodeType": "YulAssignment", + "src": "5742:19:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5753:3:103", + "nodeType": "YulIdentifier", + "src": "5753:3:103" + }, + { + "kind": "number", + "nativeSrc": "5758:2:103", + "nodeType": "YulLiteral", + "src": "5758:2:103", + "type": "", + "value": "23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5749:3:103", + "nodeType": "YulIdentifier", + "src": "5749:3:103" + }, + "nativeSrc": "5749:12:103", + "nodeType": "YulFunctionCall", + "src": "5749:12:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "5742:3:103", + "nodeType": "YulIdentifier", + "src": "5742:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_4fdc04d28c8d22070e5fd0f23f00bae0b21cc4e5091b5fd7a9cad9babd3668cf_t_address_t_stringliteral_5fe7f977e71dba2ea1a68e21057beebb9be2ac30c6410aa38d4f3fbe41dcffd2__to_t_string_memory_ptr_t_address_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "5249:518:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "5546:3:103", + "nodeType": "YulTypedName", + "src": "5546:3:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5551:6:103", + "nodeType": "YulTypedName", + "src": "5551:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "5562:3:103", + "nodeType": "YulTypedName", + "src": "5562:3:103", + "type": "" + } + ], + "src": "5249:518:103" + }, + { + "body": { + "nativeSrc": "5946:180:103", + "nodeType": "YulBlock", + "src": "5946:180:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5963:9:103", + "nodeType": "YulIdentifier", + "src": "5963:9:103" + }, + { + "kind": "number", + "nativeSrc": "5974:2:103", + "nodeType": "YulLiteral", + "src": "5974:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5956:6:103", + "nodeType": "YulIdentifier", + "src": "5956:6:103" + }, + "nativeSrc": "5956:21:103", + "nodeType": "YulFunctionCall", + "src": "5956:21:103" + }, + "nativeSrc": "5956:21:103", + "nodeType": "YulExpressionStatement", + "src": "5956:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5997:9:103", + "nodeType": "YulIdentifier", + "src": "5997:9:103" + }, + { + "kind": "number", + "nativeSrc": "6008:2:103", + "nodeType": "YulLiteral", + "src": "6008:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5993:3:103", + "nodeType": "YulIdentifier", + "src": "5993:3:103" + }, + "nativeSrc": "5993:18:103", + "nodeType": "YulFunctionCall", + "src": "5993:18:103" + }, + { + "kind": "number", + "nativeSrc": "6013:2:103", + "nodeType": "YulLiteral", + "src": "6013:2:103", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5986:6:103", + "nodeType": "YulIdentifier", + "src": "5986:6:103" + }, + "nativeSrc": "5986:30:103", + "nodeType": "YulFunctionCall", + "src": "5986:30:103" + }, + "nativeSrc": "5986:30:103", + "nodeType": "YulExpressionStatement", + "src": "5986:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6036:9:103", + "nodeType": "YulIdentifier", + "src": "6036:9:103" + }, + { + "kind": "number", + "nativeSrc": "6047:2:103", + "nodeType": "YulLiteral", + "src": "6047:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6032:3:103", + "nodeType": "YulIdentifier", + "src": "6032:3:103" + }, + "nativeSrc": "6032:18:103", + "nodeType": "YulFunctionCall", + "src": "6032:18:103" + }, + { + "hexValue": "437265617465333a2074617267657420616c726561647920657869737473", + "kind": "string", + "nativeSrc": "6052:32:103", + "nodeType": "YulLiteral", + "src": "6052:32:103", + "type": "", + "value": "Create3: target already exists" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6025:6:103", + "nodeType": "YulIdentifier", + "src": "6025:6:103" + }, + "nativeSrc": "6025:60:103", + "nodeType": "YulFunctionCall", + "src": "6025:60:103" + }, + "nativeSrc": "6025:60:103", + "nodeType": "YulExpressionStatement", + "src": "6025:60:103" + }, + { + "nativeSrc": "6094:26:103", + "nodeType": "YulAssignment", + "src": "6094:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6106:9:103", + "nodeType": "YulIdentifier", + "src": "6106:9:103" + }, + { + "kind": "number", + "nativeSrc": "6117:2:103", + "nodeType": "YulLiteral", + "src": "6117:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6102:3:103", + "nodeType": "YulIdentifier", + "src": "6102:3:103" + }, + "nativeSrc": "6102:18:103", + "nodeType": "YulFunctionCall", + "src": "6102:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6094:4:103", + "nodeType": "YulIdentifier", + "src": "6094:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_eff5890756d2c5621f001169bb16c941329db031eba2edbb4865370c160b3eae__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5772:354:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5923:9:103", + "nodeType": "YulTypedName", + "src": "5923:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5937:4:103", + "nodeType": "YulTypedName", + "src": "5937:4:103", + "type": "" + } + ], + "src": "5772:354:103" + }, + { + "body": { + "nativeSrc": "6305:181:103", + "nodeType": "YulBlock", + "src": "6305:181:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6322:9:103", + "nodeType": "YulIdentifier", + "src": "6322:9:103" + }, + { + "kind": "number", + "nativeSrc": "6333:2:103", + "nodeType": "YulLiteral", + "src": "6333:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6315:6:103", + "nodeType": "YulIdentifier", + "src": "6315:6:103" + }, + "nativeSrc": "6315:21:103", + "nodeType": "YulFunctionCall", + "src": "6315:21:103" + }, + "nativeSrc": "6315:21:103", + "nodeType": "YulExpressionStatement", + "src": "6315:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6356:9:103", + "nodeType": "YulIdentifier", + "src": "6356:9:103" + }, + { + "kind": "number", + "nativeSrc": "6367:2:103", + "nodeType": "YulLiteral", + "src": "6367:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6352:3:103", + "nodeType": "YulIdentifier", + "src": "6352:3:103" + }, + "nativeSrc": "6352:18:103", + "nodeType": "YulFunctionCall", + "src": "6352:18:103" + }, + { + "kind": "number", + "nativeSrc": "6372:2:103", + "nodeType": "YulLiteral", + "src": "6372:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6345:6:103", + "nodeType": "YulIdentifier", + "src": "6345:6:103" + }, + "nativeSrc": "6345:30:103", + "nodeType": "YulFunctionCall", + "src": "6345:30:103" + }, + "nativeSrc": "6345:30:103", + "nodeType": "YulExpressionStatement", + "src": "6345:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6395:9:103", + "nodeType": "YulIdentifier", + "src": "6395:9:103" + }, + { + "kind": "number", + "nativeSrc": "6406:2:103", + "nodeType": "YulLiteral", + "src": "6406:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6391:3:103", + "nodeType": "YulIdentifier", + "src": "6391:3:103" + }, + "nativeSrc": "6391:18:103", + "nodeType": "YulFunctionCall", + "src": "6391:18:103" + }, + { + "hexValue": "437265617465333a206572726f72206372656174696e6720666163746f7279", + "kind": "string", + "nativeSrc": "6411:33:103", + "nodeType": "YulLiteral", + "src": "6411:33:103", + "type": "", + "value": "Create3: error creating factory" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6384:6:103", + "nodeType": "YulIdentifier", + "src": "6384:6:103" + }, + "nativeSrc": "6384:61:103", + "nodeType": "YulFunctionCall", + "src": "6384:61:103" + }, + "nativeSrc": "6384:61:103", + "nodeType": "YulExpressionStatement", + "src": "6384:61:103" + }, + { + "nativeSrc": "6454:26:103", + "nodeType": "YulAssignment", + "src": "6454:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6466:9:103", + "nodeType": "YulIdentifier", + "src": "6466:9:103" + }, + { + "kind": "number", + "nativeSrc": "6477:2:103", + "nodeType": "YulLiteral", + "src": "6477:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6462:3:103", + "nodeType": "YulIdentifier", + "src": "6462:3:103" + }, + "nativeSrc": "6462:18:103", + "nodeType": "YulFunctionCall", + "src": "6462:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6454:4:103", + "nodeType": "YulIdentifier", + "src": "6454:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_9c800ce8d486c3397a1a9cc324cfcd264ced53e7b922ccf3390ef85c645102b0__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6131:355:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6282:9:103", + "nodeType": "YulTypedName", + "src": "6282:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6296:4:103", + "nodeType": "YulTypedName", + "src": "6296:4:103", + "type": "" + } + ], + "src": "6131:355:103" + }, + { + "body": { + "nativeSrc": "6628:150:103", + "nodeType": "YulBlock", + "src": "6628:150:103", + "statements": [ + { + "nativeSrc": "6638:27:103", + "nodeType": "YulVariableDeclaration", + "src": "6638:27:103", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6658:6:103", + "nodeType": "YulIdentifier", + "src": "6658:6:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6652:5:103", + "nodeType": "YulIdentifier", + "src": "6652:5:103" + }, + "nativeSrc": "6652:13:103", + "nodeType": "YulFunctionCall", + "src": "6652:13:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "6642:6:103", + "nodeType": "YulTypedName", + "src": "6642:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6713:6:103", + "nodeType": "YulIdentifier", + "src": "6713:6:103" + }, + { + "kind": "number", + "nativeSrc": "6721:4:103", + "nodeType": "YulLiteral", + "src": "6721:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6709:3:103", + "nodeType": "YulIdentifier", + "src": "6709:3:103" + }, + "nativeSrc": "6709:17:103", + "nodeType": "YulFunctionCall", + "src": "6709:17:103" + }, + { + "name": "pos", + "nativeSrc": "6728:3:103", + "nodeType": "YulIdentifier", + "src": "6728:3:103" + }, + { + "name": "length", + "nativeSrc": "6733:6:103", + "nodeType": "YulIdentifier", + "src": "6733:6:103" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "6674:34:103", + "nodeType": "YulIdentifier", + "src": "6674:34:103" + }, + "nativeSrc": "6674:66:103", + "nodeType": "YulFunctionCall", + "src": "6674:66:103" + }, + "nativeSrc": "6674:66:103", + "nodeType": "YulExpressionStatement", + "src": "6674:66:103" + }, + { + "nativeSrc": "6749:23:103", + "nodeType": "YulAssignment", + "src": "6749:23:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "6760:3:103", + "nodeType": "YulIdentifier", + "src": "6760:3:103" + }, + { + "name": "length", + "nativeSrc": "6765:6:103", + "nodeType": "YulIdentifier", + "src": "6765:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6756:3:103", + "nodeType": "YulIdentifier", + "src": "6756:3:103" + }, + "nativeSrc": "6756:16:103", + "nodeType": "YulFunctionCall", + "src": "6756:16:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "6749:3:103", + "nodeType": "YulIdentifier", + "src": "6749:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "6491:287:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "6604:3:103", + "nodeType": "YulTypedName", + "src": "6604:3:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6609:6:103", + "nodeType": "YulTypedName", + "src": "6609:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "6620:3:103", + "nodeType": "YulTypedName", + "src": "6620:3:103", + "type": "" + } + ], + "src": "6491:287:103" + }, + { + "body": { + "nativeSrc": "6957:180:103", + "nodeType": "YulBlock", + "src": "6957:180:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6974:9:103", + "nodeType": "YulIdentifier", + "src": "6974:9:103" + }, + { + "kind": "number", + "nativeSrc": "6985:2:103", + "nodeType": "YulLiteral", + "src": "6985:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6967:6:103", + "nodeType": "YulIdentifier", + "src": "6967:6:103" + }, + "nativeSrc": "6967:21:103", + "nodeType": "YulFunctionCall", + "src": "6967:21:103" + }, + "nativeSrc": "6967:21:103", + "nodeType": "YulExpressionStatement", + "src": "6967:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7008:9:103", + "nodeType": "YulIdentifier", + "src": "7008:9:103" + }, + { + "kind": "number", + "nativeSrc": "7019:2:103", + "nodeType": "YulLiteral", + "src": "7019:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7004:3:103", + "nodeType": "YulIdentifier", + "src": "7004:3:103" + }, + "nativeSrc": "7004:18:103", + "nodeType": "YulFunctionCall", + "src": "7004:18:103" + }, + { + "kind": "number", + "nativeSrc": "7024:2:103", + "nodeType": "YulLiteral", + "src": "7024:2:103", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6997:6:103", + "nodeType": "YulIdentifier", + "src": "6997:6:103" + }, + "nativeSrc": "6997:30:103", + "nodeType": "YulFunctionCall", + "src": "6997:30:103" + }, + "nativeSrc": "6997:30:103", + "nodeType": "YulExpressionStatement", + "src": "6997:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7047:9:103", + "nodeType": "YulIdentifier", + "src": "7047:9:103" + }, + { + "kind": "number", + "nativeSrc": "7058:2:103", + "nodeType": "YulLiteral", + "src": "7058:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7043:3:103", + "nodeType": "YulIdentifier", + "src": "7043:3:103" + }, + "nativeSrc": "7043:18:103", + "nodeType": "YulFunctionCall", + "src": "7043:18:103" + }, + { + "hexValue": "437265617465333a206572726f72206372656174696e6720746172676574", + "kind": "string", + "nativeSrc": "7063:32:103", + "nodeType": "YulLiteral", + "src": "7063:32:103", + "type": "", + "value": "Create3: error creating target" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7036:6:103", + "nodeType": "YulIdentifier", + "src": "7036:6:103" + }, + "nativeSrc": "7036:60:103", + "nodeType": "YulFunctionCall", + "src": "7036:60:103" + }, + "nativeSrc": "7036:60:103", + "nodeType": "YulExpressionStatement", + "src": "7036:60:103" + }, + { + "nativeSrc": "7105:26:103", + "nodeType": "YulAssignment", + "src": "7105:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7117:9:103", + "nodeType": "YulIdentifier", + "src": "7117:9:103" + }, + { + "kind": "number", + "nativeSrc": "7128:2:103", + "nodeType": "YulLiteral", + "src": "7128:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7113:3:103", + "nodeType": "YulIdentifier", + "src": "7113:3:103" + }, + "nativeSrc": "7113:18:103", + "nodeType": "YulFunctionCall", + "src": "7113:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7105:4:103", + "nodeType": "YulIdentifier", + "src": "7105:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_1398d0fda5c4dd82767513d52fb4e190bf03bb7a57b33af8f2bf0a3f254cffa0__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6783:354:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6934:9:103", + "nodeType": "YulTypedName", + "src": "6934:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6948:4:103", + "nodeType": "YulTypedName", + "src": "6948:4:103", + "type": "" + } + ], + "src": "6783:354:103" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_bytes32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function abi_decode_bytes(offset, end) -> array\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let _1 := calldataload(offset)\n let _2 := 0xffffffffffffffff\n if gt(_1, _2) { panic_error_0x41() }\n let _3 := not(31)\n let memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(and(add(_1, 0x1f), _3), 63), _3))\n if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n mstore(memPtr, _1)\n if gt(add(add(offset, _1), 0x20), end) { revert(0, 0) }\n calldatacopy(add(memPtr, 0x20), add(offset, 0x20), _1)\n mstore(add(add(memPtr, _1), 0x20), 0)\n array := memPtr\n }\n function abi_decode_tuple_t_bytes_memory_ptrt_bytes32(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_bytes(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n value0 := calldataload(headStart)\n let value := calldataload(add(headStart, 32))\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value1 := value\n let offset := calldataload(add(headStart, 64))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value2 := abi_decode_bytes(add(headStart, offset), dataEnd)\n }\n function abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 33)\n mstore(add(headStart, 64), \"WitnetDeployer: deployment faile\")\n mstore(add(headStart, 96), \"d\")\n tail := add(headStart, 128)\n }\n function copy_memory_to_memory_with_cleanup(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n function abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), 64)\n let length := mload(value1)\n mstore(add(headStart, 64), length)\n copy_memory_to_memory_with_cleanup(add(value1, 32), add(headStart, 96), length)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_07010c659982893c2bfaa9066955408f5c67d963251677f65ceecaf6871b6734__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 33)\n mstore(add(headStart, 64), \"WitnetDeployer: already proxifie\")\n mstore(add(headStart, 96), \"d\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value3, value2, value1, value0) -> end\n {\n mstore(pos, and(value0, shl(248, 255)))\n mstore(add(pos, 1), and(shl(96, value1), not(0xffffffffffffffffffffffff)))\n mstore(add(pos, 21), value2)\n mstore(add(pos, 53), value3)\n end := add(pos, 85)\n }\n function abi_encode_tuple_packed_t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9_t_address_t_bytes32_t_bytes32__to_t_string_memory_ptr_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value2, value1, value0) -> end\n {\n mstore(pos, shl(248, 255))\n mstore(add(pos, 1), and(shl(96, value0), not(0xffffffffffffffffffffffff)))\n mstore(add(pos, 21), value1)\n mstore(add(pos, 53), value2)\n end := add(pos, 85)\n }\n function abi_encode_tuple_packed_t_stringliteral_4fdc04d28c8d22070e5fd0f23f00bae0b21cc4e5091b5fd7a9cad9babd3668cf_t_address_t_stringliteral_5fe7f977e71dba2ea1a68e21057beebb9be2ac30c6410aa38d4f3fbe41dcffd2__to_t_string_memory_ptr_t_address_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, shl(242, 13733))\n mstore(add(pos, 2), and(shl(96, value0), not(0xffffffffffffffffffffffff)))\n mstore(add(pos, 22), shl(248, 1))\n end := add(pos, 23)\n }\n function abi_encode_tuple_t_stringliteral_eff5890756d2c5621f001169bb16c941329db031eba2edbb4865370c160b3eae__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 30)\n mstore(add(headStart, 64), \"Create3: target already exists\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_9c800ce8d486c3397a1a9cc324cfcd264ced53e7b922ccf3390ef85c645102b0__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 31)\n mstore(add(headStart, 64), \"Create3: error creating factory\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n end := add(pos, length)\n }\n function abi_encode_tuple_t_stringliteral_1398d0fda5c4dd82767513d52fb4e190bf03bb7a57b33af8f2bf0a3f254cffa0__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 30)\n mstore(add(headStart, 64), \"Create3: error creating target\")\n tail := add(headStart, 96)\n }\n}", + "id": 103, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "356:2917:18:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "356:2917:18:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:159;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;2119:159:18;;;;;;;900:448;;;;;;:::i;:::-;;:::i;2286:982::-;;;;;;:::i;:::-;;:::i;1694:417::-;;;;;;:::i;:::-;;:::i;2119:159::-;2210:7;2242:28;2264:5;2242:21;:28::i;:::-;2235:35;2119:159;-1:-1:-1;;2119:159:18:o;900:448::-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;2286:982;2422:11;2451:18;2472:30;2491:10;2472:18;:30::i;:::-;2451:51;;2517:10;-1:-1:-1;;;;;2517:22:18;;2543:1;2517:27;2513:748;;2600:58;2615:10;2627:30;;;;;;;;:::i;:::-;-1:-1:-1;;2627:30:18;;;;;;;;;;;;;;2600:14;:58::i;:::-;;2746:10;-1:-1:-1;;;;;2726:42:18;;2787:20;2978:10;3076:9;2876:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2726:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3161:10:18;-1:-1:-1;3134:39:18;;2513:748;3206:43;;-1:-1:-1;;;3206:43:18;;4095:2:103;3206:43:18;;;4077:21:103;4134:2;4114:18;;;4107:30;4173:34;4153:18;;;4146:62;-1:-1:-1;;;4224:18:103;;;4217:31;4265:19;;3206:43:18;3893:397:103;2286:982:18;;;;;;:::o;1694:417::-;2036:20;;;;;;;1898:177;;;-1:-1:-1;;;;;;1898:177:18;;;4506:39:103;1980:4:18;4582:2:103;4578:15;-1:-1:-1;;4574:53:103;4561:11;;;4554:74;4644:12;;;4637:28;;;;4681:12;;;;4674:28;;;;1898:177:18;;;;;;;;;;4718:12:103;;;;1898:177:18;;;1870:220;;;;;;1694:417::o;5013:1163:75:-;2439:24;;;;;;;;;;;-1:-1:-1;;;2439:24:75;;;;;5227:216;;-1:-1:-1;;;;;;5227:216:75;;;5027:26:103;5320:4:75;5090:2:103;5086:15;;;-1:-1:-1;;5082:53:103;;;5069:11;;;5062:74;5152:12;;;5145:28;;;;2429:35:75;5189:12:103;;;;5182:28;;;;5227:216:75;;;;;;;;;;5226:12:103;;;5227:216:75;;5191:275;;;;;;-1:-1:-1;;;5643:457:75;;;5580:28:103;5641:15;;5637:53;;;5624:11;;;5617:74;-1:-1:-1;;;5707:12:103;;;5700:33;5643:457:75;;;;;;;;;5749:12:103;;;;5643:457:75;;;5607:516;;;;;;5013:1163::o;2865:167::-;2961:7;2993:31;3000:5;3007:13;3022:1;3626:17;3710:20;3724:5;3710:13;:20::i;:::-;3698:32;-1:-1:-1;;;;;;3745:21:75;;;:26;3741:72;;3773:40;;-1:-1:-1;;;3773:40:75;;5974:2:103;3773:40:75;;;5956:21:103;6013:2;5993:18;;;5986:30;6052:32;6032:18;;;6025:60;6102:18;;3773:40:75;5772:354:103;3741:72:75;3912:24;;;;;;;;;;;;;-1:-1:-1;;;3912:24:75;;;;;;3853:16;;3912:24;4254:5;;3853:16;4191:69;4179:81;-1:-1:-1;;;;;;4289:22:75;;4281:66;;;;-1:-1:-1;;;4281:66:75;;6333:2:103;4281:66:75;;;6315:21:103;6372:2;6352:18;;;6345:30;6411:33;6391:18;;;6384:61;6462:18;;4281:66:75;6131:355:103;4281:66:75;4409:13;4428:8;-1:-1:-1;;;;;4428:13:75;4449:6;4457:13;4428:43;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4408:63;;;4490:8;:38;;;;-1:-1:-1;;;;;;4502:21:75;;;:26;;4490:38;4482:81;;;;-1:-1:-1;;;4482:81:75;;6985:2:103;4482:81:75;;;6967:21:103;7024:2;7004:18;;;6997:30;7063:32;7043:18;;;7036:60;7113:18;;4482:81:75;6783:354:103;4482:81:75;3650:921;;;3515:1056;;;;;:::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:250::-;2945:1;2955:113;2969:6;2966:1;2963:13;2955:113;;;3045:11;;;3039:18;3026:11;;;3019:39;2991:2;2984:10;2955:113;;;-1:-1:-1;;3102:1:103;3084:16;;3077:27;2860:250::o;3115:491::-;3319:1;3315;3310:3;3306:11;3302:19;3294:6;3290:32;3279:9;3272:51;3359:2;3354;3343:9;3339:18;3332:30;3253:4;3391:6;3385:13;3434:6;3429:2;3418:9;3414:18;3407:34;3450:79;3522:6;3517:2;3506:9;3502:18;3497:2;3489:6;3485:15;3450:79;:::i;:::-;3590:2;3569:15;-1:-1:-1;;3565:29:103;3550:45;;;;3597:2;3546:54;;3115:491;-1:-1:-1;;;3115:491:103:o;3611:277::-;3678:6;3731:2;3719:9;3710:7;3706:23;3702:32;3699:52;;;3747:1;3744;3737:12;3699:52;3779:9;3773:16;3832:5;3825:13;3818:21;3811:5;3808:32;3798:60;;3854:1;3851;3844:12;6491:287;6620:3;6658:6;6652:13;6674:66;6733:6;6728:3;6721:4;6713:6;6709:17;6674:66;:::i;:::-;6756:16;;;;;6491:287;-1:-1:-1;;6491:287:103:o", + "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetProxy.sol\";\r\n\r\nimport \"../libs/Create3.sol\";\r\n\r\n/// @notice WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, \r\n/// @notice and CREATE3 (EIP-3171) factory for Witnet proxies.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployer {\r\n\r\n /// @notice Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \r\n /// @dev The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the address\r\n /// @dev nor the nonce of the caller (i.e. see EIP-1014). \r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return _deployed Just deployed contract address.\r\n function deploy(bytes memory _initCode, bytes32 _salt)\r\n virtual public\r\n returns (address _deployed)\r\n {\r\n _deployed = determineAddr(_initCode, _salt);\r\n if (_deployed.code.length == 0) {\r\n assembly {\r\n _deployed := create2(0, add(_initCode, 0x20), mload(_initCode), _salt)\r\n }\r\n require(_deployed != address(0), \"WitnetDeployer: deployment failed\");\r\n }\r\n }\r\n\r\n /// @notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return Deterministic contract address.\r\n function determineAddr(bytes memory _initCode, bytes32 _salt)\r\n virtual public view\r\n returns (address)\r\n {\r\n return address(\r\n uint160(uint(keccak256(\r\n abi.encodePacked(\r\n bytes1(0xff),\r\n address(this),\r\n _salt,\r\n keccak256(_initCode)\r\n )\r\n )))\r\n );\r\n }\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual public view\r\n returns (address)\r\n {\r\n return Create3.determineAddr(_salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n Create3.deploy(_proxySalt, type(WitnetProxy).creationCode);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployer: already proxified\");\r\n }\r\n }\r\n\r\n}", + "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployer.sol", + "ast": { + "absolutePath": "project:/contracts/core/WitnetDeployer.sol", + "exportedSymbols": { + "Create3": [ + 17522 + ], + "ERC165": [ + 602 + ], + "IERC165": [ + 614 + ], + "Initializable": [ + 253 + ], + "Proxiable": [ + 30273 + ], + "Upgradeable": [ + 30388 + ], + "WitnetDeployer": [ + 4262 + ], + "WitnetProxy": [ + 4713 + ] + }, + "id": 4263, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4107, + "literals": [ + "solidity", + ">=", + "0.8", + ".0", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "35:31:18" + }, + { + "absolutePath": "project:/contracts/core/WitnetProxy.sol", + "file": "./WitnetProxy.sol", + "id": 4108, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4263, + "sourceUnit": 4714, + "src": "70:27:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/libs/Create3.sol", + "file": "../libs/Create3.sol", + "id": 4109, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4263, + "sourceUnit": 17523, + "src": "101:29:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "WitnetDeployer", + "contractDependencies": [ + 4713 + ], + "contractKind": "contract", + "documentation": { + "id": 4110, + "nodeType": "StructuredDocumentation", + "src": "134:220:18", + "text": "@notice WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, \n @notice and CREATE3 (EIP-3171) factory for Witnet proxies.\n @author Guillermo Díaz " + }, + "fullyImplemented": true, + "id": 4262, + "linearizedBaseContracts": [ + 4262 + ], + "name": "WitnetDeployer", + "nameLocation": "365:14:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 4145, + "nodeType": "Block", + "src": "1021:327:18", + "statements": [ + { + "expression": { + "id": 4125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4120, + "name": "_deployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4118, + "src": "1032:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4122, + "name": "_initCode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4113, + "src": "1058:9:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4123, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4115, + "src": "1069:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4121, + "name": "determineAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4184, + "src": "1044:13:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes memory,bytes32) view returns (address)" + } + }, + "id": 4124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1044:31:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1032:43:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4126, + "nodeType": "ExpressionStatement", + "src": "1032:43:18" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4127, + "name": "_deployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4118, + "src": "1090:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1100:4:18", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "1090:14:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1105:6:18", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1090:21:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1115:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1090:26:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4144, + "nodeType": "IfStatement", + "src": "1086:255:18", + "trueBody": { + "id": 4143, + "nodeType": "Block", + "src": "1118:223:18", + "statements": [ + { + "AST": { + "nativeSrc": "1142:104:18", + "nodeType": "YulBlock", + "src": "1142:104:18", + "statements": [ + { + "nativeSrc": "1161:70:18", + "nodeType": "YulAssignment", + "src": "1161:70:18", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1182:1:18", + "nodeType": "YulLiteral", + "src": "1182:1:18", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "name": "_initCode", + "nativeSrc": "1189:9:18", + "nodeType": "YulIdentifier", + "src": "1189:9:18" + }, + { + "kind": "number", + "nativeSrc": "1200:4:18", + "nodeType": "YulLiteral", + "src": "1200:4:18", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1185:3:18", + "nodeType": "YulIdentifier", + "src": "1185:3:18" + }, + "nativeSrc": "1185:20:18", + "nodeType": "YulFunctionCall", + "src": "1185:20:18" + }, + { + "arguments": [ + { + "name": "_initCode", + "nativeSrc": "1213:9:18", + "nodeType": "YulIdentifier", + "src": "1213:9:18" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1207:5:18", + "nodeType": "YulIdentifier", + "src": "1207:5:18" + }, + "nativeSrc": "1207:16:18", + "nodeType": "YulFunctionCall", + "src": "1207:16:18" + }, + { + "name": "_salt", + "nativeSrc": "1225:5:18", + "nodeType": "YulIdentifier", + "src": "1225:5:18" + } + ], + "functionName": { + "name": "create2", + "nativeSrc": "1174:7:18", + "nodeType": "YulIdentifier", + "src": "1174:7:18" + }, + "nativeSrc": "1174:57:18", + "nodeType": "YulFunctionCall", + "src": "1174:57:18" + }, + "variableNames": [ + { + "name": "_deployed", + "nativeSrc": "1161:9:18", + "nodeType": "YulIdentifier", + "src": "1161:9:18" + } + ] + } + ] + }, + "evmVersion": "paris", + "externalReferences": [ + { + "declaration": 4118, + "isOffset": false, + "isSlot": false, + "src": "1161:9:18", + "valueSize": 1 + }, + { + "declaration": 4113, + "isOffset": false, + "isSlot": false, + "src": "1189:9:18", + "valueSize": 1 + }, + { + "declaration": 4113, + "isOffset": false, + "isSlot": false, + "src": "1213:9:18", + "valueSize": 1 + }, + { + "declaration": 4115, + "isOffset": false, + "isSlot": false, + "src": "1225:5:18", + "valueSize": 1 + } + ], + "id": 4132, + "nodeType": "InlineAssembly", + "src": "1133:113:18" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4134, + "name": "_deployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4118, + "src": "1268:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1289:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1281:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1281:7:18", + "typeDescriptions": {} + } + }, + "id": 4138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1281:10:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1268:23:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c6564", + "id": 4140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1293:35:18", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f", + "typeString": "literal_string \"WitnetDeployer: deployment failed\"" + }, + "value": "WitnetDeployer: deployment failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f", + "typeString": "literal_string \"WitnetDeployer: deployment failed\"" + } + ], + "id": 4133, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1260:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1260:69:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4142, + "nodeType": "ExpressionStatement", + "src": "1260:69:18" + } + ] + } + } + ] + }, + "documentation": { + "id": 4111, + "nodeType": "StructuredDocumentation", + "src": "389:505:18", + "text": "@notice Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \n @dev The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the address\n @dev nor the nonce of the caller (i.e. see EIP-1014). \n @param _initCode Creation code, including construction logic and input parameters.\n @param _salt Arbitrary value to modify resulting address.\n @return _deployed Just deployed contract address." + }, + "functionSelector": "4af63f02", + "id": 4146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deploy", + "nameLocation": "909:6:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4113, + "mutability": "mutable", + "name": "_initCode", + "nameLocation": "929:9:18", + "nodeType": "VariableDeclaration", + "scope": 4146, + "src": "916:22:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4112, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "916:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4115, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "948:5:18", + "nodeType": "VariableDeclaration", + "scope": 4146, + "src": "940:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4114, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "940:7:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "915:39:18" + }, + "returnParameters": { + "id": 4119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4118, + "mutability": "mutable", + "name": "_deployed", + "nameLocation": "1005:9:18", + "nodeType": "VariableDeclaration", + "scope": 4146, + "src": "997:17:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "997:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "996:19:18" + }, + "scope": 4262, + "src": "900:448:18", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4183, + "nodeType": "Block", + "src": "1817:294:18", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30786666", + "id": 4167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1944:4:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + } + ], + "id": 4166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1937:6:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 4165, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1937:6:18", + "typeDescriptions": {} + } + }, + "id": 4168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1937:12:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "arguments": [ + { + "id": 4171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "1980:4:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetDeployer_$4262", + "typeString": "contract WitnetDeployer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_WitnetDeployer_$4262", + "typeString": "contract WitnetDeployer" + } + ], + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1972:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1972:7:18", + "typeDescriptions": {} + } + }, + "id": 4172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1972:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4173, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4151, + "src": "2008:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "id": 4175, + "name": "_initCode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "2046:9:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4174, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "2036:9:18", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2036:20:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 4163, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1898:3:18", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4164, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1902:12:18", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1898:16:18", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1898:177:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4162, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "1870:9:18", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1870:220:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1865:4:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4160, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1865:4:18", + "typeDescriptions": {} + } + }, + "id": 4179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1865:226:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1857:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 4158, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1857:7:18", + "typeDescriptions": {} + } + }, + "id": 4180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1857:235:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 4157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1835:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1835:7:18", + "typeDescriptions": {} + } + }, + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1835:268:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4155, + "id": 4182, + "nodeType": "Return", + "src": "1828:275:18" + } + ] + }, + "documentation": { + "id": 4147, + "nodeType": "StructuredDocumentation", + "src": "1356:332:18", + "text": "@notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\n @param _initCode Creation code, including construction logic and input parameters.\n @param _salt Arbitrary value to modify resulting address.\n @return Deterministic contract address." + }, + "functionSelector": "d3933c29", + "id": 4184, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineAddr", + "nameLocation": "1703:13:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4149, + "mutability": "mutable", + "name": "_initCode", + "nameLocation": "1730:9:18", + "nodeType": "VariableDeclaration", + "scope": 4184, + "src": "1717:22:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4148, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1717:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4151, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "1749:5:18", + "nodeType": "VariableDeclaration", + "scope": 4184, + "src": "1741:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4150, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1741:7:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1716:39:18" + }, + "returnParameters": { + "id": 4155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4154, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4184, + "src": "1803:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1803:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1802:9:18" + }, + "scope": 4262, + "src": "1694:417:18", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4196, + "nodeType": "Block", + "src": "2224:54:18", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4193, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4186, + "src": "2264:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 4191, + "name": "Create3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17522, + "src": "2242:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Create3_$17522_$", + "typeString": "type(library Create3)" + } + }, + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2250:13:18", + "memberName": "determineAddr", + "nodeType": "MemberAccess", + "referencedDeclaration": 17521, + "src": "2242:21:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 4194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2242:28:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4190, + "id": 4195, + "nodeType": "Return", + "src": "2235:35:18" + } + ] + }, + "functionSelector": "4998f038", + "id": 4197, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineProxyAddr", + "nameLocation": "2128:18:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4186, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "2155:5:18", + "nodeType": "VariableDeclaration", + "scope": 4197, + "src": "2147:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4185, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2147:7:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2146:15:18" + }, + "returnParameters": { + "id": 4190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4197, + "src": "2210:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4188, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2210:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2209:9:18" + }, + "scope": 4262, + "src": "2119:159:18", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4260, + "nodeType": "Block", + "src": "2440:828:18", + "statements": [ + { + "assignments": [ + 4210 + ], + "declarations": [ + { + "constant": false, + "id": 4210, + "mutability": "mutable", + "name": "_proxyAddr", + "nameLocation": "2459:10:18", + "nodeType": "VariableDeclaration", + "scope": 4260, + "src": "2451:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2451:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4214, + "initialValue": { + "arguments": [ + { + "id": 4212, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4199, + "src": "2491:10:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4211, + "name": "determineProxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4197, + "src": "2472:18:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2472:30:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2451:51:18" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4215, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4210, + "src": "2517:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2528:4:18", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "2517:15:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2533:6:18", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2517:22:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2543:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2517:27:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4258, + "nodeType": "Block", + "src": "3191:70:18", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e65744465706c6f7965723a20616c72656164792070726f786966696564", + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3213:35:18", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_07010c659982893c2bfaa9066955408f5c67d963251677f65ceecaf6871b6734", + "typeString": "literal_string \"WitnetDeployer: already proxified\"" + }, + "value": "WitnetDeployer: already proxified" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_07010c659982893c2bfaa9066955408f5c67d963251677f65ceecaf6871b6734", + "typeString": "literal_string \"WitnetDeployer: already proxified\"" + } + ], + "id": 4254, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "3206:6:18", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3206:43:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4257, + "nodeType": "ExpressionStatement", + "src": "3206:43:18" + } + ] + }, + "id": 4259, + "nodeType": "IfStatement", + "src": "2513:748:18", + "trueBody": { + "id": 4253, + "nodeType": "Block", + "src": "2546:639:18", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4223, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4199, + "src": "2615:10:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "arguments": [ + { + "id": 4225, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "2632:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + ], + "id": 4224, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "2627:4:18", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2627:17:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetProxy_$4713", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2645:12:18", + "memberName": "creationCode", + "nodeType": "MemberAccess", + "src": "2627:30:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4220, + "name": "Create3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17522, + "src": "2600:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Create3_$17522_$", + "typeString": "type(library Create3)" + } + }, + "id": 4222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2608:6:18", + "memberName": "deploy", + "nodeType": "MemberAccess", + "referencedDeclaration": 17403, + "src": "2600:14:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$", + "typeString": "function (bytes32,bytes memory) returns (address)" + } + }, + "id": 4228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2600:58:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4229, + "nodeType": "ExpressionStatement", + "src": "2600:58:18" + }, + { + "expression": { + "arguments": [ + { + "id": 4237, + "name": "_firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4201, + "src": "2787:20:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "expression": { + "id": 4240, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2978:3:18", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2982:6:18", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2978:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4242, + "name": "_initData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4203, + "src": "3076:9:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4238, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2876:3:18", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2880:6:18", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "2876:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2876:228:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4233, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4210, + "src": "2746:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2738:8:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2738:8:18", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2738:19:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4230, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "2726:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2726:32:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "id": 4236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2759:9:18", + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 4703, + "src": "2726:42:18", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,bytes memory) external returns (bool)" + } + }, + "id": 4244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2726:393:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4245, + "nodeType": "ExpressionStatement", + "src": "2726:393:18" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4249, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4210, + "src": "3161:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3153:8:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4247, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3153:8:18", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3153:19:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4246, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "3141:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3141:32:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "functionReturnParameters": 4208, + "id": 4252, + "nodeType": "Return", + "src": "3134:39:18" + } + ] + } + } + ] + }, + "functionSelector": "5ba489e7", + "id": 4261, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "proxify", + "nameLocation": "2295:7:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4199, + "mutability": "mutable", + "name": "_proxySalt", + "nameLocation": "2311:10:18", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "2303:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2303:7:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4201, + "mutability": "mutable", + "name": "_firstImplementation", + "nameLocation": "2331:20:18", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "2323:28:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4200, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2323:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4203, + "mutability": "mutable", + "name": "_initData", + "nameLocation": "2366:9:18", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "2353:22:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4202, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2353:5:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2302:74:18" + }, + "returnParameters": { + "id": 4208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4207, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "2422:11:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + }, + "typeName": { + "id": 4206, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4205, + "name": "WitnetProxy", + "nameLocations": [ + "2422:11:18" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4713, + "src": "2422:11:18" + }, + "referencedDeclaration": 4713, + "src": "2422:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "visibility": "internal" + } + ], + "src": "2421:13:18" + }, + "scope": 4262, + "src": "2286:982:18", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + } + ], + "scope": 4263, + "src": "356:2917:18", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "35:3238:18" + }, + "compiler": { + "name": "solc", + "version": "0.8.25+commit.b61c2a91.Emscripten.clang" + }, + "networks": { + "5777": { + "events": {}, + "links": {}, + "address": "0x0CFCA2cE0472e6cCE2ab82c1E95A207794E819f3", + "transactionHash": "0x1b0f05d3cb57a3102b160026ec4e3af88f6dd17d263207d70b1c8f6ecca03ba5" + } + }, + "schemaVersion": "3.4.16", + "updatedAt": "2024-10-20T09:42:12.831Z", + "devdoc": { + "author": "Guillermo Díaz ", + "kind": "dev", + "methods": { + "deploy(bytes,bytes32)": { + "details": "The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). ", + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_deployed": "Just deployed contract address." + } + }, + "determineAddr(bytes,bytes32)": { + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_0": "Deterministic contract address." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "deploy(bytes,bytes32)": { + "notice": "Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. " + }, + "determineAddr(bytes,bytes32)": { + "notice": "Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`." + } + }, + "notice": "WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, and CREATE3 (EIP-3171) factory for Witnet proxies.", + "version": 1 + } + } \ No newline at end of file diff --git a/migrations/frosts/WitnetDeployerConfluxCore.json b/migrations/frosts/WitnetDeployerConfluxCore.json new file mode 100644 index 00000000..ebea5527 --- /dev/null +++ b/migrations/frosts/WitnetDeployerConfluxCore.json @@ -0,0 +1,6485 @@ +{ + "contractName": "WitnetDeployerConfluxCore", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "_deployed", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineProxyAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_proxySalt", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_firstImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_initData", + "type": "bytes" + } + ], + "name": "proxify", + "outputs": [ + { + "internalType": "contract WitnetProxy", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_deployed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineProxyAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proxySalt\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_firstImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initData\",\"type\":\"bytes\"}],\"name\":\"proxify\",\"outputs\":[{\"internalType\":\"contract WitnetProxy\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Guillermo D\\u00edaz \",\"kind\":\"dev\",\"methods\":{\"deploy(bytes,bytes32)\":{\"details\":\"The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). \",\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_deployed\":\"Just deployed contract address.\"}},\"determineAddr(bytes,bytes32)\":{\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_0\":\"Deterministic contract address.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deploy(bytes,bytes32)\":{\"notice\":\"Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \"},\"determineAddr(bytes,bytes32)\":{\"notice\":\"Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\"}},\"notice\":\"WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/core/WitnetDeployerConfluxCore.sol\":\"WitnetDeployerConfluxCore\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xddce8e17e3d3f9ed818b4f4c4478a8262aab8b11ed322f1bf5ed705bb4bd97fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8084aa71a4cc7d2980972412a88fe4f114869faea3fefa5436431644eb5c0287\",\"dweb:/ipfs/Qmbqfs5dRdPvHVKY8kTaeyc65NdqXRQwRK7h9s5UJEhD1p\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621\",\"dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL\"]},\"project:/contracts/core/WitnetDeployer.sol\":{\"keccak256\":\"0x00866ae27649212bdb7aacfc69d3302325ff82c1302993c1043e6f6ad2b507bc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://62fbada06d1352d79663f0c4ec26598e60e8a6b8b1015ff821b38d4f76580533\",\"dweb:/ipfs/QmYhDCsKjUPbKJLABxSUNQHsZKwPEVr41GGXV7MpThWvcL\"]},\"project:/contracts/core/WitnetDeployerConfluxCore.sol\":{\"keccak256\":\"0xaca9ec166403d7d9f7d7c2943dc41232fead896b515b34ea1d729a1a2c9ca20c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90db7635ba5dbd446a15318f15c4e87629736fae71a1f42dc4a86bb56e68bed3\",\"dweb:/ipfs/QmcM5T3YYd1p6u6PKs7VqqKCYndB1PQ8Rnw6XKyooFAu8m\"]},\"project:/contracts/core/WitnetProxy.sol\":{\"keccak256\":\"0x2b2f56fc69bf0e01f6f1062202d1682cd394fa3b3d9ff2f8f833ab51c9e866cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8017f76a71e4a52a5a5e249081c92510bac5b91f03f727e66ff4406238521337\",\"dweb:/ipfs/QmdWcPAL3MGtxGdpX5CMfgzz4YzxYEeCiFRoGHVCr8rLEL\"]},\"project:/contracts/libs/Create3.sol\":{\"keccak256\":\"0xfbda4c773f859bef9d7878ca9412f244da85f7bd49df07c49a17544f4708d718\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://0f83b72ad1c35c707cc6daa4e8266d9d711f561a188fbb0be1885d3f08146ca6\",\"dweb:/ipfs/QmPJwdieqkxoSvqmczAtRMfb5EN8uWiabqMKj4yVqsUncv\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]},\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]},\"project:/contracts/patterns/Upgradeable.sol\":{\"keccak256\":\"0xbeb025c71f037acb1a668174eb6930631bf397129beb825f2660e5d8cf19614f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fe6ce4dcd500093ae069d35b91829ccb471e1ca33ed0851fb053fbfe76c78aba\",\"dweb:/ipfs/QmT7huvCFS6bHDxt7HhEogJmyvYNbeb6dFTJudsVSX6nEs\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50610f628061001f6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f366004610341565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e3660046103fd565b6100ed565b6100646100a1366004610442565b61017e565b6100646100b43660046103fd565b6102c9565b60006100e7604051806020016100ce90610334565b601f1982820381018352601f90910116604052836102c9565b92915050565b60006100f983836102c9565b9050806001600160a01b03163b6000036100e757818351602085016000f590506001600160a01b0381166100e75760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b60008061018a856100b9565b9050806001600160a01b03163b600003610265576101ca604051806020016101b190610334565b601f1982820381018352601f90910116604052866100ed565b50806001600160a01b0316636fbc15e98533866040516020016101ee9291906104a7565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161021a9291906104a7565b6020604051808303816000875af1158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025d9190610506565b5090506102c2565b60405162461bcd60e51b815260206004820152602c60248201527f5769746e65744465706c6f796572436f6e666c7578436f72653a20616c72656160448201526b191e481c1c9bde1a599a595960a21b6064820152608401610175565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012060016001609c1b03166001609f1b1790565b610a048061052983390190565b60006020828403121561035357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261038157600080fd5b813567ffffffffffffffff8082111561039c5761039c61035a565b604051601f8301601f19908116603f011681019082821181831017156103c4576103c461035a565b816040528381528660208588010111156103dd57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561041057600080fd5b823567ffffffffffffffff81111561042757600080fd5b61043385828601610370565b95602094909401359450505050565b60008060006060848603121561045757600080fd5b8335925060208401356001600160a01b038116811461047557600080fd5b9150604084013567ffffffffffffffff81111561049157600080fd5b61049d86828701610370565b9150509250925092565b60018060a01b03831681526000602060406020840152835180604085015260005b818110156104e4578581018301518582016060015282016104c8565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561051857600080fd5b815180151581146102c257600080fdfe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a26469706673582212200b7d983a8f8afdda5f4575fde8d9163c7ce80cac32696cf093bd7c8e5e81e28264736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f366004610341565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e3660046103fd565b6100ed565b6100646100a1366004610442565b61017e565b6100646100b43660046103fd565b6102c9565b60006100e7604051806020016100ce90610334565b601f1982820381018352601f90910116604052836102c9565b92915050565b60006100f983836102c9565b9050806001600160a01b03163b6000036100e757818351602085016000f590506001600160a01b0381166100e75760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b60008061018a856100b9565b9050806001600160a01b03163b600003610265576101ca604051806020016101b190610334565b601f1982820381018352601f90910116604052866100ed565b50806001600160a01b0316636fbc15e98533866040516020016101ee9291906104a7565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161021a9291906104a7565b6020604051808303816000875af1158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025d9190610506565b5090506102c2565b60405162461bcd60e51b815260206004820152602c60248201527f5769746e65744465706c6f796572436f6e666c7578436f72653a20616c72656160448201526b191e481c1c9bde1a599a595960a21b6064820152608401610175565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012060016001609c1b03166001609f1b1790565b610a048061052983390190565b60006020828403121561035357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261038157600080fd5b813567ffffffffffffffff8082111561039c5761039c61035a565b604051601f8301601f19908116603f011681019082821181831017156103c4576103c461035a565b816040528381528660208588010111156103dd57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561041057600080fd5b823567ffffffffffffffff81111561042757600080fd5b61043385828601610370565b95602094909401359450505050565b60008060006060848603121561045757600080fd5b8335925060208401356001600160a01b038116811461047557600080fd5b9150604084013567ffffffffffffffff81111561049157600080fd5b61049d86828701610370565b9150509250925092565b60018060a01b03831681526000602060406020840152835180604085015260005b818110156104e4578581018301518582016060015282016104c8565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561051857600080fd5b815180151581146102c257600080fdfe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a26469706673582212200b7d983a8f8afdda5f4575fde8d9163c7ce80cac32696cf093bd7c8e5e81e28264736f6c63430008190033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [ + { + "ast": { + "nativeSrc": "0:4646:103", + "nodeType": "YulBlock", + "src": "0:4646:103", + "statements": [ + { + "nativeSrc": "6:3:103", + "nodeType": "YulBlock", + "src": "6:3:103", + "statements": [] + }, + { + "body": { + "nativeSrc": "84:110:103", + "nodeType": "YulBlock", + "src": "84:110:103", + "statements": [ + { + "body": { + "nativeSrc": "130:16:103", + "nodeType": "YulBlock", + "src": "130:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "139:1:103", + "nodeType": "YulLiteral", + "src": "139:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "142:1:103", + "nodeType": "YulLiteral", + "src": "142:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "132:6:103", + "nodeType": "YulIdentifier", + "src": "132:6:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulFunctionCall", + "src": "132:12:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulExpressionStatement", + "src": "132:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "105:7:103", + "nodeType": "YulIdentifier", + "src": "105:7:103" + }, + { + "name": "headStart", + "nativeSrc": "114:9:103", + "nodeType": "YulIdentifier", + "src": "114:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "101:3:103", + "nodeType": "YulIdentifier", + "src": "101:3:103" + }, + "nativeSrc": "101:23:103", + "nodeType": "YulFunctionCall", + "src": "101:23:103" + }, + { + "kind": "number", + "nativeSrc": "126:2:103", + "nodeType": "YulLiteral", + "src": "126:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "97:3:103", + "nodeType": "YulIdentifier", + "src": "97:3:103" + }, + "nativeSrc": "97:32:103", + "nodeType": "YulFunctionCall", + "src": "97:32:103" + }, + "nativeSrc": "94:52:103", + "nodeType": "YulIf", + "src": "94:52:103" + }, + { + "nativeSrc": "155:33:103", + "nodeType": "YulAssignment", + "src": "155:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "178:9:103", + "nodeType": "YulIdentifier", + "src": "178:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "165:12:103", + "nodeType": "YulIdentifier", + "src": "165:12:103" + }, + "nativeSrc": "165:23:103", + "nodeType": "YulFunctionCall", + "src": "165:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "155:6:103", + "nodeType": "YulIdentifier", + "src": "155:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32", + "nativeSrc": "14:180:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "50:9:103", + "nodeType": "YulTypedName", + "src": "50:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "61:7:103", + "nodeType": "YulTypedName", + "src": "61:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "73:6:103", + "nodeType": "YulTypedName", + "src": "73:6:103", + "type": "" + } + ], + "src": "14:180:103" + }, + { + "body": { + "nativeSrc": "300:102:103", + "nodeType": "YulBlock", + "src": "300:102:103", + "statements": [ + { + "nativeSrc": "310:26:103", + "nodeType": "YulAssignment", + "src": "310:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "322:9:103", + "nodeType": "YulIdentifier", + "src": "322:9:103" + }, + { + "kind": "number", + "nativeSrc": "333:2:103", + "nodeType": "YulLiteral", + "src": "333:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "318:3:103", + "nodeType": "YulIdentifier", + "src": "318:3:103" + }, + "nativeSrc": "318:18:103", + "nodeType": "YulFunctionCall", + "src": "318:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "310:4:103", + "nodeType": "YulIdentifier", + "src": "310:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "352:9:103", + "nodeType": "YulIdentifier", + "src": "352:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "367:6:103", + "nodeType": "YulIdentifier", + "src": "367:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "383:3:103", + "nodeType": "YulLiteral", + "src": "383:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "388:1:103", + "nodeType": "YulLiteral", + "src": "388:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "379:3:103", + "nodeType": "YulIdentifier", + "src": "379:3:103" + }, + "nativeSrc": "379:11:103", + "nodeType": "YulFunctionCall", + "src": "379:11:103" + }, + { + "kind": "number", + "nativeSrc": "392:1:103", + "nodeType": "YulLiteral", + "src": "392:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "375:3:103", + "nodeType": "YulIdentifier", + "src": "375:3:103" + }, + "nativeSrc": "375:19:103", + "nodeType": "YulFunctionCall", + "src": "375:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "363:3:103", + "nodeType": "YulIdentifier", + "src": "363:3:103" + }, + "nativeSrc": "363:32:103", + "nodeType": "YulFunctionCall", + "src": "363:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "345:6:103", + "nodeType": "YulIdentifier", + "src": "345:6:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulFunctionCall", + "src": "345:51:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulExpressionStatement", + "src": "345:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "199:203:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "269:9:103", + "nodeType": "YulTypedName", + "src": "269:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "280:6:103", + "nodeType": "YulTypedName", + "src": "280:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "291:4:103", + "nodeType": "YulTypedName", + "src": "291:4:103", + "type": "" + } + ], + "src": "199:203:103" + }, + { + "body": { + "nativeSrc": "439:95:103", + "nodeType": "YulBlock", + "src": "439:95:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "456:1:103", + "nodeType": "YulLiteral", + "src": "456:1:103", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "463:3:103", + "nodeType": "YulLiteral", + "src": "463:3:103", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "468:10:103", + "nodeType": "YulLiteral", + "src": "468:10:103", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "459:3:103", + "nodeType": "YulIdentifier", + "src": "459:3:103" + }, + "nativeSrc": "459:20:103", + "nodeType": "YulFunctionCall", + "src": "459:20:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "449:6:103", + "nodeType": "YulIdentifier", + "src": "449:6:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulFunctionCall", + "src": "449:31:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulExpressionStatement", + "src": "449:31:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "496:1:103", + "nodeType": "YulLiteral", + "src": "496:1:103", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "499:4:103", + "nodeType": "YulLiteral", + "src": "499:4:103", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "489:6:103", + "nodeType": "YulIdentifier", + "src": "489:6:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulFunctionCall", + "src": "489:15:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulExpressionStatement", + "src": "489:15:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "520:1:103", + "nodeType": "YulLiteral", + "src": "520:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "523:4:103", + "nodeType": "YulLiteral", + "src": "523:4:103", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "513:6:103", + "nodeType": "YulIdentifier", + "src": "513:6:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulFunctionCall", + "src": "513:15:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulExpressionStatement", + "src": "513:15:103" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "407:127:103", + "nodeType": "YulFunctionDefinition", + "src": "407:127:103" + }, + { + "body": { + "nativeSrc": "591:666:103", + "nodeType": "YulBlock", + "src": "591:666:103", + "statements": [ + { + "body": { + "nativeSrc": "640:16:103", + "nodeType": "YulBlock", + "src": "640:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "649:1:103", + "nodeType": "YulLiteral", + "src": "649:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "652:1:103", + "nodeType": "YulLiteral", + "src": "652:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "642:6:103", + "nodeType": "YulIdentifier", + "src": "642:6:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulFunctionCall", + "src": "642:12:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulExpressionStatement", + "src": "642:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "619:6:103", + "nodeType": "YulIdentifier", + "src": "619:6:103" + }, + { + "kind": "number", + "nativeSrc": "627:4:103", + "nodeType": "YulLiteral", + "src": "627:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "615:3:103", + "nodeType": "YulIdentifier", + "src": "615:3:103" + }, + "nativeSrc": "615:17:103", + "nodeType": "YulFunctionCall", + "src": "615:17:103" + }, + { + "name": "end", + "nativeSrc": "634:3:103", + "nodeType": "YulIdentifier", + "src": "634:3:103" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "611:3:103", + "nodeType": "YulIdentifier", + "src": "611:3:103" + }, + "nativeSrc": "611:27:103", + "nodeType": "YulFunctionCall", + "src": "611:27:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "604:6:103", + "nodeType": "YulIdentifier", + "src": "604:6:103" + }, + "nativeSrc": "604:35:103", + "nodeType": "YulFunctionCall", + "src": "604:35:103" + }, + "nativeSrc": "601:55:103", + "nodeType": "YulIf", + "src": "601:55:103" + }, + { + "nativeSrc": "665:30:103", + "nodeType": "YulVariableDeclaration", + "src": "665:30:103", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "688:6:103", + "nodeType": "YulIdentifier", + "src": "688:6:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "675:12:103", + "nodeType": "YulIdentifier", + "src": "675:12:103" + }, + "nativeSrc": "675:20:103", + "nodeType": "YulFunctionCall", + "src": "675:20:103" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "669:2:103", + "nodeType": "YulTypedName", + "src": "669:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "704:28:103", + "nodeType": "YulVariableDeclaration", + "src": "704:28:103", + "value": { + "kind": "number", + "nativeSrc": "714:18:103", + "nodeType": "YulLiteral", + "src": "714:18:103", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "708:2:103", + "nodeType": "YulTypedName", + "src": "708:2:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "755:22:103", + "nodeType": "YulBlock", + "src": "755:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "757:16:103", + "nodeType": "YulIdentifier", + "src": "757:16:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulFunctionCall", + "src": "757:18:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulExpressionStatement", + "src": "757:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "747:2:103", + "nodeType": "YulIdentifier", + "src": "747:2:103" + }, + { + "name": "_2", + "nativeSrc": "751:2:103", + "nodeType": "YulIdentifier", + "src": "751:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "744:2:103", + "nodeType": "YulIdentifier", + "src": "744:2:103" + }, + "nativeSrc": "744:10:103", + "nodeType": "YulFunctionCall", + "src": "744:10:103" + }, + "nativeSrc": "741:36:103", + "nodeType": "YulIf", + "src": "741:36:103" + }, + { + "nativeSrc": "786:17:103", + "nodeType": "YulVariableDeclaration", + "src": "786:17:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "800:2:103", + "nodeType": "YulLiteral", + "src": "800:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "796:3:103", + "nodeType": "YulIdentifier", + "src": "796:3:103" + }, + "nativeSrc": "796:7:103", + "nodeType": "YulFunctionCall", + "src": "796:7:103" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "790:2:103", + "nodeType": "YulTypedName", + "src": "790:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "812:23:103", + "nodeType": "YulVariableDeclaration", + "src": "812:23:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "832:2:103", + "nodeType": "YulLiteral", + "src": "832:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "826:5:103", + "nodeType": "YulIdentifier", + "src": "826:5:103" + }, + "nativeSrc": "826:9:103", + "nodeType": "YulFunctionCall", + "src": "826:9:103" + }, + "variables": [ + { + "name": "memPtr", + "nativeSrc": "816:6:103", + "nodeType": "YulTypedName", + "src": "816:6:103", + "type": "" + } + ] + }, + { + "nativeSrc": "844:71:103", + "nodeType": "YulVariableDeclaration", + "src": "844:71:103", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "866:6:103", + "nodeType": "YulIdentifier", + "src": "866:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "890:2:103", + "nodeType": "YulIdentifier", + "src": "890:2:103" + }, + { + "kind": "number", + "nativeSrc": "894:4:103", + "nodeType": "YulLiteral", + "src": "894:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "886:3:103", + "nodeType": "YulIdentifier", + "src": "886:3:103" + }, + "nativeSrc": "886:13:103", + "nodeType": "YulFunctionCall", + "src": "886:13:103" + }, + { + "name": "_3", + "nativeSrc": "901:2:103", + "nodeType": "YulIdentifier", + "src": "901:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "882:3:103", + "nodeType": "YulIdentifier", + "src": "882:3:103" + }, + "nativeSrc": "882:22:103", + "nodeType": "YulFunctionCall", + "src": "882:22:103" + }, + { + "kind": "number", + "nativeSrc": "906:2:103", + "nodeType": "YulLiteral", + "src": "906:2:103", + "type": "", + "value": "63" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "878:3:103", + "nodeType": "YulIdentifier", + "src": "878:3:103" + }, + "nativeSrc": "878:31:103", + "nodeType": "YulFunctionCall", + "src": "878:31:103" + }, + { + "name": "_3", + "nativeSrc": "911:2:103", + "nodeType": "YulIdentifier", + "src": "911:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "874:3:103", + "nodeType": "YulIdentifier", + "src": "874:3:103" + }, + "nativeSrc": "874:40:103", + "nodeType": "YulFunctionCall", + "src": "874:40:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "862:3:103", + "nodeType": "YulIdentifier", + "src": "862:3:103" + }, + "nativeSrc": "862:53:103", + "nodeType": "YulFunctionCall", + "src": "862:53:103" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "848:10:103", + "nodeType": "YulTypedName", + "src": "848:10:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "974:22:103", + "nodeType": "YulBlock", + "src": "974:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "976:16:103", + "nodeType": "YulIdentifier", + "src": "976:16:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulFunctionCall", + "src": "976:18:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulExpressionStatement", + "src": "976:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "933:10:103", + "nodeType": "YulIdentifier", + "src": "933:10:103" + }, + { + "name": "_2", + "nativeSrc": "945:2:103", + "nodeType": "YulIdentifier", + "src": "945:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "930:2:103", + "nodeType": "YulIdentifier", + "src": "930:2:103" + }, + "nativeSrc": "930:18:103", + "nodeType": "YulFunctionCall", + "src": "930:18:103" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "953:10:103", + "nodeType": "YulIdentifier", + "src": "953:10:103" + }, + { + "name": "memPtr", + "nativeSrc": "965:6:103", + "nodeType": "YulIdentifier", + "src": "965:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "950:2:103", + "nodeType": "YulIdentifier", + "src": "950:2:103" + }, + "nativeSrc": "950:22:103", + "nodeType": "YulFunctionCall", + "src": "950:22:103" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "927:2:103", + "nodeType": "YulIdentifier", + "src": "927:2:103" + }, + "nativeSrc": "927:46:103", + "nodeType": "YulFunctionCall", + "src": "927:46:103" + }, + "nativeSrc": "924:72:103", + "nodeType": "YulIf", + "src": "924:72:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1012:2:103", + "nodeType": "YulLiteral", + "src": "1012:2:103", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "1016:10:103", + "nodeType": "YulIdentifier", + "src": "1016:10:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1005:6:103", + "nodeType": "YulIdentifier", + "src": "1005:6:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulFunctionCall", + "src": "1005:22:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulExpressionStatement", + "src": "1005:22:103" + }, + { + "expression": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1043:6:103", + "nodeType": "YulIdentifier", + "src": "1043:6:103" + }, + { + "name": "_1", + "nativeSrc": "1051:2:103", + "nodeType": "YulIdentifier", + "src": "1051:2:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1036:6:103", + "nodeType": "YulIdentifier", + "src": "1036:6:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulFunctionCall", + "src": "1036:18:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulExpressionStatement", + "src": "1036:18:103" + }, + { + "body": { + "nativeSrc": "1102:16:103", + "nodeType": "YulBlock", + "src": "1102:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1111:1:103", + "nodeType": "YulLiteral", + "src": "1111:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1114:1:103", + "nodeType": "YulLiteral", + "src": "1114:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1104:6:103", + "nodeType": "YulIdentifier", + "src": "1104:6:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulFunctionCall", + "src": "1104:12:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulExpressionStatement", + "src": "1104:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1077:6:103", + "nodeType": "YulIdentifier", + "src": "1077:6:103" + }, + { + "name": "_1", + "nativeSrc": "1085:2:103", + "nodeType": "YulIdentifier", + "src": "1085:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1073:3:103", + "nodeType": "YulIdentifier", + "src": "1073:3:103" + }, + "nativeSrc": "1073:15:103", + "nodeType": "YulFunctionCall", + "src": "1073:15:103" + }, + { + "kind": "number", + "nativeSrc": "1090:4:103", + "nodeType": "YulLiteral", + "src": "1090:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1069:3:103", + "nodeType": "YulIdentifier", + "src": "1069:3:103" + }, + "nativeSrc": "1069:26:103", + "nodeType": "YulFunctionCall", + "src": "1069:26:103" + }, + { + "name": "end", + "nativeSrc": "1097:3:103", + "nodeType": "YulIdentifier", + "src": "1097:3:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1066:2:103", + "nodeType": "YulIdentifier", + "src": "1066:2:103" + }, + "nativeSrc": "1066:35:103", + "nodeType": "YulFunctionCall", + "src": "1066:35:103" + }, + "nativeSrc": "1063:55:103", + "nodeType": "YulIf", + "src": "1063:55:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1144:6:103", + "nodeType": "YulIdentifier", + "src": "1144:6:103" + }, + { + "kind": "number", + "nativeSrc": "1152:4:103", + "nodeType": "YulLiteral", + "src": "1152:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1140:3:103", + "nodeType": "YulIdentifier", + "src": "1140:3:103" + }, + "nativeSrc": "1140:17:103", + "nodeType": "YulFunctionCall", + "src": "1140:17:103" + }, + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1163:6:103", + "nodeType": "YulIdentifier", + "src": "1163:6:103" + }, + { + "kind": "number", + "nativeSrc": "1171:4:103", + "nodeType": "YulLiteral", + "src": "1171:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1159:3:103", + "nodeType": "YulIdentifier", + "src": "1159:3:103" + }, + "nativeSrc": "1159:17:103", + "nodeType": "YulFunctionCall", + "src": "1159:17:103" + }, + { + "name": "_1", + "nativeSrc": "1178:2:103", + "nodeType": "YulIdentifier", + "src": "1178:2:103" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "1127:12:103", + "nodeType": "YulIdentifier", + "src": "1127:12:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulFunctionCall", + "src": "1127:54:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulExpressionStatement", + "src": "1127:54:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1205:6:103", + "nodeType": "YulIdentifier", + "src": "1205:6:103" + }, + { + "name": "_1", + "nativeSrc": "1213:2:103", + "nodeType": "YulIdentifier", + "src": "1213:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1201:3:103", + "nodeType": "YulIdentifier", + "src": "1201:3:103" + }, + "nativeSrc": "1201:15:103", + "nodeType": "YulFunctionCall", + "src": "1201:15:103" + }, + { + "kind": "number", + "nativeSrc": "1218:4:103", + "nodeType": "YulLiteral", + "src": "1218:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1197:3:103", + "nodeType": "YulIdentifier", + "src": "1197:3:103" + }, + "nativeSrc": "1197:26:103", + "nodeType": "YulFunctionCall", + "src": "1197:26:103" + }, + { + "kind": "number", + "nativeSrc": "1225:1:103", + "nodeType": "YulLiteral", + "src": "1225:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1190:6:103", + "nodeType": "YulIdentifier", + "src": "1190:6:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulFunctionCall", + "src": "1190:37:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulExpressionStatement", + "src": "1190:37:103" + }, + { + "nativeSrc": "1236:15:103", + "nodeType": "YulAssignment", + "src": "1236:15:103", + "value": { + "name": "memPtr", + "nativeSrc": "1245:6:103", + "nodeType": "YulIdentifier", + "src": "1245:6:103" + }, + "variableNames": [ + { + "name": "array", + "nativeSrc": "1236:5:103", + "nodeType": "YulIdentifier", + "src": "1236:5:103" + } + ] + } + ] + }, + "name": "abi_decode_bytes", + "nativeSrc": "539:718:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "565:6:103", + "nodeType": "YulTypedName", + "src": "565:6:103", + "type": "" + }, + { + "name": "end", + "nativeSrc": "573:3:103", + "nodeType": "YulTypedName", + "src": "573:3:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nativeSrc": "581:5:103", + "nodeType": "YulTypedName", + "src": "581:5:103", + "type": "" + } + ], + "src": "539:718:103" + }, + { + "body": { + "nativeSrc": "1358:292:103", + "nodeType": "YulBlock", + "src": "1358:292:103", + "statements": [ + { + "body": { + "nativeSrc": "1404:16:103", + "nodeType": "YulBlock", + "src": "1404:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1413:1:103", + "nodeType": "YulLiteral", + "src": "1413:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1416:1:103", + "nodeType": "YulLiteral", + "src": "1416:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1406:6:103", + "nodeType": "YulIdentifier", + "src": "1406:6:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulFunctionCall", + "src": "1406:12:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulExpressionStatement", + "src": "1406:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1379:7:103", + "nodeType": "YulIdentifier", + "src": "1379:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1388:9:103", + "nodeType": "YulIdentifier", + "src": "1388:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1375:3:103", + "nodeType": "YulIdentifier", + "src": "1375:3:103" + }, + "nativeSrc": "1375:23:103", + "nodeType": "YulFunctionCall", + "src": "1375:23:103" + }, + { + "kind": "number", + "nativeSrc": "1400:2:103", + "nodeType": "YulLiteral", + "src": "1400:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1371:3:103", + "nodeType": "YulIdentifier", + "src": "1371:3:103" + }, + "nativeSrc": "1371:32:103", + "nodeType": "YulFunctionCall", + "src": "1371:32:103" + }, + "nativeSrc": "1368:52:103", + "nodeType": "YulIf", + "src": "1368:52:103" + }, + { + "nativeSrc": "1429:37:103", + "nodeType": "YulVariableDeclaration", + "src": "1429:37:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1456:9:103", + "nodeType": "YulIdentifier", + "src": "1456:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1443:12:103", + "nodeType": "YulIdentifier", + "src": "1443:12:103" + }, + "nativeSrc": "1443:23:103", + "nodeType": "YulFunctionCall", + "src": "1443:23:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "1433:6:103", + "nodeType": "YulTypedName", + "src": "1433:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1509:16:103", + "nodeType": "YulBlock", + "src": "1509:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1518:1:103", + "nodeType": "YulLiteral", + "src": "1518:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1521:1:103", + "nodeType": "YulLiteral", + "src": "1521:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1511:6:103", + "nodeType": "YulIdentifier", + "src": "1511:6:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulFunctionCall", + "src": "1511:12:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulExpressionStatement", + "src": "1511:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1481:6:103", + "nodeType": "YulIdentifier", + "src": "1481:6:103" + }, + { + "kind": "number", + "nativeSrc": "1489:18:103", + "nodeType": "YulLiteral", + "src": "1489:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1478:2:103", + "nodeType": "YulIdentifier", + "src": "1478:2:103" + }, + "nativeSrc": "1478:30:103", + "nodeType": "YulFunctionCall", + "src": "1478:30:103" + }, + "nativeSrc": "1475:50:103", + "nodeType": "YulIf", + "src": "1475:50:103" + }, + { + "nativeSrc": "1534:59:103", + "nodeType": "YulAssignment", + "src": "1534:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1565:9:103", + "nodeType": "YulIdentifier", + "src": "1565:9:103" + }, + { + "name": "offset", + "nativeSrc": "1576:6:103", + "nodeType": "YulIdentifier", + "src": "1576:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1561:3:103", + "nodeType": "YulIdentifier", + "src": "1561:3:103" + }, + "nativeSrc": "1561:22:103", + "nodeType": "YulFunctionCall", + "src": "1561:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "1585:7:103", + "nodeType": "YulIdentifier", + "src": "1585:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "1544:16:103", + "nodeType": "YulIdentifier", + "src": "1544:16:103" + }, + "nativeSrc": "1544:49:103", + "nodeType": "YulFunctionCall", + "src": "1544:49:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1534:6:103", + "nodeType": "YulIdentifier", + "src": "1534:6:103" + } + ] + }, + { + "nativeSrc": "1602:42:103", + "nodeType": "YulAssignment", + "src": "1602:42:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1629:9:103", + "nodeType": "YulIdentifier", + "src": "1629:9:103" + }, + { + "kind": "number", + "nativeSrc": "1640:2:103", + "nodeType": "YulLiteral", + "src": "1640:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1625:3:103", + "nodeType": "YulIdentifier", + "src": "1625:3:103" + }, + "nativeSrc": "1625:18:103", + "nodeType": "YulFunctionCall", + "src": "1625:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1612:12:103", + "nodeType": "YulIdentifier", + "src": "1612:12:103" + }, + "nativeSrc": "1612:32:103", + "nodeType": "YulFunctionCall", + "src": "1612:32:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "1602:6:103", + "nodeType": "YulIdentifier", + "src": "1602:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes_memory_ptrt_bytes32", + "nativeSrc": "1262:388:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1316:9:103", + "nodeType": "YulTypedName", + "src": "1316:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1327:7:103", + "nodeType": "YulTypedName", + "src": "1327:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1339:6:103", + "nodeType": "YulTypedName", + "src": "1339:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1347:6:103", + "nodeType": "YulTypedName", + "src": "1347:6:103", + "type": "" + } + ], + "src": "1262:388:103" + }, + { + "body": { + "nativeSrc": "1768:449:103", + "nodeType": "YulBlock", + "src": "1768:449:103", + "statements": [ + { + "body": { + "nativeSrc": "1814:16:103", + "nodeType": "YulBlock", + "src": "1814:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1823:1:103", + "nodeType": "YulLiteral", + "src": "1823:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1826:1:103", + "nodeType": "YulLiteral", + "src": "1826:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1816:6:103", + "nodeType": "YulIdentifier", + "src": "1816:6:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulFunctionCall", + "src": "1816:12:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulExpressionStatement", + "src": "1816:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1789:7:103", + "nodeType": "YulIdentifier", + "src": "1789:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1798:9:103", + "nodeType": "YulIdentifier", + "src": "1798:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1785:3:103", + "nodeType": "YulIdentifier", + "src": "1785:3:103" + }, + "nativeSrc": "1785:23:103", + "nodeType": "YulFunctionCall", + "src": "1785:23:103" + }, + { + "kind": "number", + "nativeSrc": "1810:2:103", + "nodeType": "YulLiteral", + "src": "1810:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1781:3:103", + "nodeType": "YulIdentifier", + "src": "1781:3:103" + }, + "nativeSrc": "1781:32:103", + "nodeType": "YulFunctionCall", + "src": "1781:32:103" + }, + "nativeSrc": "1778:52:103", + "nodeType": "YulIf", + "src": "1778:52:103" + }, + { + "nativeSrc": "1839:33:103", + "nodeType": "YulAssignment", + "src": "1839:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1862:9:103", + "nodeType": "YulIdentifier", + "src": "1862:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1849:12:103", + "nodeType": "YulIdentifier", + "src": "1849:12:103" + }, + "nativeSrc": "1849:23:103", + "nodeType": "YulFunctionCall", + "src": "1849:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1839:6:103", + "nodeType": "YulIdentifier", + "src": "1839:6:103" + } + ] + }, + { + "nativeSrc": "1881:45:103", + "nodeType": "YulVariableDeclaration", + "src": "1881:45:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1911:9:103", + "nodeType": "YulIdentifier", + "src": "1911:9:103" + }, + { + "kind": "number", + "nativeSrc": "1922:2:103", + "nodeType": "YulLiteral", + "src": "1922:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1907:3:103", + "nodeType": "YulIdentifier", + "src": "1907:3:103" + }, + "nativeSrc": "1907:18:103", + "nodeType": "YulFunctionCall", + "src": "1907:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1894:12:103", + "nodeType": "YulIdentifier", + "src": "1894:12:103" + }, + "nativeSrc": "1894:32:103", + "nodeType": "YulFunctionCall", + "src": "1894:32:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "1885:5:103", + "nodeType": "YulTypedName", + "src": "1885:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1989:16:103", + "nodeType": "YulBlock", + "src": "1989:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1998:1:103", + "nodeType": "YulLiteral", + "src": "1998:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2001:1:103", + "nodeType": "YulLiteral", + "src": "2001:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1991:6:103", + "nodeType": "YulIdentifier", + "src": "1991:6:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulFunctionCall", + "src": "1991:12:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulExpressionStatement", + "src": "1991:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1948:5:103", + "nodeType": "YulIdentifier", + "src": "1948:5:103" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1959:5:103", + "nodeType": "YulIdentifier", + "src": "1959:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1974:3:103", + "nodeType": "YulLiteral", + "src": "1974:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1979:1:103", + "nodeType": "YulLiteral", + "src": "1979:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1970:3:103", + "nodeType": "YulIdentifier", + "src": "1970:3:103" + }, + "nativeSrc": "1970:11:103", + "nodeType": "YulFunctionCall", + "src": "1970:11:103" + }, + { + "kind": "number", + "nativeSrc": "1983:1:103", + "nodeType": "YulLiteral", + "src": "1983:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1966:3:103", + "nodeType": "YulIdentifier", + "src": "1966:3:103" + }, + "nativeSrc": "1966:19:103", + "nodeType": "YulFunctionCall", + "src": "1966:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1955:3:103", + "nodeType": "YulIdentifier", + "src": "1955:3:103" + }, + "nativeSrc": "1955:31:103", + "nodeType": "YulFunctionCall", + "src": "1955:31:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1945:2:103", + "nodeType": "YulIdentifier", + "src": "1945:2:103" + }, + "nativeSrc": "1945:42:103", + "nodeType": "YulFunctionCall", + "src": "1945:42:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1938:6:103", + "nodeType": "YulIdentifier", + "src": "1938:6:103" + }, + "nativeSrc": "1938:50:103", + "nodeType": "YulFunctionCall", + "src": "1938:50:103" + }, + "nativeSrc": "1935:70:103", + "nodeType": "YulIf", + "src": "1935:70:103" + }, + { + "nativeSrc": "2014:15:103", + "nodeType": "YulAssignment", + "src": "2014:15:103", + "value": { + "name": "value", + "nativeSrc": "2024:5:103", + "nodeType": "YulIdentifier", + "src": "2024:5:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2014:6:103", + "nodeType": "YulIdentifier", + "src": "2014:6:103" + } + ] + }, + { + "nativeSrc": "2038:46:103", + "nodeType": "YulVariableDeclaration", + "src": "2038:46:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2069:9:103", + "nodeType": "YulIdentifier", + "src": "2069:9:103" + }, + { + "kind": "number", + "nativeSrc": "2080:2:103", + "nodeType": "YulLiteral", + "src": "2080:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2065:3:103", + "nodeType": "YulIdentifier", + "src": "2065:3:103" + }, + "nativeSrc": "2065:18:103", + "nodeType": "YulFunctionCall", + "src": "2065:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2052:12:103", + "nodeType": "YulIdentifier", + "src": "2052:12:103" + }, + "nativeSrc": "2052:32:103", + "nodeType": "YulFunctionCall", + "src": "2052:32:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "2042:6:103", + "nodeType": "YulTypedName", + "src": "2042:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2127:16:103", + "nodeType": "YulBlock", + "src": "2127:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2136:1:103", + "nodeType": "YulLiteral", + "src": "2136:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2139:1:103", + "nodeType": "YulLiteral", + "src": "2139:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2129:6:103", + "nodeType": "YulIdentifier", + "src": "2129:6:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulFunctionCall", + "src": "2129:12:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulExpressionStatement", + "src": "2129:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2099:6:103", + "nodeType": "YulIdentifier", + "src": "2099:6:103" + }, + { + "kind": "number", + "nativeSrc": "2107:18:103", + "nodeType": "YulLiteral", + "src": "2107:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2096:2:103", + "nodeType": "YulIdentifier", + "src": "2096:2:103" + }, + "nativeSrc": "2096:30:103", + "nodeType": "YulFunctionCall", + "src": "2096:30:103" + }, + "nativeSrc": "2093:50:103", + "nodeType": "YulIf", + "src": "2093:50:103" + }, + { + "nativeSrc": "2152:59:103", + "nodeType": "YulAssignment", + "src": "2152:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2183:9:103", + "nodeType": "YulIdentifier", + "src": "2183:9:103" + }, + { + "name": "offset", + "nativeSrc": "2194:6:103", + "nodeType": "YulIdentifier", + "src": "2194:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2179:3:103", + "nodeType": "YulIdentifier", + "src": "2179:3:103" + }, + "nativeSrc": "2179:22:103", + "nodeType": "YulFunctionCall", + "src": "2179:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "2203:7:103", + "nodeType": "YulIdentifier", + "src": "2203:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "2162:16:103", + "nodeType": "YulIdentifier", + "src": "2162:16:103" + }, + "nativeSrc": "2162:49:103", + "nodeType": "YulFunctionCall", + "src": "2162:49:103" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "2152:6:103", + "nodeType": "YulIdentifier", + "src": "2152:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr", + "nativeSrc": "1655:562:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1718:9:103", + "nodeType": "YulTypedName", + "src": "1718:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1729:7:103", + "nodeType": "YulTypedName", + "src": "1729:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1741:6:103", + "nodeType": "YulTypedName", + "src": "1741:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1749:6:103", + "nodeType": "YulTypedName", + "src": "1749:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1757:6:103", + "nodeType": "YulTypedName", + "src": "1757:6:103", + "type": "" + } + ], + "src": "1655:562:103" + }, + { + "body": { + "nativeSrc": "2351:102:103", + "nodeType": "YulBlock", + "src": "2351:102:103", + "statements": [ + { + "nativeSrc": "2361:26:103", + "nodeType": "YulAssignment", + "src": "2361:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2373:9:103", + "nodeType": "YulIdentifier", + "src": "2373:9:103" + }, + { + "kind": "number", + "nativeSrc": "2384:2:103", + "nodeType": "YulLiteral", + "src": "2384:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2369:3:103", + "nodeType": "YulIdentifier", + "src": "2369:3:103" + }, + "nativeSrc": "2369:18:103", + "nodeType": "YulFunctionCall", + "src": "2369:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2361:4:103", + "nodeType": "YulIdentifier", + "src": "2361:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2403:9:103", + "nodeType": "YulIdentifier", + "src": "2403:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2418:6:103", + "nodeType": "YulIdentifier", + "src": "2418:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2434:3:103", + "nodeType": "YulLiteral", + "src": "2434:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2439:1:103", + "nodeType": "YulLiteral", + "src": "2439:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2430:3:103", + "nodeType": "YulIdentifier", + "src": "2430:3:103" + }, + "nativeSrc": "2430:11:103", + "nodeType": "YulFunctionCall", + "src": "2430:11:103" + }, + { + "kind": "number", + "nativeSrc": "2443:1:103", + "nodeType": "YulLiteral", + "src": "2443:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2426:3:103", + "nodeType": "YulIdentifier", + "src": "2426:3:103" + }, + "nativeSrc": "2426:19:103", + "nodeType": "YulFunctionCall", + "src": "2426:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2414:3:103", + "nodeType": "YulIdentifier", + "src": "2414:3:103" + }, + "nativeSrc": "2414:32:103", + "nodeType": "YulFunctionCall", + "src": "2414:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2396:6:103", + "nodeType": "YulIdentifier", + "src": "2396:6:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulFunctionCall", + "src": "2396:51:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulExpressionStatement", + "src": "2396:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed", + "nativeSrc": "2222:231:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2320:9:103", + "nodeType": "YulTypedName", + "src": "2320:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2331:6:103", + "nodeType": "YulTypedName", + "src": "2331:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2342:4:103", + "nodeType": "YulTypedName", + "src": "2342:4:103", + "type": "" + } + ], + "src": "2222:231:103" + }, + { + "body": { + "nativeSrc": "2632:223:103", + "nodeType": "YulBlock", + "src": "2632:223:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2649:9:103", + "nodeType": "YulIdentifier", + "src": "2649:9:103" + }, + { + "kind": "number", + "nativeSrc": "2660:2:103", + "nodeType": "YulLiteral", + "src": "2660:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2642:6:103", + "nodeType": "YulIdentifier", + "src": "2642:6:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulFunctionCall", + "src": "2642:21:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulExpressionStatement", + "src": "2642:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2683:9:103", + "nodeType": "YulIdentifier", + "src": "2683:9:103" + }, + { + "kind": "number", + "nativeSrc": "2694:2:103", + "nodeType": "YulLiteral", + "src": "2694:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2679:3:103", + "nodeType": "YulIdentifier", + "src": "2679:3:103" + }, + "nativeSrc": "2679:18:103", + "nodeType": "YulFunctionCall", + "src": "2679:18:103" + }, + { + "kind": "number", + "nativeSrc": "2699:2:103", + "nodeType": "YulLiteral", + "src": "2699:2:103", + "type": "", + "value": "33" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2672:6:103", + "nodeType": "YulIdentifier", + "src": "2672:6:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulFunctionCall", + "src": "2672:30:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulExpressionStatement", + "src": "2672:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2722:9:103", + "nodeType": "YulIdentifier", + "src": "2722:9:103" + }, + { + "kind": "number", + "nativeSrc": "2733:2:103", + "nodeType": "YulLiteral", + "src": "2733:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2718:3:103", + "nodeType": "YulIdentifier", + "src": "2718:3:103" + }, + "nativeSrc": "2718:18:103", + "nodeType": "YulFunctionCall", + "src": "2718:18:103" + }, + { + "hexValue": "5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c65", + "kind": "string", + "nativeSrc": "2738:34:103", + "nodeType": "YulLiteral", + "src": "2738:34:103", + "type": "", + "value": "WitnetDeployer: deployment faile" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2711:6:103", + "nodeType": "YulIdentifier", + "src": "2711:6:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulFunctionCall", + "src": "2711:62:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulExpressionStatement", + "src": "2711:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2793:9:103", + "nodeType": "YulIdentifier", + "src": "2793:9:103" + }, + { + "kind": "number", + "nativeSrc": "2804:2:103", + "nodeType": "YulLiteral", + "src": "2804:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2789:3:103", + "nodeType": "YulIdentifier", + "src": "2789:3:103" + }, + "nativeSrc": "2789:18:103", + "nodeType": "YulFunctionCall", + "src": "2789:18:103" + }, + { + "hexValue": "64", + "kind": "string", + "nativeSrc": "2809:3:103", + "nodeType": "YulLiteral", + "src": "2809:3:103", + "type": "", + "value": "d" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2782:6:103", + "nodeType": "YulIdentifier", + "src": "2782:6:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulFunctionCall", + "src": "2782:31:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulExpressionStatement", + "src": "2782:31:103" + }, + { + "nativeSrc": "2822:27:103", + "nodeType": "YulAssignment", + "src": "2822:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2834:9:103", + "nodeType": "YulIdentifier", + "src": "2834:9:103" + }, + { + "kind": "number", + "nativeSrc": "2845:3:103", + "nodeType": "YulLiteral", + "src": "2845:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2830:3:103", + "nodeType": "YulIdentifier", + "src": "2830:3:103" + }, + "nativeSrc": "2830:19:103", + "nodeType": "YulFunctionCall", + "src": "2830:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2822:4:103", + "nodeType": "YulIdentifier", + "src": "2822:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "2458:397:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2609:9:103", + "nodeType": "YulTypedName", + "src": "2609:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2623:4:103", + "nodeType": "YulTypedName", + "src": "2623:4:103", + "type": "" + } + ], + "src": "2458:397:103" + }, + { + "body": { + "nativeSrc": "3007:496:103", + "nodeType": "YulBlock", + "src": "3007:496:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3024:9:103", + "nodeType": "YulIdentifier", + "src": "3024:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3039:6:103", + "nodeType": "YulIdentifier", + "src": "3039:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3055:3:103", + "nodeType": "YulLiteral", + "src": "3055:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3060:1:103", + "nodeType": "YulLiteral", + "src": "3060:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3051:3:103", + "nodeType": "YulIdentifier", + "src": "3051:3:103" + }, + "nativeSrc": "3051:11:103", + "nodeType": "YulFunctionCall", + "src": "3051:11:103" + }, + { + "kind": "number", + "nativeSrc": "3064:1:103", + "nodeType": "YulLiteral", + "src": "3064:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3047:3:103", + "nodeType": "YulIdentifier", + "src": "3047:3:103" + }, + "nativeSrc": "3047:19:103", + "nodeType": "YulFunctionCall", + "src": "3047:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3035:3:103", + "nodeType": "YulIdentifier", + "src": "3035:3:103" + }, + "nativeSrc": "3035:32:103", + "nodeType": "YulFunctionCall", + "src": "3035:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3017:6:103", + "nodeType": "YulIdentifier", + "src": "3017:6:103" + }, + "nativeSrc": "3017:51:103", + "nodeType": "YulFunctionCall", + "src": "3017:51:103" + }, + "nativeSrc": "3017:51:103", + "nodeType": "YulExpressionStatement", + "src": "3017:51:103" + }, + { + "nativeSrc": "3077:12:103", + "nodeType": "YulVariableDeclaration", + "src": "3077:12:103", + "value": { + "kind": "number", + "nativeSrc": "3087:2:103", + "nodeType": "YulLiteral", + "src": "3087:2:103", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "3081:2:103", + "nodeType": "YulTypedName", + "src": "3081:2:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3109:9:103", + "nodeType": "YulIdentifier", + "src": "3109:9:103" + }, + { + "kind": "number", + "nativeSrc": "3120:2:103", + "nodeType": "YulLiteral", + "src": "3120:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3105:3:103", + "nodeType": "YulIdentifier", + "src": "3105:3:103" + }, + "nativeSrc": "3105:18:103", + "nodeType": "YulFunctionCall", + "src": "3105:18:103" + }, + { + "kind": "number", + "nativeSrc": "3125:2:103", + "nodeType": "YulLiteral", + "src": "3125:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3098:6:103", + "nodeType": "YulIdentifier", + "src": "3098:6:103" + }, + "nativeSrc": "3098:30:103", + "nodeType": "YulFunctionCall", + "src": "3098:30:103" + }, + "nativeSrc": "3098:30:103", + "nodeType": "YulExpressionStatement", + "src": "3098:30:103" + }, + { + "nativeSrc": "3137:27:103", + "nodeType": "YulVariableDeclaration", + "src": "3137:27:103", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3157:6:103", + "nodeType": "YulIdentifier", + "src": "3157:6:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3151:5:103", + "nodeType": "YulIdentifier", + "src": "3151:5:103" + }, + "nativeSrc": "3151:13:103", + "nodeType": "YulFunctionCall", + "src": "3151:13:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "3141:6:103", + "nodeType": "YulTypedName", + "src": "3141:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3184:9:103", + "nodeType": "YulIdentifier", + "src": "3184:9:103" + }, + { + "kind": "number", + "nativeSrc": "3195:2:103", + "nodeType": "YulLiteral", + "src": "3195:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3180:3:103", + "nodeType": "YulIdentifier", + "src": "3180:3:103" + }, + "nativeSrc": "3180:18:103", + "nodeType": "YulFunctionCall", + "src": "3180:18:103" + }, + { + "name": "length", + "nativeSrc": "3200:6:103", + "nodeType": "YulIdentifier", + "src": "3200:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3173:6:103", + "nodeType": "YulIdentifier", + "src": "3173:6:103" + }, + "nativeSrc": "3173:34:103", + "nodeType": "YulFunctionCall", + "src": "3173:34:103" + }, + "nativeSrc": "3173:34:103", + "nodeType": "YulExpressionStatement", + "src": "3173:34:103" + }, + { + "nativeSrc": "3216:10:103", + "nodeType": "YulVariableDeclaration", + "src": "3216:10:103", + "value": { + "kind": "number", + "nativeSrc": "3225:1:103", + "nodeType": "YulLiteral", + "src": "3225:1:103", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "3220:1:103", + "nodeType": "YulTypedName", + "src": "3220:1:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3285:90:103", + "nodeType": "YulBlock", + "src": "3285:90:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3314:9:103", + "nodeType": "YulIdentifier", + "src": "3314:9:103" + }, + { + "name": "i", + "nativeSrc": "3325:1:103", + "nodeType": "YulIdentifier", + "src": "3325:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3310:3:103", + "nodeType": "YulIdentifier", + "src": "3310:3:103" + }, + "nativeSrc": "3310:17:103", + "nodeType": "YulFunctionCall", + "src": "3310:17:103" + }, + { + "kind": "number", + "nativeSrc": "3329:2:103", + "nodeType": "YulLiteral", + "src": "3329:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3306:3:103", + "nodeType": "YulIdentifier", + "src": "3306:3:103" + }, + "nativeSrc": "3306:26:103", + "nodeType": "YulFunctionCall", + "src": "3306:26:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3348:6:103", + "nodeType": "YulIdentifier", + "src": "3348:6:103" + }, + { + "name": "i", + "nativeSrc": "3356:1:103", + "nodeType": "YulIdentifier", + "src": "3356:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3344:3:103", + "nodeType": "YulIdentifier", + "src": "3344:3:103" + }, + "nativeSrc": "3344:14:103", + "nodeType": "YulFunctionCall", + "src": "3344:14:103" + }, + { + "name": "_1", + "nativeSrc": "3360:2:103", + "nodeType": "YulIdentifier", + "src": "3360:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3340:3:103", + "nodeType": "YulIdentifier", + "src": "3340:3:103" + }, + "nativeSrc": "3340:23:103", + "nodeType": "YulFunctionCall", + "src": "3340:23:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3334:5:103", + "nodeType": "YulIdentifier", + "src": "3334:5:103" + }, + "nativeSrc": "3334:30:103", + "nodeType": "YulFunctionCall", + "src": "3334:30:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3299:6:103", + "nodeType": "YulIdentifier", + "src": "3299:6:103" + }, + "nativeSrc": "3299:66:103", + "nodeType": "YulFunctionCall", + "src": "3299:66:103" + }, + "nativeSrc": "3299:66:103", + "nodeType": "YulExpressionStatement", + "src": "3299:66:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3246:1:103", + "nodeType": "YulIdentifier", + "src": "3246:1:103" + }, + { + "name": "length", + "nativeSrc": "3249:6:103", + "nodeType": "YulIdentifier", + "src": "3249:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3243:2:103", + "nodeType": "YulIdentifier", + "src": "3243:2:103" + }, + "nativeSrc": "3243:13:103", + "nodeType": "YulFunctionCall", + "src": "3243:13:103" + }, + "nativeSrc": "3235:140:103", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "3257:19:103", + "nodeType": "YulBlock", + "src": "3257:19:103", + "statements": [ + { + "nativeSrc": "3259:15:103", + "nodeType": "YulAssignment", + "src": "3259:15:103", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3268:1:103", + "nodeType": "YulIdentifier", + "src": "3268:1:103" + }, + { + "name": "_1", + "nativeSrc": "3271:2:103", + "nodeType": "YulIdentifier", + "src": "3271:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3264:3:103", + "nodeType": "YulIdentifier", + "src": "3264:3:103" + }, + "nativeSrc": "3264:10:103", + "nodeType": "YulFunctionCall", + "src": "3264:10:103" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "3259:1:103", + "nodeType": "YulIdentifier", + "src": "3259:1:103" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "3239:3:103", + "nodeType": "YulBlock", + "src": "3239:3:103", + "statements": [] + }, + "src": "3235:140:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3399:9:103", + "nodeType": "YulIdentifier", + "src": "3399:9:103" + }, + { + "name": "length", + "nativeSrc": "3410:6:103", + "nodeType": "YulIdentifier", + "src": "3410:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3395:3:103", + "nodeType": "YulIdentifier", + "src": "3395:3:103" + }, + "nativeSrc": "3395:22:103", + "nodeType": "YulFunctionCall", + "src": "3395:22:103" + }, + { + "kind": "number", + "nativeSrc": "3419:2:103", + "nodeType": "YulLiteral", + "src": "3419:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3391:3:103", + "nodeType": "YulIdentifier", + "src": "3391:3:103" + }, + "nativeSrc": "3391:31:103", + "nodeType": "YulFunctionCall", + "src": "3391:31:103" + }, + { + "kind": "number", + "nativeSrc": "3424:1:103", + "nodeType": "YulLiteral", + "src": "3424:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3384:6:103", + "nodeType": "YulIdentifier", + "src": "3384:6:103" + }, + "nativeSrc": "3384:42:103", + "nodeType": "YulFunctionCall", + "src": "3384:42:103" + }, + "nativeSrc": "3384:42:103", + "nodeType": "YulExpressionStatement", + "src": "3384:42:103" + }, + { + "nativeSrc": "3435:62:103", + "nodeType": "YulAssignment", + "src": "3435:62:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3451:9:103", + "nodeType": "YulIdentifier", + "src": "3451:9:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "3470:6:103", + "nodeType": "YulIdentifier", + "src": "3470:6:103" + }, + { + "kind": "number", + "nativeSrc": "3478:2:103", + "nodeType": "YulLiteral", + "src": "3478:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3466:3:103", + "nodeType": "YulIdentifier", + "src": "3466:3:103" + }, + "nativeSrc": "3466:15:103", + "nodeType": "YulFunctionCall", + "src": "3466:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3487:2:103", + "nodeType": "YulLiteral", + "src": "3487:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3483:3:103", + "nodeType": "YulIdentifier", + "src": "3483:3:103" + }, + "nativeSrc": "3483:7:103", + "nodeType": "YulFunctionCall", + "src": "3483:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3462:3:103", + "nodeType": "YulIdentifier", + "src": "3462:3:103" + }, + "nativeSrc": "3462:29:103", + "nodeType": "YulFunctionCall", + "src": "3462:29:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3447:3:103", + "nodeType": "YulIdentifier", + "src": "3447:3:103" + }, + "nativeSrc": "3447:45:103", + "nodeType": "YulFunctionCall", + "src": "3447:45:103" + }, + { + "kind": "number", + "nativeSrc": "3494:2:103", + "nodeType": "YulLiteral", + "src": "3494:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3443:3:103", + "nodeType": "YulIdentifier", + "src": "3443:3:103" + }, + "nativeSrc": "3443:54:103", + "nodeType": "YulFunctionCall", + "src": "3443:54:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3435:4:103", + "nodeType": "YulIdentifier", + "src": "3435:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "2860:643:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2968:9:103", + "nodeType": "YulTypedName", + "src": "2968:9:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2979:6:103", + "nodeType": "YulTypedName", + "src": "2979:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2987:6:103", + "nodeType": "YulTypedName", + "src": "2987:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2998:4:103", + "nodeType": "YulTypedName", + "src": "2998:4:103", + "type": "" + } + ], + "src": "2860:643:103" + }, + { + "body": { + "nativeSrc": "3586:199:103", + "nodeType": "YulBlock", + "src": "3586:199:103", + "statements": [ + { + "body": { + "nativeSrc": "3632:16:103", + "nodeType": "YulBlock", + "src": "3632:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3641:1:103", + "nodeType": "YulLiteral", + "src": "3641:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3644:1:103", + "nodeType": "YulLiteral", + "src": "3644:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3634:6:103", + "nodeType": "YulIdentifier", + "src": "3634:6:103" + }, + "nativeSrc": "3634:12:103", + "nodeType": "YulFunctionCall", + "src": "3634:12:103" + }, + "nativeSrc": "3634:12:103", + "nodeType": "YulExpressionStatement", + "src": "3634:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3607:7:103", + "nodeType": "YulIdentifier", + "src": "3607:7:103" + }, + { + "name": "headStart", + "nativeSrc": "3616:9:103", + "nodeType": "YulIdentifier", + "src": "3616:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3603:3:103", + "nodeType": "YulIdentifier", + "src": "3603:3:103" + }, + "nativeSrc": "3603:23:103", + "nodeType": "YulFunctionCall", + "src": "3603:23:103" + }, + { + "kind": "number", + "nativeSrc": "3628:2:103", + "nodeType": "YulLiteral", + "src": "3628:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3599:3:103", + "nodeType": "YulIdentifier", + "src": "3599:3:103" + }, + "nativeSrc": "3599:32:103", + "nodeType": "YulFunctionCall", + "src": "3599:32:103" + }, + "nativeSrc": "3596:52:103", + "nodeType": "YulIf", + "src": "3596:52:103" + }, + { + "nativeSrc": "3657:29:103", + "nodeType": "YulVariableDeclaration", + "src": "3657:29:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3676:9:103", + "nodeType": "YulIdentifier", + "src": "3676:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3670:5:103", + "nodeType": "YulIdentifier", + "src": "3670:5:103" + }, + "nativeSrc": "3670:16:103", + "nodeType": "YulFunctionCall", + "src": "3670:16:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3661:5:103", + "nodeType": "YulTypedName", + "src": "3661:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3739:16:103", + "nodeType": "YulBlock", + "src": "3739:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3748:1:103", + "nodeType": "YulLiteral", + "src": "3748:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3751:1:103", + "nodeType": "YulLiteral", + "src": "3751:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3741:6:103", + "nodeType": "YulIdentifier", + "src": "3741:6:103" + }, + "nativeSrc": "3741:12:103", + "nodeType": "YulFunctionCall", + "src": "3741:12:103" + }, + "nativeSrc": "3741:12:103", + "nodeType": "YulExpressionStatement", + "src": "3741:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3708:5:103", + "nodeType": "YulIdentifier", + "src": "3708:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3729:5:103", + "nodeType": "YulIdentifier", + "src": "3729:5:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3722:6:103", + "nodeType": "YulIdentifier", + "src": "3722:6:103" + }, + "nativeSrc": "3722:13:103", + "nodeType": "YulFunctionCall", + "src": "3722:13:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3715:6:103", + "nodeType": "YulIdentifier", + "src": "3715:6:103" + }, + "nativeSrc": "3715:21:103", + "nodeType": "YulFunctionCall", + "src": "3715:21:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "3705:2:103", + "nodeType": "YulIdentifier", + "src": "3705:2:103" + }, + "nativeSrc": "3705:32:103", + "nodeType": "YulFunctionCall", + "src": "3705:32:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3698:6:103", + "nodeType": "YulIdentifier", + "src": "3698:6:103" + }, + "nativeSrc": "3698:40:103", + "nodeType": "YulFunctionCall", + "src": "3698:40:103" + }, + "nativeSrc": "3695:60:103", + "nodeType": "YulIf", + "src": "3695:60:103" + }, + { + "nativeSrc": "3764:15:103", + "nodeType": "YulAssignment", + "src": "3764:15:103", + "value": { + "name": "value", + "nativeSrc": "3774:5:103", + "nodeType": "YulIdentifier", + "src": "3774:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3764:6:103", + "nodeType": "YulIdentifier", + "src": "3764:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nativeSrc": "3508:277:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3552:9:103", + "nodeType": "YulTypedName", + "src": "3552:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3563:7:103", + "nodeType": "YulTypedName", + "src": "3563:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3575:6:103", + "nodeType": "YulTypedName", + "src": "3575:6:103", + "type": "" + } + ], + "src": "3508:277:103" + }, + { + "body": { + "nativeSrc": "3964:234:103", + "nodeType": "YulBlock", + "src": "3964:234:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3981:9:103", + "nodeType": "YulIdentifier", + "src": "3981:9:103" + }, + { + "kind": "number", + "nativeSrc": "3992:2:103", + "nodeType": "YulLiteral", + "src": "3992:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3974:6:103", + "nodeType": "YulIdentifier", + "src": "3974:6:103" + }, + "nativeSrc": "3974:21:103", + "nodeType": "YulFunctionCall", + "src": "3974:21:103" + }, + "nativeSrc": "3974:21:103", + "nodeType": "YulExpressionStatement", + "src": "3974:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4015:9:103", + "nodeType": "YulIdentifier", + "src": "4015:9:103" + }, + { + "kind": "number", + "nativeSrc": "4026:2:103", + "nodeType": "YulLiteral", + "src": "4026:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4011:3:103", + "nodeType": "YulIdentifier", + "src": "4011:3:103" + }, + "nativeSrc": "4011:18:103", + "nodeType": "YulFunctionCall", + "src": "4011:18:103" + }, + { + "kind": "number", + "nativeSrc": "4031:2:103", + "nodeType": "YulLiteral", + "src": "4031:2:103", + "type": "", + "value": "44" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4004:6:103", + "nodeType": "YulIdentifier", + "src": "4004:6:103" + }, + "nativeSrc": "4004:30:103", + "nodeType": "YulFunctionCall", + "src": "4004:30:103" + }, + "nativeSrc": "4004:30:103", + "nodeType": "YulExpressionStatement", + "src": "4004:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4054:9:103", + "nodeType": "YulIdentifier", + "src": "4054:9:103" + }, + { + "kind": "number", + "nativeSrc": "4065:2:103", + "nodeType": "YulLiteral", + "src": "4065:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4050:3:103", + "nodeType": "YulIdentifier", + "src": "4050:3:103" + }, + "nativeSrc": "4050:18:103", + "nodeType": "YulFunctionCall", + "src": "4050:18:103" + }, + { + "hexValue": "5769746e65744465706c6f796572436f6e666c7578436f72653a20616c726561", + "kind": "string", + "nativeSrc": "4070:34:103", + "nodeType": "YulLiteral", + "src": "4070:34:103", + "type": "", + "value": "WitnetDeployerConfluxCore: alrea" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4043:6:103", + "nodeType": "YulIdentifier", + "src": "4043:6:103" + }, + "nativeSrc": "4043:62:103", + "nodeType": "YulFunctionCall", + "src": "4043:62:103" + }, + "nativeSrc": "4043:62:103", + "nodeType": "YulExpressionStatement", + "src": "4043:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4125:9:103", + "nodeType": "YulIdentifier", + "src": "4125:9:103" + }, + { + "kind": "number", + "nativeSrc": "4136:2:103", + "nodeType": "YulLiteral", + "src": "4136:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4121:3:103", + "nodeType": "YulIdentifier", + "src": "4121:3:103" + }, + "nativeSrc": "4121:18:103", + "nodeType": "YulFunctionCall", + "src": "4121:18:103" + }, + { + "hexValue": "64792070726f786966696564", + "kind": "string", + "nativeSrc": "4141:14:103", + "nodeType": "YulLiteral", + "src": "4141:14:103", + "type": "", + "value": "dy proxified" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4114:6:103", + "nodeType": "YulIdentifier", + "src": "4114:6:103" + }, + "nativeSrc": "4114:42:103", + "nodeType": "YulFunctionCall", + "src": "4114:42:103" + }, + "nativeSrc": "4114:42:103", + "nodeType": "YulExpressionStatement", + "src": "4114:42:103" + }, + { + "nativeSrc": "4165:27:103", + "nodeType": "YulAssignment", + "src": "4165:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4177:9:103", + "nodeType": "YulIdentifier", + "src": "4177:9:103" + }, + { + "kind": "number", + "nativeSrc": "4188:3:103", + "nodeType": "YulLiteral", + "src": "4188:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4173:3:103", + "nodeType": "YulIdentifier", + "src": "4173:3:103" + }, + "nativeSrc": "4173:19:103", + "nodeType": "YulFunctionCall", + "src": "4173:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4165:4:103", + "nodeType": "YulIdentifier", + "src": "4165:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_65817204dea5927f14b134534592238589b47b1c532975b5952b836ed27903ee__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3790:408:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3941:9:103", + "nodeType": "YulTypedName", + "src": "3941:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3955:4:103", + "nodeType": "YulTypedName", + "src": "3955:4:103", + "type": "" + } + ], + "src": "3790:408:103" + }, + { + "body": { + "nativeSrc": "4404:240:103", + "nodeType": "YulBlock", + "src": "4404:240:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4421:3:103", + "nodeType": "YulIdentifier", + "src": "4421:3:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4430:6:103", + "nodeType": "YulIdentifier", + "src": "4430:6:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4442:3:103", + "nodeType": "YulLiteral", + "src": "4442:3:103", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "4447:3:103", + "nodeType": "YulLiteral", + "src": "4447:3:103", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4438:3:103", + "nodeType": "YulIdentifier", + "src": "4438:3:103" + }, + "nativeSrc": "4438:13:103", + "nodeType": "YulFunctionCall", + "src": "4438:13:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4426:3:103", + "nodeType": "YulIdentifier", + "src": "4426:3:103" + }, + "nativeSrc": "4426:26:103", + "nodeType": "YulFunctionCall", + "src": "4426:26:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4414:6:103", + "nodeType": "YulIdentifier", + "src": "4414:6:103" + }, + "nativeSrc": "4414:39:103", + "nodeType": "YulFunctionCall", + "src": "4414:39:103" + }, + "nativeSrc": "4414:39:103", + "nodeType": "YulExpressionStatement", + "src": "4414:39:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4473:3:103", + "nodeType": "YulIdentifier", + "src": "4473:3:103" + }, + { + "kind": "number", + "nativeSrc": "4478:1:103", + "nodeType": "YulLiteral", + "src": "4478:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4469:3:103", + "nodeType": "YulIdentifier", + "src": "4469:3:103" + }, + "nativeSrc": "4469:11:103", + "nodeType": "YulFunctionCall", + "src": "4469:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4490:2:103", + "nodeType": "YulLiteral", + "src": "4490:2:103", + "type": "", + "value": "96" + }, + { + "name": "value1", + "nativeSrc": "4494:6:103", + "nodeType": "YulIdentifier", + "src": "4494:6:103" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4486:3:103", + "nodeType": "YulIdentifier", + "src": "4486:3:103" + }, + "nativeSrc": "4486:15:103", + "nodeType": "YulFunctionCall", + "src": "4486:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4507:26:103", + "nodeType": "YulLiteral", + "src": "4507:26:103", + "type": "", + "value": "0xffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4503:3:103", + "nodeType": "YulIdentifier", + "src": "4503:3:103" + }, + "nativeSrc": "4503:31:103", + "nodeType": "YulFunctionCall", + "src": "4503:31:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4482:3:103", + "nodeType": "YulIdentifier", + "src": "4482:3:103" + }, + "nativeSrc": "4482:53:103", + "nodeType": "YulFunctionCall", + "src": "4482:53:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4462:6:103", + "nodeType": "YulIdentifier", + "src": "4462:6:103" + }, + "nativeSrc": "4462:74:103", + "nodeType": "YulFunctionCall", + "src": "4462:74:103" + }, + "nativeSrc": "4462:74:103", + "nodeType": "YulExpressionStatement", + "src": "4462:74:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4556:3:103", + "nodeType": "YulIdentifier", + "src": "4556:3:103" + }, + { + "kind": "number", + "nativeSrc": "4561:2:103", + "nodeType": "YulLiteral", + "src": "4561:2:103", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4552:3:103", + "nodeType": "YulIdentifier", + "src": "4552:3:103" + }, + "nativeSrc": "4552:12:103", + "nodeType": "YulFunctionCall", + "src": "4552:12:103" + }, + { + "name": "value2", + "nativeSrc": "4566:6:103", + "nodeType": "YulIdentifier", + "src": "4566:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4545:6:103", + "nodeType": "YulIdentifier", + "src": "4545:6:103" + }, + "nativeSrc": "4545:28:103", + "nodeType": "YulFunctionCall", + "src": "4545:28:103" + }, + "nativeSrc": "4545:28:103", + "nodeType": "YulExpressionStatement", + "src": "4545:28:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4593:3:103", + "nodeType": "YulIdentifier", + "src": "4593:3:103" + }, + { + "kind": "number", + "nativeSrc": "4598:2:103", + "nodeType": "YulLiteral", + "src": "4598:2:103", + "type": "", + "value": "53" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4589:3:103", + "nodeType": "YulIdentifier", + "src": "4589:3:103" + }, + "nativeSrc": "4589:12:103", + "nodeType": "YulFunctionCall", + "src": "4589:12:103" + }, + { + "name": "value3", + "nativeSrc": "4603:6:103", + "nodeType": "YulIdentifier", + "src": "4603:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4582:6:103", + "nodeType": "YulIdentifier", + "src": "4582:6:103" + }, + "nativeSrc": "4582:28:103", + "nodeType": "YulFunctionCall", + "src": "4582:28:103" + }, + "nativeSrc": "4582:28:103", + "nodeType": "YulExpressionStatement", + "src": "4582:28:103" + }, + { + "nativeSrc": "4619:19:103", + "nodeType": "YulAssignment", + "src": "4619:19:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4630:3:103", + "nodeType": "YulIdentifier", + "src": "4630:3:103" + }, + { + "kind": "number", + "nativeSrc": "4635:2:103", + "nodeType": "YulLiteral", + "src": "4635:2:103", + "type": "", + "value": "85" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4626:3:103", + "nodeType": "YulIdentifier", + "src": "4626:3:103" + }, + "nativeSrc": "4626:12:103", + "nodeType": "YulFunctionCall", + "src": "4626:12:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "4619:3:103", + "nodeType": "YulIdentifier", + "src": "4619:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "4203:441:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "4356:3:103", + "nodeType": "YulTypedName", + "src": "4356:3:103", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "4361:6:103", + "nodeType": "YulTypedName", + "src": "4361:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "4369:6:103", + "nodeType": "YulTypedName", + "src": "4369:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4377:6:103", + "nodeType": "YulTypedName", + "src": "4377:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4385:6:103", + "nodeType": "YulTypedName", + "src": "4385:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "4396:3:103", + "nodeType": "YulTypedName", + "src": "4396:3:103", + "type": "" + } + ], + "src": "4203:441:103" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_bytes32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function abi_decode_bytes(offset, end) -> array\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let _1 := calldataload(offset)\n let _2 := 0xffffffffffffffff\n if gt(_1, _2) { panic_error_0x41() }\n let _3 := not(31)\n let memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(and(add(_1, 0x1f), _3), 63), _3))\n if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n mstore(memPtr, _1)\n if gt(add(add(offset, _1), 0x20), end) { revert(0, 0) }\n calldatacopy(add(memPtr, 0x20), add(offset, 0x20), _1)\n mstore(add(add(memPtr, _1), 0x20), 0)\n array := memPtr\n }\n function abi_decode_tuple_t_bytes_memory_ptrt_bytes32(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_bytes(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n value0 := calldataload(headStart)\n let value := calldataload(add(headStart, 32))\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value1 := value\n let offset := calldataload(add(headStart, 64))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value2 := abi_decode_bytes(add(headStart, offset), dataEnd)\n }\n function abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 33)\n mstore(add(headStart, 64), \"WitnetDeployer: deployment faile\")\n mstore(add(headStart, 96), \"d\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n let _1 := 32\n mstore(add(headStart, 32), 64)\n let length := mload(value1)\n mstore(add(headStart, 64), length)\n let i := 0\n for { } lt(i, length) { i := add(i, _1) }\n {\n mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1)))\n }\n mstore(add(add(headStart, length), 96), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_65817204dea5927f14b134534592238589b47b1c532975b5952b836ed27903ee__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 44)\n mstore(add(headStart, 64), \"WitnetDeployerConfluxCore: alrea\")\n mstore(add(headStart, 96), \"dy proxified\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value3, value2, value1, value0) -> end\n {\n mstore(pos, and(value0, shl(248, 255)))\n mstore(add(pos, 1), and(shl(96, value1), not(0xffffffffffffffffffffffff)))\n mstore(add(pos, 21), value2)\n mstore(add(pos, 53), value3)\n end := add(pos, 85)\n }\n}", + "id": 103, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "368:2175:19:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "368:2175:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1335:201;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;1335:201:19;;;;;;;900:448:18;;;;;;:::i;:::-;;:::i;1544:994:19:-;;;;;;:::i;:::-;;:::i;768:559::-;;;;;;:::i;:::-;;:::i;1335:201::-;1444:7;1476:52;1490:30;;;;;;;;:::i;:::-;-1:-1:-1;;1490:30:19;;;;;;;;;;;;;;1522:5;1476:13;:52::i;:::-;1469:59;1335:201;-1:-1:-1;;1335:201:19:o;900:448:18:-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;1544:994:19;1689:11;1718:18;1739:30;1758:10;1739:18;:30::i;:::-;1718:51;;1784:10;-1:-1:-1;;;;;1784:22:19;;1810:1;1784:27;1780:751;;1867:50;1874:30;;;;;;;;:::i;:::-;-1:-1:-1;;1874:30:19;;;;;;;;;;;;;;1906:10;1867:6;:50::i;:::-;;2005:10;-1:-1:-1;;;;;1985:42:19;;2046:20;2237:10;2335:9;2135:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1985:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2420:10:19;-1:-1:-1;2393:39:19;;1780:751;2465:54;;-1:-1:-1;;;2465:54:19;;3992:2:103;2465:54:19;;;3974:21:103;4031:2;4011:18;;;4004:30;4070:34;4050:18;;;4043:62;-1:-1:-1;;;4121:18:103;;;4114:42;4173:19;;2465:54:19;3790:408:103;1544:994:19;;;;;;:::o;768:559::-;1129:20;;;;;;;991:177;;;-1:-1:-1;;;;;;991:177:19;;;4414:39:103;1073:4:19;4490:2:103;4486:15;-1:-1:-1;;4482:53:103;4469:11;;;4462:74;4552:12;;;4545:28;;;;4589:12;;;;4582:28;;;;991:177:19;;;;;;;;;;4626:12:103;;;;991:177:19;;;963:220;;;;;-1:-1:-1;;;;;950:289:19;-1:-1:-1;;;949:359:19;;768:559::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:643::-;3064:1;3060;3055:3;3051:11;3047:19;3039:6;3035:32;3024:9;3017:51;2998:4;3087:2;3125;3120;3109:9;3105:18;3098:30;3157:6;3151:13;3200:6;3195:2;3184:9;3180:18;3173:34;3225:1;3235:140;3249:6;3246:1;3243:13;3235:140;;;3344:14;;;3340:23;;3334:30;3310:17;;;3329:2;3306:26;3299:66;3264:10;;3235:140;;;3239:3;3424:1;3419:2;3410:6;3399:9;3395:22;3391:31;3384:42;3494:2;3487;3483:7;3478:2;3470:6;3466:15;3462:29;3451:9;3447:45;3443:54;3435:62;;;;2860:643;;;;;:::o;3508:277::-;3575:6;3628:2;3616:9;3607:7;3603:23;3599:32;3596:52;;;3644:1;3641;3634:12;3596:52;3676:9;3670:16;3729:5;3722:13;3715:21;3708:5;3705:32;3695:60;;3751:1;3748;3741:12", + "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetDeployer.sol\";\r\n\r\n/// @notice WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \r\n/// @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployerConfluxCore is WitnetDeployer {\r\n\r\n /// @notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return Deterministic contract address.\r\n function determineAddr(bytes memory _initCode, bytes32 _salt)\r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return address(\r\n (uint160(uint(keccak256(\r\n abi.encodePacked(\r\n bytes1(0xff),\r\n address(this),\r\n _salt,\r\n keccak256(_initCode)\r\n )\r\n ))) & uint160(0x0fffFFFFFfFfffFfFfFFffFffFffFFfffFfFFFFf)\r\n ) | uint160(0x8000000000000000000000000000000000000000)\r\n );\r\n }\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return determineAddr(type(WitnetProxy).creationCode, _salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual override external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n deploy(type(WitnetProxy).creationCode, _proxySalt);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployerConfluxCore: already proxified\");\r\n }\r\n }\r\n\r\n}", + "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployerConfluxCore.sol", + "ast": { + "absolutePath": "project:/contracts/core/WitnetDeployerConfluxCore.sol", + "exportedSymbols": { + "Create3": [ + 17522 + ], + "ERC165": [ + 602 + ], + "IERC165": [ + 614 + ], + "Initializable": [ + 253 + ], + "Proxiable": [ + 30273 + ], + "Upgradeable": [ + 30388 + ], + "WitnetDeployer": [ + 4262 + ], + "WitnetDeployerConfluxCore": [ + 4399 + ], + "WitnetProxy": [ + 4713 + ] + }, + "id": 4400, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4264, + "literals": [ + "solidity", + ">=", + "0.8", + ".0", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "35:31:19" + }, + { + "absolutePath": "project:/contracts/core/WitnetDeployer.sol", + "file": "./WitnetDeployer.sol", + "id": 4265, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4400, + "sourceUnit": 4263, + "src": "70:30:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4267, + "name": "WitnetDeployer", + "nameLocations": [ + "406:14:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4262, + "src": "406:14:19" + }, + "id": 4268, + "nodeType": "InheritanceSpecifier", + "src": "406:14:19" + } + ], + "canonicalName": "WitnetDeployerConfluxCore", + "contractDependencies": [ + 4713 + ], + "contractKind": "contract", + "documentation": { + "id": 4266, + "nodeType": "StructuredDocumentation", + "src": "104:262:19", + "text": "@notice WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \n @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem.\n @author Guillermo Díaz " + }, + "fullyImplemented": true, + "id": 4399, + "linearizedBaseContracts": [ + 4399, + 4262 + ], + "name": "WitnetDeployerConfluxCore", + "nameLocation": "377:25:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 4184 + ], + "body": { + "id": 4317, + "nodeType": "Block", + "src": "909:418:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + "id": 4314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + "id": 4308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30786666", + "id": 4290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1037:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + } + ], + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1030:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 4288, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1030:6:19", + "typeDescriptions": {} + } + }, + "id": 4291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1030:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "arguments": [ + { + "id": 4294, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "1073:4:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetDeployerConfluxCore_$4399", + "typeString": "contract WitnetDeployerConfluxCore" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_WitnetDeployerConfluxCore_$4399", + "typeString": "contract WitnetDeployerConfluxCore" + } + ], + "id": 4293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1065:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1065:7:19", + "typeDescriptions": {} + } + }, + "id": 4295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1065:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4296, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4273, + "src": "1101:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "id": 4298, + "name": "_initCode", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4271, + "src": "1139:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4297, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "1129:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1129:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 4286, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "991:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "995:12:19", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "991:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "991:177:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4285, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "963:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "963:220:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "958:4:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4283, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "958:4:19", + "typeDescriptions": {} + } + }, + "id": 4302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "958:226:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "950:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 4281, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "950:7:19", + "typeDescriptions": {} + } + }, + "id": 4303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "950:235:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "arguments": [ + { + "hexValue": "307830666666464646464666466666664666466646466666466666466666464666666646664646464666", + "id": 4306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1196:42:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0fffFFFFFfFfffFfFfFFffFffFffFFfffFfFFFFf" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1188:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 4304, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1188:7:19", + "typeDescriptions": {} + } + }, + "id": 4307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1188:51:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "src": "950:289:19", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "id": 4309, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "949:305:19", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "arguments": [ + { + "hexValue": "307838303030303030303030303030303030303030303030303030303030303030303030303030303030", + "id": 4312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1265:42:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x8000000000000000000000000000000000000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1257:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 4310, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1257:7:19", + "typeDescriptions": {} + } + }, + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1257:51:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "src": "949:359:19", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 4280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "927:7:19", + "typeDescriptions": {} + } + }, + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "927:392:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4278, + "id": 4316, + "nodeType": "Return", + "src": "920:399:19" + } + ] + }, + "documentation": { + "id": 4269, + "nodeType": "StructuredDocumentation", + "src": "430:332:19", + "text": "@notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\n @param _initCode Creation code, including construction logic and input parameters.\n @param _salt Arbitrary value to modify resulting address.\n @return Deterministic contract address." + }, + "functionSelector": "d3933c29", + "id": 4318, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineAddr", + "nameLocation": "777:13:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4275, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "847:8:19" + }, + "parameters": { + "id": 4274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4271, + "mutability": "mutable", + "name": "_initCode", + "nameLocation": "804:9:19", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "791:22:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4270, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "791:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4273, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "823:5:19", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "815:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4272, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "815:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "790:39:19" + }, + "returnParameters": { + "id": 4278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4277, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4318, + "src": "895:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "895:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "894:9:19" + }, + "scope": 4399, + "src": "768:559:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4197 + ], + "body": { + "id": 4334, + "nodeType": "Block", + "src": "1458:78:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 4328, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "1495:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + ], + "id": 4327, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "1490:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1490:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetProxy_$4713", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1508:12:19", + "memberName": "creationCode", + "nodeType": "MemberAccess", + "src": "1490:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4331, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4320, + "src": "1522:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4326, + "name": "determineAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4318 + ], + "referencedDeclaration": 4318, + "src": "1476:13:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes memory,bytes32) view returns (address)" + } + }, + "id": 4332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1476:52:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4325, + "id": 4333, + "nodeType": "Return", + "src": "1469:59:19" + } + ] + }, + "functionSelector": "4998f038", + "id": 4335, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineProxyAddr", + "nameLocation": "1344:18:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4322, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1396:8:19" + }, + "parameters": { + "id": 4321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4320, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "1371:5:19", + "nodeType": "VariableDeclaration", + "scope": 4335, + "src": "1363:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4319, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1363:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1362:15:19" + }, + "returnParameters": { + "id": 4325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4324, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4335, + "src": "1444:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1444:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1443:9:19" + }, + "scope": 4399, + "src": "1335:201:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4261 + ], + "body": { + "id": 4397, + "nodeType": "Block", + "src": "1707:831:19", + "statements": [ + { + "assignments": [ + 4349 + ], + "declarations": [ + { + "constant": false, + "id": 4349, + "mutability": "mutable", + "name": "_proxyAddr", + "nameLocation": "1726:10:19", + "nodeType": "VariableDeclaration", + "scope": 4397, + "src": "1718:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1718:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4353, + "initialValue": { + "arguments": [ + { + "id": 4351, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4337, + "src": "1758:10:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4350, + "name": "determineProxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4335 + ], + "referencedDeclaration": 4335, + "src": "1739:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 4352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1739:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1718:51:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4354, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4349, + "src": "1784:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1795:4:19", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "1784:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1800:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1784:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1810:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1784:27:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4395, + "nodeType": "Block", + "src": "2450:81:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e65744465706c6f796572436f6e666c7578436f72653a20616c72656164792070726f786966696564", + "id": 4392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2472:46:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_65817204dea5927f14b134534592238589b47b1c532975b5952b836ed27903ee", + "typeString": "literal_string \"WitnetDeployerConfluxCore: already proxified\"" + }, + "value": "WitnetDeployerConfluxCore: already proxified" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_65817204dea5927f14b134534592238589b47b1c532975b5952b836ed27903ee", + "typeString": "literal_string \"WitnetDeployerConfluxCore: already proxified\"" + } + ], + "id": 4391, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "2465:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2465:54:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4394, + "nodeType": "ExpressionStatement", + "src": "2465:54:19" + } + ] + }, + "id": 4396, + "nodeType": "IfStatement", + "src": "1780:751:19", + "trueBody": { + "id": 4390, + "nodeType": "Block", + "src": "1813:631:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 4361, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "1879:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + ], + "id": 4360, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "1874:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1874:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetProxy_$4713", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1892:12:19", + "memberName": "creationCode", + "nodeType": "MemberAccess", + "src": "1874:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4364, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4337, + "src": "1906:10:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4359, + "name": "deploy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4146, + "src": "1867:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes memory,bytes32) returns (address)" + } + }, + "id": 4365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1867:50:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4366, + "nodeType": "ExpressionStatement", + "src": "1867:50:19" + }, + { + "expression": { + "arguments": [ + { + "id": 4374, + "name": "_firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4339, + "src": "2046:20:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "expression": { + "id": 4377, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2237:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2241:6:19", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2237:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4379, + "name": "_initData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4341, + "src": "2335:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4375, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2135:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2139:6:19", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "2135:10:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2135:228:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4370, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4349, + "src": "2005:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1997:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1997:8:19", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1997:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4367, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "1985:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1985:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "id": 4373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2018:9:19", + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 4703, + "src": "1985:42:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,bytes memory) external returns (bool)" + } + }, + "id": 4381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1985:393:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4382, + "nodeType": "ExpressionStatement", + "src": "1985:393:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4386, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4349, + "src": "2420:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2412:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2412:8:19", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2412:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4383, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "2400:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2400:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "functionReturnParameters": 4347, + "id": 4389, + "nodeType": "Return", + "src": "2393:39:19" + } + ] + } + } + ] + }, + "functionSelector": "5ba489e7", + "id": 4398, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "proxify", + "nameLocation": "1553:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4343, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1652:8:19" + }, + "parameters": { + "id": 4342, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4337, + "mutability": "mutable", + "name": "_proxySalt", + "nameLocation": "1569:10:19", + "nodeType": "VariableDeclaration", + "scope": 4398, + "src": "1561:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4336, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1561:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4339, + "mutability": "mutable", + "name": "_firstImplementation", + "nameLocation": "1589:20:19", + "nodeType": "VariableDeclaration", + "scope": 4398, + "src": "1581:28:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1581:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4341, + "mutability": "mutable", + "name": "_initData", + "nameLocation": "1624:9:19", + "nodeType": "VariableDeclaration", + "scope": 4398, + "src": "1611:22:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4340, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1611:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1560:74:19" + }, + "returnParameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4346, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4398, + "src": "1689:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + }, + "typeName": { + "id": 4345, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4344, + "name": "WitnetProxy", + "nameLocations": [ + "1689:11:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4713, + "src": "1689:11:19" + }, + "referencedDeclaration": 4713, + "src": "1689:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "visibility": "internal" + } + ], + "src": "1688:13:19" + }, + "scope": 4399, + "src": "1544:994:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + } + ], + "scope": 4400, + "src": "368:2175:19", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "35:2508:19" + }, + "compiler": { + "name": "solc", + "version": "0.8.25+commit.b61c2a91.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.16", + "updatedAt": "2024-10-20T09:42:12.835Z", + "devdoc": { + "author": "Guillermo Díaz ", + "kind": "dev", + "methods": { + "deploy(bytes,bytes32)": { + "details": "The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). ", + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_deployed": "Just deployed contract address." + } + }, + "determineAddr(bytes,bytes32)": { + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_0": "Deterministic contract address." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "deploy(bytes,bytes32)": { + "notice": "Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. " + }, + "determineAddr(bytes,bytes32)": { + "notice": "Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`." + } + }, + "notice": "WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem.", + "version": 1 + } + } \ No newline at end of file diff --git a/migrations/frosts/WitnetDeployerMeter.json b/migrations/frosts/WitnetDeployerMeter.json new file mode 100644 index 00000000..7cbc4a7b --- /dev/null +++ b/migrations/frosts/WitnetDeployerMeter.json @@ -0,0 +1,5755 @@ +{ + "contractName": "WitnetDeployerMeter", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "_deployed", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initCode", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "determineProxyAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_proxySalt", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_firstImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_initData", + "type": "bytes" + } + ], + "name": "proxify", + "outputs": [ + { + "internalType": "contract WitnetProxy", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_deployed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"determineProxyAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proxySalt\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_firstImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initData\",\"type\":\"bytes\"}],\"name\":\"proxify\",\"outputs\":[{\"internalType\":\"contract WitnetProxy\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Guillermo D\\u00edaz \",\"kind\":\"dev\",\"methods\":{\"deploy(bytes,bytes32)\":{\"details\":\"The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). \",\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_deployed\":\"Just deployed contract address.\"}},\"determineAddr(bytes,bytes32)\":{\"params\":{\"_initCode\":\"Creation code, including construction logic and input parameters.\",\"_salt\":\"Arbitrary value to modify resulting address.\"},\"returns\":{\"_0\":\"Deterministic contract address.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deploy(bytes,bytes32)\":{\"notice\":\"Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \"},\"determineAddr(bytes,bytes32)\":{\"notice\":\"Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\"}},\"notice\":\"WitnetDeployerMeter contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, and CREATE3 factory (EIP-3171) for Witnet proxies, on the Meter Ecosystem.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/core/WitnetDeployerMeter.sol\":\"WitnetDeployerMeter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xddce8e17e3d3f9ed818b4f4c4478a8262aab8b11ed322f1bf5ed705bb4bd97fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8084aa71a4cc7d2980972412a88fe4f114869faea3fefa5436431644eb5c0287\",\"dweb:/ipfs/Qmbqfs5dRdPvHVKY8kTaeyc65NdqXRQwRK7h9s5UJEhD1p\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621\",\"dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL\"]},\"project:/contracts/core/WitnetDeployer.sol\":{\"keccak256\":\"0x00866ae27649212bdb7aacfc69d3302325ff82c1302993c1043e6f6ad2b507bc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://62fbada06d1352d79663f0c4ec26598e60e8a6b8b1015ff821b38d4f76580533\",\"dweb:/ipfs/QmYhDCsKjUPbKJLABxSUNQHsZKwPEVr41GGXV7MpThWvcL\"]},\"project:/contracts/core/WitnetDeployerMeter.sol\":{\"keccak256\":\"0x041cb0e647f339d45caf2449c13d192974dbca4974edb0966b42dc40aaf9f864\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1ce2e55d785a5831ad5ffb895d8592181b65862b054c566656a2ff548f90023\",\"dweb:/ipfs/QmXLM2iZPyEKca4XTAwDgmrUxne1povbzwB7kpXCYjHiUf\"]},\"project:/contracts/core/WitnetProxy.sol\":{\"keccak256\":\"0x2b2f56fc69bf0e01f6f1062202d1682cd394fa3b3d9ff2f8f833ab51c9e866cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8017f76a71e4a52a5a5e249081c92510bac5b91f03f727e66ff4406238521337\",\"dweb:/ipfs/QmdWcPAL3MGtxGdpX5CMfgzz4YzxYEeCiFRoGHVCr8rLEL\"]},\"project:/contracts/libs/Create3.sol\":{\"keccak256\":\"0xfbda4c773f859bef9d7878ca9412f244da85f7bd49df07c49a17544f4708d718\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://0f83b72ad1c35c707cc6daa4e8266d9d711f561a188fbb0be1885d3f08146ca6\",\"dweb:/ipfs/QmPJwdieqkxoSvqmczAtRMfb5EN8uWiabqMKj4yVqsUncv\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]},\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]},\"project:/contracts/patterns/Upgradeable.sol\":{\"keccak256\":\"0xbeb025c71f037acb1a668174eb6930631bf397129beb825f2660e5d8cf19614f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fe6ce4dcd500093ae069d35b91829ccb471e1ca33ed0851fb053fbfe76c78aba\",\"dweb:/ipfs/QmT7huvCFS6bHDxt7HhEogJmyvYNbeb6dFTJudsVSX6nEs\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50610f4d8061001f6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f36600461032c565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e3660046103e8565b6100ed565b6100646100a136600461042d565b61017e565b6100646100b43660046103e8565b6102c3565b60006100e7604051806020016100ce9061031f565b601f1982820381018352601f90910116604052836102c3565b92915050565b60006100f983836102c3565b9050806001600160a01b03163b6000036100e757818351602085016000f590506001600160a01b0381166100e75760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b60008061018a856100b9565b9050806001600160a01b03163b600003610265576101ca604051806020016101b19061031f565b601f1982820381018352601f90910116604052866100ed565b50806001600160a01b0316636fbc15e98533866040516020016101ee929190610492565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161021a929190610492565b6020604051808303816000875af1158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025d91906104f1565b5090506102bc565b60405162461bcd60e51b815260206004820152602660248201527f5769746e65744465706c6f7965724d657465723a20616c72656164792070726f6044820152651e1a599a595960d21b6064820152608401610175565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012090565b610a048061051483390190565b60006020828403121561033e57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261036c57600080fd5b813567ffffffffffffffff8082111561038757610387610345565b604051601f8301601f19908116603f011681019082821181831017156103af576103af610345565b816040528381528660208588010111156103c857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156103fb57600080fd5b823567ffffffffffffffff81111561041257600080fd5b61041e8582860161035b565b95602094909401359450505050565b60008060006060848603121561044257600080fd5b8335925060208401356001600160a01b038116811461046057600080fd5b9150604084013567ffffffffffffffff81111561047c57600080fd5b6104888682870161035b565b9150509250925092565b60018060a01b03831681526000602060406020840152835180604085015260005b818110156104cf578581018301518582016060015282016104b3565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561050357600080fd5b815180151581146102bc57600080fdfe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a264697066735822122094ac6e0c20a3573ed4bdc138b3b7e0e470d5afe423139ca1f67bdb46e3c519f464736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634998f038146100515780634af63f02146100805780635ba489e714610093578063d3933c29146100a6575b600080fd5b61006461005f36600461032c565b6100b9565b6040516001600160a01b03909116815260200160405180910390f35b61006461008e3660046103e8565b6100ed565b6100646100a136600461042d565b61017e565b6100646100b43660046103e8565b6102c3565b60006100e7604051806020016100ce9061031f565b601f1982820381018352601f90910116604052836102c3565b92915050565b60006100f983836102c3565b9050806001600160a01b03163b6000036100e757818351602085016000f590506001600160a01b0381166100e75760405162461bcd60e51b815260206004820152602160248201527f5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c656044820152601960fa1b60648201526084015b60405180910390fd5b60008061018a856100b9565b9050806001600160a01b03163b600003610265576101ca604051806020016101b19061031f565b601f1982820381018352601f90910116604052866100ed565b50806001600160a01b0316636fbc15e98533866040516020016101ee929190610492565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161021a929190610492565b6020604051808303816000875af1158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025d91906104f1565b5090506102bc565b60405162461bcd60e51b815260206004820152602660248201527f5769746e65744465706c6f7965724d657465723a20616c72656164792070726f6044820152651e1a599a595960d21b6064820152608401610175565b9392505050565b8151602092830120604080516001600160f81b0319818601523060601b6bffffffffffffffffffffffff191660218201526035810193909352605580840192909252805180840390920182526075909201909152805191012090565b610a048061051483390190565b60006020828403121561033e57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261036c57600080fd5b813567ffffffffffffffff8082111561038757610387610345565b604051601f8301601f19908116603f011681019082821181831017156103af576103af610345565b816040528381528660208588010111156103c857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156103fb57600080fd5b823567ffffffffffffffff81111561041257600080fd5b61041e8582860161035b565b95602094909401359450505050565b60008060006060848603121561044257600080fd5b8335925060208401356001600160a01b038116811461046057600080fd5b9150604084013567ffffffffffffffff81111561047c57600080fd5b6104888682870161035b565b9150509250925092565b60018060a01b03831681526000602060406020840152835180604085015260005b818110156104cf578581018301518582016060015282016104b3565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561050357600080fd5b815180151581146102bc57600080fdfe6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033a264697066735822122094ac6e0c20a3573ed4bdc138b3b7e0e470d5afe423139ca1f67bdb46e3c519f464736f6c63430008190033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [ + { + "ast": { + "nativeSrc": "0:4640:103", + "nodeType": "YulBlock", + "src": "0:4640:103", + "statements": [ + { + "nativeSrc": "6:3:103", + "nodeType": "YulBlock", + "src": "6:3:103", + "statements": [] + }, + { + "body": { + "nativeSrc": "84:110:103", + "nodeType": "YulBlock", + "src": "84:110:103", + "statements": [ + { + "body": { + "nativeSrc": "130:16:103", + "nodeType": "YulBlock", + "src": "130:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "139:1:103", + "nodeType": "YulLiteral", + "src": "139:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "142:1:103", + "nodeType": "YulLiteral", + "src": "142:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "132:6:103", + "nodeType": "YulIdentifier", + "src": "132:6:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulFunctionCall", + "src": "132:12:103" + }, + "nativeSrc": "132:12:103", + "nodeType": "YulExpressionStatement", + "src": "132:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "105:7:103", + "nodeType": "YulIdentifier", + "src": "105:7:103" + }, + { + "name": "headStart", + "nativeSrc": "114:9:103", + "nodeType": "YulIdentifier", + "src": "114:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "101:3:103", + "nodeType": "YulIdentifier", + "src": "101:3:103" + }, + "nativeSrc": "101:23:103", + "nodeType": "YulFunctionCall", + "src": "101:23:103" + }, + { + "kind": "number", + "nativeSrc": "126:2:103", + "nodeType": "YulLiteral", + "src": "126:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "97:3:103", + "nodeType": "YulIdentifier", + "src": "97:3:103" + }, + "nativeSrc": "97:32:103", + "nodeType": "YulFunctionCall", + "src": "97:32:103" + }, + "nativeSrc": "94:52:103", + "nodeType": "YulIf", + "src": "94:52:103" + }, + { + "nativeSrc": "155:33:103", + "nodeType": "YulAssignment", + "src": "155:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "178:9:103", + "nodeType": "YulIdentifier", + "src": "178:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "165:12:103", + "nodeType": "YulIdentifier", + "src": "165:12:103" + }, + "nativeSrc": "165:23:103", + "nodeType": "YulFunctionCall", + "src": "165:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "155:6:103", + "nodeType": "YulIdentifier", + "src": "155:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32", + "nativeSrc": "14:180:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "50:9:103", + "nodeType": "YulTypedName", + "src": "50:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "61:7:103", + "nodeType": "YulTypedName", + "src": "61:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "73:6:103", + "nodeType": "YulTypedName", + "src": "73:6:103", + "type": "" + } + ], + "src": "14:180:103" + }, + { + "body": { + "nativeSrc": "300:102:103", + "nodeType": "YulBlock", + "src": "300:102:103", + "statements": [ + { + "nativeSrc": "310:26:103", + "nodeType": "YulAssignment", + "src": "310:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "322:9:103", + "nodeType": "YulIdentifier", + "src": "322:9:103" + }, + { + "kind": "number", + "nativeSrc": "333:2:103", + "nodeType": "YulLiteral", + "src": "333:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "318:3:103", + "nodeType": "YulIdentifier", + "src": "318:3:103" + }, + "nativeSrc": "318:18:103", + "nodeType": "YulFunctionCall", + "src": "318:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "310:4:103", + "nodeType": "YulIdentifier", + "src": "310:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "352:9:103", + "nodeType": "YulIdentifier", + "src": "352:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "367:6:103", + "nodeType": "YulIdentifier", + "src": "367:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "383:3:103", + "nodeType": "YulLiteral", + "src": "383:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "388:1:103", + "nodeType": "YulLiteral", + "src": "388:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "379:3:103", + "nodeType": "YulIdentifier", + "src": "379:3:103" + }, + "nativeSrc": "379:11:103", + "nodeType": "YulFunctionCall", + "src": "379:11:103" + }, + { + "kind": "number", + "nativeSrc": "392:1:103", + "nodeType": "YulLiteral", + "src": "392:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "375:3:103", + "nodeType": "YulIdentifier", + "src": "375:3:103" + }, + "nativeSrc": "375:19:103", + "nodeType": "YulFunctionCall", + "src": "375:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "363:3:103", + "nodeType": "YulIdentifier", + "src": "363:3:103" + }, + "nativeSrc": "363:32:103", + "nodeType": "YulFunctionCall", + "src": "363:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "345:6:103", + "nodeType": "YulIdentifier", + "src": "345:6:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulFunctionCall", + "src": "345:51:103" + }, + "nativeSrc": "345:51:103", + "nodeType": "YulExpressionStatement", + "src": "345:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "199:203:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "269:9:103", + "nodeType": "YulTypedName", + "src": "269:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "280:6:103", + "nodeType": "YulTypedName", + "src": "280:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "291:4:103", + "nodeType": "YulTypedName", + "src": "291:4:103", + "type": "" + } + ], + "src": "199:203:103" + }, + { + "body": { + "nativeSrc": "439:95:103", + "nodeType": "YulBlock", + "src": "439:95:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "456:1:103", + "nodeType": "YulLiteral", + "src": "456:1:103", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "463:3:103", + "nodeType": "YulLiteral", + "src": "463:3:103", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "468:10:103", + "nodeType": "YulLiteral", + "src": "468:10:103", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "459:3:103", + "nodeType": "YulIdentifier", + "src": "459:3:103" + }, + "nativeSrc": "459:20:103", + "nodeType": "YulFunctionCall", + "src": "459:20:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "449:6:103", + "nodeType": "YulIdentifier", + "src": "449:6:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulFunctionCall", + "src": "449:31:103" + }, + "nativeSrc": "449:31:103", + "nodeType": "YulExpressionStatement", + "src": "449:31:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "496:1:103", + "nodeType": "YulLiteral", + "src": "496:1:103", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "499:4:103", + "nodeType": "YulLiteral", + "src": "499:4:103", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "489:6:103", + "nodeType": "YulIdentifier", + "src": "489:6:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulFunctionCall", + "src": "489:15:103" + }, + "nativeSrc": "489:15:103", + "nodeType": "YulExpressionStatement", + "src": "489:15:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "520:1:103", + "nodeType": "YulLiteral", + "src": "520:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "523:4:103", + "nodeType": "YulLiteral", + "src": "523:4:103", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "513:6:103", + "nodeType": "YulIdentifier", + "src": "513:6:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulFunctionCall", + "src": "513:15:103" + }, + "nativeSrc": "513:15:103", + "nodeType": "YulExpressionStatement", + "src": "513:15:103" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "407:127:103", + "nodeType": "YulFunctionDefinition", + "src": "407:127:103" + }, + { + "body": { + "nativeSrc": "591:666:103", + "nodeType": "YulBlock", + "src": "591:666:103", + "statements": [ + { + "body": { + "nativeSrc": "640:16:103", + "nodeType": "YulBlock", + "src": "640:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "649:1:103", + "nodeType": "YulLiteral", + "src": "649:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "652:1:103", + "nodeType": "YulLiteral", + "src": "652:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "642:6:103", + "nodeType": "YulIdentifier", + "src": "642:6:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulFunctionCall", + "src": "642:12:103" + }, + "nativeSrc": "642:12:103", + "nodeType": "YulExpressionStatement", + "src": "642:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "619:6:103", + "nodeType": "YulIdentifier", + "src": "619:6:103" + }, + { + "kind": "number", + "nativeSrc": "627:4:103", + "nodeType": "YulLiteral", + "src": "627:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "615:3:103", + "nodeType": "YulIdentifier", + "src": "615:3:103" + }, + "nativeSrc": "615:17:103", + "nodeType": "YulFunctionCall", + "src": "615:17:103" + }, + { + "name": "end", + "nativeSrc": "634:3:103", + "nodeType": "YulIdentifier", + "src": "634:3:103" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "611:3:103", + "nodeType": "YulIdentifier", + "src": "611:3:103" + }, + "nativeSrc": "611:27:103", + "nodeType": "YulFunctionCall", + "src": "611:27:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "604:6:103", + "nodeType": "YulIdentifier", + "src": "604:6:103" + }, + "nativeSrc": "604:35:103", + "nodeType": "YulFunctionCall", + "src": "604:35:103" + }, + "nativeSrc": "601:55:103", + "nodeType": "YulIf", + "src": "601:55:103" + }, + { + "nativeSrc": "665:30:103", + "nodeType": "YulVariableDeclaration", + "src": "665:30:103", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "688:6:103", + "nodeType": "YulIdentifier", + "src": "688:6:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "675:12:103", + "nodeType": "YulIdentifier", + "src": "675:12:103" + }, + "nativeSrc": "675:20:103", + "nodeType": "YulFunctionCall", + "src": "675:20:103" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "669:2:103", + "nodeType": "YulTypedName", + "src": "669:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "704:28:103", + "nodeType": "YulVariableDeclaration", + "src": "704:28:103", + "value": { + "kind": "number", + "nativeSrc": "714:18:103", + "nodeType": "YulLiteral", + "src": "714:18:103", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "708:2:103", + "nodeType": "YulTypedName", + "src": "708:2:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "755:22:103", + "nodeType": "YulBlock", + "src": "755:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "757:16:103", + "nodeType": "YulIdentifier", + "src": "757:16:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulFunctionCall", + "src": "757:18:103" + }, + "nativeSrc": "757:18:103", + "nodeType": "YulExpressionStatement", + "src": "757:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "747:2:103", + "nodeType": "YulIdentifier", + "src": "747:2:103" + }, + { + "name": "_2", + "nativeSrc": "751:2:103", + "nodeType": "YulIdentifier", + "src": "751:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "744:2:103", + "nodeType": "YulIdentifier", + "src": "744:2:103" + }, + "nativeSrc": "744:10:103", + "nodeType": "YulFunctionCall", + "src": "744:10:103" + }, + "nativeSrc": "741:36:103", + "nodeType": "YulIf", + "src": "741:36:103" + }, + { + "nativeSrc": "786:17:103", + "nodeType": "YulVariableDeclaration", + "src": "786:17:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "800:2:103", + "nodeType": "YulLiteral", + "src": "800:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "796:3:103", + "nodeType": "YulIdentifier", + "src": "796:3:103" + }, + "nativeSrc": "796:7:103", + "nodeType": "YulFunctionCall", + "src": "796:7:103" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "790:2:103", + "nodeType": "YulTypedName", + "src": "790:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "812:23:103", + "nodeType": "YulVariableDeclaration", + "src": "812:23:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "832:2:103", + "nodeType": "YulLiteral", + "src": "832:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "826:5:103", + "nodeType": "YulIdentifier", + "src": "826:5:103" + }, + "nativeSrc": "826:9:103", + "nodeType": "YulFunctionCall", + "src": "826:9:103" + }, + "variables": [ + { + "name": "memPtr", + "nativeSrc": "816:6:103", + "nodeType": "YulTypedName", + "src": "816:6:103", + "type": "" + } + ] + }, + { + "nativeSrc": "844:71:103", + "nodeType": "YulVariableDeclaration", + "src": "844:71:103", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "866:6:103", + "nodeType": "YulIdentifier", + "src": "866:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "890:2:103", + "nodeType": "YulIdentifier", + "src": "890:2:103" + }, + { + "kind": "number", + "nativeSrc": "894:4:103", + "nodeType": "YulLiteral", + "src": "894:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "886:3:103", + "nodeType": "YulIdentifier", + "src": "886:3:103" + }, + "nativeSrc": "886:13:103", + "nodeType": "YulFunctionCall", + "src": "886:13:103" + }, + { + "name": "_3", + "nativeSrc": "901:2:103", + "nodeType": "YulIdentifier", + "src": "901:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "882:3:103", + "nodeType": "YulIdentifier", + "src": "882:3:103" + }, + "nativeSrc": "882:22:103", + "nodeType": "YulFunctionCall", + "src": "882:22:103" + }, + { + "kind": "number", + "nativeSrc": "906:2:103", + "nodeType": "YulLiteral", + "src": "906:2:103", + "type": "", + "value": "63" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "878:3:103", + "nodeType": "YulIdentifier", + "src": "878:3:103" + }, + "nativeSrc": "878:31:103", + "nodeType": "YulFunctionCall", + "src": "878:31:103" + }, + { + "name": "_3", + "nativeSrc": "911:2:103", + "nodeType": "YulIdentifier", + "src": "911:2:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "874:3:103", + "nodeType": "YulIdentifier", + "src": "874:3:103" + }, + "nativeSrc": "874:40:103", + "nodeType": "YulFunctionCall", + "src": "874:40:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "862:3:103", + "nodeType": "YulIdentifier", + "src": "862:3:103" + }, + "nativeSrc": "862:53:103", + "nodeType": "YulFunctionCall", + "src": "862:53:103" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "848:10:103", + "nodeType": "YulTypedName", + "src": "848:10:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "974:22:103", + "nodeType": "YulBlock", + "src": "974:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "976:16:103", + "nodeType": "YulIdentifier", + "src": "976:16:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulFunctionCall", + "src": "976:18:103" + }, + "nativeSrc": "976:18:103", + "nodeType": "YulExpressionStatement", + "src": "976:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "933:10:103", + "nodeType": "YulIdentifier", + "src": "933:10:103" + }, + { + "name": "_2", + "nativeSrc": "945:2:103", + "nodeType": "YulIdentifier", + "src": "945:2:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "930:2:103", + "nodeType": "YulIdentifier", + "src": "930:2:103" + }, + "nativeSrc": "930:18:103", + "nodeType": "YulFunctionCall", + "src": "930:18:103" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "953:10:103", + "nodeType": "YulIdentifier", + "src": "953:10:103" + }, + { + "name": "memPtr", + "nativeSrc": "965:6:103", + "nodeType": "YulIdentifier", + "src": "965:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "950:2:103", + "nodeType": "YulIdentifier", + "src": "950:2:103" + }, + "nativeSrc": "950:22:103", + "nodeType": "YulFunctionCall", + "src": "950:22:103" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "927:2:103", + "nodeType": "YulIdentifier", + "src": "927:2:103" + }, + "nativeSrc": "927:46:103", + "nodeType": "YulFunctionCall", + "src": "927:46:103" + }, + "nativeSrc": "924:72:103", + "nodeType": "YulIf", + "src": "924:72:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1012:2:103", + "nodeType": "YulLiteral", + "src": "1012:2:103", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "1016:10:103", + "nodeType": "YulIdentifier", + "src": "1016:10:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1005:6:103", + "nodeType": "YulIdentifier", + "src": "1005:6:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulFunctionCall", + "src": "1005:22:103" + }, + "nativeSrc": "1005:22:103", + "nodeType": "YulExpressionStatement", + "src": "1005:22:103" + }, + { + "expression": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1043:6:103", + "nodeType": "YulIdentifier", + "src": "1043:6:103" + }, + { + "name": "_1", + "nativeSrc": "1051:2:103", + "nodeType": "YulIdentifier", + "src": "1051:2:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1036:6:103", + "nodeType": "YulIdentifier", + "src": "1036:6:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulFunctionCall", + "src": "1036:18:103" + }, + "nativeSrc": "1036:18:103", + "nodeType": "YulExpressionStatement", + "src": "1036:18:103" + }, + { + "body": { + "nativeSrc": "1102:16:103", + "nodeType": "YulBlock", + "src": "1102:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1111:1:103", + "nodeType": "YulLiteral", + "src": "1111:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1114:1:103", + "nodeType": "YulLiteral", + "src": "1114:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1104:6:103", + "nodeType": "YulIdentifier", + "src": "1104:6:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulFunctionCall", + "src": "1104:12:103" + }, + "nativeSrc": "1104:12:103", + "nodeType": "YulExpressionStatement", + "src": "1104:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1077:6:103", + "nodeType": "YulIdentifier", + "src": "1077:6:103" + }, + { + "name": "_1", + "nativeSrc": "1085:2:103", + "nodeType": "YulIdentifier", + "src": "1085:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1073:3:103", + "nodeType": "YulIdentifier", + "src": "1073:3:103" + }, + "nativeSrc": "1073:15:103", + "nodeType": "YulFunctionCall", + "src": "1073:15:103" + }, + { + "kind": "number", + "nativeSrc": "1090:4:103", + "nodeType": "YulLiteral", + "src": "1090:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1069:3:103", + "nodeType": "YulIdentifier", + "src": "1069:3:103" + }, + "nativeSrc": "1069:26:103", + "nodeType": "YulFunctionCall", + "src": "1069:26:103" + }, + { + "name": "end", + "nativeSrc": "1097:3:103", + "nodeType": "YulIdentifier", + "src": "1097:3:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1066:2:103", + "nodeType": "YulIdentifier", + "src": "1066:2:103" + }, + "nativeSrc": "1066:35:103", + "nodeType": "YulFunctionCall", + "src": "1066:35:103" + }, + "nativeSrc": "1063:55:103", + "nodeType": "YulIf", + "src": "1063:55:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1144:6:103", + "nodeType": "YulIdentifier", + "src": "1144:6:103" + }, + { + "kind": "number", + "nativeSrc": "1152:4:103", + "nodeType": "YulLiteral", + "src": "1152:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1140:3:103", + "nodeType": "YulIdentifier", + "src": "1140:3:103" + }, + "nativeSrc": "1140:17:103", + "nodeType": "YulFunctionCall", + "src": "1140:17:103" + }, + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1163:6:103", + "nodeType": "YulIdentifier", + "src": "1163:6:103" + }, + { + "kind": "number", + "nativeSrc": "1171:4:103", + "nodeType": "YulLiteral", + "src": "1171:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1159:3:103", + "nodeType": "YulIdentifier", + "src": "1159:3:103" + }, + "nativeSrc": "1159:17:103", + "nodeType": "YulFunctionCall", + "src": "1159:17:103" + }, + { + "name": "_1", + "nativeSrc": "1178:2:103", + "nodeType": "YulIdentifier", + "src": "1178:2:103" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "1127:12:103", + "nodeType": "YulIdentifier", + "src": "1127:12:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulFunctionCall", + "src": "1127:54:103" + }, + "nativeSrc": "1127:54:103", + "nodeType": "YulExpressionStatement", + "src": "1127:54:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "1205:6:103", + "nodeType": "YulIdentifier", + "src": "1205:6:103" + }, + { + "name": "_1", + "nativeSrc": "1213:2:103", + "nodeType": "YulIdentifier", + "src": "1213:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1201:3:103", + "nodeType": "YulIdentifier", + "src": "1201:3:103" + }, + "nativeSrc": "1201:15:103", + "nodeType": "YulFunctionCall", + "src": "1201:15:103" + }, + { + "kind": "number", + "nativeSrc": "1218:4:103", + "nodeType": "YulLiteral", + "src": "1218:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1197:3:103", + "nodeType": "YulIdentifier", + "src": "1197:3:103" + }, + "nativeSrc": "1197:26:103", + "nodeType": "YulFunctionCall", + "src": "1197:26:103" + }, + { + "kind": "number", + "nativeSrc": "1225:1:103", + "nodeType": "YulLiteral", + "src": "1225:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1190:6:103", + "nodeType": "YulIdentifier", + "src": "1190:6:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulFunctionCall", + "src": "1190:37:103" + }, + "nativeSrc": "1190:37:103", + "nodeType": "YulExpressionStatement", + "src": "1190:37:103" + }, + { + "nativeSrc": "1236:15:103", + "nodeType": "YulAssignment", + "src": "1236:15:103", + "value": { + "name": "memPtr", + "nativeSrc": "1245:6:103", + "nodeType": "YulIdentifier", + "src": "1245:6:103" + }, + "variableNames": [ + { + "name": "array", + "nativeSrc": "1236:5:103", + "nodeType": "YulIdentifier", + "src": "1236:5:103" + } + ] + } + ] + }, + "name": "abi_decode_bytes", + "nativeSrc": "539:718:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "565:6:103", + "nodeType": "YulTypedName", + "src": "565:6:103", + "type": "" + }, + { + "name": "end", + "nativeSrc": "573:3:103", + "nodeType": "YulTypedName", + "src": "573:3:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nativeSrc": "581:5:103", + "nodeType": "YulTypedName", + "src": "581:5:103", + "type": "" + } + ], + "src": "539:718:103" + }, + { + "body": { + "nativeSrc": "1358:292:103", + "nodeType": "YulBlock", + "src": "1358:292:103", + "statements": [ + { + "body": { + "nativeSrc": "1404:16:103", + "nodeType": "YulBlock", + "src": "1404:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1413:1:103", + "nodeType": "YulLiteral", + "src": "1413:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1416:1:103", + "nodeType": "YulLiteral", + "src": "1416:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1406:6:103", + "nodeType": "YulIdentifier", + "src": "1406:6:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulFunctionCall", + "src": "1406:12:103" + }, + "nativeSrc": "1406:12:103", + "nodeType": "YulExpressionStatement", + "src": "1406:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1379:7:103", + "nodeType": "YulIdentifier", + "src": "1379:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1388:9:103", + "nodeType": "YulIdentifier", + "src": "1388:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1375:3:103", + "nodeType": "YulIdentifier", + "src": "1375:3:103" + }, + "nativeSrc": "1375:23:103", + "nodeType": "YulFunctionCall", + "src": "1375:23:103" + }, + { + "kind": "number", + "nativeSrc": "1400:2:103", + "nodeType": "YulLiteral", + "src": "1400:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1371:3:103", + "nodeType": "YulIdentifier", + "src": "1371:3:103" + }, + "nativeSrc": "1371:32:103", + "nodeType": "YulFunctionCall", + "src": "1371:32:103" + }, + "nativeSrc": "1368:52:103", + "nodeType": "YulIf", + "src": "1368:52:103" + }, + { + "nativeSrc": "1429:37:103", + "nodeType": "YulVariableDeclaration", + "src": "1429:37:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1456:9:103", + "nodeType": "YulIdentifier", + "src": "1456:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1443:12:103", + "nodeType": "YulIdentifier", + "src": "1443:12:103" + }, + "nativeSrc": "1443:23:103", + "nodeType": "YulFunctionCall", + "src": "1443:23:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "1433:6:103", + "nodeType": "YulTypedName", + "src": "1433:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1509:16:103", + "nodeType": "YulBlock", + "src": "1509:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1518:1:103", + "nodeType": "YulLiteral", + "src": "1518:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1521:1:103", + "nodeType": "YulLiteral", + "src": "1521:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1511:6:103", + "nodeType": "YulIdentifier", + "src": "1511:6:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulFunctionCall", + "src": "1511:12:103" + }, + "nativeSrc": "1511:12:103", + "nodeType": "YulExpressionStatement", + "src": "1511:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1481:6:103", + "nodeType": "YulIdentifier", + "src": "1481:6:103" + }, + { + "kind": "number", + "nativeSrc": "1489:18:103", + "nodeType": "YulLiteral", + "src": "1489:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1478:2:103", + "nodeType": "YulIdentifier", + "src": "1478:2:103" + }, + "nativeSrc": "1478:30:103", + "nodeType": "YulFunctionCall", + "src": "1478:30:103" + }, + "nativeSrc": "1475:50:103", + "nodeType": "YulIf", + "src": "1475:50:103" + }, + { + "nativeSrc": "1534:59:103", + "nodeType": "YulAssignment", + "src": "1534:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1565:9:103", + "nodeType": "YulIdentifier", + "src": "1565:9:103" + }, + { + "name": "offset", + "nativeSrc": "1576:6:103", + "nodeType": "YulIdentifier", + "src": "1576:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1561:3:103", + "nodeType": "YulIdentifier", + "src": "1561:3:103" + }, + "nativeSrc": "1561:22:103", + "nodeType": "YulFunctionCall", + "src": "1561:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "1585:7:103", + "nodeType": "YulIdentifier", + "src": "1585:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "1544:16:103", + "nodeType": "YulIdentifier", + "src": "1544:16:103" + }, + "nativeSrc": "1544:49:103", + "nodeType": "YulFunctionCall", + "src": "1544:49:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1534:6:103", + "nodeType": "YulIdentifier", + "src": "1534:6:103" + } + ] + }, + { + "nativeSrc": "1602:42:103", + "nodeType": "YulAssignment", + "src": "1602:42:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1629:9:103", + "nodeType": "YulIdentifier", + "src": "1629:9:103" + }, + { + "kind": "number", + "nativeSrc": "1640:2:103", + "nodeType": "YulLiteral", + "src": "1640:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1625:3:103", + "nodeType": "YulIdentifier", + "src": "1625:3:103" + }, + "nativeSrc": "1625:18:103", + "nodeType": "YulFunctionCall", + "src": "1625:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1612:12:103", + "nodeType": "YulIdentifier", + "src": "1612:12:103" + }, + "nativeSrc": "1612:32:103", + "nodeType": "YulFunctionCall", + "src": "1612:32:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "1602:6:103", + "nodeType": "YulIdentifier", + "src": "1602:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes_memory_ptrt_bytes32", + "nativeSrc": "1262:388:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1316:9:103", + "nodeType": "YulTypedName", + "src": "1316:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1327:7:103", + "nodeType": "YulTypedName", + "src": "1327:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1339:6:103", + "nodeType": "YulTypedName", + "src": "1339:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1347:6:103", + "nodeType": "YulTypedName", + "src": "1347:6:103", + "type": "" + } + ], + "src": "1262:388:103" + }, + { + "body": { + "nativeSrc": "1768:449:103", + "nodeType": "YulBlock", + "src": "1768:449:103", + "statements": [ + { + "body": { + "nativeSrc": "1814:16:103", + "nodeType": "YulBlock", + "src": "1814:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1823:1:103", + "nodeType": "YulLiteral", + "src": "1823:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1826:1:103", + "nodeType": "YulLiteral", + "src": "1826:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1816:6:103", + "nodeType": "YulIdentifier", + "src": "1816:6:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulFunctionCall", + "src": "1816:12:103" + }, + "nativeSrc": "1816:12:103", + "nodeType": "YulExpressionStatement", + "src": "1816:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1789:7:103", + "nodeType": "YulIdentifier", + "src": "1789:7:103" + }, + { + "name": "headStart", + "nativeSrc": "1798:9:103", + "nodeType": "YulIdentifier", + "src": "1798:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1785:3:103", + "nodeType": "YulIdentifier", + "src": "1785:3:103" + }, + "nativeSrc": "1785:23:103", + "nodeType": "YulFunctionCall", + "src": "1785:23:103" + }, + { + "kind": "number", + "nativeSrc": "1810:2:103", + "nodeType": "YulLiteral", + "src": "1810:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1781:3:103", + "nodeType": "YulIdentifier", + "src": "1781:3:103" + }, + "nativeSrc": "1781:32:103", + "nodeType": "YulFunctionCall", + "src": "1781:32:103" + }, + "nativeSrc": "1778:52:103", + "nodeType": "YulIf", + "src": "1778:52:103" + }, + { + "nativeSrc": "1839:33:103", + "nodeType": "YulAssignment", + "src": "1839:33:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1862:9:103", + "nodeType": "YulIdentifier", + "src": "1862:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1849:12:103", + "nodeType": "YulIdentifier", + "src": "1849:12:103" + }, + "nativeSrc": "1849:23:103", + "nodeType": "YulFunctionCall", + "src": "1849:23:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1839:6:103", + "nodeType": "YulIdentifier", + "src": "1839:6:103" + } + ] + }, + { + "nativeSrc": "1881:45:103", + "nodeType": "YulVariableDeclaration", + "src": "1881:45:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1911:9:103", + "nodeType": "YulIdentifier", + "src": "1911:9:103" + }, + { + "kind": "number", + "nativeSrc": "1922:2:103", + "nodeType": "YulLiteral", + "src": "1922:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1907:3:103", + "nodeType": "YulIdentifier", + "src": "1907:3:103" + }, + "nativeSrc": "1907:18:103", + "nodeType": "YulFunctionCall", + "src": "1907:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1894:12:103", + "nodeType": "YulIdentifier", + "src": "1894:12:103" + }, + "nativeSrc": "1894:32:103", + "nodeType": "YulFunctionCall", + "src": "1894:32:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "1885:5:103", + "nodeType": "YulTypedName", + "src": "1885:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1989:16:103", + "nodeType": "YulBlock", + "src": "1989:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1998:1:103", + "nodeType": "YulLiteral", + "src": "1998:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2001:1:103", + "nodeType": "YulLiteral", + "src": "2001:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1991:6:103", + "nodeType": "YulIdentifier", + "src": "1991:6:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulFunctionCall", + "src": "1991:12:103" + }, + "nativeSrc": "1991:12:103", + "nodeType": "YulExpressionStatement", + "src": "1991:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1948:5:103", + "nodeType": "YulIdentifier", + "src": "1948:5:103" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1959:5:103", + "nodeType": "YulIdentifier", + "src": "1959:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1974:3:103", + "nodeType": "YulLiteral", + "src": "1974:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1979:1:103", + "nodeType": "YulLiteral", + "src": "1979:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1970:3:103", + "nodeType": "YulIdentifier", + "src": "1970:3:103" + }, + "nativeSrc": "1970:11:103", + "nodeType": "YulFunctionCall", + "src": "1970:11:103" + }, + { + "kind": "number", + "nativeSrc": "1983:1:103", + "nodeType": "YulLiteral", + "src": "1983:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1966:3:103", + "nodeType": "YulIdentifier", + "src": "1966:3:103" + }, + "nativeSrc": "1966:19:103", + "nodeType": "YulFunctionCall", + "src": "1966:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1955:3:103", + "nodeType": "YulIdentifier", + "src": "1955:3:103" + }, + "nativeSrc": "1955:31:103", + "nodeType": "YulFunctionCall", + "src": "1955:31:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1945:2:103", + "nodeType": "YulIdentifier", + "src": "1945:2:103" + }, + "nativeSrc": "1945:42:103", + "nodeType": "YulFunctionCall", + "src": "1945:42:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1938:6:103", + "nodeType": "YulIdentifier", + "src": "1938:6:103" + }, + "nativeSrc": "1938:50:103", + "nodeType": "YulFunctionCall", + "src": "1938:50:103" + }, + "nativeSrc": "1935:70:103", + "nodeType": "YulIf", + "src": "1935:70:103" + }, + { + "nativeSrc": "2014:15:103", + "nodeType": "YulAssignment", + "src": "2014:15:103", + "value": { + "name": "value", + "nativeSrc": "2024:5:103", + "nodeType": "YulIdentifier", + "src": "2024:5:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2014:6:103", + "nodeType": "YulIdentifier", + "src": "2014:6:103" + } + ] + }, + { + "nativeSrc": "2038:46:103", + "nodeType": "YulVariableDeclaration", + "src": "2038:46:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2069:9:103", + "nodeType": "YulIdentifier", + "src": "2069:9:103" + }, + { + "kind": "number", + "nativeSrc": "2080:2:103", + "nodeType": "YulLiteral", + "src": "2080:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2065:3:103", + "nodeType": "YulIdentifier", + "src": "2065:3:103" + }, + "nativeSrc": "2065:18:103", + "nodeType": "YulFunctionCall", + "src": "2065:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2052:12:103", + "nodeType": "YulIdentifier", + "src": "2052:12:103" + }, + "nativeSrc": "2052:32:103", + "nodeType": "YulFunctionCall", + "src": "2052:32:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "2042:6:103", + "nodeType": "YulTypedName", + "src": "2042:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2127:16:103", + "nodeType": "YulBlock", + "src": "2127:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2136:1:103", + "nodeType": "YulLiteral", + "src": "2136:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2139:1:103", + "nodeType": "YulLiteral", + "src": "2139:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2129:6:103", + "nodeType": "YulIdentifier", + "src": "2129:6:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulFunctionCall", + "src": "2129:12:103" + }, + "nativeSrc": "2129:12:103", + "nodeType": "YulExpressionStatement", + "src": "2129:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2099:6:103", + "nodeType": "YulIdentifier", + "src": "2099:6:103" + }, + { + "kind": "number", + "nativeSrc": "2107:18:103", + "nodeType": "YulLiteral", + "src": "2107:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2096:2:103", + "nodeType": "YulIdentifier", + "src": "2096:2:103" + }, + "nativeSrc": "2096:30:103", + "nodeType": "YulFunctionCall", + "src": "2096:30:103" + }, + "nativeSrc": "2093:50:103", + "nodeType": "YulIf", + "src": "2093:50:103" + }, + { + "nativeSrc": "2152:59:103", + "nodeType": "YulAssignment", + "src": "2152:59:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2183:9:103", + "nodeType": "YulIdentifier", + "src": "2183:9:103" + }, + { + "name": "offset", + "nativeSrc": "2194:6:103", + "nodeType": "YulIdentifier", + "src": "2194:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2179:3:103", + "nodeType": "YulIdentifier", + "src": "2179:3:103" + }, + "nativeSrc": "2179:22:103", + "nodeType": "YulFunctionCall", + "src": "2179:22:103" + }, + { + "name": "dataEnd", + "nativeSrc": "2203:7:103", + "nodeType": "YulIdentifier", + "src": "2203:7:103" + } + ], + "functionName": { + "name": "abi_decode_bytes", + "nativeSrc": "2162:16:103", + "nodeType": "YulIdentifier", + "src": "2162:16:103" + }, + "nativeSrc": "2162:49:103", + "nodeType": "YulFunctionCall", + "src": "2162:49:103" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "2152:6:103", + "nodeType": "YulIdentifier", + "src": "2152:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr", + "nativeSrc": "1655:562:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1718:9:103", + "nodeType": "YulTypedName", + "src": "1718:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1729:7:103", + "nodeType": "YulTypedName", + "src": "1729:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1741:6:103", + "nodeType": "YulTypedName", + "src": "1741:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1749:6:103", + "nodeType": "YulTypedName", + "src": "1749:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1757:6:103", + "nodeType": "YulTypedName", + "src": "1757:6:103", + "type": "" + } + ], + "src": "1655:562:103" + }, + { + "body": { + "nativeSrc": "2351:102:103", + "nodeType": "YulBlock", + "src": "2351:102:103", + "statements": [ + { + "nativeSrc": "2361:26:103", + "nodeType": "YulAssignment", + "src": "2361:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2373:9:103", + "nodeType": "YulIdentifier", + "src": "2373:9:103" + }, + { + "kind": "number", + "nativeSrc": "2384:2:103", + "nodeType": "YulLiteral", + "src": "2384:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2369:3:103", + "nodeType": "YulIdentifier", + "src": "2369:3:103" + }, + "nativeSrc": "2369:18:103", + "nodeType": "YulFunctionCall", + "src": "2369:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2361:4:103", + "nodeType": "YulIdentifier", + "src": "2361:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2403:9:103", + "nodeType": "YulIdentifier", + "src": "2403:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2418:6:103", + "nodeType": "YulIdentifier", + "src": "2418:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2434:3:103", + "nodeType": "YulLiteral", + "src": "2434:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2439:1:103", + "nodeType": "YulLiteral", + "src": "2439:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2430:3:103", + "nodeType": "YulIdentifier", + "src": "2430:3:103" + }, + "nativeSrc": "2430:11:103", + "nodeType": "YulFunctionCall", + "src": "2430:11:103" + }, + { + "kind": "number", + "nativeSrc": "2443:1:103", + "nodeType": "YulLiteral", + "src": "2443:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2426:3:103", + "nodeType": "YulIdentifier", + "src": "2426:3:103" + }, + "nativeSrc": "2426:19:103", + "nodeType": "YulFunctionCall", + "src": "2426:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2414:3:103", + "nodeType": "YulIdentifier", + "src": "2414:3:103" + }, + "nativeSrc": "2414:32:103", + "nodeType": "YulFunctionCall", + "src": "2414:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2396:6:103", + "nodeType": "YulIdentifier", + "src": "2396:6:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulFunctionCall", + "src": "2396:51:103" + }, + "nativeSrc": "2396:51:103", + "nodeType": "YulExpressionStatement", + "src": "2396:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed", + "nativeSrc": "2222:231:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2320:9:103", + "nodeType": "YulTypedName", + "src": "2320:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2331:6:103", + "nodeType": "YulTypedName", + "src": "2331:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2342:4:103", + "nodeType": "YulTypedName", + "src": "2342:4:103", + "type": "" + } + ], + "src": "2222:231:103" + }, + { + "body": { + "nativeSrc": "2632:223:103", + "nodeType": "YulBlock", + "src": "2632:223:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2649:9:103", + "nodeType": "YulIdentifier", + "src": "2649:9:103" + }, + { + "kind": "number", + "nativeSrc": "2660:2:103", + "nodeType": "YulLiteral", + "src": "2660:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2642:6:103", + "nodeType": "YulIdentifier", + "src": "2642:6:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulFunctionCall", + "src": "2642:21:103" + }, + "nativeSrc": "2642:21:103", + "nodeType": "YulExpressionStatement", + "src": "2642:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2683:9:103", + "nodeType": "YulIdentifier", + "src": "2683:9:103" + }, + { + "kind": "number", + "nativeSrc": "2694:2:103", + "nodeType": "YulLiteral", + "src": "2694:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2679:3:103", + "nodeType": "YulIdentifier", + "src": "2679:3:103" + }, + "nativeSrc": "2679:18:103", + "nodeType": "YulFunctionCall", + "src": "2679:18:103" + }, + { + "kind": "number", + "nativeSrc": "2699:2:103", + "nodeType": "YulLiteral", + "src": "2699:2:103", + "type": "", + "value": "33" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2672:6:103", + "nodeType": "YulIdentifier", + "src": "2672:6:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulFunctionCall", + "src": "2672:30:103" + }, + "nativeSrc": "2672:30:103", + "nodeType": "YulExpressionStatement", + "src": "2672:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2722:9:103", + "nodeType": "YulIdentifier", + "src": "2722:9:103" + }, + { + "kind": "number", + "nativeSrc": "2733:2:103", + "nodeType": "YulLiteral", + "src": "2733:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2718:3:103", + "nodeType": "YulIdentifier", + "src": "2718:3:103" + }, + "nativeSrc": "2718:18:103", + "nodeType": "YulFunctionCall", + "src": "2718:18:103" + }, + { + "hexValue": "5769746e65744465706c6f7965723a206465706c6f796d656e74206661696c65", + "kind": "string", + "nativeSrc": "2738:34:103", + "nodeType": "YulLiteral", + "src": "2738:34:103", + "type": "", + "value": "WitnetDeployer: deployment faile" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2711:6:103", + "nodeType": "YulIdentifier", + "src": "2711:6:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulFunctionCall", + "src": "2711:62:103" + }, + "nativeSrc": "2711:62:103", + "nodeType": "YulExpressionStatement", + "src": "2711:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2793:9:103", + "nodeType": "YulIdentifier", + "src": "2793:9:103" + }, + { + "kind": "number", + "nativeSrc": "2804:2:103", + "nodeType": "YulLiteral", + "src": "2804:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2789:3:103", + "nodeType": "YulIdentifier", + "src": "2789:3:103" + }, + "nativeSrc": "2789:18:103", + "nodeType": "YulFunctionCall", + "src": "2789:18:103" + }, + { + "hexValue": "64", + "kind": "string", + "nativeSrc": "2809:3:103", + "nodeType": "YulLiteral", + "src": "2809:3:103", + "type": "", + "value": "d" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2782:6:103", + "nodeType": "YulIdentifier", + "src": "2782:6:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulFunctionCall", + "src": "2782:31:103" + }, + "nativeSrc": "2782:31:103", + "nodeType": "YulExpressionStatement", + "src": "2782:31:103" + }, + { + "nativeSrc": "2822:27:103", + "nodeType": "YulAssignment", + "src": "2822:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2834:9:103", + "nodeType": "YulIdentifier", + "src": "2834:9:103" + }, + { + "kind": "number", + "nativeSrc": "2845:3:103", + "nodeType": "YulLiteral", + "src": "2845:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2830:3:103", + "nodeType": "YulIdentifier", + "src": "2830:3:103" + }, + "nativeSrc": "2830:19:103", + "nodeType": "YulFunctionCall", + "src": "2830:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2822:4:103", + "nodeType": "YulIdentifier", + "src": "2822:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "2458:397:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2609:9:103", + "nodeType": "YulTypedName", + "src": "2609:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2623:4:103", + "nodeType": "YulTypedName", + "src": "2623:4:103", + "type": "" + } + ], + "src": "2458:397:103" + }, + { + "body": { + "nativeSrc": "3007:496:103", + "nodeType": "YulBlock", + "src": "3007:496:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3024:9:103", + "nodeType": "YulIdentifier", + "src": "3024:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3039:6:103", + "nodeType": "YulIdentifier", + "src": "3039:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3055:3:103", + "nodeType": "YulLiteral", + "src": "3055:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3060:1:103", + "nodeType": "YulLiteral", + "src": "3060:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3051:3:103", + "nodeType": "YulIdentifier", + "src": "3051:3:103" + }, + "nativeSrc": "3051:11:103", + "nodeType": "YulFunctionCall", + "src": "3051:11:103" + }, + { + "kind": "number", + "nativeSrc": "3064:1:103", + "nodeType": "YulLiteral", + "src": "3064:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3047:3:103", + "nodeType": "YulIdentifier", + "src": "3047:3:103" + }, + "nativeSrc": "3047:19:103", + "nodeType": "YulFunctionCall", + "src": "3047:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3035:3:103", + "nodeType": "YulIdentifier", + "src": "3035:3:103" + }, + "nativeSrc": "3035:32:103", + "nodeType": "YulFunctionCall", + "src": "3035:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3017:6:103", + "nodeType": "YulIdentifier", + "src": "3017:6:103" + }, + "nativeSrc": "3017:51:103", + "nodeType": "YulFunctionCall", + "src": "3017:51:103" + }, + "nativeSrc": "3017:51:103", + "nodeType": "YulExpressionStatement", + "src": "3017:51:103" + }, + { + "nativeSrc": "3077:12:103", + "nodeType": "YulVariableDeclaration", + "src": "3077:12:103", + "value": { + "kind": "number", + "nativeSrc": "3087:2:103", + "nodeType": "YulLiteral", + "src": "3087:2:103", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "3081:2:103", + "nodeType": "YulTypedName", + "src": "3081:2:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3109:9:103", + "nodeType": "YulIdentifier", + "src": "3109:9:103" + }, + { + "kind": "number", + "nativeSrc": "3120:2:103", + "nodeType": "YulLiteral", + "src": "3120:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3105:3:103", + "nodeType": "YulIdentifier", + "src": "3105:3:103" + }, + "nativeSrc": "3105:18:103", + "nodeType": "YulFunctionCall", + "src": "3105:18:103" + }, + { + "kind": "number", + "nativeSrc": "3125:2:103", + "nodeType": "YulLiteral", + "src": "3125:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3098:6:103", + "nodeType": "YulIdentifier", + "src": "3098:6:103" + }, + "nativeSrc": "3098:30:103", + "nodeType": "YulFunctionCall", + "src": "3098:30:103" + }, + "nativeSrc": "3098:30:103", + "nodeType": "YulExpressionStatement", + "src": "3098:30:103" + }, + { + "nativeSrc": "3137:27:103", + "nodeType": "YulVariableDeclaration", + "src": "3137:27:103", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3157:6:103", + "nodeType": "YulIdentifier", + "src": "3157:6:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3151:5:103", + "nodeType": "YulIdentifier", + "src": "3151:5:103" + }, + "nativeSrc": "3151:13:103", + "nodeType": "YulFunctionCall", + "src": "3151:13:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "3141:6:103", + "nodeType": "YulTypedName", + "src": "3141:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3184:9:103", + "nodeType": "YulIdentifier", + "src": "3184:9:103" + }, + { + "kind": "number", + "nativeSrc": "3195:2:103", + "nodeType": "YulLiteral", + "src": "3195:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3180:3:103", + "nodeType": "YulIdentifier", + "src": "3180:3:103" + }, + "nativeSrc": "3180:18:103", + "nodeType": "YulFunctionCall", + "src": "3180:18:103" + }, + { + "name": "length", + "nativeSrc": "3200:6:103", + "nodeType": "YulIdentifier", + "src": "3200:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3173:6:103", + "nodeType": "YulIdentifier", + "src": "3173:6:103" + }, + "nativeSrc": "3173:34:103", + "nodeType": "YulFunctionCall", + "src": "3173:34:103" + }, + "nativeSrc": "3173:34:103", + "nodeType": "YulExpressionStatement", + "src": "3173:34:103" + }, + { + "nativeSrc": "3216:10:103", + "nodeType": "YulVariableDeclaration", + "src": "3216:10:103", + "value": { + "kind": "number", + "nativeSrc": "3225:1:103", + "nodeType": "YulLiteral", + "src": "3225:1:103", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "3220:1:103", + "nodeType": "YulTypedName", + "src": "3220:1:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3285:90:103", + "nodeType": "YulBlock", + "src": "3285:90:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3314:9:103", + "nodeType": "YulIdentifier", + "src": "3314:9:103" + }, + { + "name": "i", + "nativeSrc": "3325:1:103", + "nodeType": "YulIdentifier", + "src": "3325:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3310:3:103", + "nodeType": "YulIdentifier", + "src": "3310:3:103" + }, + "nativeSrc": "3310:17:103", + "nodeType": "YulFunctionCall", + "src": "3310:17:103" + }, + { + "kind": "number", + "nativeSrc": "3329:2:103", + "nodeType": "YulLiteral", + "src": "3329:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3306:3:103", + "nodeType": "YulIdentifier", + "src": "3306:3:103" + }, + "nativeSrc": "3306:26:103", + "nodeType": "YulFunctionCall", + "src": "3306:26:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3348:6:103", + "nodeType": "YulIdentifier", + "src": "3348:6:103" + }, + { + "name": "i", + "nativeSrc": "3356:1:103", + "nodeType": "YulIdentifier", + "src": "3356:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3344:3:103", + "nodeType": "YulIdentifier", + "src": "3344:3:103" + }, + "nativeSrc": "3344:14:103", + "nodeType": "YulFunctionCall", + "src": "3344:14:103" + }, + { + "name": "_1", + "nativeSrc": "3360:2:103", + "nodeType": "YulIdentifier", + "src": "3360:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3340:3:103", + "nodeType": "YulIdentifier", + "src": "3340:3:103" + }, + "nativeSrc": "3340:23:103", + "nodeType": "YulFunctionCall", + "src": "3340:23:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3334:5:103", + "nodeType": "YulIdentifier", + "src": "3334:5:103" + }, + "nativeSrc": "3334:30:103", + "nodeType": "YulFunctionCall", + "src": "3334:30:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3299:6:103", + "nodeType": "YulIdentifier", + "src": "3299:6:103" + }, + "nativeSrc": "3299:66:103", + "nodeType": "YulFunctionCall", + "src": "3299:66:103" + }, + "nativeSrc": "3299:66:103", + "nodeType": "YulExpressionStatement", + "src": "3299:66:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3246:1:103", + "nodeType": "YulIdentifier", + "src": "3246:1:103" + }, + { + "name": "length", + "nativeSrc": "3249:6:103", + "nodeType": "YulIdentifier", + "src": "3249:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3243:2:103", + "nodeType": "YulIdentifier", + "src": "3243:2:103" + }, + "nativeSrc": "3243:13:103", + "nodeType": "YulFunctionCall", + "src": "3243:13:103" + }, + "nativeSrc": "3235:140:103", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "3257:19:103", + "nodeType": "YulBlock", + "src": "3257:19:103", + "statements": [ + { + "nativeSrc": "3259:15:103", + "nodeType": "YulAssignment", + "src": "3259:15:103", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3268:1:103", + "nodeType": "YulIdentifier", + "src": "3268:1:103" + }, + { + "name": "_1", + "nativeSrc": "3271:2:103", + "nodeType": "YulIdentifier", + "src": "3271:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3264:3:103", + "nodeType": "YulIdentifier", + "src": "3264:3:103" + }, + "nativeSrc": "3264:10:103", + "nodeType": "YulFunctionCall", + "src": "3264:10:103" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "3259:1:103", + "nodeType": "YulIdentifier", + "src": "3259:1:103" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "3239:3:103", + "nodeType": "YulBlock", + "src": "3239:3:103", + "statements": [] + }, + "src": "3235:140:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3399:9:103", + "nodeType": "YulIdentifier", + "src": "3399:9:103" + }, + { + "name": "length", + "nativeSrc": "3410:6:103", + "nodeType": "YulIdentifier", + "src": "3410:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3395:3:103", + "nodeType": "YulIdentifier", + "src": "3395:3:103" + }, + "nativeSrc": "3395:22:103", + "nodeType": "YulFunctionCall", + "src": "3395:22:103" + }, + { + "kind": "number", + "nativeSrc": "3419:2:103", + "nodeType": "YulLiteral", + "src": "3419:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3391:3:103", + "nodeType": "YulIdentifier", + "src": "3391:3:103" + }, + "nativeSrc": "3391:31:103", + "nodeType": "YulFunctionCall", + "src": "3391:31:103" + }, + { + "kind": "number", + "nativeSrc": "3424:1:103", + "nodeType": "YulLiteral", + "src": "3424:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3384:6:103", + "nodeType": "YulIdentifier", + "src": "3384:6:103" + }, + "nativeSrc": "3384:42:103", + "nodeType": "YulFunctionCall", + "src": "3384:42:103" + }, + "nativeSrc": "3384:42:103", + "nodeType": "YulExpressionStatement", + "src": "3384:42:103" + }, + { + "nativeSrc": "3435:62:103", + "nodeType": "YulAssignment", + "src": "3435:62:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3451:9:103", + "nodeType": "YulIdentifier", + "src": "3451:9:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "3470:6:103", + "nodeType": "YulIdentifier", + "src": "3470:6:103" + }, + { + "kind": "number", + "nativeSrc": "3478:2:103", + "nodeType": "YulLiteral", + "src": "3478:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3466:3:103", + "nodeType": "YulIdentifier", + "src": "3466:3:103" + }, + "nativeSrc": "3466:15:103", + "nodeType": "YulFunctionCall", + "src": "3466:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3487:2:103", + "nodeType": "YulLiteral", + "src": "3487:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3483:3:103", + "nodeType": "YulIdentifier", + "src": "3483:3:103" + }, + "nativeSrc": "3483:7:103", + "nodeType": "YulFunctionCall", + "src": "3483:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3462:3:103", + "nodeType": "YulIdentifier", + "src": "3462:3:103" + }, + "nativeSrc": "3462:29:103", + "nodeType": "YulFunctionCall", + "src": "3462:29:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3447:3:103", + "nodeType": "YulIdentifier", + "src": "3447:3:103" + }, + "nativeSrc": "3447:45:103", + "nodeType": "YulFunctionCall", + "src": "3447:45:103" + }, + { + "kind": "number", + "nativeSrc": "3494:2:103", + "nodeType": "YulLiteral", + "src": "3494:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3443:3:103", + "nodeType": "YulIdentifier", + "src": "3443:3:103" + }, + "nativeSrc": "3443:54:103", + "nodeType": "YulFunctionCall", + "src": "3443:54:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3435:4:103", + "nodeType": "YulIdentifier", + "src": "3435:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "2860:643:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2968:9:103", + "nodeType": "YulTypedName", + "src": "2968:9:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2979:6:103", + "nodeType": "YulTypedName", + "src": "2979:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2987:6:103", + "nodeType": "YulTypedName", + "src": "2987:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2998:4:103", + "nodeType": "YulTypedName", + "src": "2998:4:103", + "type": "" + } + ], + "src": "2860:643:103" + }, + { + "body": { + "nativeSrc": "3586:199:103", + "nodeType": "YulBlock", + "src": "3586:199:103", + "statements": [ + { + "body": { + "nativeSrc": "3632:16:103", + "nodeType": "YulBlock", + "src": "3632:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3641:1:103", + "nodeType": "YulLiteral", + "src": "3641:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3644:1:103", + "nodeType": "YulLiteral", + "src": "3644:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3634:6:103", + "nodeType": "YulIdentifier", + "src": "3634:6:103" + }, + "nativeSrc": "3634:12:103", + "nodeType": "YulFunctionCall", + "src": "3634:12:103" + }, + "nativeSrc": "3634:12:103", + "nodeType": "YulExpressionStatement", + "src": "3634:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3607:7:103", + "nodeType": "YulIdentifier", + "src": "3607:7:103" + }, + { + "name": "headStart", + "nativeSrc": "3616:9:103", + "nodeType": "YulIdentifier", + "src": "3616:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3603:3:103", + "nodeType": "YulIdentifier", + "src": "3603:3:103" + }, + "nativeSrc": "3603:23:103", + "nodeType": "YulFunctionCall", + "src": "3603:23:103" + }, + { + "kind": "number", + "nativeSrc": "3628:2:103", + "nodeType": "YulLiteral", + "src": "3628:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3599:3:103", + "nodeType": "YulIdentifier", + "src": "3599:3:103" + }, + "nativeSrc": "3599:32:103", + "nodeType": "YulFunctionCall", + "src": "3599:32:103" + }, + "nativeSrc": "3596:52:103", + "nodeType": "YulIf", + "src": "3596:52:103" + }, + { + "nativeSrc": "3657:29:103", + "nodeType": "YulVariableDeclaration", + "src": "3657:29:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3676:9:103", + "nodeType": "YulIdentifier", + "src": "3676:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3670:5:103", + "nodeType": "YulIdentifier", + "src": "3670:5:103" + }, + "nativeSrc": "3670:16:103", + "nodeType": "YulFunctionCall", + "src": "3670:16:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3661:5:103", + "nodeType": "YulTypedName", + "src": "3661:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3739:16:103", + "nodeType": "YulBlock", + "src": "3739:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3748:1:103", + "nodeType": "YulLiteral", + "src": "3748:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3751:1:103", + "nodeType": "YulLiteral", + "src": "3751:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3741:6:103", + "nodeType": "YulIdentifier", + "src": "3741:6:103" + }, + "nativeSrc": "3741:12:103", + "nodeType": "YulFunctionCall", + "src": "3741:12:103" + }, + "nativeSrc": "3741:12:103", + "nodeType": "YulExpressionStatement", + "src": "3741:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3708:5:103", + "nodeType": "YulIdentifier", + "src": "3708:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3729:5:103", + "nodeType": "YulIdentifier", + "src": "3729:5:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3722:6:103", + "nodeType": "YulIdentifier", + "src": "3722:6:103" + }, + "nativeSrc": "3722:13:103", + "nodeType": "YulFunctionCall", + "src": "3722:13:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3715:6:103", + "nodeType": "YulIdentifier", + "src": "3715:6:103" + }, + "nativeSrc": "3715:21:103", + "nodeType": "YulFunctionCall", + "src": "3715:21:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "3705:2:103", + "nodeType": "YulIdentifier", + "src": "3705:2:103" + }, + "nativeSrc": "3705:32:103", + "nodeType": "YulFunctionCall", + "src": "3705:32:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3698:6:103", + "nodeType": "YulIdentifier", + "src": "3698:6:103" + }, + "nativeSrc": "3698:40:103", + "nodeType": "YulFunctionCall", + "src": "3698:40:103" + }, + "nativeSrc": "3695:60:103", + "nodeType": "YulIf", + "src": "3695:60:103" + }, + { + "nativeSrc": "3764:15:103", + "nodeType": "YulAssignment", + "src": "3764:15:103", + "value": { + "name": "value", + "nativeSrc": "3774:5:103", + "nodeType": "YulIdentifier", + "src": "3774:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3764:6:103", + "nodeType": "YulIdentifier", + "src": "3764:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nativeSrc": "3508:277:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3552:9:103", + "nodeType": "YulTypedName", + "src": "3552:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3563:7:103", + "nodeType": "YulTypedName", + "src": "3563:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3575:6:103", + "nodeType": "YulTypedName", + "src": "3575:6:103", + "type": "" + } + ], + "src": "3508:277:103" + }, + { + "body": { + "nativeSrc": "3964:228:103", + "nodeType": "YulBlock", + "src": "3964:228:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3981:9:103", + "nodeType": "YulIdentifier", + "src": "3981:9:103" + }, + { + "kind": "number", + "nativeSrc": "3992:2:103", + "nodeType": "YulLiteral", + "src": "3992:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3974:6:103", + "nodeType": "YulIdentifier", + "src": "3974:6:103" + }, + "nativeSrc": "3974:21:103", + "nodeType": "YulFunctionCall", + "src": "3974:21:103" + }, + "nativeSrc": "3974:21:103", + "nodeType": "YulExpressionStatement", + "src": "3974:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4015:9:103", + "nodeType": "YulIdentifier", + "src": "4015:9:103" + }, + { + "kind": "number", + "nativeSrc": "4026:2:103", + "nodeType": "YulLiteral", + "src": "4026:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4011:3:103", + "nodeType": "YulIdentifier", + "src": "4011:3:103" + }, + "nativeSrc": "4011:18:103", + "nodeType": "YulFunctionCall", + "src": "4011:18:103" + }, + { + "kind": "number", + "nativeSrc": "4031:2:103", + "nodeType": "YulLiteral", + "src": "4031:2:103", + "type": "", + "value": "38" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4004:6:103", + "nodeType": "YulIdentifier", + "src": "4004:6:103" + }, + "nativeSrc": "4004:30:103", + "nodeType": "YulFunctionCall", + "src": "4004:30:103" + }, + "nativeSrc": "4004:30:103", + "nodeType": "YulExpressionStatement", + "src": "4004:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4054:9:103", + "nodeType": "YulIdentifier", + "src": "4054:9:103" + }, + { + "kind": "number", + "nativeSrc": "4065:2:103", + "nodeType": "YulLiteral", + "src": "4065:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4050:3:103", + "nodeType": "YulIdentifier", + "src": "4050:3:103" + }, + "nativeSrc": "4050:18:103", + "nodeType": "YulFunctionCall", + "src": "4050:18:103" + }, + { + "hexValue": "5769746e65744465706c6f7965724d657465723a20616c72656164792070726f", + "kind": "string", + "nativeSrc": "4070:34:103", + "nodeType": "YulLiteral", + "src": "4070:34:103", + "type": "", + "value": "WitnetDeployerMeter: already pro" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4043:6:103", + "nodeType": "YulIdentifier", + "src": "4043:6:103" + }, + "nativeSrc": "4043:62:103", + "nodeType": "YulFunctionCall", + "src": "4043:62:103" + }, + "nativeSrc": "4043:62:103", + "nodeType": "YulExpressionStatement", + "src": "4043:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4125:9:103", + "nodeType": "YulIdentifier", + "src": "4125:9:103" + }, + { + "kind": "number", + "nativeSrc": "4136:2:103", + "nodeType": "YulLiteral", + "src": "4136:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4121:3:103", + "nodeType": "YulIdentifier", + "src": "4121:3:103" + }, + "nativeSrc": "4121:18:103", + "nodeType": "YulFunctionCall", + "src": "4121:18:103" + }, + { + "hexValue": "786966696564", + "kind": "string", + "nativeSrc": "4141:8:103", + "nodeType": "YulLiteral", + "src": "4141:8:103", + "type": "", + "value": "xified" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4114:6:103", + "nodeType": "YulIdentifier", + "src": "4114:6:103" + }, + "nativeSrc": "4114:36:103", + "nodeType": "YulFunctionCall", + "src": "4114:36:103" + }, + "nativeSrc": "4114:36:103", + "nodeType": "YulExpressionStatement", + "src": "4114:36:103" + }, + { + "nativeSrc": "4159:27:103", + "nodeType": "YulAssignment", + "src": "4159:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4171:9:103", + "nodeType": "YulIdentifier", + "src": "4171:9:103" + }, + { + "kind": "number", + "nativeSrc": "4182:3:103", + "nodeType": "YulLiteral", + "src": "4182:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4167:3:103", + "nodeType": "YulIdentifier", + "src": "4167:3:103" + }, + "nativeSrc": "4167:19:103", + "nodeType": "YulFunctionCall", + "src": "4167:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4159:4:103", + "nodeType": "YulIdentifier", + "src": "4159:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_35301ced9723f633ba26a41ab9b6ac754c475b81a3607fce6b33ac3eddaf591d__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3790:402:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3941:9:103", + "nodeType": "YulTypedName", + "src": "3941:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3955:4:103", + "nodeType": "YulTypedName", + "src": "3955:4:103", + "type": "" + } + ], + "src": "3790:402:103" + }, + { + "body": { + "nativeSrc": "4398:240:103", + "nodeType": "YulBlock", + "src": "4398:240:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4415:3:103", + "nodeType": "YulIdentifier", + "src": "4415:3:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4424:6:103", + "nodeType": "YulIdentifier", + "src": "4424:6:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4436:3:103", + "nodeType": "YulLiteral", + "src": "4436:3:103", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "4441:3:103", + "nodeType": "YulLiteral", + "src": "4441:3:103", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4432:3:103", + "nodeType": "YulIdentifier", + "src": "4432:3:103" + }, + "nativeSrc": "4432:13:103", + "nodeType": "YulFunctionCall", + "src": "4432:13:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4420:3:103", + "nodeType": "YulIdentifier", + "src": "4420:3:103" + }, + "nativeSrc": "4420:26:103", + "nodeType": "YulFunctionCall", + "src": "4420:26:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4408:6:103", + "nodeType": "YulIdentifier", + "src": "4408:6:103" + }, + "nativeSrc": "4408:39:103", + "nodeType": "YulFunctionCall", + "src": "4408:39:103" + }, + "nativeSrc": "4408:39:103", + "nodeType": "YulExpressionStatement", + "src": "4408:39:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4467:3:103", + "nodeType": "YulIdentifier", + "src": "4467:3:103" + }, + { + "kind": "number", + "nativeSrc": "4472:1:103", + "nodeType": "YulLiteral", + "src": "4472:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4463:3:103", + "nodeType": "YulIdentifier", + "src": "4463:3:103" + }, + "nativeSrc": "4463:11:103", + "nodeType": "YulFunctionCall", + "src": "4463:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4484:2:103", + "nodeType": "YulLiteral", + "src": "4484:2:103", + "type": "", + "value": "96" + }, + { + "name": "value1", + "nativeSrc": "4488:6:103", + "nodeType": "YulIdentifier", + "src": "4488:6:103" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4480:3:103", + "nodeType": "YulIdentifier", + "src": "4480:3:103" + }, + "nativeSrc": "4480:15:103", + "nodeType": "YulFunctionCall", + "src": "4480:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4501:26:103", + "nodeType": "YulLiteral", + "src": "4501:26:103", + "type": "", + "value": "0xffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4497:3:103", + "nodeType": "YulIdentifier", + "src": "4497:3:103" + }, + "nativeSrc": "4497:31:103", + "nodeType": "YulFunctionCall", + "src": "4497:31:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4476:3:103", + "nodeType": "YulIdentifier", + "src": "4476:3:103" + }, + "nativeSrc": "4476:53:103", + "nodeType": "YulFunctionCall", + "src": "4476:53:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4456:6:103", + "nodeType": "YulIdentifier", + "src": "4456:6:103" + }, + "nativeSrc": "4456:74:103", + "nodeType": "YulFunctionCall", + "src": "4456:74:103" + }, + "nativeSrc": "4456:74:103", + "nodeType": "YulExpressionStatement", + "src": "4456:74:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4550:3:103", + "nodeType": "YulIdentifier", + "src": "4550:3:103" + }, + { + "kind": "number", + "nativeSrc": "4555:2:103", + "nodeType": "YulLiteral", + "src": "4555:2:103", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4546:3:103", + "nodeType": "YulIdentifier", + "src": "4546:3:103" + }, + "nativeSrc": "4546:12:103", + "nodeType": "YulFunctionCall", + "src": "4546:12:103" + }, + { + "name": "value2", + "nativeSrc": "4560:6:103", + "nodeType": "YulIdentifier", + "src": "4560:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4539:6:103", + "nodeType": "YulIdentifier", + "src": "4539:6:103" + }, + "nativeSrc": "4539:28:103", + "nodeType": "YulFunctionCall", + "src": "4539:28:103" + }, + "nativeSrc": "4539:28:103", + "nodeType": "YulExpressionStatement", + "src": "4539:28:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4587:3:103", + "nodeType": "YulIdentifier", + "src": "4587:3:103" + }, + { + "kind": "number", + "nativeSrc": "4592:2:103", + "nodeType": "YulLiteral", + "src": "4592:2:103", + "type": "", + "value": "53" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4583:3:103", + "nodeType": "YulIdentifier", + "src": "4583:3:103" + }, + "nativeSrc": "4583:12:103", + "nodeType": "YulFunctionCall", + "src": "4583:12:103" + }, + { + "name": "value3", + "nativeSrc": "4597:6:103", + "nodeType": "YulIdentifier", + "src": "4597:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4576:6:103", + "nodeType": "YulIdentifier", + "src": "4576:6:103" + }, + "nativeSrc": "4576:28:103", + "nodeType": "YulFunctionCall", + "src": "4576:28:103" + }, + "nativeSrc": "4576:28:103", + "nodeType": "YulExpressionStatement", + "src": "4576:28:103" + }, + { + "nativeSrc": "4613:19:103", + "nodeType": "YulAssignment", + "src": "4613:19:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4624:3:103", + "nodeType": "YulIdentifier", + "src": "4624:3:103" + }, + { + "kind": "number", + "nativeSrc": "4629:2:103", + "nodeType": "YulLiteral", + "src": "4629:2:103", + "type": "", + "value": "85" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4620:3:103", + "nodeType": "YulIdentifier", + "src": "4620:3:103" + }, + "nativeSrc": "4620:12:103", + "nodeType": "YulFunctionCall", + "src": "4620:12:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "4613:3:103", + "nodeType": "YulIdentifier", + "src": "4613:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "4197:441:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "4350:3:103", + "nodeType": "YulTypedName", + "src": "4350:3:103", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "4355:6:103", + "nodeType": "YulTypedName", + "src": "4355:6:103", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "4363:6:103", + "nodeType": "YulTypedName", + "src": "4363:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4371:6:103", + "nodeType": "YulTypedName", + "src": "4371:6:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4379:6:103", + "nodeType": "YulTypedName", + "src": "4379:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "4390:3:103", + "nodeType": "YulTypedName", + "src": "4390:3:103", + "type": "" + } + ], + "src": "4197:441:103" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_bytes32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function abi_decode_bytes(offset, end) -> array\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let _1 := calldataload(offset)\n let _2 := 0xffffffffffffffff\n if gt(_1, _2) { panic_error_0x41() }\n let _3 := not(31)\n let memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(and(add(_1, 0x1f), _3), 63), _3))\n if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n mstore(memPtr, _1)\n if gt(add(add(offset, _1), 0x20), end) { revert(0, 0) }\n calldatacopy(add(memPtr, 0x20), add(offset, 0x20), _1)\n mstore(add(add(memPtr, _1), 0x20), 0)\n array := memPtr\n }\n function abi_decode_tuple_t_bytes_memory_ptrt_bytes32(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_bytes(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_decode_tuple_t_bytes32t_addresst_bytes_memory_ptr(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n value0 := calldataload(headStart)\n let value := calldataload(add(headStart, 32))\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value1 := value\n let offset := calldataload(add(headStart, 64))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value2 := abi_decode_bytes(add(headStart, offset), dataEnd)\n }\n function abi_encode_tuple_t_contract$_WitnetProxy_$4713__to_t_address_payable__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_a449f037473e66c93f74665b4547dc6279e787cd06aefbab4d74a9c55d42a13f__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 33)\n mstore(add(headStart, 64), \"WitnetDeployer: deployment faile\")\n mstore(add(headStart, 96), \"d\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_address_t_bytes_memory_ptr__to_t_address_t_bytes_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n let _1 := 32\n mstore(add(headStart, 32), 64)\n let length := mload(value1)\n mstore(add(headStart, 64), length)\n let i := 0\n for { } lt(i, length) { i := add(i, _1) }\n {\n mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1)))\n }\n mstore(add(add(headStart, length), 96), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_35301ced9723f633ba26a41ab9b6ac754c475b81a3607fce6b33ac3eddaf591d__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 38)\n mstore(add(headStart, 64), \"WitnetDeployerMeter: already pro\")\n mstore(add(headStart, 96), \"xified\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_packed_t_bytes1_t_address_t_bytes32_t_bytes32__to_t_bytes1_t_address_t_bytes32_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value3, value2, value1, value0) -> end\n {\n mstore(pos, and(value0, shl(248, 255)))\n mstore(add(pos, 1), and(shl(96, value1), not(0xffffffffffffffffffffffff)))\n mstore(add(pos, 21), value2)\n mstore(add(pos, 53), value3)\n end := add(pos, 85)\n }\n}", + "id": 103, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "355:1267:20:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "355:1267:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:201;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;411:201:20;;;;;;;900:448:18;;;;;;:::i;:::-;;:::i;620:997:20:-;;;;;;:::i;:::-;;:::i;1694:417:18:-;;;;;;:::i;:::-;;:::i;411:201:20:-;520:7;552:52;566:30;;;;;;;;:::i;:::-;-1:-1:-1;;566:30:20;;;;;;;;;;;;;;598:5;552:13;:52::i;:::-;545:59;411:201;-1:-1:-1;;411:201:20:o;900:448:18:-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;620:997:20;774:11;803:18;824:30;843:10;824:18;:30::i;:::-;803:51;;869:10;-1:-1:-1;;;;;869:22:20;;895:1;869:27;865:745;;952:50;959:30;;;;;;;;:::i;:::-;-1:-1:-1;;959:30:20;;;;;;;;;;;;;;991:10;952:6;:50::i;:::-;;1090:10;-1:-1:-1;;;;;1070:42:20;;1131:20;1322:10;1420:9;1220:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1070:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;1505:10:20;-1:-1:-1;1478:39:20;;865:745;1550:48;;-1:-1:-1;;;1550:48:20;;3992:2:103;1550:48:20;;;3974:21:103;4031:2;4011:18;;;4004:30;4070:34;4050:18;;;4043:62;-1:-1:-1;;;4121:18:103;;;4114:36;4167:19;;1550:48:20;3790:402:103;620:997:20;;;;;;:::o;1694:417:18:-;2036:20;;;;;;;1898:177;;;-1:-1:-1;;;;;;1898:177:18;;;4408:39:103;1980:4:18;4484:2:103;4480:15;-1:-1:-1;;4476:53:103;4463:11;;;4456:74;4546:12;;;4539:28;;;;4583:12;;;;4576:28;;;;1898:177:18;;;;;;;;;;4620:12:103;;;;1898:177:18;;;1870:220;;;;;;1694:417::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:643::-;3064:1;3060;3055:3;3051:11;3047:19;3039:6;3035:32;3024:9;3017:51;2998:4;3087:2;3125;3120;3109:9;3105:18;3098:30;3157:6;3151:13;3200:6;3195:2;3184:9;3180:18;3173:34;3225:1;3235:140;3249:6;3246:1;3243:13;3235:140;;;3344:14;;;3340:23;;3334:30;3310:17;;;3329:2;3306:26;3299:66;3264:10;;3235:140;;;3239:3;3424:1;3419:2;3410:6;3399:9;3395:22;3391:31;3384:42;3494:2;3487;3483:7;3478:2;3470:6;3466:15;3462:29;3451:9;3447:45;3443:54;3435:62;;;;2860:643;;;;;:::o;3508:277::-;3575:6;3628:2;3616:9;3607:7;3603:23;3599:32;3596:52;;;3644:1;3641;3634:12;3596:52;3676:9;3670:16;3729:5;3722:13;3715:21;3708:5;3705:32;3695:60;;3751:1;3748;3741:12", + "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetDeployer.sol\";\r\n\r\n/// @notice WitnetDeployerMeter contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \r\n/// @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Meter Ecosystem.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployerMeter is WitnetDeployer {\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return determineAddr(type(WitnetProxy).creationCode, _salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual override\r\n external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n deploy(type(WitnetProxy).creationCode, _proxySalt);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployerMeter: already proxified\");\r\n }\r\n }\r\n\r\n}", + "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployerMeter.sol", + "ast": { + "absolutePath": "project:/contracts/core/WitnetDeployerMeter.sol", + "exportedSymbols": { + "Create3": [ + 17522 + ], + "ERC165": [ + 602 + ], + "IERC165": [ + 614 + ], + "Initializable": [ + 253 + ], + "Proxiable": [ + 30273 + ], + "Upgradeable": [ + 30388 + ], + "WitnetDeployer": [ + 4262 + ], + "WitnetDeployerMeter": [ + 4486 + ], + "WitnetProxy": [ + 4713 + ] + }, + "id": 4487, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4401, + "literals": [ + "solidity", + ">=", + "0.8", + ".0", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "35:31:20" + }, + { + "absolutePath": "project:/contracts/core/WitnetDeployer.sol", + "file": "./WitnetDeployer.sol", + "id": 4402, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4487, + "sourceUnit": 4263, + "src": "70:30:20", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4404, + "name": "WitnetDeployer", + "nameLocations": [ + "387:14:20" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4262, + "src": "387:14:20" + }, + "id": 4405, + "nodeType": "InheritanceSpecifier", + "src": "387:14:20" + } + ], + "canonicalName": "WitnetDeployerMeter", + "contractDependencies": [ + 4713 + ], + "contractKind": "contract", + "documentation": { + "id": 4403, + "nodeType": "StructuredDocumentation", + "src": "104:249:20", + "text": "@notice WitnetDeployerMeter contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \n @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Meter Ecosystem.\n @author Guillermo Díaz " + }, + "fullyImplemented": true, + "id": 4486, + "linearizedBaseContracts": [ + 4486, + 4262 + ], + "name": "WitnetDeployerMeter", + "nameLocation": "364:19:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 4197 + ], + "body": { + "id": 4421, + "nodeType": "Block", + "src": "534:78:20", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 4415, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "571:11:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + ], + "id": 4414, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "566:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "566:17:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetProxy_$4713", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "584:12:20", + "memberName": "creationCode", + "nodeType": "MemberAccess", + "src": "566:30:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4418, + "name": "_salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4407, + "src": "598:5:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4413, + "name": "determineAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4184, + "src": "552:13:20", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes memory,bytes32) view returns (address)" + } + }, + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "552:52:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4412, + "id": 4420, + "nodeType": "Return", + "src": "545:59:20" + } + ] + }, + "functionSelector": "4998f038", + "id": 4422, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineProxyAddr", + "nameLocation": "420:18:20", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4409, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "472:8:20" + }, + "parameters": { + "id": 4408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4407, + "mutability": "mutable", + "name": "_salt", + "nameLocation": "447:5:20", + "nodeType": "VariableDeclaration", + "scope": 4422, + "src": "439:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4406, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "439:7:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "438:15:20" + }, + "returnParameters": { + "id": 4412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4411, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4422, + "src": "520:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4410, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "520:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "519:9:20" + }, + "scope": 4486, + "src": "411:201:20", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4261 + ], + "body": { + "id": 4484, + "nodeType": "Block", + "src": "792:825:20", + "statements": [ + { + "assignments": [ + 4436 + ], + "declarations": [ + { + "constant": false, + "id": 4436, + "mutability": "mutable", + "name": "_proxyAddr", + "nameLocation": "811:10:20", + "nodeType": "VariableDeclaration", + "scope": 4484, + "src": "803:18:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4440, + "initialValue": { + "arguments": [ + { + "id": 4438, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4424, + "src": "843:10:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4437, + "name": "determineProxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4422 + ], + "referencedDeclaration": 4422, + "src": "824:18:20", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 4439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "824:30:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "803:51:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4441, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4436, + "src": "869:10:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "880:4:20", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "869:15:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "885:6:20", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "869:22:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "895:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "869:27:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4482, + "nodeType": "Block", + "src": "1535:75:20", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e65744465706c6f7965724d657465723a20616c72656164792070726f786966696564", + "id": 4479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1557:40:20", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_35301ced9723f633ba26a41ab9b6ac754c475b81a3607fce6b33ac3eddaf591d", + "typeString": "literal_string \"WitnetDeployerMeter: already proxified\"" + }, + "value": "WitnetDeployerMeter: already proxified" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_35301ced9723f633ba26a41ab9b6ac754c475b81a3607fce6b33ac3eddaf591d", + "typeString": "literal_string \"WitnetDeployerMeter: already proxified\"" + } + ], + "id": 4478, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "1550:6:20", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1550:48:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4481, + "nodeType": "ExpressionStatement", + "src": "1550:48:20" + } + ] + }, + "id": 4483, + "nodeType": "IfStatement", + "src": "865:745:20", + "trueBody": { + "id": 4477, + "nodeType": "Block", + "src": "898:631:20", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 4448, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "964:11:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + ], + "id": 4447, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "959:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "959:17:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetProxy_$4713", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "977:12:20", + "memberName": "creationCode", + "nodeType": "MemberAccess", + "src": "959:30:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4451, + "name": "_proxySalt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4424, + "src": "991:10:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4446, + "name": "deploy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4146, + "src": "952:6:20", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes memory,bytes32) returns (address)" + } + }, + "id": 4452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "952:50:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4453, + "nodeType": "ExpressionStatement", + "src": "952:50:20" + }, + { + "expression": { + "arguments": [ + { + "id": 4461, + "name": "_firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4426, + "src": "1131:20:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "expression": { + "id": 4464, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1322:3:20", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1326:6:20", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1322:10:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4466, + "name": "_initData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "1420:9:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4462, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1220:3:20", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1224:6:20", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "1220:10:20", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1220:228:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4457, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4436, + "src": "1090:10:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1082:8:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1082:8:20", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1082:19:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4454, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "1070:11:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1070:32:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1103:9:20", + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 4703, + "src": "1070:42:20", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,bytes memory) external returns (bool)" + } + }, + "id": 4468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1070:393:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4469, + "nodeType": "ExpressionStatement", + "src": "1070:393:20" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4473, + "name": "_proxyAddr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4436, + "src": "1505:10:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1497:8:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 4471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1497:8:20", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 4474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1497:19:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4470, + "name": "WitnetProxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "1485:11:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetProxy_$4713_$", + "typeString": "type(contract WitnetProxy)" + } + }, + "id": 4475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1485:32:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "functionReturnParameters": 4434, + "id": 4476, + "nodeType": "Return", + "src": "1478:39:20" + } + ] + } + } + ] + }, + "functionSelector": "5ba489e7", + "id": 4485, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "proxify", + "nameLocation": "629:7:20", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4430, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "728:8:20" + }, + "parameters": { + "id": 4429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4424, + "mutability": "mutable", + "name": "_proxySalt", + "nameLocation": "645:10:20", + "nodeType": "VariableDeclaration", + "scope": 4485, + "src": "637:18:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4423, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "637:7:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4426, + "mutability": "mutable", + "name": "_firstImplementation", + "nameLocation": "665:20:20", + "nodeType": "VariableDeclaration", + "scope": 4485, + "src": "657:28:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "657:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4428, + "mutability": "mutable", + "name": "_initData", + "nameLocation": "700:9:20", + "nodeType": "VariableDeclaration", + "scope": 4485, + "src": "687:22:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4427, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "687:5:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "636:74:20" + }, + "returnParameters": { + "id": 4434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4433, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4485, + "src": "774:11:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + }, + "typeName": { + "id": 4432, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4431, + "name": "WitnetProxy", + "nameLocations": [ + "774:11:20" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4713, + "src": "774:11:20" + }, + "referencedDeclaration": 4713, + "src": "774:11:20", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetProxy_$4713", + "typeString": "contract WitnetProxy" + } + }, + "visibility": "internal" + } + ], + "src": "773:13:20" + }, + "scope": 4486, + "src": "620:997:20", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + } + ], + "scope": 4487, + "src": "355:1267:20", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "35:1587:20" + }, + "compiler": { + "name": "solc", + "version": "0.8.25+commit.b61c2a91.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.16", + "updatedAt": "2024-10-20T09:42:12.838Z", + "devdoc": { + "author": "Guillermo Díaz ", + "kind": "dev", + "methods": { + "deploy(bytes,bytes32)": { + "details": "The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the addressnor the nonce of the caller (i.e. see EIP-1014). ", + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_deployed": "Just deployed contract address." + } + }, + "determineAddr(bytes,bytes32)": { + "params": { + "_initCode": "Creation code, including construction logic and input parameters.", + "_salt": "Arbitrary value to modify resulting address." + }, + "returns": { + "_0": "Deterministic contract address." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "deploy(bytes,bytes32)": { + "notice": "Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. " + }, + "determineAddr(bytes,bytes32)": { + "notice": "Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`." + } + }, + "notice": "WitnetDeployerMeter contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, and CREATE3 factory (EIP-3171) for Witnet proxies, on the Meter Ecosystem.", + "version": 1 + } + } \ No newline at end of file diff --git a/migrations/frosts/WitnetProxy.json b/migrations/frosts/WitnetProxy.json new file mode 100644 index 00000000..05cd7c47 --- /dev/null +++ b/migrations/frosts/WitnetProxy.json @@ -0,0 +1,9535 @@ +{ + "contractName": "WitnetProxy", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_initData", + "type": "bytes" + } + ], + "name": "upgradeTo", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initData\",\"type\":\"bytes\"}],\"name\":\"upgradeTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Guillermo D\\u00edaz \",\"kind\":\"dev\",\"methods\":{\"upgradeTo(address,bytes)\":{\"params\":{\"_initData\":\"Raw data with which new implementation will be initialized.\",\"_newImplementation\":\"New implementation address.\"},\"returns\":{\"_0\":\"Returns whether new implementation would be further upgradable, or not.\"}}},\"title\":\"WitnetProxy: upgradable delegate-proxy contract. \",\"version\":1},\"userdoc\":{\"events\":{\"Upgraded(address)\":{\"notice\":\"Event emitted every time the implementation gets updated.\"}},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470).\"},\"implementation()\":{\"notice\":\"Returns proxy's current implementation address.\"},\"upgradeTo(address,bytes)\":{\"notice\":\"Upgrades the `implementation` address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/core/WitnetProxy.sol\":\"WitnetProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xddce8e17e3d3f9ed818b4f4c4478a8262aab8b11ed322f1bf5ed705bb4bd97fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8084aa71a4cc7d2980972412a88fe4f114869faea3fefa5436431644eb5c0287\",\"dweb:/ipfs/Qmbqfs5dRdPvHVKY8kTaeyc65NdqXRQwRK7h9s5UJEhD1p\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621\",\"dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL\"]},\"project:/contracts/core/WitnetProxy.sol\":{\"keccak256\":\"0x2b2f56fc69bf0e01f6f1062202d1682cd394fa3b3d9ff2f8f833ab51c9e866cc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8017f76a71e4a52a5a5e249081c92510bac5b91f03f727e66ff4406238521337\",\"dweb:/ipfs/QmdWcPAL3MGtxGdpX5CMfgzz4YzxYEeCiFRoGHVCr8rLEL\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]},\"project:/contracts/patterns/Proxiable.sol\":{\"keccak256\":\"0x86032205378fed9ed2bf155eed8ce4bdbb13b7f5960850c6d50954a38b61a3d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f89978eda4244a13f42a6092a94ac829bb3e38c92d77d4978b9f32894b187a63\",\"dweb:/ipfs/Qmbc1XaFCvLm3Sxvh7tP29Ug32jBGy3avsCqBGAptxs765\"]},\"project:/contracts/patterns/Upgradeable.sol\":{\"keccak256\":\"0xbeb025c71f037acb1a668174eb6930631bf397129beb825f2660e5d8cf19614f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fe6ce4dcd500093ae069d35b91829ccb471e1ca33ed0851fb053fbfe76c78aba\",\"dweb:/ipfs/QmT7huvCFS6bHDxt7HhEogJmyvYNbeb6dFTJudsVSX6nEs\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b506109e58061001f6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033", + "deployedBytecode": "0x60806040526004361061002d5760003560e01c80635c60da1b146100655780636fbc15e91461009757610034565b3661003457005b600061003e6100c7565b905060405136600082376000803683855af43d806000843e818015610061578184f35b8184fd5b34801561007157600080fd5b5061007a6100c7565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a357600080fd5b506100b76100b2366004610791565b6100f5565b604051901515815260200161008e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b60006001600160a01b0383166101525760405162461bcd60e51b815260206004820181905260248201527f5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e60448201526064015b60405180910390fd5b600061015c6100c7565b90506001600160a01b0381161561050857806001600160a01b0316846001600160a01b0316036101ce5760405162461bcd60e51b815260206004820152601f60248201527f5769746e657450726f78793a206e6f7468696e6720746f2075706772616465006044820152606401610149565b806001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610228575060408051601f3d908101601f1916820190925261022591810190610830565b60015b6102875760405162461bcd60e51b815260206004820152602a60248201527f5769746e657450726f78793a20756e61626c6520746f20636865636b207570676044820152697261646162696c69747960b01b6064820152608401610149565b806102d45760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f742075706772616461626c6500000000006044820152606401610149565b5060405133602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180516001600160e01b03166335ac4b0560e11b17905251610326919061087d565b600060405180830381855af49150503d8060008114610361576040519150601f19603f3d011682016040523d82523d6000602084013e610366565b606091505b5091509150816103885760405162461bcd60e51b815260040161014990610899565b8080602001905181019061039c9190610830565b6103e85760405162461bcd60e51b815260206004820152601b60248201527f5769746e657450726f78793a206e6f7420617574686f72697a656400000000006044820152606401610149565b856001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a91906108e0565b836001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906108e0565b146105055760405162461bcd60e51b8152602060048201526024808201527f5769746e657450726f78793a2070726f786961626c655555494473206d69736d6044820152630c2e8c6d60e31b6064820152608401610149565b50505b600080856001600160a01b0316856040516024016105269190610925565b60408051601f198184030181529181526020820180516001600160e01b031663439fab9160e01b1790525161055b919061087d565b600060405180830381855af49150503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b509150915081610635576044815110156106025760405162461bcd60e51b815260206004820152602260248201527f5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c604482015261195960f21b6064820152608401610149565b6004810190508080602001905181019061061c9190610938565b60405162461bcd60e51b81526004016101499190610925565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0388169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2856001600160a01b0316635479d9406040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156106f5575060408051601f3d908101601f191682019092526106f291810190610830565b60015b6107115760405162461bcd60e51b815260040161014990610899565b935061071c92505050565b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561076157610761610722565b604052919050565b600067ffffffffffffffff82111561078357610783610722565b50601f01601f191660200190565b600080604083850312156107a457600080fd5b82356001600160a01b03811681146107bb57600080fd5b9150602083013567ffffffffffffffff8111156107d757600080fd5b8301601f810185136107e857600080fd5b80356107fb6107f682610769565b610738565b81815286602083850101111561081057600080fd5b816020840160208301376000602083830101528093505050509250929050565b60006020828403121561084257600080fd5b8151801515811461085257600080fd5b9392505050565b60005b8381101561087457818101518382015260200161085c565b50506000910152565b6000825161088f818460208701610859565b9190910192915050565b60208082526027908201527f5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65604082015266373a30ba34b7b760c91b606082015260800190565b6000602082840312156108f257600080fd5b5051919050565b60008151808452610911816020860160208601610859565b601f01601f19169290920160200192915050565b60208152600061085260208301846108f9565b60006020828403121561094a57600080fd5b815167ffffffffffffffff81111561096157600080fd5b8201601f8101841361097257600080fd5b80516109806107f682610769565b81815285602083850101111561099557600080fd5b6109a6826020830160208601610859565b9594505050505056fea2646970667358221220ba4d61ba6dc6b10826f1b2f21a7fb1965aee5031bae62952c0d5d7b7c16674ab64736f6c63430008190033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [ + { + "ast": { + "nativeSrc": "0:7316:103", + "nodeType": "YulBlock", + "src": "0:7316:103", + "statements": [ + { + "nativeSrc": "6:3:103", + "nodeType": "YulBlock", + "src": "6:3:103", + "statements": [] + }, + { + "body": { + "nativeSrc": "115:102:103", + "nodeType": "YulBlock", + "src": "115:102:103", + "statements": [ + { + "nativeSrc": "125:26:103", + "nodeType": "YulAssignment", + "src": "125:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "137:9:103", + "nodeType": "YulIdentifier", + "src": "137:9:103" + }, + { + "kind": "number", + "nativeSrc": "148:2:103", + "nodeType": "YulLiteral", + "src": "148:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "133:3:103", + "nodeType": "YulIdentifier", + "src": "133:3:103" + }, + "nativeSrc": "133:18:103", + "nodeType": "YulFunctionCall", + "src": "133:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "125:4:103", + "nodeType": "YulIdentifier", + "src": "125:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "167:9:103", + "nodeType": "YulIdentifier", + "src": "167:9:103" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "182:6:103", + "nodeType": "YulIdentifier", + "src": "182:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "198:3:103", + "nodeType": "YulLiteral", + "src": "198:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "203:1:103", + "nodeType": "YulLiteral", + "src": "203:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "194:3:103", + "nodeType": "YulIdentifier", + "src": "194:3:103" + }, + "nativeSrc": "194:11:103", + "nodeType": "YulFunctionCall", + "src": "194:11:103" + }, + { + "kind": "number", + "nativeSrc": "207:1:103", + "nodeType": "YulLiteral", + "src": "207:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "190:3:103", + "nodeType": "YulIdentifier", + "src": "190:3:103" + }, + "nativeSrc": "190:19:103", + "nodeType": "YulFunctionCall", + "src": "190:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "178:3:103", + "nodeType": "YulIdentifier", + "src": "178:3:103" + }, + "nativeSrc": "178:32:103", + "nodeType": "YulFunctionCall", + "src": "178:32:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "160:6:103", + "nodeType": "YulIdentifier", + "src": "160:6:103" + }, + "nativeSrc": "160:51:103", + "nodeType": "YulFunctionCall", + "src": "160:51:103" + }, + "nativeSrc": "160:51:103", + "nodeType": "YulExpressionStatement", + "src": "160:51:103" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "14:203:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "84:9:103", + "nodeType": "YulTypedName", + "src": "84:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "95:6:103", + "nodeType": "YulTypedName", + "src": "95:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "106:4:103", + "nodeType": "YulTypedName", + "src": "106:4:103", + "type": "" + } + ], + "src": "14:203:103" + }, + { + "body": { + "nativeSrc": "254:95:103", + "nodeType": "YulBlock", + "src": "254:95:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "271:1:103", + "nodeType": "YulLiteral", + "src": "271:1:103", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "278:3:103", + "nodeType": "YulLiteral", + "src": "278:3:103", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "283:10:103", + "nodeType": "YulLiteral", + "src": "283:10:103", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "274:3:103", + "nodeType": "YulIdentifier", + "src": "274:3:103" + }, + "nativeSrc": "274:20:103", + "nodeType": "YulFunctionCall", + "src": "274:20:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "264:6:103", + "nodeType": "YulIdentifier", + "src": "264:6:103" + }, + "nativeSrc": "264:31:103", + "nodeType": "YulFunctionCall", + "src": "264:31:103" + }, + "nativeSrc": "264:31:103", + "nodeType": "YulExpressionStatement", + "src": "264:31:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "311:1:103", + "nodeType": "YulLiteral", + "src": "311:1:103", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "314:4:103", + "nodeType": "YulLiteral", + "src": "314:4:103", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "304:6:103", + "nodeType": "YulIdentifier", + "src": "304:6:103" + }, + "nativeSrc": "304:15:103", + "nodeType": "YulFunctionCall", + "src": "304:15:103" + }, + "nativeSrc": "304:15:103", + "nodeType": "YulExpressionStatement", + "src": "304:15:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "335:1:103", + "nodeType": "YulLiteral", + "src": "335:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "338:4:103", + "nodeType": "YulLiteral", + "src": "338:4:103", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "328:6:103", + "nodeType": "YulIdentifier", + "src": "328:6:103" + }, + "nativeSrc": "328:15:103", + "nodeType": "YulFunctionCall", + "src": "328:15:103" + }, + "nativeSrc": "328:15:103", + "nodeType": "YulExpressionStatement", + "src": "328:15:103" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "222:127:103", + "nodeType": "YulFunctionDefinition", + "src": "222:127:103" + }, + { + "body": { + "nativeSrc": "399:230:103", + "nodeType": "YulBlock", + "src": "399:230:103", + "statements": [ + { + "nativeSrc": "409:19:103", + "nodeType": "YulAssignment", + "src": "409:19:103", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "425:2:103", + "nodeType": "YulLiteral", + "src": "425:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "419:5:103", + "nodeType": "YulIdentifier", + "src": "419:5:103" + }, + "nativeSrc": "419:9:103", + "nodeType": "YulFunctionCall", + "src": "419:9:103" + }, + "variableNames": [ + { + "name": "memPtr", + "nativeSrc": "409:6:103", + "nodeType": "YulIdentifier", + "src": "409:6:103" + } + ] + }, + { + "nativeSrc": "437:58:103", + "nodeType": "YulVariableDeclaration", + "src": "437:58:103", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "459:6:103", + "nodeType": "YulIdentifier", + "src": "459:6:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "size", + "nativeSrc": "475:4:103", + "nodeType": "YulIdentifier", + "src": "475:4:103" + }, + { + "kind": "number", + "nativeSrc": "481:2:103", + "nodeType": "YulLiteral", + "src": "481:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "471:3:103", + "nodeType": "YulIdentifier", + "src": "471:3:103" + }, + "nativeSrc": "471:13:103", + "nodeType": "YulFunctionCall", + "src": "471:13:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "490:2:103", + "nodeType": "YulLiteral", + "src": "490:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "486:3:103", + "nodeType": "YulIdentifier", + "src": "486:3:103" + }, + "nativeSrc": "486:7:103", + "nodeType": "YulFunctionCall", + "src": "486:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "467:3:103", + "nodeType": "YulIdentifier", + "src": "467:3:103" + }, + "nativeSrc": "467:27:103", + "nodeType": "YulFunctionCall", + "src": "467:27:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "455:3:103", + "nodeType": "YulIdentifier", + "src": "455:3:103" + }, + "nativeSrc": "455:40:103", + "nodeType": "YulFunctionCall", + "src": "455:40:103" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "441:10:103", + "nodeType": "YulTypedName", + "src": "441:10:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "570:22:103", + "nodeType": "YulBlock", + "src": "570:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "572:16:103", + "nodeType": "YulIdentifier", + "src": "572:16:103" + }, + "nativeSrc": "572:18:103", + "nodeType": "YulFunctionCall", + "src": "572:18:103" + }, + "nativeSrc": "572:18:103", + "nodeType": "YulExpressionStatement", + "src": "572:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "513:10:103", + "nodeType": "YulIdentifier", + "src": "513:10:103" + }, + { + "kind": "number", + "nativeSrc": "525:18:103", + "nodeType": "YulLiteral", + "src": "525:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "510:2:103", + "nodeType": "YulIdentifier", + "src": "510:2:103" + }, + "nativeSrc": "510:34:103", + "nodeType": "YulFunctionCall", + "src": "510:34:103" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "549:10:103", + "nodeType": "YulIdentifier", + "src": "549:10:103" + }, + { + "name": "memPtr", + "nativeSrc": "561:6:103", + "nodeType": "YulIdentifier", + "src": "561:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "546:2:103", + "nodeType": "YulIdentifier", + "src": "546:2:103" + }, + "nativeSrc": "546:22:103", + "nodeType": "YulFunctionCall", + "src": "546:22:103" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "507:2:103", + "nodeType": "YulIdentifier", + "src": "507:2:103" + }, + "nativeSrc": "507:62:103", + "nodeType": "YulFunctionCall", + "src": "507:62:103" + }, + "nativeSrc": "504:88:103", + "nodeType": "YulIf", + "src": "504:88:103" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "608:2:103", + "nodeType": "YulLiteral", + "src": "608:2:103", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "612:10:103", + "nodeType": "YulIdentifier", + "src": "612:10:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "601:6:103", + "nodeType": "YulIdentifier", + "src": "601:6:103" + }, + "nativeSrc": "601:22:103", + "nodeType": "YulFunctionCall", + "src": "601:22:103" + }, + "nativeSrc": "601:22:103", + "nodeType": "YulExpressionStatement", + "src": "601:22:103" + } + ] + }, + "name": "allocate_memory", + "nativeSrc": "354:275:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "size", + "nativeSrc": "379:4:103", + "nodeType": "YulTypedName", + "src": "379:4:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "memPtr", + "nativeSrc": "388:6:103", + "nodeType": "YulTypedName", + "src": "388:6:103", + "type": "" + } + ], + "src": "354:275:103" + }, + { + "body": { + "nativeSrc": "691:129:103", + "nodeType": "YulBlock", + "src": "691:129:103", + "statements": [ + { + "body": { + "nativeSrc": "735:22:103", + "nodeType": "YulBlock", + "src": "735:22:103", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "737:16:103", + "nodeType": "YulIdentifier", + "src": "737:16:103" + }, + "nativeSrc": "737:18:103", + "nodeType": "YulFunctionCall", + "src": "737:18:103" + }, + "nativeSrc": "737:18:103", + "nodeType": "YulExpressionStatement", + "src": "737:18:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "707:6:103", + "nodeType": "YulIdentifier", + "src": "707:6:103" + }, + { + "kind": "number", + "nativeSrc": "715:18:103", + "nodeType": "YulLiteral", + "src": "715:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "704:2:103", + "nodeType": "YulIdentifier", + "src": "704:2:103" + }, + "nativeSrc": "704:30:103", + "nodeType": "YulFunctionCall", + "src": "704:30:103" + }, + "nativeSrc": "701:56:103", + "nodeType": "YulIf", + "src": "701:56:103" + }, + { + "nativeSrc": "766:48:103", + "nodeType": "YulAssignment", + "src": "766:48:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "786:6:103", + "nodeType": "YulIdentifier", + "src": "786:6:103" + }, + { + "kind": "number", + "nativeSrc": "794:2:103", + "nodeType": "YulLiteral", + "src": "794:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "782:3:103", + "nodeType": "YulIdentifier", + "src": "782:3:103" + }, + "nativeSrc": "782:15:103", + "nodeType": "YulFunctionCall", + "src": "782:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "803:2:103", + "nodeType": "YulLiteral", + "src": "803:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "799:3:103", + "nodeType": "YulIdentifier", + "src": "799:3:103" + }, + "nativeSrc": "799:7:103", + "nodeType": "YulFunctionCall", + "src": "799:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "778:3:103", + "nodeType": "YulIdentifier", + "src": "778:3:103" + }, + "nativeSrc": "778:29:103", + "nodeType": "YulFunctionCall", + "src": "778:29:103" + }, + { + "kind": "number", + "nativeSrc": "809:4:103", + "nodeType": "YulLiteral", + "src": "809:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "774:3:103", + "nodeType": "YulIdentifier", + "src": "774:3:103" + }, + "nativeSrc": "774:40:103", + "nodeType": "YulFunctionCall", + "src": "774:40:103" + }, + "variableNames": [ + { + "name": "size", + "nativeSrc": "766:4:103", + "nodeType": "YulIdentifier", + "src": "766:4:103" + } + ] + } + ] + }, + "name": "array_allocation_size_bytes", + "nativeSrc": "634:186:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "length", + "nativeSrc": "671:6:103", + "nodeType": "YulTypedName", + "src": "671:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "size", + "nativeSrc": "682:4:103", + "nodeType": "YulTypedName", + "src": "682:4:103", + "type": "" + } + ], + "src": "634:186:103" + }, + { + "body": { + "nativeSrc": "921:749:103", + "nodeType": "YulBlock", + "src": "921:749:103", + "statements": [ + { + "body": { + "nativeSrc": "967:16:103", + "nodeType": "YulBlock", + "src": "967:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "976:1:103", + "nodeType": "YulLiteral", + "src": "976:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "979:1:103", + "nodeType": "YulLiteral", + "src": "979:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "969:6:103", + "nodeType": "YulIdentifier", + "src": "969:6:103" + }, + "nativeSrc": "969:12:103", + "nodeType": "YulFunctionCall", + "src": "969:12:103" + }, + "nativeSrc": "969:12:103", + "nodeType": "YulExpressionStatement", + "src": "969:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "942:7:103", + "nodeType": "YulIdentifier", + "src": "942:7:103" + }, + { + "name": "headStart", + "nativeSrc": "951:9:103", + "nodeType": "YulIdentifier", + "src": "951:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "938:3:103", + "nodeType": "YulIdentifier", + "src": "938:3:103" + }, + "nativeSrc": "938:23:103", + "nodeType": "YulFunctionCall", + "src": "938:23:103" + }, + { + "kind": "number", + "nativeSrc": "963:2:103", + "nodeType": "YulLiteral", + "src": "963:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "934:3:103", + "nodeType": "YulIdentifier", + "src": "934:3:103" + }, + "nativeSrc": "934:32:103", + "nodeType": "YulFunctionCall", + "src": "934:32:103" + }, + "nativeSrc": "931:52:103", + "nodeType": "YulIf", + "src": "931:52:103" + }, + { + "nativeSrc": "992:36:103", + "nodeType": "YulVariableDeclaration", + "src": "992:36:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1018:9:103", + "nodeType": "YulIdentifier", + "src": "1018:9:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1005:12:103", + "nodeType": "YulIdentifier", + "src": "1005:12:103" + }, + "nativeSrc": "1005:23:103", + "nodeType": "YulFunctionCall", + "src": "1005:23:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "996:5:103", + "nodeType": "YulTypedName", + "src": "996:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1091:16:103", + "nodeType": "YulBlock", + "src": "1091:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1100:1:103", + "nodeType": "YulLiteral", + "src": "1100:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1103:1:103", + "nodeType": "YulLiteral", + "src": "1103:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1093:6:103", + "nodeType": "YulIdentifier", + "src": "1093:6:103" + }, + "nativeSrc": "1093:12:103", + "nodeType": "YulFunctionCall", + "src": "1093:12:103" + }, + "nativeSrc": "1093:12:103", + "nodeType": "YulExpressionStatement", + "src": "1093:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1050:5:103", + "nodeType": "YulIdentifier", + "src": "1050:5:103" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1061:5:103", + "nodeType": "YulIdentifier", + "src": "1061:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1076:3:103", + "nodeType": "YulLiteral", + "src": "1076:3:103", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1081:1:103", + "nodeType": "YulLiteral", + "src": "1081:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1072:3:103", + "nodeType": "YulIdentifier", + "src": "1072:3:103" + }, + "nativeSrc": "1072:11:103", + "nodeType": "YulFunctionCall", + "src": "1072:11:103" + }, + { + "kind": "number", + "nativeSrc": "1085:1:103", + "nodeType": "YulLiteral", + "src": "1085:1:103", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1068:3:103", + "nodeType": "YulIdentifier", + "src": "1068:3:103" + }, + "nativeSrc": "1068:19:103", + "nodeType": "YulFunctionCall", + "src": "1068:19:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1057:3:103", + "nodeType": "YulIdentifier", + "src": "1057:3:103" + }, + "nativeSrc": "1057:31:103", + "nodeType": "YulFunctionCall", + "src": "1057:31:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1047:2:103", + "nodeType": "YulIdentifier", + "src": "1047:2:103" + }, + "nativeSrc": "1047:42:103", + "nodeType": "YulFunctionCall", + "src": "1047:42:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1040:6:103", + "nodeType": "YulIdentifier", + "src": "1040:6:103" + }, + "nativeSrc": "1040:50:103", + "nodeType": "YulFunctionCall", + "src": "1040:50:103" + }, + "nativeSrc": "1037:70:103", + "nodeType": "YulIf", + "src": "1037:70:103" + }, + { + "nativeSrc": "1116:15:103", + "nodeType": "YulAssignment", + "src": "1116:15:103", + "value": { + "name": "value", + "nativeSrc": "1126:5:103", + "nodeType": "YulIdentifier", + "src": "1126:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1116:6:103", + "nodeType": "YulIdentifier", + "src": "1116:6:103" + } + ] + }, + { + "nativeSrc": "1140:46:103", + "nodeType": "YulVariableDeclaration", + "src": "1140:46:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1171:9:103", + "nodeType": "YulIdentifier", + "src": "1171:9:103" + }, + { + "kind": "number", + "nativeSrc": "1182:2:103", + "nodeType": "YulLiteral", + "src": "1182:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1167:3:103", + "nodeType": "YulIdentifier", + "src": "1167:3:103" + }, + "nativeSrc": "1167:18:103", + "nodeType": "YulFunctionCall", + "src": "1167:18:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1154:12:103", + "nodeType": "YulIdentifier", + "src": "1154:12:103" + }, + "nativeSrc": "1154:32:103", + "nodeType": "YulFunctionCall", + "src": "1154:32:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "1144:6:103", + "nodeType": "YulTypedName", + "src": "1144:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1229:16:103", + "nodeType": "YulBlock", + "src": "1229:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1238:1:103", + "nodeType": "YulLiteral", + "src": "1238:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1241:1:103", + "nodeType": "YulLiteral", + "src": "1241:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1231:6:103", + "nodeType": "YulIdentifier", + "src": "1231:6:103" + }, + "nativeSrc": "1231:12:103", + "nodeType": "YulFunctionCall", + "src": "1231:12:103" + }, + "nativeSrc": "1231:12:103", + "nodeType": "YulExpressionStatement", + "src": "1231:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "1201:6:103", + "nodeType": "YulIdentifier", + "src": "1201:6:103" + }, + { + "kind": "number", + "nativeSrc": "1209:18:103", + "nodeType": "YulLiteral", + "src": "1209:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1198:2:103", + "nodeType": "YulIdentifier", + "src": "1198:2:103" + }, + "nativeSrc": "1198:30:103", + "nodeType": "YulFunctionCall", + "src": "1198:30:103" + }, + "nativeSrc": "1195:50:103", + "nodeType": "YulIf", + "src": "1195:50:103" + }, + { + "nativeSrc": "1254:32:103", + "nodeType": "YulVariableDeclaration", + "src": "1254:32:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1268:9:103", + "nodeType": "YulIdentifier", + "src": "1268:9:103" + }, + { + "name": "offset", + "nativeSrc": "1279:6:103", + "nodeType": "YulIdentifier", + "src": "1279:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1264:3:103", + "nodeType": "YulIdentifier", + "src": "1264:3:103" + }, + "nativeSrc": "1264:22:103", + "nodeType": "YulFunctionCall", + "src": "1264:22:103" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "1258:2:103", + "nodeType": "YulTypedName", + "src": "1258:2:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1334:16:103", + "nodeType": "YulBlock", + "src": "1334:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1343:1:103", + "nodeType": "YulLiteral", + "src": "1343:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1346:1:103", + "nodeType": "YulLiteral", + "src": "1346:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1336:6:103", + "nodeType": "YulIdentifier", + "src": "1336:6:103" + }, + "nativeSrc": "1336:12:103", + "nodeType": "YulFunctionCall", + "src": "1336:12:103" + }, + "nativeSrc": "1336:12:103", + "nodeType": "YulExpressionStatement", + "src": "1336:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "1313:2:103", + "nodeType": "YulIdentifier", + "src": "1313:2:103" + }, + { + "kind": "number", + "nativeSrc": "1317:4:103", + "nodeType": "YulLiteral", + "src": "1317:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1309:3:103", + "nodeType": "YulIdentifier", + "src": "1309:3:103" + }, + "nativeSrc": "1309:13:103", + "nodeType": "YulFunctionCall", + "src": "1309:13:103" + }, + { + "name": "dataEnd", + "nativeSrc": "1324:7:103", + "nodeType": "YulIdentifier", + "src": "1324:7:103" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1305:3:103", + "nodeType": "YulIdentifier", + "src": "1305:3:103" + }, + "nativeSrc": "1305:27:103", + "nodeType": "YulFunctionCall", + "src": "1305:27:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1298:6:103", + "nodeType": "YulIdentifier", + "src": "1298:6:103" + }, + "nativeSrc": "1298:35:103", + "nodeType": "YulFunctionCall", + "src": "1298:35:103" + }, + "nativeSrc": "1295:55:103", + "nodeType": "YulIf", + "src": "1295:55:103" + }, + { + "nativeSrc": "1359:26:103", + "nodeType": "YulVariableDeclaration", + "src": "1359:26:103", + "value": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "1382:2:103", + "nodeType": "YulIdentifier", + "src": "1382:2:103" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1369:12:103", + "nodeType": "YulIdentifier", + "src": "1369:12:103" + }, + "nativeSrc": "1369:16:103", + "nodeType": "YulFunctionCall", + "src": "1369:16:103" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "1363:2:103", + "nodeType": "YulTypedName", + "src": "1363:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "1394:61:103", + "nodeType": "YulVariableDeclaration", + "src": "1394:61:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "1451:2:103", + "nodeType": "YulIdentifier", + "src": "1451:2:103" + } + ], + "functionName": { + "name": "array_allocation_size_bytes", + "nativeSrc": "1423:27:103", + "nodeType": "YulIdentifier", + "src": "1423:27:103" + }, + "nativeSrc": "1423:31:103", + "nodeType": "YulFunctionCall", + "src": "1423:31:103" + } + ], + "functionName": { + "name": "allocate_memory", + "nativeSrc": "1407:15:103", + "nodeType": "YulIdentifier", + "src": "1407:15:103" + }, + "nativeSrc": "1407:48:103", + "nodeType": "YulFunctionCall", + "src": "1407:48:103" + }, + "variables": [ + { + "name": "array", + "nativeSrc": "1398:5:103", + "nodeType": "YulTypedName", + "src": "1398:5:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "array", + "nativeSrc": "1471:5:103", + "nodeType": "YulIdentifier", + "src": "1471:5:103" + }, + { + "name": "_2", + "nativeSrc": "1478:2:103", + "nodeType": "YulIdentifier", + "src": "1478:2:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1464:6:103", + "nodeType": "YulIdentifier", + "src": "1464:6:103" + }, + "nativeSrc": "1464:17:103", + "nodeType": "YulFunctionCall", + "src": "1464:17:103" + }, + "nativeSrc": "1464:17:103", + "nodeType": "YulExpressionStatement", + "src": "1464:17:103" + }, + { + "body": { + "nativeSrc": "1527:16:103", + "nodeType": "YulBlock", + "src": "1527:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1536:1:103", + "nodeType": "YulLiteral", + "src": "1536:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1539:1:103", + "nodeType": "YulLiteral", + "src": "1539:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1529:6:103", + "nodeType": "YulIdentifier", + "src": "1529:6:103" + }, + "nativeSrc": "1529:12:103", + "nodeType": "YulFunctionCall", + "src": "1529:12:103" + }, + "nativeSrc": "1529:12:103", + "nodeType": "YulExpressionStatement", + "src": "1529:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "1504:2:103", + "nodeType": "YulIdentifier", + "src": "1504:2:103" + }, + { + "name": "_2", + "nativeSrc": "1508:2:103", + "nodeType": "YulIdentifier", + "src": "1508:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1500:3:103", + "nodeType": "YulIdentifier", + "src": "1500:3:103" + }, + "nativeSrc": "1500:11:103", + "nodeType": "YulFunctionCall", + "src": "1500:11:103" + }, + { + "kind": "number", + "nativeSrc": "1513:2:103", + "nodeType": "YulLiteral", + "src": "1513:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1496:3:103", + "nodeType": "YulIdentifier", + "src": "1496:3:103" + }, + "nativeSrc": "1496:20:103", + "nodeType": "YulFunctionCall", + "src": "1496:20:103" + }, + { + "name": "dataEnd", + "nativeSrc": "1518:7:103", + "nodeType": "YulIdentifier", + "src": "1518:7:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1493:2:103", + "nodeType": "YulIdentifier", + "src": "1493:2:103" + }, + "nativeSrc": "1493:33:103", + "nodeType": "YulFunctionCall", + "src": "1493:33:103" + }, + "nativeSrc": "1490:53:103", + "nodeType": "YulIf", + "src": "1490:53:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "array", + "nativeSrc": "1569:5:103", + "nodeType": "YulIdentifier", + "src": "1569:5:103" + }, + { + "kind": "number", + "nativeSrc": "1576:2:103", + "nodeType": "YulLiteral", + "src": "1576:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1565:3:103", + "nodeType": "YulIdentifier", + "src": "1565:3:103" + }, + "nativeSrc": "1565:14:103", + "nodeType": "YulFunctionCall", + "src": "1565:14:103" + }, + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "1585:2:103", + "nodeType": "YulIdentifier", + "src": "1585:2:103" + }, + { + "kind": "number", + "nativeSrc": "1589:2:103", + "nodeType": "YulLiteral", + "src": "1589:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1581:3:103", + "nodeType": "YulIdentifier", + "src": "1581:3:103" + }, + "nativeSrc": "1581:11:103", + "nodeType": "YulFunctionCall", + "src": "1581:11:103" + }, + { + "name": "_2", + "nativeSrc": "1594:2:103", + "nodeType": "YulIdentifier", + "src": "1594:2:103" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "1552:12:103", + "nodeType": "YulIdentifier", + "src": "1552:12:103" + }, + "nativeSrc": "1552:45:103", + "nodeType": "YulFunctionCall", + "src": "1552:45:103" + }, + "nativeSrc": "1552:45:103", + "nodeType": "YulExpressionStatement", + "src": "1552:45:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "array", + "nativeSrc": "1621:5:103", + "nodeType": "YulIdentifier", + "src": "1621:5:103" + }, + { + "name": "_2", + "nativeSrc": "1628:2:103", + "nodeType": "YulIdentifier", + "src": "1628:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1617:3:103", + "nodeType": "YulIdentifier", + "src": "1617:3:103" + }, + "nativeSrc": "1617:14:103", + "nodeType": "YulFunctionCall", + "src": "1617:14:103" + }, + { + "kind": "number", + "nativeSrc": "1633:2:103", + "nodeType": "YulLiteral", + "src": "1633:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1613:3:103", + "nodeType": "YulIdentifier", + "src": "1613:3:103" + }, + "nativeSrc": "1613:23:103", + "nodeType": "YulFunctionCall", + "src": "1613:23:103" + }, + { + "kind": "number", + "nativeSrc": "1638:1:103", + "nodeType": "YulLiteral", + "src": "1638:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1606:6:103", + "nodeType": "YulIdentifier", + "src": "1606:6:103" + }, + "nativeSrc": "1606:34:103", + "nodeType": "YulFunctionCall", + "src": "1606:34:103" + }, + "nativeSrc": "1606:34:103", + "nodeType": "YulExpressionStatement", + "src": "1606:34:103" + }, + { + "nativeSrc": "1649:15:103", + "nodeType": "YulAssignment", + "src": "1649:15:103", + "value": { + "name": "array", + "nativeSrc": "1659:5:103", + "nodeType": "YulIdentifier", + "src": "1659:5:103" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "1649:6:103", + "nodeType": "YulIdentifier", + "src": "1649:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_bytes_memory_ptr", + "nativeSrc": "825:845:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "879:9:103", + "nodeType": "YulTypedName", + "src": "879:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "890:7:103", + "nodeType": "YulTypedName", + "src": "890:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "902:6:103", + "nodeType": "YulTypedName", + "src": "902:6:103", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "910:6:103", + "nodeType": "YulTypedName", + "src": "910:6:103", + "type": "" + } + ], + "src": "825:845:103" + }, + { + "body": { + "nativeSrc": "1770:92:103", + "nodeType": "YulBlock", + "src": "1770:92:103", + "statements": [ + { + "nativeSrc": "1780:26:103", + "nodeType": "YulAssignment", + "src": "1780:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1792:9:103", + "nodeType": "YulIdentifier", + "src": "1792:9:103" + }, + { + "kind": "number", + "nativeSrc": "1803:2:103", + "nodeType": "YulLiteral", + "src": "1803:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1788:3:103", + "nodeType": "YulIdentifier", + "src": "1788:3:103" + }, + "nativeSrc": "1788:18:103", + "nodeType": "YulFunctionCall", + "src": "1788:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "1780:4:103", + "nodeType": "YulIdentifier", + "src": "1780:4:103" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1822:9:103", + "nodeType": "YulIdentifier", + "src": "1822:9:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "1847:6:103", + "nodeType": "YulIdentifier", + "src": "1847:6:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1840:6:103", + "nodeType": "YulIdentifier", + "src": "1840:6:103" + }, + "nativeSrc": "1840:14:103", + "nodeType": "YulFunctionCall", + "src": "1840:14:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1833:6:103", + "nodeType": "YulIdentifier", + "src": "1833:6:103" + }, + "nativeSrc": "1833:22:103", + "nodeType": "YulFunctionCall", + "src": "1833:22:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1815:6:103", + "nodeType": "YulIdentifier", + "src": "1815:6:103" + }, + "nativeSrc": "1815:41:103", + "nodeType": "YulFunctionCall", + "src": "1815:41:103" + }, + "nativeSrc": "1815:41:103", + "nodeType": "YulExpressionStatement", + "src": "1815:41:103" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nativeSrc": "1675:187:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1739:9:103", + "nodeType": "YulTypedName", + "src": "1739:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "1750:6:103", + "nodeType": "YulTypedName", + "src": "1750:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1761:4:103", + "nodeType": "YulTypedName", + "src": "1761:4:103", + "type": "" + } + ], + "src": "1675:187:103" + }, + { + "body": { + "nativeSrc": "2041:182:103", + "nodeType": "YulBlock", + "src": "2041:182:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2058:9:103", + "nodeType": "YulIdentifier", + "src": "2058:9:103" + }, + { + "kind": "number", + "nativeSrc": "2069:2:103", + "nodeType": "YulLiteral", + "src": "2069:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2051:6:103", + "nodeType": "YulIdentifier", + "src": "2051:6:103" + }, + "nativeSrc": "2051:21:103", + "nodeType": "YulFunctionCall", + "src": "2051:21:103" + }, + "nativeSrc": "2051:21:103", + "nodeType": "YulExpressionStatement", + "src": "2051:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2092:9:103", + "nodeType": "YulIdentifier", + "src": "2092:9:103" + }, + { + "kind": "number", + "nativeSrc": "2103:2:103", + "nodeType": "YulLiteral", + "src": "2103:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2088:3:103", + "nodeType": "YulIdentifier", + "src": "2088:3:103" + }, + "nativeSrc": "2088:18:103", + "nodeType": "YulFunctionCall", + "src": "2088:18:103" + }, + { + "kind": "number", + "nativeSrc": "2108:2:103", + "nodeType": "YulLiteral", + "src": "2108:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2081:6:103", + "nodeType": "YulIdentifier", + "src": "2081:6:103" + }, + "nativeSrc": "2081:30:103", + "nodeType": "YulFunctionCall", + "src": "2081:30:103" + }, + "nativeSrc": "2081:30:103", + "nodeType": "YulExpressionStatement", + "src": "2081:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2131:9:103", + "nodeType": "YulIdentifier", + "src": "2131:9:103" + }, + { + "kind": "number", + "nativeSrc": "2142:2:103", + "nodeType": "YulLiteral", + "src": "2142:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2127:3:103", + "nodeType": "YulIdentifier", + "src": "2127:3:103" + }, + "nativeSrc": "2127:18:103", + "nodeType": "YulFunctionCall", + "src": "2127:18:103" + }, + { + "hexValue": "5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e", + "kind": "string", + "nativeSrc": "2147:34:103", + "nodeType": "YulLiteral", + "src": "2147:34:103", + "type": "", + "value": "WitnetProxy: null implementation" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2120:6:103", + "nodeType": "YulIdentifier", + "src": "2120:6:103" + }, + "nativeSrc": "2120:62:103", + "nodeType": "YulFunctionCall", + "src": "2120:62:103" + }, + "nativeSrc": "2120:62:103", + "nodeType": "YulExpressionStatement", + "src": "2120:62:103" + }, + { + "nativeSrc": "2191:26:103", + "nodeType": "YulAssignment", + "src": "2191:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2203:9:103", + "nodeType": "YulIdentifier", + "src": "2203:9:103" + }, + { + "kind": "number", + "nativeSrc": "2214:2:103", + "nodeType": "YulLiteral", + "src": "2214:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2199:3:103", + "nodeType": "YulIdentifier", + "src": "2199:3:103" + }, + "nativeSrc": "2199:18:103", + "nodeType": "YulFunctionCall", + "src": "2199:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2191:4:103", + "nodeType": "YulIdentifier", + "src": "2191:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_d599eaa5e68d91d75c142446490ab9a15fd0284a41ce949219b5b4d8f267239a__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "1867:356:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2018:9:103", + "nodeType": "YulTypedName", + "src": "2018:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2032:4:103", + "nodeType": "YulTypedName", + "src": "2032:4:103", + "type": "" + } + ], + "src": "1867:356:103" + }, + { + "body": { + "nativeSrc": "2402:181:103", + "nodeType": "YulBlock", + "src": "2402:181:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2419:9:103", + "nodeType": "YulIdentifier", + "src": "2419:9:103" + }, + { + "kind": "number", + "nativeSrc": "2430:2:103", + "nodeType": "YulLiteral", + "src": "2430:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2412:6:103", + "nodeType": "YulIdentifier", + "src": "2412:6:103" + }, + "nativeSrc": "2412:21:103", + "nodeType": "YulFunctionCall", + "src": "2412:21:103" + }, + "nativeSrc": "2412:21:103", + "nodeType": "YulExpressionStatement", + "src": "2412:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2453:9:103", + "nodeType": "YulIdentifier", + "src": "2453:9:103" + }, + { + "kind": "number", + "nativeSrc": "2464:2:103", + "nodeType": "YulLiteral", + "src": "2464:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2449:3:103", + "nodeType": "YulIdentifier", + "src": "2449:3:103" + }, + "nativeSrc": "2449:18:103", + "nodeType": "YulFunctionCall", + "src": "2449:18:103" + }, + { + "kind": "number", + "nativeSrc": "2469:2:103", + "nodeType": "YulLiteral", + "src": "2469:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2442:6:103", + "nodeType": "YulIdentifier", + "src": "2442:6:103" + }, + "nativeSrc": "2442:30:103", + "nodeType": "YulFunctionCall", + "src": "2442:30:103" + }, + "nativeSrc": "2442:30:103", + "nodeType": "YulExpressionStatement", + "src": "2442:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2492:9:103", + "nodeType": "YulIdentifier", + "src": "2492:9:103" + }, + { + "kind": "number", + "nativeSrc": "2503:2:103", + "nodeType": "YulLiteral", + "src": "2503:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2488:3:103", + "nodeType": "YulIdentifier", + "src": "2488:3:103" + }, + "nativeSrc": "2488:18:103", + "nodeType": "YulFunctionCall", + "src": "2488:18:103" + }, + { + "hexValue": "5769746e657450726f78793a206e6f7468696e6720746f2075706772616465", + "kind": "string", + "nativeSrc": "2508:33:103", + "nodeType": "YulLiteral", + "src": "2508:33:103", + "type": "", + "value": "WitnetProxy: nothing to upgrade" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2481:6:103", + "nodeType": "YulIdentifier", + "src": "2481:6:103" + }, + "nativeSrc": "2481:61:103", + "nodeType": "YulFunctionCall", + "src": "2481:61:103" + }, + "nativeSrc": "2481:61:103", + "nodeType": "YulExpressionStatement", + "src": "2481:61:103" + }, + { + "nativeSrc": "2551:26:103", + "nodeType": "YulAssignment", + "src": "2551:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2563:9:103", + "nodeType": "YulIdentifier", + "src": "2563:9:103" + }, + { + "kind": "number", + "nativeSrc": "2574:2:103", + "nodeType": "YulLiteral", + "src": "2574:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2559:3:103", + "nodeType": "YulIdentifier", + "src": "2559:3:103" + }, + "nativeSrc": "2559:18:103", + "nodeType": "YulFunctionCall", + "src": "2559:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2551:4:103", + "nodeType": "YulIdentifier", + "src": "2551:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_e332eab1bae45430d1201a30c0d80d8fcb5570f9e70201a9eb7b229e17fd2084__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "2228:355:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2379:9:103", + "nodeType": "YulTypedName", + "src": "2379:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2393:4:103", + "nodeType": "YulTypedName", + "src": "2393:4:103", + "type": "" + } + ], + "src": "2228:355:103" + }, + { + "body": { + "nativeSrc": "2666:199:103", + "nodeType": "YulBlock", + "src": "2666:199:103", + "statements": [ + { + "body": { + "nativeSrc": "2712:16:103", + "nodeType": "YulBlock", + "src": "2712:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2721:1:103", + "nodeType": "YulLiteral", + "src": "2721:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2724:1:103", + "nodeType": "YulLiteral", + "src": "2724:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2714:6:103", + "nodeType": "YulIdentifier", + "src": "2714:6:103" + }, + "nativeSrc": "2714:12:103", + "nodeType": "YulFunctionCall", + "src": "2714:12:103" + }, + "nativeSrc": "2714:12:103", + "nodeType": "YulExpressionStatement", + "src": "2714:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2687:7:103", + "nodeType": "YulIdentifier", + "src": "2687:7:103" + }, + { + "name": "headStart", + "nativeSrc": "2696:9:103", + "nodeType": "YulIdentifier", + "src": "2696:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2683:3:103", + "nodeType": "YulIdentifier", + "src": "2683:3:103" + }, + "nativeSrc": "2683:23:103", + "nodeType": "YulFunctionCall", + "src": "2683:23:103" + }, + { + "kind": "number", + "nativeSrc": "2708:2:103", + "nodeType": "YulLiteral", + "src": "2708:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2679:3:103", + "nodeType": "YulIdentifier", + "src": "2679:3:103" + }, + "nativeSrc": "2679:32:103", + "nodeType": "YulFunctionCall", + "src": "2679:32:103" + }, + "nativeSrc": "2676:52:103", + "nodeType": "YulIf", + "src": "2676:52:103" + }, + { + "nativeSrc": "2737:29:103", + "nodeType": "YulVariableDeclaration", + "src": "2737:29:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2756:9:103", + "nodeType": "YulIdentifier", + "src": "2756:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2750:5:103", + "nodeType": "YulIdentifier", + "src": "2750:5:103" + }, + "nativeSrc": "2750:16:103", + "nodeType": "YulFunctionCall", + "src": "2750:16:103" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2741:5:103", + "nodeType": "YulTypedName", + "src": "2741:5:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2819:16:103", + "nodeType": "YulBlock", + "src": "2819:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2828:1:103", + "nodeType": "YulLiteral", + "src": "2828:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2831:1:103", + "nodeType": "YulLiteral", + "src": "2831:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2821:6:103", + "nodeType": "YulIdentifier", + "src": "2821:6:103" + }, + "nativeSrc": "2821:12:103", + "nodeType": "YulFunctionCall", + "src": "2821:12:103" + }, + "nativeSrc": "2821:12:103", + "nodeType": "YulExpressionStatement", + "src": "2821:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2788:5:103", + "nodeType": "YulIdentifier", + "src": "2788:5:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2809:5:103", + "nodeType": "YulIdentifier", + "src": "2809:5:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2802:6:103", + "nodeType": "YulIdentifier", + "src": "2802:6:103" + }, + "nativeSrc": "2802:13:103", + "nodeType": "YulFunctionCall", + "src": "2802:13:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2795:6:103", + "nodeType": "YulIdentifier", + "src": "2795:6:103" + }, + "nativeSrc": "2795:21:103", + "nodeType": "YulFunctionCall", + "src": "2795:21:103" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2785:2:103", + "nodeType": "YulIdentifier", + "src": "2785:2:103" + }, + "nativeSrc": "2785:32:103", + "nodeType": "YulFunctionCall", + "src": "2785:32:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2778:6:103", + "nodeType": "YulIdentifier", + "src": "2778:6:103" + }, + "nativeSrc": "2778:40:103", + "nodeType": "YulFunctionCall", + "src": "2778:40:103" + }, + "nativeSrc": "2775:60:103", + "nodeType": "YulIf", + "src": "2775:60:103" + }, + { + "nativeSrc": "2844:15:103", + "nodeType": "YulAssignment", + "src": "2844:15:103", + "value": { + "name": "value", + "nativeSrc": "2854:5:103", + "nodeType": "YulIdentifier", + "src": "2854:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "2844:6:103", + "nodeType": "YulIdentifier", + "src": "2844:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nativeSrc": "2588:277:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2632:9:103", + "nodeType": "YulTypedName", + "src": "2632:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2643:7:103", + "nodeType": "YulTypedName", + "src": "2643:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2655:6:103", + "nodeType": "YulTypedName", + "src": "2655:6:103", + "type": "" + } + ], + "src": "2588:277:103" + }, + { + "body": { + "nativeSrc": "3044:232:103", + "nodeType": "YulBlock", + "src": "3044:232:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3061:9:103", + "nodeType": "YulIdentifier", + "src": "3061:9:103" + }, + { + "kind": "number", + "nativeSrc": "3072:2:103", + "nodeType": "YulLiteral", + "src": "3072:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3054:6:103", + "nodeType": "YulIdentifier", + "src": "3054:6:103" + }, + "nativeSrc": "3054:21:103", + "nodeType": "YulFunctionCall", + "src": "3054:21:103" + }, + "nativeSrc": "3054:21:103", + "nodeType": "YulExpressionStatement", + "src": "3054:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3095:9:103", + "nodeType": "YulIdentifier", + "src": "3095:9:103" + }, + { + "kind": "number", + "nativeSrc": "3106:2:103", + "nodeType": "YulLiteral", + "src": "3106:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3091:3:103", + "nodeType": "YulIdentifier", + "src": "3091:3:103" + }, + "nativeSrc": "3091:18:103", + "nodeType": "YulFunctionCall", + "src": "3091:18:103" + }, + { + "kind": "number", + "nativeSrc": "3111:2:103", + "nodeType": "YulLiteral", + "src": "3111:2:103", + "type": "", + "value": "42" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3084:6:103", + "nodeType": "YulIdentifier", + "src": "3084:6:103" + }, + "nativeSrc": "3084:30:103", + "nodeType": "YulFunctionCall", + "src": "3084:30:103" + }, + "nativeSrc": "3084:30:103", + "nodeType": "YulExpressionStatement", + "src": "3084:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3134:9:103", + "nodeType": "YulIdentifier", + "src": "3134:9:103" + }, + { + "kind": "number", + "nativeSrc": "3145:2:103", + "nodeType": "YulLiteral", + "src": "3145:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3130:3:103", + "nodeType": "YulIdentifier", + "src": "3130:3:103" + }, + "nativeSrc": "3130:18:103", + "nodeType": "YulFunctionCall", + "src": "3130:18:103" + }, + { + "hexValue": "5769746e657450726f78793a20756e61626c6520746f20636865636b20757067", + "kind": "string", + "nativeSrc": "3150:34:103", + "nodeType": "YulLiteral", + "src": "3150:34:103", + "type": "", + "value": "WitnetProxy: unable to check upg" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3123:6:103", + "nodeType": "YulIdentifier", + "src": "3123:6:103" + }, + "nativeSrc": "3123:62:103", + "nodeType": "YulFunctionCall", + "src": "3123:62:103" + }, + "nativeSrc": "3123:62:103", + "nodeType": "YulExpressionStatement", + "src": "3123:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3205:9:103", + "nodeType": "YulIdentifier", + "src": "3205:9:103" + }, + { + "kind": "number", + "nativeSrc": "3216:2:103", + "nodeType": "YulLiteral", + "src": "3216:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3201:3:103", + "nodeType": "YulIdentifier", + "src": "3201:3:103" + }, + "nativeSrc": "3201:18:103", + "nodeType": "YulFunctionCall", + "src": "3201:18:103" + }, + { + "hexValue": "7261646162696c697479", + "kind": "string", + "nativeSrc": "3221:12:103", + "nodeType": "YulLiteral", + "src": "3221:12:103", + "type": "", + "value": "radability" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3194:6:103", + "nodeType": "YulIdentifier", + "src": "3194:6:103" + }, + "nativeSrc": "3194:40:103", + "nodeType": "YulFunctionCall", + "src": "3194:40:103" + }, + "nativeSrc": "3194:40:103", + "nodeType": "YulExpressionStatement", + "src": "3194:40:103" + }, + { + "nativeSrc": "3243:27:103", + "nodeType": "YulAssignment", + "src": "3243:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3255:9:103", + "nodeType": "YulIdentifier", + "src": "3255:9:103" + }, + { + "kind": "number", + "nativeSrc": "3266:3:103", + "nodeType": "YulLiteral", + "src": "3266:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3251:3:103", + "nodeType": "YulIdentifier", + "src": "3251:3:103" + }, + "nativeSrc": "3251:19:103", + "nodeType": "YulFunctionCall", + "src": "3251:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3243:4:103", + "nodeType": "YulIdentifier", + "src": "3243:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_7f859058ad3ee4e192700ff813ed67dc892a0c7de91510ee584a0ac25fc982fc__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "2870:406:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3021:9:103", + "nodeType": "YulTypedName", + "src": "3021:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3035:4:103", + "nodeType": "YulTypedName", + "src": "3035:4:103", + "type": "" + } + ], + "src": "2870:406:103" + }, + { + "body": { + "nativeSrc": "3455:177:103", + "nodeType": "YulBlock", + "src": "3455:177:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3472:9:103", + "nodeType": "YulIdentifier", + "src": "3472:9:103" + }, + { + "kind": "number", + "nativeSrc": "3483:2:103", + "nodeType": "YulLiteral", + "src": "3483:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3465:6:103", + "nodeType": "YulIdentifier", + "src": "3465:6:103" + }, + "nativeSrc": "3465:21:103", + "nodeType": "YulFunctionCall", + "src": "3465:21:103" + }, + "nativeSrc": "3465:21:103", + "nodeType": "YulExpressionStatement", + "src": "3465:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3506:9:103", + "nodeType": "YulIdentifier", + "src": "3506:9:103" + }, + { + "kind": "number", + "nativeSrc": "3517:2:103", + "nodeType": "YulLiteral", + "src": "3517:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3502:3:103", + "nodeType": "YulIdentifier", + "src": "3502:3:103" + }, + "nativeSrc": "3502:18:103", + "nodeType": "YulFunctionCall", + "src": "3502:18:103" + }, + { + "kind": "number", + "nativeSrc": "3522:2:103", + "nodeType": "YulLiteral", + "src": "3522:2:103", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3495:6:103", + "nodeType": "YulIdentifier", + "src": "3495:6:103" + }, + "nativeSrc": "3495:30:103", + "nodeType": "YulFunctionCall", + "src": "3495:30:103" + }, + "nativeSrc": "3495:30:103", + "nodeType": "YulExpressionStatement", + "src": "3495:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3545:9:103", + "nodeType": "YulIdentifier", + "src": "3545:9:103" + }, + { + "kind": "number", + "nativeSrc": "3556:2:103", + "nodeType": "YulLiteral", + "src": "3556:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3541:3:103", + "nodeType": "YulIdentifier", + "src": "3541:3:103" + }, + "nativeSrc": "3541:18:103", + "nodeType": "YulFunctionCall", + "src": "3541:18:103" + }, + { + "hexValue": "5769746e657450726f78793a206e6f742075706772616461626c65", + "kind": "string", + "nativeSrc": "3561:29:103", + "nodeType": "YulLiteral", + "src": "3561:29:103", + "type": "", + "value": "WitnetProxy: not upgradable" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3534:6:103", + "nodeType": "YulIdentifier", + "src": "3534:6:103" + }, + "nativeSrc": "3534:57:103", + "nodeType": "YulFunctionCall", + "src": "3534:57:103" + }, + "nativeSrc": "3534:57:103", + "nodeType": "YulExpressionStatement", + "src": "3534:57:103" + }, + { + "nativeSrc": "3600:26:103", + "nodeType": "YulAssignment", + "src": "3600:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3612:9:103", + "nodeType": "YulIdentifier", + "src": "3612:9:103" + }, + { + "kind": "number", + "nativeSrc": "3623:2:103", + "nodeType": "YulLiteral", + "src": "3623:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3608:3:103", + "nodeType": "YulIdentifier", + "src": "3608:3:103" + }, + "nativeSrc": "3608:18:103", + "nodeType": "YulFunctionCall", + "src": "3608:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3600:4:103", + "nodeType": "YulIdentifier", + "src": "3600:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_d96132834a96bae5cb2f32cb07f13985dcde0f2358055c198eb3065af6c5aa7f__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3281:351:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3432:9:103", + "nodeType": "YulTypedName", + "src": "3432:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3446:4:103", + "nodeType": "YulTypedName", + "src": "3446:4:103", + "type": "" + } + ], + "src": "3281:351:103" + }, + { + "body": { + "nativeSrc": "3703:184:103", + "nodeType": "YulBlock", + "src": "3703:184:103", + "statements": [ + { + "nativeSrc": "3713:10:103", + "nodeType": "YulVariableDeclaration", + "src": "3713:10:103", + "value": { + "kind": "number", + "nativeSrc": "3722:1:103", + "nodeType": "YulLiteral", + "src": "3722:1:103", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "3717:1:103", + "nodeType": "YulTypedName", + "src": "3717:1:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3782:63:103", + "nodeType": "YulBlock", + "src": "3782:63:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "3807:3:103", + "nodeType": "YulIdentifier", + "src": "3807:3:103" + }, + { + "name": "i", + "nativeSrc": "3812:1:103", + "nodeType": "YulIdentifier", + "src": "3812:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3803:3:103", + "nodeType": "YulIdentifier", + "src": "3803:3:103" + }, + "nativeSrc": "3803:11:103", + "nodeType": "YulFunctionCall", + "src": "3803:11:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3826:3:103", + "nodeType": "YulIdentifier", + "src": "3826:3:103" + }, + { + "name": "i", + "nativeSrc": "3831:1:103", + "nodeType": "YulIdentifier", + "src": "3831:1:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3822:3:103", + "nodeType": "YulIdentifier", + "src": "3822:3:103" + }, + "nativeSrc": "3822:11:103", + "nodeType": "YulFunctionCall", + "src": "3822:11:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3816:5:103", + "nodeType": "YulIdentifier", + "src": "3816:5:103" + }, + "nativeSrc": "3816:18:103", + "nodeType": "YulFunctionCall", + "src": "3816:18:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3796:6:103", + "nodeType": "YulIdentifier", + "src": "3796:6:103" + }, + "nativeSrc": "3796:39:103", + "nodeType": "YulFunctionCall", + "src": "3796:39:103" + }, + "nativeSrc": "3796:39:103", + "nodeType": "YulExpressionStatement", + "src": "3796:39:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3743:1:103", + "nodeType": "YulIdentifier", + "src": "3743:1:103" + }, + { + "name": "length", + "nativeSrc": "3746:6:103", + "nodeType": "YulIdentifier", + "src": "3746:6:103" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3740:2:103", + "nodeType": "YulIdentifier", + "src": "3740:2:103" + }, + "nativeSrc": "3740:13:103", + "nodeType": "YulFunctionCall", + "src": "3740:13:103" + }, + "nativeSrc": "3732:113:103", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "3754:19:103", + "nodeType": "YulBlock", + "src": "3754:19:103", + "statements": [ + { + "nativeSrc": "3756:15:103", + "nodeType": "YulAssignment", + "src": "3756:15:103", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "3765:1:103", + "nodeType": "YulIdentifier", + "src": "3765:1:103" + }, + { + "kind": "number", + "nativeSrc": "3768:2:103", + "nodeType": "YulLiteral", + "src": "3768:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3761:3:103", + "nodeType": "YulIdentifier", + "src": "3761:3:103" + }, + "nativeSrc": "3761:10:103", + "nodeType": "YulFunctionCall", + "src": "3761:10:103" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "3756:1:103", + "nodeType": "YulIdentifier", + "src": "3756:1:103" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "3736:3:103", + "nodeType": "YulBlock", + "src": "3736:3:103", + "statements": [] + }, + "src": "3732:113:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "3865:3:103", + "nodeType": "YulIdentifier", + "src": "3865:3:103" + }, + { + "name": "length", + "nativeSrc": "3870:6:103", + "nodeType": "YulIdentifier", + "src": "3870:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3861:3:103", + "nodeType": "YulIdentifier", + "src": "3861:3:103" + }, + "nativeSrc": "3861:16:103", + "nodeType": "YulFunctionCall", + "src": "3861:16:103" + }, + { + "kind": "number", + "nativeSrc": "3879:1:103", + "nodeType": "YulLiteral", + "src": "3879:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3854:6:103", + "nodeType": "YulIdentifier", + "src": "3854:6:103" + }, + "nativeSrc": "3854:27:103", + "nodeType": "YulFunctionCall", + "src": "3854:27:103" + }, + "nativeSrc": "3854:27:103", + "nodeType": "YulExpressionStatement", + "src": "3854:27:103" + } + ] + }, + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "3637:250:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nativeSrc": "3681:3:103", + "nodeType": "YulTypedName", + "src": "3681:3:103", + "type": "" + }, + { + "name": "dst", + "nativeSrc": "3686:3:103", + "nodeType": "YulTypedName", + "src": "3686:3:103", + "type": "" + }, + { + "name": "length", + "nativeSrc": "3691:6:103", + "nodeType": "YulTypedName", + "src": "3691:6:103", + "type": "" + } + ], + "src": "3637:250:103" + }, + { + "body": { + "nativeSrc": "4029:150:103", + "nodeType": "YulBlock", + "src": "4029:150:103", + "statements": [ + { + "nativeSrc": "4039:27:103", + "nodeType": "YulVariableDeclaration", + "src": "4039:27:103", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4059:6:103", + "nodeType": "YulIdentifier", + "src": "4059:6:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4053:5:103", + "nodeType": "YulIdentifier", + "src": "4053:5:103" + }, + "nativeSrc": "4053:13:103", + "nodeType": "YulFunctionCall", + "src": "4053:13:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "4043:6:103", + "nodeType": "YulTypedName", + "src": "4043:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4114:6:103", + "nodeType": "YulIdentifier", + "src": "4114:6:103" + }, + { + "kind": "number", + "nativeSrc": "4122:4:103", + "nodeType": "YulLiteral", + "src": "4122:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4110:3:103", + "nodeType": "YulIdentifier", + "src": "4110:3:103" + }, + "nativeSrc": "4110:17:103", + "nodeType": "YulFunctionCall", + "src": "4110:17:103" + }, + { + "name": "pos", + "nativeSrc": "4129:3:103", + "nodeType": "YulIdentifier", + "src": "4129:3:103" + }, + { + "name": "length", + "nativeSrc": "4134:6:103", + "nodeType": "YulIdentifier", + "src": "4134:6:103" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "4075:34:103", + "nodeType": "YulIdentifier", + "src": "4075:34:103" + }, + "nativeSrc": "4075:66:103", + "nodeType": "YulFunctionCall", + "src": "4075:66:103" + }, + "nativeSrc": "4075:66:103", + "nodeType": "YulExpressionStatement", + "src": "4075:66:103" + }, + { + "nativeSrc": "4150:23:103", + "nodeType": "YulAssignment", + "src": "4150:23:103", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4161:3:103", + "nodeType": "YulIdentifier", + "src": "4161:3:103" + }, + { + "name": "length", + "nativeSrc": "4166:6:103", + "nodeType": "YulIdentifier", + "src": "4166:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4157:3:103", + "nodeType": "YulIdentifier", + "src": "4157:3:103" + }, + "nativeSrc": "4157:16:103", + "nodeType": "YulFunctionCall", + "src": "4157:16:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "4150:3:103", + "nodeType": "YulIdentifier", + "src": "4150:3:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "3892:287:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "4005:3:103", + "nodeType": "YulTypedName", + "src": "4005:3:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4010:6:103", + "nodeType": "YulTypedName", + "src": "4010:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "4021:3:103", + "nodeType": "YulTypedName", + "src": "4021:3:103", + "type": "" + } + ], + "src": "3892:287:103" + }, + { + "body": { + "nativeSrc": "4358:229:103", + "nodeType": "YulBlock", + "src": "4358:229:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4375:9:103", + "nodeType": "YulIdentifier", + "src": "4375:9:103" + }, + { + "kind": "number", + "nativeSrc": "4386:2:103", + "nodeType": "YulLiteral", + "src": "4386:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4368:6:103", + "nodeType": "YulIdentifier", + "src": "4368:6:103" + }, + "nativeSrc": "4368:21:103", + "nodeType": "YulFunctionCall", + "src": "4368:21:103" + }, + "nativeSrc": "4368:21:103", + "nodeType": "YulExpressionStatement", + "src": "4368:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4409:9:103", + "nodeType": "YulIdentifier", + "src": "4409:9:103" + }, + { + "kind": "number", + "nativeSrc": "4420:2:103", + "nodeType": "YulLiteral", + "src": "4420:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4405:3:103", + "nodeType": "YulIdentifier", + "src": "4405:3:103" + }, + "nativeSrc": "4405:18:103", + "nodeType": "YulFunctionCall", + "src": "4405:18:103" + }, + { + "kind": "number", + "nativeSrc": "4425:2:103", + "nodeType": "YulLiteral", + "src": "4425:2:103", + "type": "", + "value": "39" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4398:6:103", + "nodeType": "YulIdentifier", + "src": "4398:6:103" + }, + "nativeSrc": "4398:30:103", + "nodeType": "YulFunctionCall", + "src": "4398:30:103" + }, + "nativeSrc": "4398:30:103", + "nodeType": "YulExpressionStatement", + "src": "4398:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4448:9:103", + "nodeType": "YulIdentifier", + "src": "4448:9:103" + }, + { + "kind": "number", + "nativeSrc": "4459:2:103", + "nodeType": "YulLiteral", + "src": "4459:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4444:3:103", + "nodeType": "YulIdentifier", + "src": "4444:3:103" + }, + "nativeSrc": "4444:18:103", + "nodeType": "YulFunctionCall", + "src": "4444:18:103" + }, + { + "hexValue": "5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d65", + "kind": "string", + "nativeSrc": "4464:34:103", + "nodeType": "YulLiteral", + "src": "4464:34:103", + "type": "", + "value": "WitnetProxy: uncompliant impleme" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4437:6:103", + "nodeType": "YulIdentifier", + "src": "4437:6:103" + }, + "nativeSrc": "4437:62:103", + "nodeType": "YulFunctionCall", + "src": "4437:62:103" + }, + "nativeSrc": "4437:62:103", + "nodeType": "YulExpressionStatement", + "src": "4437:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4519:9:103", + "nodeType": "YulIdentifier", + "src": "4519:9:103" + }, + { + "kind": "number", + "nativeSrc": "4530:2:103", + "nodeType": "YulLiteral", + "src": "4530:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4515:3:103", + "nodeType": "YulIdentifier", + "src": "4515:3:103" + }, + "nativeSrc": "4515:18:103", + "nodeType": "YulFunctionCall", + "src": "4515:18:103" + }, + { + "hexValue": "6e746174696f6e", + "kind": "string", + "nativeSrc": "4535:9:103", + "nodeType": "YulLiteral", + "src": "4535:9:103", + "type": "", + "value": "ntation" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4508:6:103", + "nodeType": "YulIdentifier", + "src": "4508:6:103" + }, + "nativeSrc": "4508:37:103", + "nodeType": "YulFunctionCall", + "src": "4508:37:103" + }, + "nativeSrc": "4508:37:103", + "nodeType": "YulExpressionStatement", + "src": "4508:37:103" + }, + { + "nativeSrc": "4554:27:103", + "nodeType": "YulAssignment", + "src": "4554:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4566:9:103", + "nodeType": "YulIdentifier", + "src": "4566:9:103" + }, + { + "kind": "number", + "nativeSrc": "4577:3:103", + "nodeType": "YulLiteral", + "src": "4577:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4562:3:103", + "nodeType": "YulIdentifier", + "src": "4562:3:103" + }, + "nativeSrc": "4562:19:103", + "nodeType": "YulFunctionCall", + "src": "4562:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4554:4:103", + "nodeType": "YulIdentifier", + "src": "4554:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4184:403:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4335:9:103", + "nodeType": "YulTypedName", + "src": "4335:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4349:4:103", + "nodeType": "YulTypedName", + "src": "4349:4:103", + "type": "" + } + ], + "src": "4184:403:103" + }, + { + "body": { + "nativeSrc": "4766:177:103", + "nodeType": "YulBlock", + "src": "4766:177:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4783:9:103", + "nodeType": "YulIdentifier", + "src": "4783:9:103" + }, + { + "kind": "number", + "nativeSrc": "4794:2:103", + "nodeType": "YulLiteral", + "src": "4794:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4776:6:103", + "nodeType": "YulIdentifier", + "src": "4776:6:103" + }, + "nativeSrc": "4776:21:103", + "nodeType": "YulFunctionCall", + "src": "4776:21:103" + }, + "nativeSrc": "4776:21:103", + "nodeType": "YulExpressionStatement", + "src": "4776:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4817:9:103", + "nodeType": "YulIdentifier", + "src": "4817:9:103" + }, + { + "kind": "number", + "nativeSrc": "4828:2:103", + "nodeType": "YulLiteral", + "src": "4828:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4813:3:103", + "nodeType": "YulIdentifier", + "src": "4813:3:103" + }, + "nativeSrc": "4813:18:103", + "nodeType": "YulFunctionCall", + "src": "4813:18:103" + }, + { + "kind": "number", + "nativeSrc": "4833:2:103", + "nodeType": "YulLiteral", + "src": "4833:2:103", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4806:6:103", + "nodeType": "YulIdentifier", + "src": "4806:6:103" + }, + "nativeSrc": "4806:30:103", + "nodeType": "YulFunctionCall", + "src": "4806:30:103" + }, + "nativeSrc": "4806:30:103", + "nodeType": "YulExpressionStatement", + "src": "4806:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4856:9:103", + "nodeType": "YulIdentifier", + "src": "4856:9:103" + }, + { + "kind": "number", + "nativeSrc": "4867:2:103", + "nodeType": "YulLiteral", + "src": "4867:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4852:3:103", + "nodeType": "YulIdentifier", + "src": "4852:3:103" + }, + "nativeSrc": "4852:18:103", + "nodeType": "YulFunctionCall", + "src": "4852:18:103" + }, + { + "hexValue": "5769746e657450726f78793a206e6f7420617574686f72697a6564", + "kind": "string", + "nativeSrc": "4872:29:103", + "nodeType": "YulLiteral", + "src": "4872:29:103", + "type": "", + "value": "WitnetProxy: not authorized" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4845:6:103", + "nodeType": "YulIdentifier", + "src": "4845:6:103" + }, + "nativeSrc": "4845:57:103", + "nodeType": "YulFunctionCall", + "src": "4845:57:103" + }, + "nativeSrc": "4845:57:103", + "nodeType": "YulExpressionStatement", + "src": "4845:57:103" + }, + { + "nativeSrc": "4911:26:103", + "nodeType": "YulAssignment", + "src": "4911:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4923:9:103", + "nodeType": "YulIdentifier", + "src": "4923:9:103" + }, + { + "kind": "number", + "nativeSrc": "4934:2:103", + "nodeType": "YulLiteral", + "src": "4934:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4919:3:103", + "nodeType": "YulIdentifier", + "src": "4919:3:103" + }, + "nativeSrc": "4919:18:103", + "nodeType": "YulFunctionCall", + "src": "4919:18:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4911:4:103", + "nodeType": "YulIdentifier", + "src": "4911:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_ba8d4d661ce88eb2915ba133e6cad533938b754d7b66d8253879ef2c2193ecb2__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4592:351:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4743:9:103", + "nodeType": "YulTypedName", + "src": "4743:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4757:4:103", + "nodeType": "YulTypedName", + "src": "4757:4:103", + "type": "" + } + ], + "src": "4592:351:103" + }, + { + "body": { + "nativeSrc": "5029:103:103", + "nodeType": "YulBlock", + "src": "5029:103:103", + "statements": [ + { + "body": { + "nativeSrc": "5075:16:103", + "nodeType": "YulBlock", + "src": "5075:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5084:1:103", + "nodeType": "YulLiteral", + "src": "5084:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5087:1:103", + "nodeType": "YulLiteral", + "src": "5087:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5077:6:103", + "nodeType": "YulIdentifier", + "src": "5077:6:103" + }, + "nativeSrc": "5077:12:103", + "nodeType": "YulFunctionCall", + "src": "5077:12:103" + }, + "nativeSrc": "5077:12:103", + "nodeType": "YulExpressionStatement", + "src": "5077:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5050:7:103", + "nodeType": "YulIdentifier", + "src": "5050:7:103" + }, + { + "name": "headStart", + "nativeSrc": "5059:9:103", + "nodeType": "YulIdentifier", + "src": "5059:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5046:3:103", + "nodeType": "YulIdentifier", + "src": "5046:3:103" + }, + "nativeSrc": "5046:23:103", + "nodeType": "YulFunctionCall", + "src": "5046:23:103" + }, + { + "kind": "number", + "nativeSrc": "5071:2:103", + "nodeType": "YulLiteral", + "src": "5071:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5042:3:103", + "nodeType": "YulIdentifier", + "src": "5042:3:103" + }, + "nativeSrc": "5042:32:103", + "nodeType": "YulFunctionCall", + "src": "5042:32:103" + }, + "nativeSrc": "5039:52:103", + "nodeType": "YulIf", + "src": "5039:52:103" + }, + { + "nativeSrc": "5100:26:103", + "nodeType": "YulAssignment", + "src": "5100:26:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5116:9:103", + "nodeType": "YulIdentifier", + "src": "5116:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5110:5:103", + "nodeType": "YulIdentifier", + "src": "5110:5:103" + }, + "nativeSrc": "5110:16:103", + "nodeType": "YulFunctionCall", + "src": "5110:16:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5100:6:103", + "nodeType": "YulIdentifier", + "src": "5100:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32_fromMemory", + "nativeSrc": "4948:184:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4995:9:103", + "nodeType": "YulTypedName", + "src": "4995:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5006:7:103", + "nodeType": "YulTypedName", + "src": "5006:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5018:6:103", + "nodeType": "YulTypedName", + "src": "5018:6:103", + "type": "" + } + ], + "src": "4948:184:103" + }, + { + "body": { + "nativeSrc": "5311:226:103", + "nodeType": "YulBlock", + "src": "5311:226:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5328:9:103", + "nodeType": "YulIdentifier", + "src": "5328:9:103" + }, + { + "kind": "number", + "nativeSrc": "5339:2:103", + "nodeType": "YulLiteral", + "src": "5339:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5321:6:103", + "nodeType": "YulIdentifier", + "src": "5321:6:103" + }, + "nativeSrc": "5321:21:103", + "nodeType": "YulFunctionCall", + "src": "5321:21:103" + }, + "nativeSrc": "5321:21:103", + "nodeType": "YulExpressionStatement", + "src": "5321:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5362:9:103", + "nodeType": "YulIdentifier", + "src": "5362:9:103" + }, + { + "kind": "number", + "nativeSrc": "5373:2:103", + "nodeType": "YulLiteral", + "src": "5373:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5358:3:103", + "nodeType": "YulIdentifier", + "src": "5358:3:103" + }, + "nativeSrc": "5358:18:103", + "nodeType": "YulFunctionCall", + "src": "5358:18:103" + }, + { + "kind": "number", + "nativeSrc": "5378:2:103", + "nodeType": "YulLiteral", + "src": "5378:2:103", + "type": "", + "value": "36" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5351:6:103", + "nodeType": "YulIdentifier", + "src": "5351:6:103" + }, + "nativeSrc": "5351:30:103", + "nodeType": "YulFunctionCall", + "src": "5351:30:103" + }, + "nativeSrc": "5351:30:103", + "nodeType": "YulExpressionStatement", + "src": "5351:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5401:9:103", + "nodeType": "YulIdentifier", + "src": "5401:9:103" + }, + { + "kind": "number", + "nativeSrc": "5412:2:103", + "nodeType": "YulLiteral", + "src": "5412:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5397:3:103", + "nodeType": "YulIdentifier", + "src": "5397:3:103" + }, + "nativeSrc": "5397:18:103", + "nodeType": "YulFunctionCall", + "src": "5397:18:103" + }, + { + "hexValue": "5769746e657450726f78793a2070726f786961626c655555494473206d69736d", + "kind": "string", + "nativeSrc": "5417:34:103", + "nodeType": "YulLiteral", + "src": "5417:34:103", + "type": "", + "value": "WitnetProxy: proxiableUUIDs mism" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5390:6:103", + "nodeType": "YulIdentifier", + "src": "5390:6:103" + }, + "nativeSrc": "5390:62:103", + "nodeType": "YulFunctionCall", + "src": "5390:62:103" + }, + "nativeSrc": "5390:62:103", + "nodeType": "YulExpressionStatement", + "src": "5390:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5472:9:103", + "nodeType": "YulIdentifier", + "src": "5472:9:103" + }, + { + "kind": "number", + "nativeSrc": "5483:2:103", + "nodeType": "YulLiteral", + "src": "5483:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5468:3:103", + "nodeType": "YulIdentifier", + "src": "5468:3:103" + }, + "nativeSrc": "5468:18:103", + "nodeType": "YulFunctionCall", + "src": "5468:18:103" + }, + { + "hexValue": "61746368", + "kind": "string", + "nativeSrc": "5488:6:103", + "nodeType": "YulLiteral", + "src": "5488:6:103", + "type": "", + "value": "atch" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5461:6:103", + "nodeType": "YulIdentifier", + "src": "5461:6:103" + }, + "nativeSrc": "5461:34:103", + "nodeType": "YulFunctionCall", + "src": "5461:34:103" + }, + "nativeSrc": "5461:34:103", + "nodeType": "YulExpressionStatement", + "src": "5461:34:103" + }, + { + "nativeSrc": "5504:27:103", + "nodeType": "YulAssignment", + "src": "5504:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5516:9:103", + "nodeType": "YulIdentifier", + "src": "5516:9:103" + }, + { + "kind": "number", + "nativeSrc": "5527:3:103", + "nodeType": "YulLiteral", + "src": "5527:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5512:3:103", + "nodeType": "YulIdentifier", + "src": "5512:3:103" + }, + "nativeSrc": "5512:19:103", + "nodeType": "YulFunctionCall", + "src": "5512:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5504:4:103", + "nodeType": "YulIdentifier", + "src": "5504:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f3c1ad1fa1688d47e62cc4dd5b4be101315ef47e38e05aa3a37a4ef2e1cec0a8__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5137:400:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5288:9:103", + "nodeType": "YulTypedName", + "src": "5288:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5302:4:103", + "nodeType": "YulTypedName", + "src": "5302:4:103", + "type": "" + } + ], + "src": "5137:400:103" + }, + { + "body": { + "nativeSrc": "5591:221:103", + "nodeType": "YulBlock", + "src": "5591:221:103", + "statements": [ + { + "nativeSrc": "5601:26:103", + "nodeType": "YulVariableDeclaration", + "src": "5601:26:103", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "5621:5:103", + "nodeType": "YulIdentifier", + "src": "5621:5:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5615:5:103", + "nodeType": "YulIdentifier", + "src": "5615:5:103" + }, + "nativeSrc": "5615:12:103", + "nodeType": "YulFunctionCall", + "src": "5615:12:103" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "5605:6:103", + "nodeType": "YulTypedName", + "src": "5605:6:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5643:3:103", + "nodeType": "YulIdentifier", + "src": "5643:3:103" + }, + { + "name": "length", + "nativeSrc": "5648:6:103", + "nodeType": "YulIdentifier", + "src": "5648:6:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5636:6:103", + "nodeType": "YulIdentifier", + "src": "5636:6:103" + }, + "nativeSrc": "5636:19:103", + "nodeType": "YulFunctionCall", + "src": "5636:19:103" + }, + "nativeSrc": "5636:19:103", + "nodeType": "YulExpressionStatement", + "src": "5636:19:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5703:5:103", + "nodeType": "YulIdentifier", + "src": "5703:5:103" + }, + { + "kind": "number", + "nativeSrc": "5710:4:103", + "nodeType": "YulLiteral", + "src": "5710:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5699:3:103", + "nodeType": "YulIdentifier", + "src": "5699:3:103" + }, + "nativeSrc": "5699:16:103", + "nodeType": "YulFunctionCall", + "src": "5699:16:103" + }, + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5721:3:103", + "nodeType": "YulIdentifier", + "src": "5721:3:103" + }, + { + "kind": "number", + "nativeSrc": "5726:4:103", + "nodeType": "YulLiteral", + "src": "5726:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5717:3:103", + "nodeType": "YulIdentifier", + "src": "5717:3:103" + }, + "nativeSrc": "5717:14:103", + "nodeType": "YulFunctionCall", + "src": "5717:14:103" + }, + { + "name": "length", + "nativeSrc": "5733:6:103", + "nodeType": "YulIdentifier", + "src": "5733:6:103" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "5664:34:103", + "nodeType": "YulIdentifier", + "src": "5664:34:103" + }, + "nativeSrc": "5664:76:103", + "nodeType": "YulFunctionCall", + "src": "5664:76:103" + }, + "nativeSrc": "5664:76:103", + "nodeType": "YulExpressionStatement", + "src": "5664:76:103" + }, + { + "nativeSrc": "5749:57:103", + "nodeType": "YulAssignment", + "src": "5749:57:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "5764:3:103", + "nodeType": "YulIdentifier", + "src": "5764:3:103" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "5777:6:103", + "nodeType": "YulIdentifier", + "src": "5777:6:103" + }, + { + "kind": "number", + "nativeSrc": "5785:2:103", + "nodeType": "YulLiteral", + "src": "5785:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5773:3:103", + "nodeType": "YulIdentifier", + "src": "5773:3:103" + }, + "nativeSrc": "5773:15:103", + "nodeType": "YulFunctionCall", + "src": "5773:15:103" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5794:2:103", + "nodeType": "YulLiteral", + "src": "5794:2:103", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "5790:3:103", + "nodeType": "YulIdentifier", + "src": "5790:3:103" + }, + "nativeSrc": "5790:7:103", + "nodeType": "YulFunctionCall", + "src": "5790:7:103" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5769:3:103", + "nodeType": "YulIdentifier", + "src": "5769:3:103" + }, + "nativeSrc": "5769:29:103", + "nodeType": "YulFunctionCall", + "src": "5769:29:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5760:3:103", + "nodeType": "YulIdentifier", + "src": "5760:3:103" + }, + "nativeSrc": "5760:39:103", + "nodeType": "YulFunctionCall", + "src": "5760:39:103" + }, + { + "kind": "number", + "nativeSrc": "5801:4:103", + "nodeType": "YulLiteral", + "src": "5801:4:103", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5756:3:103", + "nodeType": "YulIdentifier", + "src": "5756:3:103" + }, + "nativeSrc": "5756:50:103", + "nodeType": "YulFunctionCall", + "src": "5756:50:103" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "5749:3:103", + "nodeType": "YulIdentifier", + "src": "5749:3:103" + } + ] + } + ] + }, + "name": "abi_encode_bytes", + "nativeSrc": "5542:270:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "5568:5:103", + "nodeType": "YulTypedName", + "src": "5568:5:103", + "type": "" + }, + { + "name": "pos", + "nativeSrc": "5575:3:103", + "nodeType": "YulTypedName", + "src": "5575:3:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "5583:3:103", + "nodeType": "YulTypedName", + "src": "5583:3:103", + "type": "" + } + ], + "src": "5542:270:103" + }, + { + "body": { + "nativeSrc": "5936:98:103", + "nodeType": "YulBlock", + "src": "5936:98:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5953:9:103", + "nodeType": "YulIdentifier", + "src": "5953:9:103" + }, + { + "kind": "number", + "nativeSrc": "5964:2:103", + "nodeType": "YulLiteral", + "src": "5964:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5946:6:103", + "nodeType": "YulIdentifier", + "src": "5946:6:103" + }, + "nativeSrc": "5946:21:103", + "nodeType": "YulFunctionCall", + "src": "5946:21:103" + }, + "nativeSrc": "5946:21:103", + "nodeType": "YulExpressionStatement", + "src": "5946:21:103" + }, + { + "nativeSrc": "5976:52:103", + "nodeType": "YulAssignment", + "src": "5976:52:103", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6001:6:103", + "nodeType": "YulIdentifier", + "src": "6001:6:103" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6013:9:103", + "nodeType": "YulIdentifier", + "src": "6013:9:103" + }, + { + "kind": "number", + "nativeSrc": "6024:2:103", + "nodeType": "YulLiteral", + "src": "6024:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6009:3:103", + "nodeType": "YulIdentifier", + "src": "6009:3:103" + }, + "nativeSrc": "6009:18:103", + "nodeType": "YulFunctionCall", + "src": "6009:18:103" + } + ], + "functionName": { + "name": "abi_encode_bytes", + "nativeSrc": "5984:16:103", + "nodeType": "YulIdentifier", + "src": "5984:16:103" + }, + "nativeSrc": "5984:44:103", + "nodeType": "YulFunctionCall", + "src": "5984:44:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5976:4:103", + "nodeType": "YulIdentifier", + "src": "5976:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "5817:217:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5905:9:103", + "nodeType": "YulTypedName", + "src": "5905:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5916:6:103", + "nodeType": "YulTypedName", + "src": "5916:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5927:4:103", + "nodeType": "YulTypedName", + "src": "5927:4:103", + "type": "" + } + ], + "src": "5817:217:103" + }, + { + "body": { + "nativeSrc": "6213:224:103", + "nodeType": "YulBlock", + "src": "6213:224:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6230:9:103", + "nodeType": "YulIdentifier", + "src": "6230:9:103" + }, + { + "kind": "number", + "nativeSrc": "6241:2:103", + "nodeType": "YulLiteral", + "src": "6241:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6223:6:103", + "nodeType": "YulIdentifier", + "src": "6223:6:103" + }, + "nativeSrc": "6223:21:103", + "nodeType": "YulFunctionCall", + "src": "6223:21:103" + }, + "nativeSrc": "6223:21:103", + "nodeType": "YulExpressionStatement", + "src": "6223:21:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6264:9:103", + "nodeType": "YulIdentifier", + "src": "6264:9:103" + }, + { + "kind": "number", + "nativeSrc": "6275:2:103", + "nodeType": "YulLiteral", + "src": "6275:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6260:3:103", + "nodeType": "YulIdentifier", + "src": "6260:3:103" + }, + "nativeSrc": "6260:18:103", + "nodeType": "YulFunctionCall", + "src": "6260:18:103" + }, + { + "kind": "number", + "nativeSrc": "6280:2:103", + "nodeType": "YulLiteral", + "src": "6280:2:103", + "type": "", + "value": "34" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6253:6:103", + "nodeType": "YulIdentifier", + "src": "6253:6:103" + }, + "nativeSrc": "6253:30:103", + "nodeType": "YulFunctionCall", + "src": "6253:30:103" + }, + "nativeSrc": "6253:30:103", + "nodeType": "YulExpressionStatement", + "src": "6253:30:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6303:9:103", + "nodeType": "YulIdentifier", + "src": "6303:9:103" + }, + { + "kind": "number", + "nativeSrc": "6314:2:103", + "nodeType": "YulLiteral", + "src": "6314:2:103", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6299:3:103", + "nodeType": "YulIdentifier", + "src": "6299:3:103" + }, + "nativeSrc": "6299:18:103", + "nodeType": "YulFunctionCall", + "src": "6299:18:103" + }, + { + "hexValue": "5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c", + "kind": "string", + "nativeSrc": "6319:34:103", + "nodeType": "YulLiteral", + "src": "6319:34:103", + "type": "", + "value": "WitnetProxy: initialization fail" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6292:6:103", + "nodeType": "YulIdentifier", + "src": "6292:6:103" + }, + "nativeSrc": "6292:62:103", + "nodeType": "YulFunctionCall", + "src": "6292:62:103" + }, + "nativeSrc": "6292:62:103", + "nodeType": "YulExpressionStatement", + "src": "6292:62:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6374:9:103", + "nodeType": "YulIdentifier", + "src": "6374:9:103" + }, + { + "kind": "number", + "nativeSrc": "6385:2:103", + "nodeType": "YulLiteral", + "src": "6385:2:103", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6370:3:103", + "nodeType": "YulIdentifier", + "src": "6370:3:103" + }, + "nativeSrc": "6370:18:103", + "nodeType": "YulFunctionCall", + "src": "6370:18:103" + }, + { + "hexValue": "6564", + "kind": "string", + "nativeSrc": "6390:4:103", + "nodeType": "YulLiteral", + "src": "6390:4:103", + "type": "", + "value": "ed" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6363:6:103", + "nodeType": "YulIdentifier", + "src": "6363:6:103" + }, + "nativeSrc": "6363:32:103", + "nodeType": "YulFunctionCall", + "src": "6363:32:103" + }, + "nativeSrc": "6363:32:103", + "nodeType": "YulExpressionStatement", + "src": "6363:32:103" + }, + { + "nativeSrc": "6404:27:103", + "nodeType": "YulAssignment", + "src": "6404:27:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6416:9:103", + "nodeType": "YulIdentifier", + "src": "6416:9:103" + }, + { + "kind": "number", + "nativeSrc": "6427:3:103", + "nodeType": "YulLiteral", + "src": "6427:3:103", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6412:3:103", + "nodeType": "YulIdentifier", + "src": "6412:3:103" + }, + "nativeSrc": "6412:19:103", + "nodeType": "YulFunctionCall", + "src": "6412:19:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6404:4:103", + "nodeType": "YulIdentifier", + "src": "6404:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_1a3a4ea76e2e68e14fc5328c93896fc2e23cf33c9f37d13d21f0003bedc2d604__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6039:398:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6190:9:103", + "nodeType": "YulTypedName", + "src": "6190:9:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6204:4:103", + "nodeType": "YulTypedName", + "src": "6204:4:103", + "type": "" + } + ], + "src": "6039:398:103" + }, + { + "body": { + "nativeSrc": "6533:557:103", + "nodeType": "YulBlock", + "src": "6533:557:103", + "statements": [ + { + "body": { + "nativeSrc": "6579:16:103", + "nodeType": "YulBlock", + "src": "6579:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6588:1:103", + "nodeType": "YulLiteral", + "src": "6588:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6591:1:103", + "nodeType": "YulLiteral", + "src": "6591:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6581:6:103", + "nodeType": "YulIdentifier", + "src": "6581:6:103" + }, + "nativeSrc": "6581:12:103", + "nodeType": "YulFunctionCall", + "src": "6581:12:103" + }, + "nativeSrc": "6581:12:103", + "nodeType": "YulExpressionStatement", + "src": "6581:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "6554:7:103", + "nodeType": "YulIdentifier", + "src": "6554:7:103" + }, + { + "name": "headStart", + "nativeSrc": "6563:9:103", + "nodeType": "YulIdentifier", + "src": "6563:9:103" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6550:3:103", + "nodeType": "YulIdentifier", + "src": "6550:3:103" + }, + "nativeSrc": "6550:23:103", + "nodeType": "YulFunctionCall", + "src": "6550:23:103" + }, + { + "kind": "number", + "nativeSrc": "6575:2:103", + "nodeType": "YulLiteral", + "src": "6575:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "6546:3:103", + "nodeType": "YulIdentifier", + "src": "6546:3:103" + }, + "nativeSrc": "6546:32:103", + "nodeType": "YulFunctionCall", + "src": "6546:32:103" + }, + "nativeSrc": "6543:52:103", + "nodeType": "YulIf", + "src": "6543:52:103" + }, + { + "nativeSrc": "6604:30:103", + "nodeType": "YulVariableDeclaration", + "src": "6604:30:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6624:9:103", + "nodeType": "YulIdentifier", + "src": "6624:9:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6618:5:103", + "nodeType": "YulIdentifier", + "src": "6618:5:103" + }, + "nativeSrc": "6618:16:103", + "nodeType": "YulFunctionCall", + "src": "6618:16:103" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "6608:6:103", + "nodeType": "YulTypedName", + "src": "6608:6:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6677:16:103", + "nodeType": "YulBlock", + "src": "6677:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6686:1:103", + "nodeType": "YulLiteral", + "src": "6686:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6689:1:103", + "nodeType": "YulLiteral", + "src": "6689:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6679:6:103", + "nodeType": "YulIdentifier", + "src": "6679:6:103" + }, + "nativeSrc": "6679:12:103", + "nodeType": "YulFunctionCall", + "src": "6679:12:103" + }, + "nativeSrc": "6679:12:103", + "nodeType": "YulExpressionStatement", + "src": "6679:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "6649:6:103", + "nodeType": "YulIdentifier", + "src": "6649:6:103" + }, + { + "kind": "number", + "nativeSrc": "6657:18:103", + "nodeType": "YulLiteral", + "src": "6657:18:103", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "6646:2:103", + "nodeType": "YulIdentifier", + "src": "6646:2:103" + }, + "nativeSrc": "6646:30:103", + "nodeType": "YulFunctionCall", + "src": "6646:30:103" + }, + "nativeSrc": "6643:50:103", + "nodeType": "YulIf", + "src": "6643:50:103" + }, + { + "nativeSrc": "6702:32:103", + "nodeType": "YulVariableDeclaration", + "src": "6702:32:103", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6716:9:103", + "nodeType": "YulIdentifier", + "src": "6716:9:103" + }, + { + "name": "offset", + "nativeSrc": "6727:6:103", + "nodeType": "YulIdentifier", + "src": "6727:6:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6712:3:103", + "nodeType": "YulIdentifier", + "src": "6712:3:103" + }, + "nativeSrc": "6712:22:103", + "nodeType": "YulFunctionCall", + "src": "6712:22:103" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "6706:2:103", + "nodeType": "YulTypedName", + "src": "6706:2:103", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6782:16:103", + "nodeType": "YulBlock", + "src": "6782:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6791:1:103", + "nodeType": "YulLiteral", + "src": "6791:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6794:1:103", + "nodeType": "YulLiteral", + "src": "6794:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6784:6:103", + "nodeType": "YulIdentifier", + "src": "6784:6:103" + }, + "nativeSrc": "6784:12:103", + "nodeType": "YulFunctionCall", + "src": "6784:12:103" + }, + "nativeSrc": "6784:12:103", + "nodeType": "YulExpressionStatement", + "src": "6784:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "6761:2:103", + "nodeType": "YulIdentifier", + "src": "6761:2:103" + }, + { + "kind": "number", + "nativeSrc": "6765:4:103", + "nodeType": "YulLiteral", + "src": "6765:4:103", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6757:3:103", + "nodeType": "YulIdentifier", + "src": "6757:3:103" + }, + "nativeSrc": "6757:13:103", + "nodeType": "YulFunctionCall", + "src": "6757:13:103" + }, + { + "name": "dataEnd", + "nativeSrc": "6772:7:103", + "nodeType": "YulIdentifier", + "src": "6772:7:103" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "6753:3:103", + "nodeType": "YulIdentifier", + "src": "6753:3:103" + }, + "nativeSrc": "6753:27:103", + "nodeType": "YulFunctionCall", + "src": "6753:27:103" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "6746:6:103", + "nodeType": "YulIdentifier", + "src": "6746:6:103" + }, + "nativeSrc": "6746:35:103", + "nodeType": "YulFunctionCall", + "src": "6746:35:103" + }, + "nativeSrc": "6743:55:103", + "nodeType": "YulIf", + "src": "6743:55:103" + }, + { + "nativeSrc": "6807:19:103", + "nodeType": "YulVariableDeclaration", + "src": "6807:19:103", + "value": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "6823:2:103", + "nodeType": "YulIdentifier", + "src": "6823:2:103" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6817:5:103", + "nodeType": "YulIdentifier", + "src": "6817:5:103" + }, + "nativeSrc": "6817:9:103", + "nodeType": "YulFunctionCall", + "src": "6817:9:103" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "6811:2:103", + "nodeType": "YulTypedName", + "src": "6811:2:103", + "type": "" + } + ] + }, + { + "nativeSrc": "6835:61:103", + "nodeType": "YulVariableDeclaration", + "src": "6835:61:103", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "6892:2:103", + "nodeType": "YulIdentifier", + "src": "6892:2:103" + } + ], + "functionName": { + "name": "array_allocation_size_bytes", + "nativeSrc": "6864:27:103", + "nodeType": "YulIdentifier", + "src": "6864:27:103" + }, + "nativeSrc": "6864:31:103", + "nodeType": "YulFunctionCall", + "src": "6864:31:103" + } + ], + "functionName": { + "name": "allocate_memory", + "nativeSrc": "6848:15:103", + "nodeType": "YulIdentifier", + "src": "6848:15:103" + }, + "nativeSrc": "6848:48:103", + "nodeType": "YulFunctionCall", + "src": "6848:48:103" + }, + "variables": [ + { + "name": "array", + "nativeSrc": "6839:5:103", + "nodeType": "YulTypedName", + "src": "6839:5:103", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "array", + "nativeSrc": "6912:5:103", + "nodeType": "YulIdentifier", + "src": "6912:5:103" + }, + { + "name": "_2", + "nativeSrc": "6919:2:103", + "nodeType": "YulIdentifier", + "src": "6919:2:103" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6905:6:103", + "nodeType": "YulIdentifier", + "src": "6905:6:103" + }, + "nativeSrc": "6905:17:103", + "nodeType": "YulFunctionCall", + "src": "6905:17:103" + }, + "nativeSrc": "6905:17:103", + "nodeType": "YulExpressionStatement", + "src": "6905:17:103" + }, + { + "body": { + "nativeSrc": "6968:16:103", + "nodeType": "YulBlock", + "src": "6968:16:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6977:1:103", + "nodeType": "YulLiteral", + "src": "6977:1:103", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6980:1:103", + "nodeType": "YulLiteral", + "src": "6980:1:103", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6970:6:103", + "nodeType": "YulIdentifier", + "src": "6970:6:103" + }, + "nativeSrc": "6970:12:103", + "nodeType": "YulFunctionCall", + "src": "6970:12:103" + }, + "nativeSrc": "6970:12:103", + "nodeType": "YulExpressionStatement", + "src": "6970:12:103" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "6945:2:103", + "nodeType": "YulIdentifier", + "src": "6945:2:103" + }, + { + "name": "_2", + "nativeSrc": "6949:2:103", + "nodeType": "YulIdentifier", + "src": "6949:2:103" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6941:3:103", + "nodeType": "YulIdentifier", + "src": "6941:3:103" + }, + "nativeSrc": "6941:11:103", + "nodeType": "YulFunctionCall", + "src": "6941:11:103" + }, + { + "kind": "number", + "nativeSrc": "6954:2:103", + "nodeType": "YulLiteral", + "src": "6954:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6937:3:103", + "nodeType": "YulIdentifier", + "src": "6937:3:103" + }, + "nativeSrc": "6937:20:103", + "nodeType": "YulFunctionCall", + "src": "6937:20:103" + }, + { + "name": "dataEnd", + "nativeSrc": "6959:7:103", + "nodeType": "YulIdentifier", + "src": "6959:7:103" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "6934:2:103", + "nodeType": "YulIdentifier", + "src": "6934:2:103" + }, + "nativeSrc": "6934:33:103", + "nodeType": "YulFunctionCall", + "src": "6934:33:103" + }, + "nativeSrc": "6931:53:103", + "nodeType": "YulIf", + "src": "6931:53:103" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "7032:2:103", + "nodeType": "YulIdentifier", + "src": "7032:2:103" + }, + { + "kind": "number", + "nativeSrc": "7036:2:103", + "nodeType": "YulLiteral", + "src": "7036:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7028:3:103", + "nodeType": "YulIdentifier", + "src": "7028:3:103" + }, + "nativeSrc": "7028:11:103", + "nodeType": "YulFunctionCall", + "src": "7028:11:103" + }, + { + "arguments": [ + { + "name": "array", + "nativeSrc": "7045:5:103", + "nodeType": "YulIdentifier", + "src": "7045:5:103" + }, + { + "kind": "number", + "nativeSrc": "7052:2:103", + "nodeType": "YulLiteral", + "src": "7052:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7041:3:103", + "nodeType": "YulIdentifier", + "src": "7041:3:103" + }, + "nativeSrc": "7041:14:103", + "nodeType": "YulFunctionCall", + "src": "7041:14:103" + }, + { + "name": "_2", + "nativeSrc": "7057:2:103", + "nodeType": "YulIdentifier", + "src": "7057:2:103" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "6993:34:103", + "nodeType": "YulIdentifier", + "src": "6993:34:103" + }, + "nativeSrc": "6993:67:103", + "nodeType": "YulFunctionCall", + "src": "6993:67:103" + }, + "nativeSrc": "6993:67:103", + "nodeType": "YulExpressionStatement", + "src": "6993:67:103" + }, + { + "nativeSrc": "7069:15:103", + "nodeType": "YulAssignment", + "src": "7069:15:103", + "value": { + "name": "array", + "nativeSrc": "7079:5:103", + "nodeType": "YulIdentifier", + "src": "7079:5:103" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "7069:6:103", + "nodeType": "YulIdentifier", + "src": "7069:6:103" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_string_memory_ptr_fromMemory", + "nativeSrc": "6442:648:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6499:9:103", + "nodeType": "YulTypedName", + "src": "6499:9:103", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "6510:7:103", + "nodeType": "YulTypedName", + "src": "6510:7:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "6522:6:103", + "nodeType": "YulTypedName", + "src": "6522:6:103", + "type": "" + } + ], + "src": "6442:648:103" + }, + { + "body": { + "nativeSrc": "7216:98:103", + "nodeType": "YulBlock", + "src": "7216:98:103", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7233:9:103", + "nodeType": "YulIdentifier", + "src": "7233:9:103" + }, + { + "kind": "number", + "nativeSrc": "7244:2:103", + "nodeType": "YulLiteral", + "src": "7244:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7226:6:103", + "nodeType": "YulIdentifier", + "src": "7226:6:103" + }, + "nativeSrc": "7226:21:103", + "nodeType": "YulFunctionCall", + "src": "7226:21:103" + }, + "nativeSrc": "7226:21:103", + "nodeType": "YulExpressionStatement", + "src": "7226:21:103" + }, + { + "nativeSrc": "7256:52:103", + "nodeType": "YulAssignment", + "src": "7256:52:103", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "7281:6:103", + "nodeType": "YulIdentifier", + "src": "7281:6:103" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7293:9:103", + "nodeType": "YulIdentifier", + "src": "7293:9:103" + }, + { + "kind": "number", + "nativeSrc": "7304:2:103", + "nodeType": "YulLiteral", + "src": "7304:2:103", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7289:3:103", + "nodeType": "YulIdentifier", + "src": "7289:3:103" + }, + "nativeSrc": "7289:18:103", + "nodeType": "YulFunctionCall", + "src": "7289:18:103" + } + ], + "functionName": { + "name": "abi_encode_bytes", + "nativeSrc": "7264:16:103", + "nodeType": "YulIdentifier", + "src": "7264:16:103" + }, + "nativeSrc": "7264:44:103", + "nodeType": "YulFunctionCall", + "src": "7264:44:103" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7256:4:103", + "nodeType": "YulIdentifier", + "src": "7256:4:103" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "7095:219:103", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "7185:9:103", + "nodeType": "YulTypedName", + "src": "7185:9:103", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "7196:6:103", + "nodeType": "YulTypedName", + "src": "7196:6:103", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "7207:4:103", + "nodeType": "YulTypedName", + "src": "7207:4:103", + "type": "" + } + ], + "src": "7095:219:103" + } + ] + }, + "contents": "{\n { }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function allocate_memory(size) -> memPtr\n {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(size, 31), not(31)))\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n function array_allocation_size_bytes(length) -> size\n {\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n size := add(and(add(length, 31), not(31)), 0x20)\n }\n function abi_decode_tuple_t_addresst_bytes_memory_ptr(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n let offset := calldataload(add(headStart, 32))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _1 := add(headStart, offset)\n if iszero(slt(add(_1, 0x1f), dataEnd)) { revert(0, 0) }\n let _2 := calldataload(_1)\n let array := allocate_memory(array_allocation_size_bytes(_2))\n mstore(array, _2)\n if gt(add(add(_1, _2), 32), dataEnd) { revert(0, 0) }\n calldatacopy(add(array, 32), add(_1, 32), _2)\n mstore(add(add(array, _2), 32), 0)\n value1 := array\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_encode_tuple_t_stringliteral_d599eaa5e68d91d75c142446490ab9a15fd0284a41ce949219b5b4d8f267239a__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 32)\n mstore(add(headStart, 64), \"WitnetProxy: null implementation\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_e332eab1bae45430d1201a30c0d80d8fcb5570f9e70201a9eb7b229e17fd2084__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 31)\n mstore(add(headStart, 64), \"WitnetProxy: nothing to upgrade\")\n tail := add(headStart, 96)\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_7f859058ad3ee4e192700ff813ed67dc892a0c7de91510ee584a0ac25fc982fc__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 42)\n mstore(add(headStart, 64), \"WitnetProxy: unable to check upg\")\n mstore(add(headStart, 96), \"radability\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_stringliteral_d96132834a96bae5cb2f32cb07f13985dcde0f2358055c198eb3065af6c5aa7f__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 27)\n mstore(add(headStart, 64), \"WitnetProxy: not upgradable\")\n tail := add(headStart, 96)\n }\n function copy_memory_to_memory_with_cleanup(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n end := add(pos, length)\n }\n function abi_encode_tuple_t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 39)\n mstore(add(headStart, 64), \"WitnetProxy: uncompliant impleme\")\n mstore(add(headStart, 96), \"ntation\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_stringliteral_ba8d4d661ce88eb2915ba133e6cad533938b754d7b66d8253879ef2c2193ecb2__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 27)\n mstore(add(headStart, 64), \"WitnetProxy: not authorized\")\n tail := add(headStart, 96)\n }\n function abi_decode_tuple_t_bytes32_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function abi_encode_tuple_t_stringliteral_f3c1ad1fa1688d47e62cc4dd5b4be101315ef47e38e05aa3a37a4ef2e1cec0a8__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 36)\n mstore(add(headStart, 64), \"WitnetProxy: proxiableUUIDs mism\")\n mstore(add(headStart, 96), \"atch\")\n tail := add(headStart, 128)\n }\n function abi_encode_bytes(value, pos) -> end\n {\n let length := mload(value)\n mstore(pos, length)\n copy_memory_to_memory_with_cleanup(add(value, 0x20), add(pos, 0x20), length)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n tail := abi_encode_bytes(value0, add(headStart, 32))\n }\n function abi_encode_tuple_t_stringliteral_1a3a4ea76e2e68e14fc5328c93896fc2e23cf33c9f37d13d21f0003bedc2d604__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 34)\n mstore(add(headStart, 64), \"WitnetProxy: initialization fail\")\n mstore(add(headStart, 96), \"ed\")\n tail := add(headStart, 128)\n }\n function abi_decode_tuple_t_string_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _1 := add(headStart, offset)\n if iszero(slt(add(_1, 0x1f), dataEnd)) { revert(0, 0) }\n let _2 := mload(_1)\n let array := allocate_memory(array_allocation_size_bytes(_2))\n mstore(array, _2)\n if gt(add(add(_1, _2), 32), dataEnd) { revert(0, 0) }\n copy_memory_to_memory_with_cleanup(add(_1, 32), add(array, 32), _2)\n value0 := array\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n tail := abi_encode_bytes(value0, add(headStart, 32))\n }\n}", + "id": 103, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "264:5139:21:-:0;;;520:17;;;;;;;;;;264:5139;;;;;;", + "deployedSourceMap": "264:5139:21:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;746:23;772:16;:14;:16::i;:::-;746:42;;1136:4;1130:11;1176:14;1173:1;1168:3;1155:36;1280:1;1277;1261:14;1256:3;1239:15;1232:5;1219:63;1308:16;1361:4;1358:1;1353:3;1338:28;1387:6;1411:119;;;;1673:4;1668:3;1661:17;1411:119;1505:4;1500:3;1493:17;1781:110;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;178:32:103;;;160:51;;148:2;133:18;1781:110:21;;;;;;;;2185:2793;;;;;;;;;;-1:-1:-1;2185:2793:21;;;;;:::i;:::-;;:::i;:::-;;;1840:14:103;;1833:22;1815:41;;1803:2;1788:18;2185:2793:21;1675:187:103;1781:110:21;5314:66;1855:28;-1:-1:-1;;;;;1855:28:21;;1781:110::o;2185:2793::-;2281:4;-1:-1:-1;;;;;2358:32:21;;2350:77;;;;-1:-1:-1;;;2350:77:21;;2069:2:103;2350:77:21;;;2051:21:103;;;2088:18;;;2081:30;2147:34;2127:18;;;2120:62;2199:18;;2350:77:21;;;;;;;;;2440:26;2469:16;:14;:16::i;:::-;2440:45;-1:-1:-1;;;;;;2500:32:21;;;2496:1298;;2652:18;-1:-1:-1;;;;;2630:40:21;:18;-1:-1:-1;;;;;2630:40:21;;2622:84;;;;-1:-1:-1;;;2622:84:21;;2430:2:103;2622:84:21;;;2412:21:103;2469:2;2449:18;;;2442:30;2508:33;2488:18;;;2481:61;2559:18;;2622:84:21;2228:355:103;2622:84:21;2822:18;-1:-1:-1;;;;;2810:44:21;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2810:46:21;;;;;;;;-1:-1:-1;;2810:46:21;;;;;;;;;;;;:::i;:::-;;;2806:262;;3000:52;;-1:-1:-1;;;3000:52:21;;3072:2:103;3000:52:21;;;3054:21:103;3111:2;3091:18;;;3084:30;3150:34;3130:18;;;3123:62;-1:-1:-1;;;3201:18:103;;;3194:40;3251:19;;3000:52:21;2870:406:103;2806:262:21;2913:13;2905:53;;;;-1:-1:-1;;;2905:53:21;;3483:2:103;2905:53:21;;;3465:21:103;3522:2;3502:18;;;3495:30;3561:29;3541:18;;;3534:57;3608:18;;2905:53:21;3281:351:103;2905:53:21;-1:-1:-1;3272:125:21;;3368:10;3272:125;;;160:51:103;3181:15:21;;;;-1:-1:-1;;;;;3222:31:21;;;133:18:103;;3272:125:21;;;-1:-1:-1;;3272:125:21;;;;;;;;;;;;;;-1:-1:-1;;;;;3272:125:21;-1:-1:-1;;;3272:125:21;;;3222:190;;;3272:125;3222:190;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3180:232;;;;3435:10;3427:62;;;;-1:-1:-1;;;3427:62:21;;;;;;;:::i;:::-;3523:7;3512:27;;;;;;;;;;;;:::i;:::-;3504:67;;;;-1:-1:-1;;;3504:67:21;;4794:2:103;3504:67:21;;;4776:21:103;4833:2;4813:18;;;4806:30;4872:29;4852:18;;;4845:57;4919:18;;3504:67:21;4592:351:103;3504:67:21;3675:18;-1:-1:-1;;;;;3663:45:21;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3624:18;-1:-1:-1;;;;;3612:45:21;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:98;3586:196;;;;-1:-1:-1;;;3586:196:21;;5339:2:103;3586:196:21;;;5321:21:103;5378:2;5358:18;;;5351:30;5417:34;5397:18;;;5390:62;-1:-1:-1;;;5468:18:103;;;5461:34;5512:19;;3586:196:21;5137:400:103;3586:196:21;2534:1260;;2496:1298;3879:20;3901:24;3929:18;-1:-1:-1;;;;;3929:31:21;4055:9;3975:104;;;;;;;;:::i;:::-;;;;-1:-1:-1;;3975:104:21;;;;;;;;;;;;;;-1:-1:-1;;;;;3975:104:21;-1:-1:-1;;;3975:104:21;;;3929:161;;;3975:104;3929:161;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3878:212;;;;4106:15;4101:344;;4163:2;4142:11;:18;:23;4138:296;;;4186:44;;-1:-1:-1;;;4186:44:21;;6241:2:103;4186:44:21;;;6223:21:103;6280:2;6260:18;;;6253:30;6319:34;6299:18;;;6292:62;-1:-1:-1;;;6370:18:103;;;6363:32;6412:19;;4186:44:21;6039:398:103;4138:296:21;4335:4;4322:11;4318:22;4303:37;;4395:11;4384:33;;;;;;;;;;;;:::i;:::-;4377:41;;-1:-1:-1;;;4377:41:21;;;;;;;;:::i;4138:296::-;5314:66;4539:49;;-1:-1:-1;;;;;;4539:49:21;-1:-1:-1;;;;;4539:49:21;;;;;;;;4610:28;;;;-1:-1:-1;;4610:28:21;4767:18;-1:-1:-1;;;;;4755:44:21;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4755:46:21;;;;;;;;-1:-1:-1;;4755:46:21;;;;;;;;;;;;:::i;:::-;;;4751:220;;4909:50;;-1:-1:-1;;;4909:50:21;;;;;;;:::i;4751:220::-;4853:13;-1:-1:-1;4846:20:21;;-1:-1:-1;;;4846:20:21;2185:2793;;;;;:::o;222:127:103:-;283:10;278:3;274:20;271:1;264:31;314:4;311:1;304:15;338:4;335:1;328:15;354:275;425:2;419:9;490:2;471:13;;-1:-1:-1;;467:27:103;455:40;;525:18;510:34;;546:22;;;507:62;504:88;;;572:18;;:::i;:::-;608:2;601:22;354:275;;-1:-1:-1;354:275:103:o;634:186::-;682:4;715:18;707:6;704:30;701:56;;;737:18;;:::i;:::-;-1:-1:-1;803:2:103;782:15;-1:-1:-1;;778:29:103;809:4;774:40;;634:186::o;825:845::-;902:6;910;963:2;951:9;942:7;938:23;934:32;931:52;;;979:1;976;969:12;931:52;1005:23;;-1:-1:-1;;;;;1057:31:103;;1047:42;;1037:70;;1103:1;1100;1093:12;1037:70;1126:5;-1:-1:-1;1182:2:103;1167:18;;1154:32;1209:18;1198:30;;1195:50;;;1241:1;1238;1231:12;1195:50;1264:22;;1317:4;1309:13;;1305:27;-1:-1:-1;1295:55:103;;1346:1;1343;1336:12;1295:55;1382:2;1369:16;1407:48;1423:31;1451:2;1423:31;:::i;:::-;1407:48;:::i;:::-;1478:2;1471:5;1464:17;1518:7;1513:2;1508;1504;1500:11;1496:20;1493:33;1490:53;;;1539:1;1536;1529:12;1490:53;1594:2;1589;1585;1581:11;1576:2;1569:5;1565:14;1552:45;1638:1;1633:2;1628;1621:5;1617:14;1613:23;1606:34;1659:5;1649:15;;;;;825:845;;;;;:::o;2588:277::-;2655:6;2708:2;2696:9;2687:7;2683:23;2679:32;2676:52;;;2724:1;2721;2714:12;2676:52;2756:9;2750:16;2809:5;2802:13;2795:21;2788:5;2785:32;2775:60;;2831:1;2828;2821:12;2775:60;2854:5;2588:277;-1:-1:-1;;;2588:277:103:o;3637:250::-;3722:1;3732:113;3746:6;3743:1;3740:13;3732:113;;;3822:11;;;3816:18;3803:11;;;3796:39;3768:2;3761:10;3732:113;;;-1:-1:-1;;3879:1:103;3861:16;;3854:27;3637:250::o;3892:287::-;4021:3;4059:6;4053:13;4075:66;4134:6;4129:3;4122:4;4114:6;4110:17;4075:66;:::i;:::-;4157:16;;;;;3892:287;-1:-1:-1;;3892:287:103:o;4184:403::-;4386:2;4368:21;;;4425:2;4405:18;;;4398:30;4464:34;4459:2;4444:18;;4437:62;-1:-1:-1;;;4530:2:103;4515:18;;4508:37;4577:3;4562:19;;4184:403::o;4948:184::-;5018:6;5071:2;5059:9;5050:7;5046:23;5042:32;5039:52;;;5087:1;5084;5077:12;5039:52;-1:-1:-1;5110:16:103;;4948:184;-1:-1:-1;4948:184:103:o;5542:270::-;5583:3;5621:5;5615:12;5648:6;5643:3;5636:19;5664:76;5733:6;5726:4;5721:3;5717:14;5710:4;5703:5;5699:16;5664:76;:::i;:::-;5794:2;5773:15;-1:-1:-1;;5769:29:103;5760:39;;;;5801:4;5756:50;;5542:270;-1:-1:-1;;5542:270:103:o;5817:217::-;5964:2;5953:9;5946:21;5927:4;5984:44;6024:2;6013:9;6009:18;6001:6;5984:44;:::i;6442:648::-;6522:6;6575:2;6563:9;6554:7;6550:23;6546:32;6543:52;;;6591:1;6588;6581:12;6543:52;6624:9;6618:16;6657:18;6649:6;6646:30;6643:50;;;6689:1;6686;6679:12;6643:50;6712:22;;6765:4;6757:13;;6753:27;-1:-1:-1;6743:55:103;;6794:1;6791;6784:12;6743:55;6823:2;6817:9;6848:48;6864:31;6892:2;6864:31;:::i;6848:48::-;6919:2;6912:5;6905:17;6959:7;6954:2;6949;6945;6941:11;6937:20;6934:33;6931:53;;;6980:1;6977;6970:12;6931:53;6993:67;7057:2;7052;7045:5;7041:14;7036:2;7032;7028:11;6993:67;:::i;:::-;7079:5;6442:648;-1:-1:-1;;;;;6442:648:103:o", + "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.7.0 <0.9.0;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"../patterns/Upgradeable.sol\";\r\n\r\n/// @title WitnetProxy: upgradable delegate-proxy contract. \r\n/// @author Guillermo Díaz \r\ncontract WitnetProxy {\r\n\r\n /// Event emitted every time the implementation gets updated.\r\n event Upgraded(address indexed implementation); \r\n\r\n /// Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470).\r\n constructor () {}\r\n\r\n receive() virtual external payable {}\r\n\r\n /// Payable fallback accepts delegating calls to payable functions. \r\n fallback() external payable { /* solhint-disable no-complex-fallback */\r\n address _implementation = implementation();\r\n assembly { /* solhint-disable avoid-low-level-calls */\r\n // Gas optimized delegate call to 'implementation' contract.\r\n // Note: `msg.data`, `msg.sender` and `msg.value` will be passed over \r\n // to actual implementation of `msg.sig` within `implementation` contract.\r\n let ptr := mload(0x40)\r\n calldatacopy(ptr, 0, calldatasize())\r\n let result := delegatecall(gas(), _implementation, ptr, calldatasize(), 0, 0)\r\n let size := returndatasize()\r\n returndatacopy(ptr, 0, size)\r\n switch result\r\n case 0 { \r\n // pass back revert message:\r\n revert(ptr, size) \r\n }\r\n default {\r\n // pass back same data as returned by 'implementation' contract:\r\n return(ptr, size) \r\n }\r\n }\r\n }\r\n\r\n /// Returns proxy's current implementation address.\r\n function implementation() public view returns (address) {\r\n return __proxySlot().implementation;\r\n }\r\n\r\n /// Upgrades the `implementation` address.\r\n /// @param _newImplementation New implementation address.\r\n /// @param _initData Raw data with which new implementation will be initialized.\r\n /// @return Returns whether new implementation would be further upgradable, or not.\r\n function upgradeTo(address _newImplementation, bytes memory _initData)\r\n public returns (bool)\r\n {\r\n // New implementation cannot be null:\r\n require(_newImplementation != address(0), \"WitnetProxy: null implementation\");\r\n\r\n address _oldImplementation = implementation();\r\n if (_oldImplementation != address(0)) {\r\n // New implementation address must differ from current one:\r\n require(_newImplementation != _oldImplementation, \"WitnetProxy: nothing to upgrade\");\r\n\r\n // Assert whether current implementation is intrinsically upgradable:\r\n try Upgradeable(_oldImplementation).isUpgradable() returns (bool _isUpgradable) {\r\n require(_isUpgradable, \"WitnetProxy: not upgradable\");\r\n } catch {\r\n revert(\"WitnetProxy: unable to check upgradability\");\r\n }\r\n\r\n // Assert whether current implementation allows `msg.sender` to upgrade the proxy:\r\n (bool _wasCalled, bytes memory _result) = _oldImplementation.delegatecall(\r\n abi.encodeWithSignature(\r\n \"isUpgradableFrom(address)\",\r\n msg.sender\r\n )\r\n );\r\n require(_wasCalled, \"WitnetProxy: uncompliant implementation\");\r\n require(abi.decode(_result, (bool)), \"WitnetProxy: not authorized\");\r\n require(\r\n Upgradeable(_oldImplementation).proxiableUUID() == Upgradeable(_newImplementation).proxiableUUID(),\r\n \"WitnetProxy: proxiableUUIDs mismatch\"\r\n );\r\n }\r\n\r\n // Initialize new implementation within proxy-context storage:\r\n (bool _wasInitialized, bytes memory _returnData) = _newImplementation.delegatecall(\r\n abi.encodeWithSignature(\r\n \"initialize(bytes)\",\r\n _initData\r\n )\r\n );\r\n if (!_wasInitialized) {\r\n if (_returnData.length < 68) {\r\n revert(\"WitnetProxy: initialization failed\");\r\n } else {\r\n assembly {\r\n _returnData := add(_returnData, 0x04)\r\n }\r\n revert(abi.decode(_returnData, (string)));\r\n }\r\n }\r\n\r\n // If all checks and initialization pass, update implementation address:\r\n __proxySlot().implementation = _newImplementation;\r\n \r\n emit Upgraded(_newImplementation);\r\n\r\n // Asserts new implementation complies w/ minimal implementation of Upgradeable interface:\r\n try Upgradeable(_newImplementation).isUpgradable() returns (bool _isUpgradable) {\r\n return _isUpgradable;\r\n }\r\n catch {\r\n revert (\"WitnetProxy: uncompliant implementation\");\r\n }\r\n }\r\n\r\n /// @dev Complying with EIP-1967, retrieves storage struct containing proxy's current implementation address.\r\n function __proxySlot() private pure returns (Proxiable.ProxiableSlot storage _slot) {\r\n assembly {\r\n // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\r\n _slot.slot := 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\r\n }\r\n }\r\n\r\n}\r\n", + "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetProxy.sol", + "ast": { + "absolutePath": "project:/contracts/core/WitnetProxy.sol", + "exportedSymbols": { + "ERC165": [ + 602 + ], + "IERC165": [ + 614 + ], + "Initializable": [ + 253 + ], + "Proxiable": [ + 30273 + ], + "Upgradeable": [ + 30388 + ], + "WitnetProxy": [ + 4713 + ] + }, + "id": 4714, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4488, + "literals": [ + "solidity", + ">=", + "0.7", + ".0", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "35:31:21" + }, + { + "id": 4489, + "literals": [ + "experimental", + "ABIEncoderV2" + ], + "nodeType": "PragmaDirective", + "src": "68:33:21" + }, + { + "absolutePath": "project:/contracts/patterns/Upgradeable.sol", + "file": "../patterns/Upgradeable.sol", + "id": 4490, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4714, + "sourceUnit": 30389, + "src": "105:37:21", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "WitnetProxy", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4491, + "nodeType": "StructuredDocumentation", + "src": "146:118:21", + "text": "@title WitnetProxy: upgradable delegate-proxy contract. \n @author Guillermo Díaz " + }, + "fullyImplemented": true, + "id": 4713, + "linearizedBaseContracts": [ + 4713 + ], + "name": "WitnetProxy", + "nameLocation": "273:11:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 4492, + "nodeType": "StructuredDocumentation", + "src": "294:61:21", + "text": "Event emitted every time the implementation gets updated." + }, + "eventSelector": "bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "id": 4496, + "name": "Upgraded", + "nameLocation": "367:8:21", + "nodeType": "EventDefinition", + "parameters": { + "id": 4495, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4494, + "indexed": true, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "392:14:21", + "nodeType": "VariableDeclaration", + "scope": 4496, + "src": "376:30:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "376:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "375:32:21" + }, + "src": "361:47:21" + }, + { + "body": { + "id": 4500, + "nodeType": "Block", + "src": "535:2:21", + "statements": [] + }, + "documentation": { + "id": 4497, + "nodeType": "StructuredDocumentation", + "src": "418:96:21", + "text": "Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470)." + }, + "id": 4501, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4498, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:21" + }, + "returnParameters": { + "id": 4499, + "nodeType": "ParameterList", + "parameters": [], + "src": "535:0:21" + }, + "scope": 4713, + "src": "520:17:21", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4504, + "nodeType": "Block", + "src": "580:2:21", + "statements": [] + }, + "id": 4505, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4502, + "nodeType": "ParameterList", + "parameters": [], + "src": "552:2:21" + }, + "returnParameters": { + "id": 4503, + "nodeType": "ParameterList", + "parameters": [], + "src": "580:0:21" + }, + "scope": 4713, + "src": "545:37:21", + "stateMutability": "payable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 4515, + "nodeType": "Block", + "src": "693:1023:21", + "statements": [ + { + "assignments": [ + 4510 + ], + "declarations": [ + { + "constant": false, + "id": 4510, + "mutability": "mutable", + "name": "_implementation", + "nameLocation": "754:15:21", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "746:23:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "746:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4513, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4511, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4527, + "src": "772:14:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "772:16:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "746:42:21" + }, + { + "AST": { + "nativeSrc": "808:901:21", + "nodeType": "YulBlock", + "src": "808:901:21", + "statements": [ + { + "nativeSrc": "1119:22:21", + "nodeType": "YulVariableDeclaration", + "src": "1119:22:21", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1136:4:21", + "nodeType": "YulLiteral", + "src": "1136:4:21", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1130:5:21", + "nodeType": "YulIdentifier", + "src": "1130:5:21" + }, + "nativeSrc": "1130:11:21", + "nodeType": "YulFunctionCall", + "src": "1130:11:21" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "1123:3:21", + "nodeType": "YulTypedName", + "src": "1123:3:21", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1168:3:21", + "nodeType": "YulIdentifier", + "src": "1168:3:21" + }, + { + "kind": "number", + "nativeSrc": "1173:1:21", + "nodeType": "YulLiteral", + "src": "1173:1:21", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "1176:12:21", + "nodeType": "YulIdentifier", + "src": "1176:12:21" + }, + "nativeSrc": "1176:14:21", + "nodeType": "YulFunctionCall", + "src": "1176:14:21" + } + ], + "functionName": { + "name": "calldatacopy", + "nativeSrc": "1155:12:21", + "nodeType": "YulIdentifier", + "src": "1155:12:21" + }, + "nativeSrc": "1155:36:21", + "nodeType": "YulFunctionCall", + "src": "1155:36:21" + }, + "nativeSrc": "1155:36:21", + "nodeType": "YulExpressionStatement", + "src": "1155:36:21" + }, + { + "nativeSrc": "1205:77:21", + "nodeType": "YulVariableDeclaration", + "src": "1205:77:21", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "1232:3:21", + "nodeType": "YulIdentifier", + "src": "1232:3:21" + }, + "nativeSrc": "1232:5:21", + "nodeType": "YulFunctionCall", + "src": "1232:5:21" + }, + { + "name": "_implementation", + "nativeSrc": "1239:15:21", + "nodeType": "YulIdentifier", + "src": "1239:15:21" + }, + { + "name": "ptr", + "nativeSrc": "1256:3:21", + "nodeType": "YulIdentifier", + "src": "1256:3:21" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "1261:12:21", + "nodeType": "YulIdentifier", + "src": "1261:12:21" + }, + "nativeSrc": "1261:14:21", + "nodeType": "YulFunctionCall", + "src": "1261:14:21" + }, + { + "kind": "number", + "nativeSrc": "1277:1:21", + "nodeType": "YulLiteral", + "src": "1277:1:21", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1280:1:21", + "nodeType": "YulLiteral", + "src": "1280:1:21", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nativeSrc": "1219:12:21", + "nodeType": "YulIdentifier", + "src": "1219:12:21" + }, + "nativeSrc": "1219:63:21", + "nodeType": "YulFunctionCall", + "src": "1219:63:21" + }, + "variables": [ + { + "name": "result", + "nativeSrc": "1209:6:21", + "nodeType": "YulTypedName", + "src": "1209:6:21", + "type": "" + } + ] + }, + { + "nativeSrc": "1296:28:21", + "nodeType": "YulVariableDeclaration", + "src": "1296:28:21", + "value": { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "1308:14:21", + "nodeType": "YulIdentifier", + "src": "1308:14:21" + }, + "nativeSrc": "1308:16:21", + "nodeType": "YulFunctionCall", + "src": "1308:16:21" + }, + "variables": [ + { + "name": "size", + "nativeSrc": "1300:4:21", + "nodeType": "YulTypedName", + "src": "1300:4:21", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1353:3:21", + "nodeType": "YulIdentifier", + "src": "1353:3:21" + }, + { + "kind": "number", + "nativeSrc": "1358:1:21", + "nodeType": "YulLiteral", + "src": "1358:1:21", + "type": "", + "value": "0" + }, + { + "name": "size", + "nativeSrc": "1361:4:21", + "nodeType": "YulIdentifier", + "src": "1361:4:21" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "1338:14:21", + "nodeType": "YulIdentifier", + "src": "1338:14:21" + }, + "nativeSrc": "1338:28:21", + "nodeType": "YulFunctionCall", + "src": "1338:28:21" + }, + "nativeSrc": "1338:28:21", + "nodeType": "YulExpressionStatement", + "src": "1338:28:21" + }, + { + "cases": [ + { + "body": { + "nativeSrc": "1419:111:21", + "nodeType": "YulBlock", + "src": "1419:111:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1500:3:21", + "nodeType": "YulIdentifier", + "src": "1500:3:21" + }, + { + "name": "size", + "nativeSrc": "1505:4:21", + "nodeType": "YulIdentifier", + "src": "1505:4:21" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1493:6:21", + "nodeType": "YulIdentifier", + "src": "1493:6:21" + }, + "nativeSrc": "1493:17:21", + "nodeType": "YulFunctionCall", + "src": "1493:17:21" + }, + "nativeSrc": "1493:17:21", + "nodeType": "YulExpressionStatement", + "src": "1493:17:21" + } + ] + }, + "nativeSrc": "1411:119:21", + "nodeType": "YulCase", + "src": "1411:119:21", + "value": { + "kind": "number", + "nativeSrc": "1416:1:21", + "nodeType": "YulLiteral", + "src": "1416:1:21", + "type": "", + "value": "0" + } + }, + { + "body": { + "nativeSrc": "1556:142:21", + "nodeType": "YulBlock", + "src": "1556:142:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1668:3:21", + "nodeType": "YulIdentifier", + "src": "1668:3:21" + }, + { + "name": "size", + "nativeSrc": "1673:4:21", + "nodeType": "YulIdentifier", + "src": "1673:4:21" + } + ], + "functionName": { + "name": "return", + "nativeSrc": "1661:6:21", + "nodeType": "YulIdentifier", + "src": "1661:6:21" + }, + "nativeSrc": "1661:17:21", + "nodeType": "YulFunctionCall", + "src": "1661:17:21" + }, + "nativeSrc": "1661:17:21", + "nodeType": "YulExpressionStatement", + "src": "1661:17:21" + } + ] + }, + "nativeSrc": "1548:150:21", + "nodeType": "YulCase", + "src": "1548:150:21", + "value": "default" + } + ], + "expression": { + "name": "result", + "nativeSrc": "1387:6:21", + "nodeType": "YulIdentifier", + "src": "1387:6:21" + }, + "nativeSrc": "1380:318:21", + "nodeType": "YulSwitch", + "src": "1380:318:21" + } + ] + }, + "evmVersion": "paris", + "externalReferences": [ + { + "declaration": 4510, + "isOffset": false, + "isSlot": false, + "src": "1239:15:21", + "valueSize": 1 + } + ], + "id": 4514, + "nodeType": "InlineAssembly", + "src": "799:910:21" + } + ] + }, + "documentation": { + "id": 4506, + "nodeType": "StructuredDocumentation", + "src": "590:69:21", + "text": "Payable fallback accepts delegating calls to payable functions. " + }, + "id": 4516, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4507, + "nodeType": "ParameterList", + "parameters": [], + "src": "673:2:21" + }, + "returnParameters": { + "id": 4508, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:21" + }, + "scope": 4713, + "src": "665:1051:21", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 4526, + "nodeType": "Block", + "src": "1837:54:21", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4522, + "name": "__proxySlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4712, + "src": "1855:11:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$30244_storage_ptr_$", + "typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)" + } + }, + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1855:13:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxiableSlot_$30244_storage_ptr", + "typeString": "struct Proxiable.ProxiableSlot storage pointer" + } + }, + "id": 4524, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1869:14:21", + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 30239, + "src": "1855:28:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4521, + "id": 4525, + "nodeType": "Return", + "src": "1848:35:21" + } + ] + }, + "documentation": { + "id": 4517, + "nodeType": "StructuredDocumentation", + "src": "1724:51:21", + "text": "Returns proxy's current implementation address." + }, + "functionSelector": "5c60da1b", + "id": 4527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "implementation", + "nameLocation": "1790:14:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4518, + "nodeType": "ParameterList", + "parameters": [], + "src": "1804:2:21" + }, + "returnParameters": { + "id": 4521, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4520, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "1828:7:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1828:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1827:9:21" + }, + "scope": 4713, + "src": "1781:110:21", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4702, + "nodeType": "Block", + "src": "2292:2686:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4538, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "2358:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2388:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2380:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4539, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2380:7:21", + "typeDescriptions": {} + } + }, + "id": 4542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2380:10:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2358:32:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a206e756c6c20696d706c656d656e746174696f6e", + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2392:34:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d599eaa5e68d91d75c142446490ab9a15fd0284a41ce949219b5b4d8f267239a", + "typeString": "literal_string \"WitnetProxy: null implementation\"" + }, + "value": "WitnetProxy: null implementation" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d599eaa5e68d91d75c142446490ab9a15fd0284a41ce949219b5b4d8f267239a", + "typeString": "literal_string \"WitnetProxy: null implementation\"" + } + ], + "id": 4537, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2350:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2350:77:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4546, + "nodeType": "ExpressionStatement", + "src": "2350:77:21" + }, + { + "assignments": [ + 4548 + ], + "declarations": [ + { + "constant": false, + "id": 4548, + "mutability": "mutable", + "name": "_oldImplementation", + "nameLocation": "2448:18:21", + "nodeType": "VariableDeclaration", + "scope": 4702, + "src": "2440:26:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2440:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4551, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4549, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4527, + "src": "2469:14:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 4550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2469:16:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2440:45:21" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4552, + "name": "_oldImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "2500:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2530:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2522:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2522:7:21", + "typeDescriptions": {} + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2522:10:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2500:32:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4633, + "nodeType": "IfStatement", + "src": "2496:1298:21", + "trueBody": { + "id": 4632, + "nodeType": "Block", + "src": "2534:1260:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4559, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "2630:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 4560, + "name": "_oldImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "2652:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2630:40:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a206e6f7468696e6720746f2075706772616465", + "id": 4562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2672:33:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e332eab1bae45430d1201a30c0d80d8fcb5570f9e70201a9eb7b229e17fd2084", + "typeString": "literal_string \"WitnetProxy: nothing to upgrade\"" + }, + "value": "WitnetProxy: nothing to upgrade" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e332eab1bae45430d1201a30c0d80d8fcb5570f9e70201a9eb7b229e17fd2084", + "typeString": "literal_string \"WitnetProxy: nothing to upgrade\"" + } + ], + "id": 4558, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2622:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2622:84:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4564, + "nodeType": "ExpressionStatement", + "src": "2622:84:21" + }, + { + "clauses": [ + { + "block": { + "id": 4578, + "nodeType": "Block", + "src": "2886:88:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4574, + "name": "_isUpgradable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4571, + "src": "2913:13:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a206e6f742075706772616461626c65", + "id": 4575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:29:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d96132834a96bae5cb2f32cb07f13985dcde0f2358055c198eb3065af6c5aa7f", + "typeString": "literal_string \"WitnetProxy: not upgradable\"" + }, + "value": "WitnetProxy: not upgradable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d96132834a96bae5cb2f32cb07f13985dcde0f2358055c198eb3065af6c5aa7f", + "typeString": "literal_string \"WitnetProxy: not upgradable\"" + } + ], + "id": 4573, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2905:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2905:53:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4577, + "nodeType": "ExpressionStatement", + "src": "2905:53:21" + } + ] + }, + "errorName": "", + "id": 4579, + "nodeType": "TryCatchClause", + "parameters": { + "id": 4572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4571, + "mutability": "mutable", + "name": "_isUpgradable", + "nameLocation": "2871:13:21", + "nodeType": "VariableDeclaration", + "scope": 4579, + "src": "2866:18:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4570, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2866:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2865:20:21" + }, + "src": "2857:117:21" + }, + { + "block": { + "id": 4584, + "nodeType": "Block", + "src": "2981:87:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e657450726f78793a20756e61626c6520746f20636865636b207570677261646162696c697479", + "id": 4581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3007:44:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f859058ad3ee4e192700ff813ed67dc892a0c7de91510ee584a0ac25fc982fc", + "typeString": "literal_string \"WitnetProxy: unable to check upgradability\"" + }, + "value": "WitnetProxy: unable to check upgradability" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7f859058ad3ee4e192700ff813ed67dc892a0c7de91510ee584a0ac25fc982fc", + "typeString": "literal_string \"WitnetProxy: unable to check upgradability\"" + } + ], + "id": 4580, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "3000:6:21", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3000:52:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4583, + "nodeType": "ExpressionStatement", + "src": "3000:52:21" + } + ] + }, + "errorName": "", + "id": 4585, + "nodeType": "TryCatchClause", + "src": "2975:93:21" + } + ], + "externalCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 4566, + "name": "_oldImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "2822:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4565, + "name": "Upgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30388, + "src": "2810:11:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Upgradeable_$30388_$", + "typeString": "type(contract Upgradeable)" + } + }, + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2810:31:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Upgradeable_$30388", + "typeString": "contract Upgradeable" + } + }, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2842:12:21", + "memberName": "isUpgradable", + "nodeType": "MemberAccess", + "referencedDeclaration": 30367, + "src": "2810:44:21", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 4569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2810:46:21", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4586, + "nodeType": "TryStatement", + "src": "2806:262:21" + }, + { + "assignments": [ + 4588, + 4590 + ], + "declarations": [ + { + "constant": false, + "id": 4588, + "mutability": "mutable", + "name": "_wasCalled", + "nameLocation": "3186:10:21", + "nodeType": "VariableDeclaration", + "scope": 4632, + "src": "3181:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4587, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3181:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4590, + "mutability": "mutable", + "name": "_result", + "nameLocation": "3211:7:21", + "nodeType": "VariableDeclaration", + "scope": 4632, + "src": "3198:20:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4589, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3198:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 4600, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "697355706772616461626c6546726f6d286164647265737329", + "id": 4595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3318:27:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6b58960af5008b519145bb1cb07a67ee0927d8e642573c92f5babc4d0c2721d7", + "typeString": "literal_string \"isUpgradableFrom(address)\"" + }, + "value": "isUpgradableFrom(address)" + }, + { + "expression": { + "id": 4596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3368:3:21", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3372:6:21", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3368:10:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6b58960af5008b519145bb1cb07a67ee0927d8e642573c92f5babc4d0c2721d7", + "typeString": "literal_string \"isUpgradableFrom(address)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4593, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "3272:3:21", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3276:19:21", + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "3272:23:21", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3272:125:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4591, + "name": "_oldImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3222:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3241:12:21", + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "3222:31:21", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3222:190:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3180:232:21" + }, + { + "expression": { + "arguments": [ + { + "id": 4602, + "name": "_wasCalled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4588, + "src": "3435:10:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d656e746174696f6e", + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3447:41:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4", + "typeString": "literal_string \"WitnetProxy: uncompliant implementation\"" + }, + "value": "WitnetProxy: uncompliant implementation" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4", + "typeString": "literal_string \"WitnetProxy: uncompliant implementation\"" + } + ], + "id": 4601, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3427:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3427:62:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4605, + "nodeType": "ExpressionStatement", + "src": "3427:62:21" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4609, + "name": "_result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4590, + "src": "3523:7:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "components": [ + { + "id": 4611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3533:4:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 4610, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3533:4:21", + "typeDescriptions": {} + } + } + ], + "id": 4612, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3532:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "id": 4607, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "3512:3:21", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3516:6:21", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "3512:10:21", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3512:27:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a206e6f7420617574686f72697a6564", + "id": 4614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3541:29:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ba8d4d661ce88eb2915ba133e6cad533938b754d7b66d8253879ef2c2193ecb2", + "typeString": "literal_string \"WitnetProxy: not authorized\"" + }, + "value": "WitnetProxy: not authorized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ba8d4d661ce88eb2915ba133e6cad533938b754d7b66d8253879ef2c2193ecb2", + "typeString": "literal_string \"WitnetProxy: not authorized\"" + } + ], + "id": 4606, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3504:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3504:67:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4616, + "nodeType": "ExpressionStatement", + "src": "3504:67:21" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 4619, + "name": "_oldImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3624:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4618, + "name": "Upgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30388, + "src": "3612:11:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Upgradeable_$30388_$", + "typeString": "type(contract Upgradeable)" + } + }, + "id": 4620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3612:31:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Upgradeable_$30388", + "typeString": "contract Upgradeable" + } + }, + "id": 4621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3644:13:21", + "memberName": "proxiableUUID", + "nodeType": "MemberAccess", + "referencedDeclaration": 30237, + "src": "3612:45:21", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$", + "typeString": "function () view external returns (bytes32)" + } + }, + "id": 4622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3612:47:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 4624, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "3675:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4623, + "name": "Upgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30388, + "src": "3663:11:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Upgradeable_$30388_$", + "typeString": "type(contract Upgradeable)" + } + }, + "id": 4625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3663:31:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Upgradeable_$30388", + "typeString": "contract Upgradeable" + } + }, + "id": 4626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3695:13:21", + "memberName": "proxiableUUID", + "nodeType": "MemberAccess", + "referencedDeclaration": 30237, + "src": "3663:45:21", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$", + "typeString": "function () view external returns (bytes32)" + } + }, + "id": 4627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3663:47:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3612:98:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5769746e657450726f78793a2070726f786961626c655555494473206d69736d61746368", + "id": 4629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3729:38:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f3c1ad1fa1688d47e62cc4dd5b4be101315ef47e38e05aa3a37a4ef2e1cec0a8", + "typeString": "literal_string \"WitnetProxy: proxiableUUIDs mismatch\"" + }, + "value": "WitnetProxy: proxiableUUIDs mismatch" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f3c1ad1fa1688d47e62cc4dd5b4be101315ef47e38e05aa3a37a4ef2e1cec0a8", + "typeString": "literal_string \"WitnetProxy: proxiableUUIDs mismatch\"" + } + ], + "id": 4617, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3586:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3586:196:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4631, + "nodeType": "ExpressionStatement", + "src": "3586:196:21" + } + ] + } + }, + { + "assignments": [ + 4635, + 4637 + ], + "declarations": [ + { + "constant": false, + "id": 4635, + "mutability": "mutable", + "name": "_wasInitialized", + "nameLocation": "3884:15:21", + "nodeType": "VariableDeclaration", + "scope": 4702, + "src": "3879:20:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4634, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3879:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4637, + "mutability": "mutable", + "name": "_returnData", + "nameLocation": "3914:11:21", + "nodeType": "VariableDeclaration", + "scope": 4702, + "src": "3901:24:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4636, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3901:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 4646, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "696e697469616c697a6528627974657329", + "id": 4642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4017:19:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_439fab91f8ccf5be59586b9cf7bb7786c67a661a95ce1cfc146c1ed62922ae26", + "typeString": "literal_string \"initialize(bytes)\"" + }, + "value": "initialize(bytes)" + }, + { + "id": 4643, + "name": "_initData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "4055:9:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_439fab91f8ccf5be59586b9cf7bb7786c67a661a95ce1cfc146c1ed62922ae26", + "typeString": "literal_string \"initialize(bytes)\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4640, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "3975:3:21", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3979:19:21", + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "3975:23:21", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 4644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3975:104:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4638, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "3929:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3948:12:21", + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "3929:31:21", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 4645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3929:161:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3878:212:21" + }, + { + "condition": { + "id": 4648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4105:16:21", + "subExpression": { + "id": 4647, + "name": "_wasInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4635, + "src": "4106:15:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4672, + "nodeType": "IfStatement", + "src": "4101:344:21", + "trueBody": { + "id": 4671, + "nodeType": "Block", + "src": "4123:322:21", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4649, + "name": "_returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "4142:11:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4154:6:21", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4142:18:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "3638", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4163:2:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_68_by_1", + "typeString": "int_const 68" + }, + "value": "68" + }, + "src": "4142:23:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4669, + "nodeType": "Block", + "src": "4252:182:21", + "statements": [ + { + "AST": { + "nativeSrc": "4280:79:21", + "nodeType": "YulBlock", + "src": "4280:79:21", + "statements": [ + { + "nativeSrc": "4303:37:21", + "nodeType": "YulAssignment", + "src": "4303:37:21", + "value": { + "arguments": [ + { + "name": "_returnData", + "nativeSrc": "4322:11:21", + "nodeType": "YulIdentifier", + "src": "4322:11:21" + }, + { + "kind": "number", + "nativeSrc": "4335:4:21", + "nodeType": "YulLiteral", + "src": "4335:4:21", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4318:3:21", + "nodeType": "YulIdentifier", + "src": "4318:3:21" + }, + "nativeSrc": "4318:22:21", + "nodeType": "YulFunctionCall", + "src": "4318:22:21" + }, + "variableNames": [ + { + "name": "_returnData", + "nativeSrc": "4303:11:21", + "nodeType": "YulIdentifier", + "src": "4303:11:21" + } + ] + } + ] + }, + "evmVersion": "paris", + "externalReferences": [ + { + "declaration": 4637, + "isOffset": false, + "isSlot": false, + "src": "4303:11:21", + "valueSize": 1 + }, + { + "declaration": 4637, + "isOffset": false, + "isSlot": false, + "src": "4322:11:21", + "valueSize": 1 + } + ], + "id": 4658, + "nodeType": "InlineAssembly", + "src": "4271:88:21" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4662, + "name": "_returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "4395:11:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "components": [ + { + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 4663, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4409:6:21", + "typeDescriptions": {} + } + } + ], + "id": 4665, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4408:8:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + } + ], + "expression": { + "id": 4660, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "4384:3:21", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4388:6:21", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "4384:10:21", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4384:33:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4659, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "4377:6:21", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4377:41:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4668, + "nodeType": "ExpressionStatement", + "src": "4377:41:21" + } + ] + }, + "id": 4670, + "nodeType": "IfStatement", + "src": "4138:296:21", + "trueBody": { + "id": 4657, + "nodeType": "Block", + "src": "4167:79:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e657450726f78793a20696e697469616c697a6174696f6e206661696c6564", + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4193:36:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1a3a4ea76e2e68e14fc5328c93896fc2e23cf33c9f37d13d21f0003bedc2d604", + "typeString": "literal_string \"WitnetProxy: initialization failed\"" + }, + "value": "WitnetProxy: initialization failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1a3a4ea76e2e68e14fc5328c93896fc2e23cf33c9f37d13d21f0003bedc2d604", + "typeString": "literal_string \"WitnetProxy: initialization failed\"" + } + ], + "id": 4653, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "4186:6:21", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4186:44:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4656, + "nodeType": "ExpressionStatement", + "src": "4186:44:21" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 4677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4673, + "name": "__proxySlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4712, + "src": "4539:11:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxiableSlot_$30244_storage_ptr_$", + "typeString": "function () pure returns (struct Proxiable.ProxiableSlot storage pointer)" + } + }, + "id": 4674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4539:13:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxiableSlot_$30244_storage_ptr", + "typeString": "struct Proxiable.ProxiableSlot storage pointer" + } + }, + "id": 4675, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4553:14:21", + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 30239, + "src": "4539:28:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4676, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "4570:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4539:49:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4678, + "nodeType": "ExpressionStatement", + "src": "4539:49:21" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4680, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "4619:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4679, + "name": "Upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4496, + "src": "4610:8:21", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4610:28:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4682, + "nodeType": "EmitStatement", + "src": "4605:33:21" + }, + { + "clauses": [ + { + "block": { + "id": 4693, + "nodeType": "Block", + "src": "4831:47:21", + "statements": [ + { + "expression": { + "id": 4691, + "name": "_isUpgradable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4689, + "src": "4853:13:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4536, + "id": 4692, + "nodeType": "Return", + "src": "4846:20:21" + } + ] + }, + "errorName": "", + "id": 4694, + "nodeType": "TryCatchClause", + "parameters": { + "id": 4690, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4689, + "mutability": "mutable", + "name": "_isUpgradable", + "nameLocation": "4816:13:21", + "nodeType": "VariableDeclaration", + "scope": 4694, + "src": "4811:18:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4688, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4811:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4810:20:21" + }, + "src": "4802:76:21" + }, + { + "block": { + "id": 4699, + "nodeType": "Block", + "src": "4894:77:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "5769746e657450726f78793a20756e636f6d706c69616e7420696d706c656d656e746174696f6e", + "id": 4696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4917:41:21", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4", + "typeString": "literal_string \"WitnetProxy: uncompliant implementation\"" + }, + "value": "WitnetProxy: uncompliant implementation" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_af0aea8d1824a1e38021567a37dc01337985e80f2aafd4c71622592f865dd0f4", + "typeString": "literal_string \"WitnetProxy: uncompliant implementation\"" + } + ], + "id": 4695, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "4909:6:21", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4909:50:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4698, + "nodeType": "ExpressionStatement", + "src": "4909:50:21" + } + ] + }, + "errorName": "", + "id": 4700, + "nodeType": "TryCatchClause", + "src": "4888:83:21" + } + ], + "externalCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 4684, + "name": "_newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "4767:18:21", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4683, + "name": "Upgradeable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30388, + "src": "4755:11:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Upgradeable_$30388_$", + "typeString": "type(contract Upgradeable)" + } + }, + "id": 4685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4755:31:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Upgradeable_$30388", + "typeString": "contract Upgradeable" + } + }, + "id": 4686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4787:12:21", + "memberName": "isUpgradable", + "nodeType": "MemberAccess", + "referencedDeclaration": 30367, + "src": "4755:44:21", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4755:46:21", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4701, + "nodeType": "TryStatement", + "src": "4751:220:21" + } + ] + }, + "documentation": { + "id": 4528, + "nodeType": "StructuredDocumentation", + "src": "1899:280:21", + "text": "Upgrades the `implementation` address.\n @param _newImplementation New implementation address.\n @param _initData Raw data with which new implementation will be initialized.\n @return Returns whether new implementation would be further upgradable, or not." + }, + "functionSelector": "6fbc15e9", + "id": 4703, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgradeTo", + "nameLocation": "2194:9:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4533, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4530, + "mutability": "mutable", + "name": "_newImplementation", + "nameLocation": "2212:18:21", + "nodeType": "VariableDeclaration", + "scope": 4703, + "src": "2204:26:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2204:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4532, + "mutability": "mutable", + "name": "_initData", + "nameLocation": "2245:9:21", + "nodeType": "VariableDeclaration", + "scope": 4703, + "src": "2232:22:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4531, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2232:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2203:52:21" + }, + "returnParameters": { + "id": 4536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4535, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4703, + "src": "2281:4:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4534, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2281:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2280:6:21" + }, + "scope": 4713, + "src": "2185:2793:21", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4711, + "nodeType": "Block", + "src": "5185:213:21", + "statements": [ + { + "AST": { + "nativeSrc": "5205:186:21", + "nodeType": "YulBlock", + "src": "5205:186:21", + "statements": [ + { + "nativeSrc": "5300:80:21", + "nodeType": "YulAssignment", + "src": "5300:80:21", + "value": { + "kind": "number", + "nativeSrc": "5314:66:21", + "nodeType": "YulLiteral", + "src": "5314:66:21", + "type": "", + "value": "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" + }, + "variableNames": [ + { + "name": "_slot.slot", + "nativeSrc": "5300:10:21", + "nodeType": "YulIdentifier", + "src": "5300:10:21" + } + ] + } + ] + }, + "evmVersion": "paris", + "externalReferences": [ + { + "declaration": 4708, + "isOffset": false, + "isSlot": true, + "src": "5300:10:21", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 4710, + "nodeType": "InlineAssembly", + "src": "5196:195:21" + } + ] + }, + "documentation": { + "id": 4704, + "nodeType": "StructuredDocumentation", + "src": "4986:109:21", + "text": "@dev Complying with EIP-1967, retrieves storage struct containing proxy's current implementation address." + }, + "id": 4712, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "__proxySlot", + "nameLocation": "5110:11:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4705, + "nodeType": "ParameterList", + "parameters": [], + "src": "5121:2:21" + }, + "returnParameters": { + "id": 4709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4708, + "mutability": "mutable", + "name": "_slot", + "nameLocation": "5178:5:21", + "nodeType": "VariableDeclaration", + "scope": 4712, + "src": "5146:37:21", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxiableSlot_$30244_storage_ptr", + "typeString": "struct Proxiable.ProxiableSlot" + }, + "typeName": { + "id": 4707, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4706, + "name": "Proxiable.ProxiableSlot", + "nameLocations": [ + "5146:9:21", + "5156:13:21" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30244, + "src": "5146:23:21" + }, + "referencedDeclaration": 30244, + "src": "5146:23:21", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxiableSlot_$30244_storage_ptr", + "typeString": "struct Proxiable.ProxiableSlot" + } + }, + "visibility": "internal" + } + ], + "src": "5145:39:21" + }, + "scope": 4713, + "src": "5101:297:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 4714, + "src": "264:5139:21", + "usedErrors": [], + "usedEvents": [ + 4496 + ] + } + ], + "src": "35:5370:21" + }, + "compiler": { + "name": "solc", + "version": "0.8.25+commit.b61c2a91.Emscripten.clang" + }, + "networks": { + "5777": { + "events": {}, + "links": {}, + "address": "0xC32CeF95b3AeF472088B6d3c2a90DC2a117654FB", + "transactionHash": "0x2c68e14a10a4ce21ab89c01188d70a6b81ea88ca24dfcc6daaf666bd63145c82" + } + }, + "schemaVersion": "3.4.16", + "updatedAt": "2024-10-20T09:42:12.841Z", + "devdoc": { + "author": "Guillermo Díaz ", + "kind": "dev", + "methods": { + "upgradeTo(address,bytes)": { + "params": { + "_initData": "Raw data with which new implementation will be initialized.", + "_newImplementation": "New implementation address." + }, + "returns": { + "_0": "Returns whether new implementation would be further upgradable, or not." + } + } + }, + "title": "WitnetProxy: upgradable delegate-proxy contract. ", + "version": 1 + }, + "userdoc": { + "events": { + "Upgraded(address)": { + "notice": "Event emitted every time the implementation gets updated." + } + }, + "kind": "user", + "methods": { + "constructor": { + "notice": "Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470)." + }, + "implementation()": { + "notice": "Returns proxy's current implementation address." + }, + "upgradeTo(address,bytes)": { + "notice": "Upgrades the `implementation` address." + } + }, + "version": 1 + } + } \ No newline at end of file diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js new file mode 100644 index 00000000..c8d00f75 --- /dev/null +++ b/migrations/scripts/1_base.js @@ -0,0 +1,59 @@ +const ethUtils = require("ethereumjs-util") +const fs = require("fs") +const settings = require("../../settings") +const utils = require("../../src/utils") + +const WitnetDeployer = artifacts.require("WitnetDeployer") + +module.exports = async function (truffleDeployer, network, [,,, master]) { + const addresses = await utils.readJsonFromFile("./migrations/addresses.json") + if (!addresses[network]) addresses[network] = {}; + + const deployerAddr = utils.getNetworkBaseArtifactAddress(network, addresses, "WitnetDeployer") + if (utils.isNullAddress(deployerAddr) || (await web3.eth.getCode(deployerAddr)).length < 3) { + // Settle WitnetDeployer bytecode and source code as to guarantee + // salted addresses remain as expected no matter if the solc version + // is changed in migrations/witnet.settings.js + const impl = settings.getArtifacts(network).WitnetDeployer; + utils.traceHeader("Defrosted 'WitnetDeployer'") + fs.writeFileSync( + `build/contracts/${impl}.json`, + fs.readFileSync(`migrations/frosts/${impl}.json`), + { encoding: "utf8", flag: "w" } + ) + const WitnetDeployer = artifacts.require(impl) + const metadata = JSON.parse(WitnetDeployer.metadata) + console.info(" ", "> compiler: ", metadata.compiler.version) + console.info(" ", "> compilation target:", metadata.settings.compilationTarget) + console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) + console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) + console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetDeployer.toJSON().deployedBytecode)) + + await truffleDeployer.deploy(WitnetDeployer, { + from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), + }) + addresses[network].WitnetDeployer = WitnetDeployer.address + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + + } else { + WitnetDeployer.address = addresses[network].WitnetDeployer; + utils.traceHeader("Deployed 'WitnetDeployer'") + console.info(" ", "> contract address: \x1b[95m", WitnetDeployer.address, "\x1b[0m") + console.info() + } + + // Settle WitnetDeployer bytecode and source code as to guarantee + // that proxified base artifacts can get automatically verified + utils.traceHeader("Defrosting 'WitnetProxy'") + fs.writeFileSync( + `build/contracts/WitnetProxy.json`, + fs.readFileSync(`migrations/frosts/WitnetProxy.json`), + { encoding: "utf8", flag: "w" } + ) + const WitnetProxy = artifacts.require("WitnetProxy") + const metadata = JSON.parse(WitnetProxy.metadata) + console.info(" ", "> compiler: ", metadata.compiler.version) + console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) + console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) + console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetProxy.toJSON().deployedBytecode)) +} diff --git a/migrations/scripts/1_deployer.js b/migrations/scripts/1_deployer.js deleted file mode 100644 index 19346749..00000000 --- a/migrations/scripts/1_deployer.js +++ /dev/null @@ -1,51 +0,0 @@ -const settings = require("../../settings") -const utils = require("../../src/utils") - -const WitnetDeployer = artifacts.require("WitnetDeployer") -const WitnetProxy = artifacts.require("WitnetProxy") - -module.exports = async function (deployer, network, [,,, master]) { - const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - if (!addresses[network]) addresses[network] = {} - - const factoryAddr = addresses[network]?.WitnetDeployer || addresses?.default?.WitnetDeployer || "" - if ( - utils.isNullAddress(factoryAddr) || - (await web3.eth.getCode(factoryAddr)).length < 3 - ) { - const WitnetDeployerImpl = artifacts.require(settings.getArtifacts(network).WitnetDeployer) - await deployer.deploy(WitnetDeployerImpl, { - from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), - }) - const factory = await WitnetDeployerImpl.deployed() - if (factory.address !== addresses?.default?.WitnetDeployer) { - addresses[network].WitnetDeployer = factory.address - if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - } - } - WitnetDeployer.address = factory.address - } else { - const factory = await WitnetDeployer.at(factoryAddr) - WitnetDeployer.address = factory.address - utils.traceHeader("Skipped 'WitnetDeployer'") - console.info(" > Contract address:", factory.address) - console.info() - } - - const proxyAddr = addresses[network]?.WitnetProxy || addresses?.default?.WitnetProxy || "" - if ( - utils.isNullAddress(proxyAddr) || - (await web3.eth.getCode(proxyAddr)).length < 3 - ) { - await deployer.deploy(WitnetProxy, { - from: settings.getSpecs(network)?.WitnetDeployer?.from || master, - }) - if (WitnetProxy.address !== addresses?.default?.WitnetProxy) { - addresses[network].WitnetProxy = WitnetProxy.address - if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - } - } - } -} From 51a6991249915ff2ac4cb0707b47390957347e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 09:07:39 +0200 Subject: [PATCH 15/62] feat(migrations): agnotisticize core vs apps - trustable vs upgradable vs trustless --- migrations/addresses.json | 646 +++++------------------------- migrations/constructorArgs.json | 120 +++--- migrations/scripts/2_libs.js | 68 ++-- migrations/scripts/3_core.js | 182 --------- migrations/scripts/3_framework.js | 404 +++++++++++++++++++ migrations/scripts/4_proxies.js | 151 ------- migrations/scripts/5_apps.js | 131 ------ settings/artifacts.js | 78 ++-- settings/index.js | 33 +- settings/specs.js | 109 ++--- src/utils.js | 116 +++++- 11 files changed, 793 insertions(+), 1245 deletions(-) delete mode 100644 migrations/scripts/3_core.js create mode 100644 migrations/scripts/3_framework.js delete mode 100644 migrations/scripts/4_proxies.js delete mode 100644 migrations/scripts/5_apps.js diff --git a/migrations/addresses.json b/migrations/addresses.json index b89fa99c..af4e7838 100644 --- a/migrations/addresses.json +++ b/migrations/addresses.json @@ -1,563 +1,113 @@ { "default": { - "WitnetDeployer": "0x03232aBE800D1638B30432FeEF300581De323a4E", - "WitOracle": "0x77703aE126B971c9946d562F41Dd47071dA00777", - "WitnetProxy": "0xaC3E870BF8D13Dc39f76936b6AF8279eF5a9211F", - "WitPriceFeeds": "0x1111AbA2164AcdC6D291b08DfB374280035E1111", - "WitnetRandomnessV2": "0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB", - "WitOracleRadonRegistry": "0x000B61Fe075F545fd37767f40391658275900000", - "WitOracleRequestFactory": "0x000DB36997AF1F02209A6F995883B9B699900000" - }, - "arbitrum:one": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "arbitrum:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x85cd7aaF5248fC0568B003EF24FB2a5329C95c28", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x682A7dF2852F3Df2d3B4b84803da69A38ba33180", - "WitOracleRadonRegistryDefault": "0x03604d41a0289cb9325814A6aCA8BaBEf7492B44", - "WitOracleRequestFactoryDefault": "0x90a7Fc875dac0D453b43BF9E5AeE7dC68091CC24" - }, - "avalanche:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x412647Ff1519706C01706c5816E5cC355dd0A06D", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "avalanche:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x5B354083da3c7D034b8b95bE96aC5d114CcdA71f", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "base:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableOvm2": "0x9F02CD498b47B928c5a12FdC7cEa36246d27a638", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0xcB61b81a775E56e9Ec8884d2E13352d668294141", - "WitOracleRadonRegistryDefault": "0x730a88594d8287Ec898b2B7fE592aB155bE71590", - "WitOracleRequestFactoryDefault": "0xe1CDE456D3eC92640711625E01170A6800773b91" - }, - "base:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableOvm2": "0xDc5Ec161b72C5710E2D648b3f360C9b76952397b", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "boba:bnb:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableOvm2": "0x0D929cFfa089cA99a644E10A7c7fe1C8C62F657f", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "boba:bnb:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x4e6159Aa6c94584Af01Ccc828200c79D350D07E9", - "WitOracleRequestFactoryDefault": "0xFbb35731Fd5c35a84176aBccD214538843eAf5db", - "WitOracleRequestBoardTrustableOvm": "0xA126d29b0803CD0536c5487C831Daf9cB634318D", - "WitOracleTrustableOvm2": "0xA126d29b0803CD0536c5487C831Daf9cB634318D", - "WitPriceFeedsV21": "0x9E23a4CD5f903b4D0ED1358413250a1e2c459F63" - }, - "boba:eth:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableOvm2": "0xDc5Ec161b72C5710E2D648b3f360C9b76952397b", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "celo:alfajores": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "celo:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04" - }, - "conflux:core:mainnet": { - "WitnetDeployer": "0x8785dBa05D3B90c55c009D0C47f12A2d976C5e47", - "WitnetProxy": "0x8529DA52FF40990685B61432BA49246b94850d86", - "WitOracleResultErrorsLib": "0x899325905515049B49e726AF5d5f24f723a5eab2", - "WitOracleRadonEncodingLib": "0x80Ea106BE90aB7b4FCac2b3D4aCe4Ea262918188", - "WitPriceFeedsLib": "0x8Ac628741A0983869d237AF759f39a553aE91e47", - "WitOracleDataLib": "0x81cfB91911F6C8fa582033149582a63EBa39D0D3", - "WitOracleRadonRegistryDefault": "0x8C6cC510195f2B53abC65340346843Df91F6B940", - "WitOracleRequestFactoryCfxCore": "0x839d58dE8F143bC01549A7FD62fd508BCA922C8d", - "WitOracleTrustableDefault": "0x8E6Ddf8bA76350A5fde230a05fc58559A90B878D", - "WitPriceFeedsV21": "0x8af4262e9ECb7320a9ffdEe366172EAeA1D60e91", - "WitOracleRadonRegistry": "0x85d3E5577f947BcA1A12C00940087129A5F8B2eb", - "WitOracleRequestFactory": "0x8daDc231C8C810CBbe2d555338bDa94DA648f964", - "WitOracle": "0x8346D6ba3b7a04923492007cC3A2eE7135Db7463", - "WitPriceFeeds": "0x8ba3C59e1029cd90010e8C731461ddFC5f49091b", - "WitnetRandomnessV2": "0x897832C89ec306A74f9eC29abfFcaDBfCb11A13B" - }, - "conflux:core:testnet": { - "WitnetDeployer": "0x8785dBa05D3B90c55c009D0C47f12A2d976C5e47", - "WitnetProxy": "0x8529DA52FF40990685B61432BA49246b94850d86", - "WitOracleResultErrorsLib": "0x899325905515049B49e726AF5d5f24f723a5eab2", - "WitOracleRadonEncodingLib": "0x80Ea106BE90aB7b4FCac2b3D4aCe4Ea262918188", - "WitOracle": "0x8346D6ba3b7a04923492007cC3A2eE7135Db7463", - "WitOracleDataLib": "0x81cfB91911F6C8fa582033149582a63EBa39D0D3", - "WitOracleTrustableDefault": "0x857A67Cc046dB5D6414493ED9E65291FF2824116", - "WitPriceFeeds": "0x8ba3C59e1029cd90010e8C731461ddFC5f49091b", - "WitPriceFeedsLib": "0x8Ac628741A0983869d237AF759f39a553aE91e47", - "WitPriceFeedsV21": "0x80050098a4fdd72409D6C8Ec72FD50ca460349E9", - "WitnetRandomnessV2": "0x897832C89ec306A74f9eC29abfFcaDBfCb11A13B", - "WitOracleRadonRegistry": "0x85d3E5577f947BcA1A12C00940087129A5F8B2eb", - "WitOracleRadonRegistryDefault": "0x8176457C9620E8bb508aA22062E1967726179Cc9", - "WitOracleRequestFactory": "0x8daDc231C8C810CBbe2d555338bDa94DA648f964", - "WitOracleRequestFactoryCfxCore": "0x8E10530323e534d953D7EC83e075eCAbB38079d8" - }, - "conflux:espace:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "conflux:espace:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x1B9D8186e901b6ED7848374e81B79C9eBf74801E", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "cronos:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x412647Ff1519706C01706c5816E5cC355dd0A06D", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "cronos:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x44C4C71c31aD14dB5B18520D3801B88aA26427B0", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "dogechain:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "elastos:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "elastos:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" + "apps": { + "WitPriceFeeds": "0x1111AbA2164AcdC6D291b08DfB374280035E1111", + "WitRandomness": "0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB" + }, + "core": { + "WitOracle": "0x77703aE126B971c9946d562F41Dd47071dA00777", + "WitOracleRadonRegistry": "0x000B61Fe075F545fd37767f40391658275900000", + "WitOracleRequestFactory": "0x000DB36997AF1F02209A6F995883B9B699900000" + }, + "libs": { + "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", + "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", + "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", + "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837" + }, + "WitnetDeployer": "0x03232aBE800D1638B30432FeEF300581De323a4E" + }, + "conflux:core": { + "apps": { + "WitPriceFeeds": "0x8ba3C59e1029cd90010e8C731461ddFC5f49091b", + "WitRandomness": "0x897832C89ec306A74f9eC29abfFcaDBfCb11A13B" + }, + "core": { + "WitOracle": "0x8346D6ba3b7a04923492007cC3A2eE7135Db7463", + "WitOracleRadonRegistry": "0x85d3E5577f947BcA1A12C00940087129A5F8B2eb", + "WitOracleRequestFactory": "0x8daDc231C8C810CBbe2d555338bDa94DA648f964" + }, + "libs": { + "WitOracleDataLib": "0x81cfB91911F6C8fa582033149582a63EBa39D0D3", + "WitOracleRadonEncodingLib": "0x80Ea106BE90aB7b4FCac2b3D4aCe4Ea262918188", + "WitOracleResultErrorsLib": "0x899325905515049B49e726AF5d5f24f723a5eab2", + "WitPriceFeedsLib": "0x8Ac628741A0983869d237AF759f39a553aE91e47" + }, + "WitnetDeployer": "0x8785dBa05D3B90c55c009D0C47f12A2d976C5e47" }, "ethereum:mainnet": { - "WitOracleResultErrorsLib": "0x3b7AD1402C243Ba59D45a0364B17A31e260A4301", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x751F77190Ce6212899D5848334838D56CF7eEe91", - "WitOracleDataLib": "0xE89dc301AEe78917018039FEBE72f9FE5aB730D9", - "WitOracleRadonRegistryDefault": "0x4a2f2b2E137DD7D4a61389E07c935B14a562078d", - "WitOracleRequestFactoryDefault": "0x1a5cc6DeE6c7d873639e3eF49678b581f459bBa1", - "WitOracleTrustableDefault": "0x7084a8C12100cDBB1995aa1B0393A83A0B868837", - "WitPriceFeedsV21": "0xC815f56cC791E41a11DB3f0D2880AdB10316fca6" - }, - "ethereum:sepolia": { - "WitnetProxy": "0x21ac85A6c320E6fC89774A98732eAE733032651C", - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0xE790FdaEa7f1f4C4Bbd74B3493Cf94E79b24396a", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x327470b70d0cCF47cB89a1f3475DE23Ac2437c9e", - "WitOracleRadonRegistryDefault": "0x34e6465f23aE086e5701A6ca8547aF7c29e0283C", - "WitOracleRequestFactoryDefault": "0x1869A7137dF26397999AA6DB90c7D6D029d13908" - }, - "gnosis:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "kava:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" + "libs": { + "WitOracleDataLib": "0xE89dc301AEe78917018039FEBE72f9FE5aB730D9", + "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", + "WitOracleResultErrorsLib": "0x3b7AD1402C243Ba59D45a0364B17A31e260A4301", + "WitPriceFeedsLib": "0x751F77190Ce6212899D5848334838D56CF7eEe91" + } }, - "kava:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x64c74993A83C55Dc81eB1ec9502867d3b4d1d924", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "kcc:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "kcc:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x64c74993A83C55Dc81eB1ec9502867d3b4d1d924", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "klaytn:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "klaytn:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x64c74993A83C55Dc81eB1ec9502867d3b4d1d924", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "mantle:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableOvm2": "0xDc5Ec161b72C5710E2D648b3f360C9b76952397b", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "mantle:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableOvm2": "0x8423ddeb7d86Ce43a9C643bE3A420Ff69825Dd53", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x853DDf69DbEaDA2fc4A521a1dBA5Beb210a5c4d2", - "WitOracleRadonRegistryDefault": "0xD1960cdC1593Bb9CA75263266dAB75EE33163187", - "WitOracleRequestFactoryDefault": "0x9ef37BF321828AD49F3D31Fd9Cd36921ee317190" - }, - "metis:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" + "meter": { + "WitnetDeployer": "0x496aB880a611825c7c2322AD6d7ead0f84276327" }, "meter:mainnet": { - "WitnetDeployer": "0x496aB880a611825c7c2322AD6d7ead0f84276327", - "WitnetProxy": "0xc0a47100832Bf857Bf1F0517F4bf84D79da60B23", - "WitOracleResultErrorsLib": "0x5a59Ce1206B1771AcdE7ff85910F9e03Aef20EB8", - "WitOracleRadonEncodingLib": "0xfa52abc94415A334F6C846CA018290CE2755B13D", - "WitPriceFeedsLib": "0xBD9Ec958409eC6FbaF4d833F7Ea4e3892A406c98", - "WitOracleDataLib": "0x70d501E01d0EE71F8DD3e533849F5fc454359d6F", - "WitOracleRadonRegistryDefault": "0x14D3AAD34a7aB614Feaf72cc0eAab120E64d032F", - "WitOracleRequestFactoryCfxCore": "0x6Ee46D8db750607ffa5Ec3Eb0DAE969E1916F417", - "WitOracleTrustableDefault": "0xB11b58238BAf7CBBb608C81e7792cEA29e4E19D0", - "WitPriceFeedsV21": "0x7e701068365CFF4f217A32be8059550d8aEdc00D", - "WitOracleRadonRegistry": "0xBa84D2ffA26c8fC7EF2c5Bd4839B4b2E4d56D330", - "WitOracleRequestFactory": "0xc5074dde3FEA0347d3B2E8C38e58e6A34FeEf8EF", - "WitOracle": "0x1f28E4d955eccE989c00b3871446AB22B3Fa9Cc8", - "WitPriceFeeds": "0x27EF7A3e155F96e68A9988EAdBF8bd3eFdba1438", - "WitnetRandomnessV2": "0x4d239f070e475E454148093781211c9eE34f476C" + "apps": { + "WitPriceFeeds": "0x27EF7A3e155F96e68A9988EAdBF8bd3eFdba1438", + "WitRandomness": "0x4d239f070e475E454148093781211c9eE34f476C" + }, + "core": { + "WitOracle": "0x1f28E4d955eccE989c00b3871446AB22B3Fa9Cc8", + "WitOracleRadonRegistry": "0xBa84D2ffA26c8fC7EF2c5Bd4839B4b2E4d56D330", + "WitOracleRequestFactory": "0xc5074dde3FEA0347d3B2E8C38e58e6A34FeEf8EF" + }, + "libs": { + "WitOracleDataLib": "0x70d501E01d0EE71F8DD3e533849F5fc454359d6F", + "WitOracleRadonEncodingLib": "0xfa52abc94415A334F6C846CA018290CE2755B13D", + "WitOracleResultErrorsLib": "0x5a59Ce1206B1771AcdE7ff85910F9e03Aef20EB8", + "WitPriceFeedsLib": "0xBD9Ec958409eC6FbaF4d833F7Ea4e3892A406c98" + } }, "meter:testnet": { "WitnetDeployer": "0xE9D654A97eC431C4f1faba550d0a26399f6fEc80", - "WitnetProxy": "0x49c94B9d32a9AFc3C9Ce0159324b81635ac3f0Ea", - "WitOracleResultErrorsLib": "0x02762C84752C1C1ef582E6FE8dBAF60383a87e66", - "WitOracleRadonEncodingLib": "0xA4c9D0f1DE84D190a0478FD9226Ec201Daf509E2", - "WitPriceFeedsLib": "0x75cC6DA115846D1E577F5C5D5566BD2C15D5d198", - "WitOracleDataLib": "0xCc0444d867188796254141220744BdfE9Ef6d742", - "WitOracleRadonRegistryDefault": "0x8e1EDea211ed85316Bc7F115972C995b5fA897aF", - "WitOracleRequestFactoryDefault": "0xC69640F34267C5B9F58f716d1385A481D7dff10D", - "WitOracleTrustableDefault": "0xb7dd2cD53790a5D87f5cfD265D3bD889ed5FC28d", - "WitPriceFeedsV21": "0x89eE40cfb4F7D9f56Ee2E2E9B1580176361D84eC", - "WitOracleRadonRegistry": "0x87E25Ad751306b21F9345494F163122e057B7b53", - "WitOracleRequestFactory": "0xd0b4512F4c9291de4104a1ad7be0c51956044bbC", - "WitOracle": "0x51e12A16d52DE519f7b13bFeDa42Fb61214d32a0", - "WitPriceFeeds": "0xD9f5Af15288294678B0863A20F4B83eeeEAa775C", - "WitnetRandomnessV2": "0x2dE368AFC80b13E4a42990004ebC74ce125486F9", - "WitOracleRequestFactoryCfxCore": "0x602e74De19acA64f6ea1E20Da94a8B4D81dF3013" - }, - "moonbeam:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "moonbeam:moonbase": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x64c74993A83C55Dc81eB1ec9502867d3b4d1d924", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "moonbeam:moonriver": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x412647Ff1519706C01706c5816E5cC355dd0A06D", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "okx:oktchain:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "okx:x1:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryNoSha256": "0xd3a3C178F76D788B4054C3945281F94e7122a8fD", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "optimism:mainnet": { - "WitnetProxy": "0xADA577AC8eE9Cb726F6FC45f0B0716FD1aB3637D", - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableOvm2": "0xDc5Ec161b72C5710E2D648b3f360C9b76952397b", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04" + "apps": { + "WitPriceFeeds": "0xD9f5Af15288294678B0863A20F4B83eeeEAa775C", + "WitRandomness": "0x2dE368AFC80b13E4a42990004ebC74ce125486F9" + }, + "core": { + "WitOracle": "0x51e12A16d52DE519f7b13bFeDa42Fb61214d32a0", + "WitOracleRadonRegistry": "0x87E25Ad751306b21F9345494F163122e057B7b53", + "WitOracleRequestFactory": "0xd0b4512F4c9291de4104a1ad7be0c51956044bbC" + }, + "libs": { + "WitOracleDataLib": "0xCc0444d867188796254141220744BdfE9Ef6d742", + "WitOracleRadonEncodingLib": "0xA4c9D0f1DE84D190a0478FD9226Ec201Daf509E2", + "WitOracleResultErrorsLib": "0x02762C84752C1C1ef582E6FE8dBAF60383a87e66", + "WitPriceFeedsLib": "0x75cC6DA115846D1E577F5C5D5566BD2C15D5d198" + } }, "optimism:sepolia": { - "WitnetProxy": "0x58Bd0091748d0438f379bbf7D8BfF3a624CEbc3F", - "WitOracleResultErrorsLib": "0x4f2F381Ed2020095F1a1B5a0BDe5AB30da916BC9", - "WitOracleRadonEncodingLib": "0xf321bcD29CFc6134c9Bf42F759f428F3A6010919", - "WitOracleDataLib": "0x25d57Cf8a047B14172Ba2a929C1441E1A77c3f9D", - "WitOracleTrustableOvm2": "0xc1C158e77A91da158a1A2D0c2A154c68a8C7c0d2", - "WitPriceFeedsLib": "0x85aa4A0fDa112c47d4216448EE4D49Afd072675e", - "WitPriceFeedsV21": "0xA936f7F4909494Ea1F7D898C2759b2324912153d", - "WitOracleRadonRegistryDefault": "0x2D8BCBC4F8c97CC227e770d95d19914324baBF2A", - "WitOracleRequestFactoryDefault": "0x3D551165020a4014A8d5b9E4b73D2b3Dbe401546" - }, - "polygon:amoy": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "polygon:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "polygon:zkevm:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryNoSha256": "0x0C39d07778Fc2FF94efe889b107Deaa074041719", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x2c2C1Cf21c113F1c2D2df35a1E88aa96fc0AE749", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" + "libs": { + "WitOracleDataLib": "0x25d57Cf8a047B14172Ba2a929C1441E1A77c3f9D", + "WitOracleRadonEncodingLib": "0xf321bcD29CFc6134c9Bf42F759f428F3A6010919", + "WitOracleResultErrorsLib": "0x4f2F381Ed2020095F1a1B5a0BDe5AB30da916BC9", + "WitPriceFeedsLib": "0x85aa4A0fDa112c47d4216448EE4D49Afd072675e" + } + }, + "reef": { + "apps": { + "WitPriceFeeds": "0xA9991dCd62a863f0F0aabF95a6a252d132b5c8D4", + "WitRandomness": "0x84CD0bde18f78101064A2c8b8BaE5e1fCe1BCc0d" + }, + "core": { + "WitOracle": "0x604b98893335CEf7Dc40061731F40aC5C6239907", + "WitOracleRadonRegistry": "0xC4b7a5aD8BAF8fea9DbeB18aB6F77cdf54CF297a", + "WitOracleRequestFactory": "0xEBa788A5de67E4B11869558a2414247e8Aa62179" + }, + "WitnetDeployer": "0x94d6e5321039343f5e656aa7591dfbdbe81ff78f" }, "reef:mainnet": { - "WitnetDeployer": "0x94d6e5321039343f5e656aa7591dfbdbe81ff78f", - "WitnetProxy": "0x57a52fbcb26a08425fbe813bb1f21380bff23d47", - "WitOracleResultErrorsLib": "0xE2996CE29D5351E22a01E9dD73ADd8A0264E7318", - "WitOracleRadonEncodingLib": "0x416c6e7ff66868375cFF36bA87B8eCBB2CF2Fb08", - "WitPriceFeedsLib": "0xcaa6dE265EF1545788E9576660Bc6d5ae1Edb0F5", - "WitOracleDataLib": "0x6F65a0110a2D2Af299a73a4C169CC3d2C41Be505", - "WitOracleRadonRegistryDefault": "0x1A80B677A9dd6a6762273593FE2797927c4010A4", - "WitOracleRequestFactoryDefault": "0x71E2e26E5EfF3C05935A497282Fe018963b78F55", - "WitOracleTrustableReef": "0x7950250D3d2ae1636a7Ca2a8A6ba53e46D1cB573", - "WitPriceFeedsV21": "0x8af56567C7F0Deaf8979244d83194816a6ED144F", - "WitOracleRadonRegistry": "0xC4b7a5aD8BAF8fea9DbeB18aB6F77cdf54CF297a", - "WitOracleRequestFactory": "0xEBa788A5de67E4B11869558a2414247e8Aa62179", - "WitOracle": "0x604b98893335CEf7Dc40061731F40aC5C6239907", - "WitPriceFeeds": "0xA9991dCd62a863f0F0aabF95a6a252d132b5c8D4", - "WitnetRandomnessV2": "0x84CD0bde18f78101064A2c8b8BaE5e1fCe1BCc0d" - }, - "reef:testnet": {}, - "scroll:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryNoSha256": "0x0C39d07778Fc2FF94efe889b107Deaa074041719", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x412647Ff1519706C01706c5816E5cC355dd0A06D", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "scroll:sepolia": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryNoSha256": "0xd3a3C178F76D788B4054C3945281F94e7122a8fD", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "syscoin:rollux:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773", - "WitOracleTrustableOvm2": "0x9Bd67787019a6474ddE27f9c9A37260c87Da92B5", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11" - }, - "ten:testnet": { - "WitnetProxy": "0xaC3E870BF8D13Dc39f76936b6AF8279eF5a9211F", - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleTrustableObscuro": "0x2330f492635c2E7476bB2A3162e69129F6FEaB56", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773" - }, - "ultron:mainnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x967C4A627e68770db28803d033eEBCeE615C37EB", - "WitOracleRequestFactoryDefault": "0xE2CA421F5c28a04eb0B22f12512627acA9cF9E04", - "WitOracleTrustableDefault": "0x105EeFc7ad7A057C3BF2D516a0bFbB84E80d66eF", - "WitPriceFeedsV21": "0xd26f5c402D274C1b7c443E2215221D70C0b8DeB0" - }, - "ultron:testnet": { - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837", - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonRegistryDefault": "0x51376b77d9944bb9c5685b9d9289dd08D399B5e1", - "WitOracleRequestFactoryDefault": "0xB06a2fEc3Dc38b6f8Ce6337317Fcd4aAB00FE773", - "WitOracleTrustableDefault": "0x90A31c3f10391bd0f69a436473C96AAEe4DF0A5e", - "WitPriceFeedsV21": "0x8280929b7F6adcE1CfA15b63cbEC1A7FD8cAEf11" - } + "libs": { + "WitOracleDataLib": "0x6F65a0110a2D2Af299a73a4C169CC3d2C41Be505", + "WitOracleRadonEncodingLib": "0x416c6e7ff66868375cFF36bA87B8eCBB2CF2Fb08", + "WitOracleResultErrorsLib": "0xE2996CE29D5351E22a01E9dD73ADd8A0264E7318", + "WitPriceFeedsLib": "0xcaa6dE265EF1545788E9576660Bc6d5ae1Edb0F5" + } + }, + "reef:testnet": {} } \ No newline at end of file diff --git a/migrations/constructorArgs.json b/migrations/constructorArgs.json index c7feca4b..ee9acbcd 100644 --- a/migrations/constructorArgs.json +++ b/migrations/constructorArgs.json @@ -2,190 +2,190 @@ "default": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31322d61653734633030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitnetRandomnessV2": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000f121b71715e71dded592f1125a06d4ed06f0694d", - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", - "WitOracleRadonRegistryNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" }, "arbitrum:one": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "avalanche:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "base:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "boba:bnb:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "boba:bnb:testnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d34643165343634000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d34643165343634000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d34643165343634000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d34643165343634000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "boba:eth:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "celo:alfajores": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d64383461343832000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "celo:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "conflux:core:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", - "WitOracleRequestFactoryCfxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "0000000000000000000000008dadc231c8c810cbbe2d555338bda94da648f96400000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitPriceFeedsUpgradable": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitnetRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "conflux:core:testnet": { - "WitOracleRequestFactoryCfxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleTrustableDefault": "0000000000000000000000008dadc231c8c810cbbe2d555338bda94da648f96400000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitPriceFeedsUpgradable": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitnetRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "conflux:espace:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "conflux:espace:testnet": { - "WitOracleRequestFactoryCfxCore": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" + "WitOracleRequestFactoryUpgradableConfluxCore": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" }, "cronos:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "dogechain:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "elastos:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "ethereum:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31352d32623837306334000000000000000000000000000000000000" }, "kava:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "kava:testnet": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d64626234666331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "kcc:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "kcc:testnet": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d64626234666331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "klaytn:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "klaytn:testnet": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d64626234666331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "mantle:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "meter:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", - "WitOracleRequestFactoryCfxCore": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000ba84d2ffa26c8fc7ef2c5bd4839b4b2e4d56d3300000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000ba84d2ffa26c8fc7ef2c5bd4839b4b2e4d56d3300000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000c5074dde3fea0347d3b2e8c38e58e6a34feef8ef000000000000000000000000ba84d2ffa26c8fc7ef2c5bd4839b4b2e4d56d3300000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc80000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitPriceFeedsUpgradable": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc80000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitnetRandomnessV2": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "meter:testnet": { "WitOracleRequestFactoryDefault": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a000000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000d0b4512f4c9291de4104a1ad7be0c51956044bbc00000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a00000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitPriceFeedsUpgradable": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a00000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitnetRandomnessV2": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a0000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7", - "WitOracleRequestFactoryCfxCore": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a000000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" + "WitOracleRequestFactoryUpgradableConfluxCore": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a000000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" }, "moonbeam:moonbase": { "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31352d64626234666331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "moonbeam:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "moonbeam:moonriver": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "optimism:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "polygon:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "polygon:zkevm:mainnet": { - "WitOracleRadonRegistryNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "reef:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d34333966396166000000000000000000000000000000000000" + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31352d34333966396166000000000000000000000000000000000000" }, "scroll:mainnet": { - "WitOracleRadonRegistryNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" }, "syscoin:rollux:testnet": { "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" @@ -194,9 +194,9 @@ "WitOracleTrustableObscuro": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20" }, "ultron:mainnet": { - "WitOracleRadonRegistryDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", + "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", - "WitPriceFeedsV21": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" + "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000" } } \ No newline at end of file diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index f83b9eae..53fe9b1f 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -6,48 +6,52 @@ const WitnetDeployer = artifacts.require("WitnetDeployer") module.exports = async function (_, network, [, from]) { const addresses = await utils.readJsonFromFile("./migrations/addresses.json") if (!addresses[network]) addresses[network] = {} + if (!addresses[network]?.libs) addresses[network].libs = {} - const targets = settings.getArtifacts(network) - const libs = [ - targets.WitPriceFeedsLib, - targets.WitOracleDataLib, - targets.WitOracleRadonEncodingLib, - targets.WitOracleResultErrorsLib, - ] - + const deployer = await WitnetDeployer.deployed() + const networkArtifacts = settings.getArtifacts(network); const selection = utils.getWitnetArtifactsFromArgs() - const deployer = await WitnetDeployer.deployed() - for (const index in libs) { - const key = libs[index] - const artifact = artifacts.require(key) + for (const index in networkArtifacts.libs) { + const base = networkArtifacts.libs[index] + const impl = networkArtifacts.libs[base] + const libImplArtifact = artifacts.require(impl) + const libInitCode = libImplArtifact.toJSON().bytecode + const libTargetAddr = await deployer.determineAddr.call(libInitCode, "0x0", { from }) + const libTargetCode = await web3.eth.getCode(libTargetAddr) + let libNetworkAddr = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if ( - utils.isNullAddress(addresses[network][key]) || - (await web3.eth.getCode(addresses[network][key])).length < 3 || - selection.includes(key) + // lib implementation artifact is listed as --artifacts on CLI + selection.includes(impl) || + // or, no address found in addresses file but code is already deployed into target address + (utils.isNullAddress(libNetworkAddr) && libTargetCode.length > 3) || + // or, address found in addresses file but no code currently deployed in such + (await web3.eth.getCode(libNetworkAddr)).length < 3 ) { - utils.traceHeader(`Deploying '${key}'...`) - const libInitCode = artifact.toJSON().bytecode - const libAddr = await deployer.determineAddr.call(libInitCode, "0x0", { from }) - console.info(" ", "> account: ", from) - console.info(" ", "> balance: ", web3.utils.fromWei(await web3.eth.getBalance(from), "ether"), "ETH") - const tx = await deployer.deploy(libInitCode, "0x0", { from }) - utils.traceTx(tx) - if ((await web3.eth.getCode(libAddr)).length > 3) { - addresses[network][key] = libAddr + if (libTargetCode.length < 3) { + utils.traceHeader(`Deploying '${impl}'...`) + utils.traceTx(await deployer.deploy(libInitCode, "0x0", { from })) + if ((await web3.eth.getCode(libTargetAddr)).length < 3) { + console.info(`Error: Library was not deployed on expected address: ${libTargetAddr}`) + process.exit(1) + } } else { - console.info(`Error: Library was not deployed on expected address: ${libAddr}`) - process.exit(1) + utils.traceHeader(`Recovered '${impl}'`) } - if (!utils.isDryRun(network)) { + addresses[network].libs[impl] = libTargetAddr + libNetworkAddr = libTargetAddr + // if (!utils.isDryRun(network)) { await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - } + // } + } else { + utils.traceHeader(`Deployed '${impl}'`) + } + libImplArtifact.address = utils.getNetworkLibsArtifactAddress(network, addresses, impl) + if (libTargetAddr !== libNetworkAddr) { + console.info(" ", "> library address: \x1b[96m", libImplArtifact.address, `\x1b[0m!== \x1b[30;43m${libTargetAddr}\x1b[0m`) } else { - utils.traceHeader(`Skipped '${key}'`) + console.info(" ", "> library address: \x1b[96m", libImplArtifact.address, "\x1b[0m") } - artifact.address = addresses[network][key] - console.info(" ", "> library address: ", artifact.address) - console.info(" ", "> library codehash: ", web3.utils.soliditySha3(await web3.eth.getCode(artifact.address))) console.info() } } diff --git a/migrations/scripts/3_core.js b/migrations/scripts/3_core.js deleted file mode 100644 index e28a36bb..00000000 --- a/migrations/scripts/3_core.js +++ /dev/null @@ -1,182 +0,0 @@ -const ethUtils = require("ethereumjs-util") -const settings = require("../../settings") -const utils = require("../../src/utils") -const version = `${ - require("../../package").version -}-${ - require("child_process").execSync("git rev-parse HEAD").toString().trim().substring(0, 7) -}` - -const WitnetDeployer = artifacts.require("WitnetDeployer") - -module.exports = async function (_, network, [, from]) { - const specs = settings.getSpecs(network) - const targets = settings.getArtifacts(network) - - // ========================================================================== - // --- WitOracleRadonRegistry core implementation --------------------------- - - await deploy({ - network, - targets, - from: utils.isDryRun(network) ? from : specs.WitOracleRadonRegistry.from || from, - key: targets.WitOracleRadonRegistry, - libs: specs.WitOracleRadonRegistry.libs, - immutables: specs.WitOracleRadonRegistry.immutables, - intrinsics: { - types: ["bool", "bytes32"], - values: [ - /* _upgradable */ true, - /* _versionTag */ utils.fromAscii(version), - ], - }, - }) - - // ========================================================================== - // --- WitOracleRequestFactory core implementation ----------------------------- - - await deploy({ - network, - targets, - from: utils.isDryRun(network) ? from : specs.WitOracleRequestFactory.from || from, - key: targets.WitOracleRequestFactory, - libs: specs.WitOracleRequestFactory.libs, - immutables: specs.WitOracleRequestFactory.immutables, - intrinsics: { - types: ["address", "bool", "bytes32"], - values: [ - /* _witOracle */ await determineProxyAddr(from, specs.WitOracle?.vanity || 3), - /* _upgradable */ true, - /* _versionTag */ utils.fromAscii(version), - ], - }, - }) - - // ========================================================================== - // --- WitOracle core implementation --------------------------------- - - await deploy({ - network, - targets, - from: utils.isDryRun(network) ? from : specs.WitOracle.from || from, - key: targets.WitOracle, - libs: specs.WitOracle.libs, - immutables: specs.WitOracle.immutables, - intrinsics: { - types: ["address", "address", "bool", "bytes32"], - values: [ - /* _registry */ await determineProxyAddr(from, specs.WitOracleRadonRegistry?.vanity || 1), - /* _factory */ await determineProxyAddr(from, specs.WitOracleRequestFactory?.vanity || 2), - /* _upgradable */ true, - /* _versionTag */ utils.fromAscii(version), - ], - }, - }) - - // ========================================================================== - // --- WitPriceFeeds core implementation --------------------------------- - - await deploy({ - network, - targets, - from: utils.isDryRun(network) ? from : specs.WitPriceFeeds.from || from, - key: targets.WitPriceFeeds, - libs: specs.WitPriceFeeds.libs, - immutables: specs.WitPriceFeeds.immutables, - intrinsics: { - types: ["address", "bool", "bytes32"], - values: [ - /* _witOracle */ await determineProxyAddr(from, specs.WitOracle?.vanity || 3), - /* _upgradable */ true, - /* _versionTag */ utils.fromAscii(version), - ], - }, - }) -} - -async function deploy (specs) { - const { from, key, libs, intrinsics, immutables, network, targets } = specs - - const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - if (!addresses[network]) addresses[network] = {} - - const selection = utils.getWitnetArtifactsFromArgs() - - const contract = artifacts.require(key) - if ( - utils.isNullAddress(addresses[network][key]) || - (await web3.eth.getCode(addresses[network][key])).length < 3 || - selection.includes(key) || - (libs && selection.filter(item => libs.includes(item)).length > 0) - ) { - utils.traceHeader(`Deploying '${key}'...`) - console.info(" ", "> account: ", from) - console.info(" ", "> balance: ", web3.utils.fromWei(await web3.eth.getBalance(from), "ether"), "ETH") - const deployer = await WitnetDeployer.deployed() - let { types, values } = intrinsics - if (immutables?.types) types = [...types, ...immutables.types] - if (immutables?.values) values = [...values, ...immutables.values] - const constructorArgs = web3.eth.abi.encodeParameters(types, values) - if (constructorArgs.length > 2) { - console.info(" ", "> constructor types:", JSON.stringify(types)) - console.info(" ", "> constructor args: ", constructorArgs.slice(2)) - } - const coreBytecode = link(contract.toJSON().bytecode, libs, targets) - if (coreBytecode.indexOf("__") > -1) { - console.info(coreBytecode) - console.info("Error: Cannot deploy due to some missing libs") - process.exit(1) - } - const coreInitCode = coreBytecode + constructorArgs.slice(2) - const coreAddr = await deployer.determineAddr.call(coreInitCode, "0x0", { from }) - const tx = await deployer.deploy(coreInitCode, "0x0", { from }) - utils.traceTx(tx) - if ((await web3.eth.getCode(coreAddr)).length > 3) { - addresses[network][key] = coreAddr - } else { - console.info(`Error: Contract was not deployed on expected address: ${coreAddr}`) - process.exit(1) - } - // save addresses file if required - if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - const args = await utils.readJsonFromFile("./migrations/constructorArgs.json") - if (!args?.default[key] || constructorArgs.slice(2) !== args.default[key]) { - if (!args[network]) args[network] = {} - args[network][key] = constructorArgs.slice(2) - await utils.overwriteJsonFile("./migrations/constructorArgs.json", args) - } - } - } else { - utils.traceHeader(`Skipped '${key}'`) - } - contract.address = addresses[network][key] - for (const index in libs) { - const libname = libs[index] - const lib = artifacts.require(libname) - contract.link(lib) - console.info(" ", "> external library: ", `${libname}@${lib.address}`) - }; - console.info(" ", "> contract address: ", contract.address) - console.info(" ", "> contract codehash:", web3.utils.soliditySha3(await web3.eth.getCode(contract.address))) - console.info() - return contract -} - -async function determineProxyAddr (from, nonce) { - const salt = nonce ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(nonce), 32).toString("hex") : "0x0" - const deployer = await WitnetDeployer.deployed() - return await deployer.determineProxyAddr.call(salt, { from }) -} - -function link (bytecode, libs, targets) { - if (libs && Array.isArray(libs) && libs.length > 0) { - for (const index in libs) { - const key = targets[libs[index]] - const lib = artifacts.require(key) - bytecode = bytecode.replaceAll(`__${key}${"_".repeat(38 - key.length)}`, lib.address.slice(2)) - console.info(" ", `> linked library: ${key} => ${lib.address}`) - } - } - return bytecode -} diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js new file mode 100644 index 00000000..fe63444e --- /dev/null +++ b/migrations/scripts/3_framework.js @@ -0,0 +1,404 @@ +const ethUtils = require("ethereumjs-util") +const merge = require("lodash.merge") +const settings = require("../../settings") +const utils = require("../../src/utils") +const version = `${ + require("../../package").version +}-${ + require("child_process").execSync("git rev-parse HEAD").toString().trim().substring(0, 7) +}` + +const selection = utils.getWitnetArtifactsFromArgs(); + +const WitnetDeployer = artifacts.require("WitnetDeployer") +const WitnetProxy = artifacts.require("WitnetProxy") + +module.exports = async function (_, network, [, from, reporter, curator, ]) { + + const addresses = await utils.readJsonFromFile("./migrations/addresses.json"); + const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json"); + if (!constructorArgs[network]) constructorArgs[network] = {} + + const networkArtifacts = settings.getArtifacts(network) + const networkSpecs = settings.getSpecs(network) + + // Settle the order in which (some of the) framework artifacts must be deployed first + const framework = { + core: merge(Object.keys(networkArtifacts.core), [ "WitOracleRadonRegistry", "WitOracle", ], ), + apps: merge(Object.keys(networkArtifacts.apps), [], ), + }; + + // Settle WitOracle as first dependency on all Wit/oracle appliances + framework.apps.map(appliance => { + networkSpecs[appliance].baseDeps = merge([], networkSpecs[appliance]?.baseDeps, [ "WitOracle", ]) + }); + + // Settle network-specific initialization params, if any... + networkSpecs.WitOracle.mutables = merge(networkSpecs.WitOracle?.mutables, { + types: [ "address[]", ], values: [ [ reporter, ] ], + }); + networkSpecs.WitRandomness.mutables = merge(networkSpecs.WitRandomness?.mutables, { + types: [ "address", ], values: [ curator ], + }); + + // Loop on framework domains ... + for (domain in framework) { + if (!addresses[network][domain]) addresses[network][domain] = {} + + // Loop on domain artifacts ... + for (const index in framework[domain]) { + const base = framework[domain][index] + const impl = networkArtifacts[domain][base] + + if (impl.indexOf(base) < 0) { + console.error(`Mismatching inheriting artifact names on settings/artifacts.js: ${base} 0) { + console.info(" ", "> constructor types: \x1b[90m", targetSpecs.constructorArgs.types, "\x1b[0m") + utils.traceData(" > constructor values: ", encodeCoreTargetConstructorArgs(targetSpecs).slice(2), 64, "\x1b[90m") + } + await deployCoreTarget(impl, targetSpecs, networkArtifacts) + // save constructor args + constructorArgs[network][impl] = encodeCoreTargetConstructorArgs(targetSpecs).slice(2) + await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) + } + + if (targetSpecs.isUpgradable) { + + if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { + // a proxy address with deployed code is found in the addresses file... + const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) + if ( + proxyImplAddr === targetAddr || + utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") + ) { + implArtifact.address = targetAddr + + } else { + implArtifact.address = proxyImplAddr + } + + } else { + targetBaseAddr = await deployCoreBase(targetSpecs, targetAddr) + implArtifact.address = targetAddr + // save new proxy address in file + addresses[network][domain][base] = targetBaseAddr + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + } + baseArtifact.address = targetBaseAddr + + // link implementation artifact to external libs so it can get eventually verified + for (const index in targetSpecs?.baseLibs) { + const libArtifact = artifacts.require(networkArtifacts.libs[targetSpecs.baseLibs[index]]) + implArtifact.link(libArtifact) + }; + + // determines whether a new implementation is available, and ask the user to upgrade the proxy if so: + let upgradeProxy = targetAddr !== await getProxyImplementation(targetSpecs.from, targetBaseAddr) + if (upgradeProxy) { + const target = await implArtifact.at(targetAddr) + const targetVersion = await target.version.call({ from: targetSpecs.from }) + const targetGithubTag = targetVersion.slice(-7) + const legacy = await implArtifact.at(targetBaseAddr) + const legacyVersion = await target.version.call({ from: targetSpecs.from }) + const legacyGithubTag = legacyVersion.slice(-7) + + if (targetGithubTag === legacyGithubTag && network !== "develop") { + console.info(` > \x1b[41mPlease, commit your latest changes before upgrading.\x1b[0m`) + upgradeProxy = false + + } else if (!selection.includes(base) && !process.argv.includes("--upgrade-all") && network !== "develop") { + const targetClass = await target.class.call({ from: targetSpecs.from}) + const legacyClass = await legacy.class.call({ from: targetSpecs.from}) + if (legacyClass !== targetClass || legacyVersion !== targetVersion) { + upgradeProxy = ["y", "yes", ].includes((await + utils.prompt(` > Upgrade artifact from ${legacyClass}:${legacyVersion} to \x1b[1;39m${targetClass}:${targetVersion}\x1b[0m? (y/N) `) + )) + } else { + const legacyCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(legacy.address)) + const targetCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(target.address)) + if (legacyCodeHash !== targetCodeHash) { + upgradeProxy = ["y", "yes", ].includes((await + utils.prompt(` > Upgrade artifact to \x1b[1;39mlatest compilation of v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) `) + )) + } + } + + } else { + upgradeProxy = selection.includes(base) || process.argv.includes("--upgrade-all") + } + } + if (upgradeProxy) { + utils.traceHeader(`Upgrading '${base}'...`) + await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) + + } else { + utils.traceHeader(`Upgradable '${base}'`) + } + + if (implArtifact.address !== targetAddr) { + console.info(" ", "> contract address: \x1b[96m", baseArtifact.address, "\x1b[0m") + console.info(" ", " \x1b[96m -->\x1b[36m", implArtifact.address, "!==", `\x1b[30;43m${targetAddr}\x1b[0m`) + + } else { + console.info(" ", "> contract address: \x1b[96m", + baseArtifact.address, "-->\x1b[36m", + implArtifact.address, "\x1b[0m" + ); + } + + } else { + utils.traceHeader(`Immutable '${base}'`) + // if (targetCode.length > 3) { + // // if not deployed during this migration, and artifact required constructor args... + // if (targetSpecs?.constructorArgs?.types.length > 0) { + // console.info(" ", "> constructor types: \x1b[90m", targetSpecs.constructorArgs.types, "\x1b[0m") + // utils.traceData(" > constructor values: ", constructorArgs[network][impl], 64, "\x1b[90m") + // } + // } + if (selection.includes(impl) || utils.isNullAddress(targetBaseAddr) || (await web3.eth.getCode(targetBaseAddr)).length < 3) { + baseArtifact.address = targetAddr + implArtifact.address = targetAddr + if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { + console.info(" ", "> contract address: \x1b[36m", targetBaseAddr, "\x1b[0m==>", `\x1b[96m${targetAddr}\x1b[0m`) + } else { + console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") + } + + } else { + baseArtifact.address = targetBaseAddr + implArtifact.address = targetBaseAddr + if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { + console.info(" ", "> contract address: \x1b[96m", targetBaseAddr, "\x1b[0m!==", `\x1b[41m${targetAddr}\x1b[0m`) + } else { + console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") + } + } + addresses[network][domain][base] = baseArtifact.address + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + } + const core = await implArtifact.at(baseArtifact.address) + try { + console.info(" ", "> contract curator: \x1b[95m", await core.owner.call({ from }), "\x1b[0m") + } catch {} + console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") + if (targetSpecs.isUpgradable) { + const coreVersion = await core.version.call({ from }) + const nextCore = await implArtifact.at(targetAddr) + const nextCoreVersion = await nextCore.version.call({ from }) + if (implArtifact.address !== targetAddr && coreVersion !== nextCoreVersion) { + console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m!==", `\x1b[33m${nextCoreVersion}\x1b[0m`) + + } else { + console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m") + } + } + console.info(" ", "> contract specs: ", await core.specs.call({ from }), "\x1b[0m") + console.info() + } + } +} +async function deployCoreBase (targetSpecs, targetAddr) { + const deployer = await WitnetDeployer.deployed() + const proxyInitArgs = targetSpecs.mutables + const proxySalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") + const proxyAddr = await deployer.determineProxyAddr.call(proxySalt, { from: targetSpecs.from }) + if ((await web3.eth.getCode(proxyAddr)).length < 3) { + // if no contract is yet deployed on the expected address + // proxify to last deployed implementation, and initialize it: + utils.traceHeader(`Deploying new 'WitnetProxy'...`) + const initdata = proxyInitArgs ? web3.eth.abi.encodeParameters(proxyInitArgs.types, proxyInitArgs.values) : "0x" + if (initdata.length > 2) { + console.info(" ", "> initdata types: \x1b[90m", proxyInitArgs.types, "\x1b[0m") + utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") + } + utils.traceTx(await deployer.proxify(proxySalt, targetAddr, initdata, { from: targetSpecs.from })) + } + if ((await web3.eth.getCode(proxyAddr)).length < 3) { + console.error(`Error: WitnetProxy was not deployed on the expected address: ${proxyAddr}`) + process.exit(1) + } + return proxyAddr +} + +async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { + const initdata = targetSpecs.mutables?.types ? web3.eth.abi.encodeParameters(targetSpecs.mutables.types, targetSpecs.mutables.values) : "0x" + if (initdata.length > 2) { + console.info(" ", "> initdata types: \x1b[90m", targetSpecs.mutables.types, "\x1b[0m") + utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") + } + const proxy = await WitnetProxy.at(proxyAddr) + utils.traceTx(await proxy.upgradeTo(targetAddr, initdata, { from: targetSpecs.from })) + return proxyAddr +} + + +async function deployCoreTarget (target, targetSpecs, networkArtifacts) { + const deployer = await WitnetDeployer.deployed() + console.log(target, targetSpecs) + const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) + const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") + const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) + utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) + if ((await web3.eth.getCode(targetAddr)).length <= 3) { + console.error(`Error: Contract ${target} was not deployed on the expected address: ${targetAddr}`) + process.exit(1) + } + return targetAddr +} + +async function determineCoreTargetAddr(target, targetSpecs, networkArtifacts) { + const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) + const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") + return (await WitnetDeployer.deployed()).determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) +} + +async function determineProxyAddr (from, nonce) { + const salt = nonce ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(nonce), 32).toString("hex") : "0x0" + const deployer = await WitnetDeployer.deployed() + return await deployer.determineProxyAddr.call(salt, { from }) +} + +function encodeCoreTargetConstructorArgs(targetSpecs) { + return web3.eth.abi.encodeParameters(targetSpecs.constructorArgs.types, targetSpecs.constructorArgs.values) +} + +function encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) { + // extract bytecode from target's artifact, replacing lib references to actual addresses + const targetCode = linkBaseLibs( + artifacts.require(target).toJSON().bytecode, + targetSpecs.baseLibs, + networkArtifacts + ) + if (targetCode.indexOf("__") > -1) { + console.info(targetCode) + console.error( + `Error: artifact ${target} depends on library`, + targetCode.substring(targetCode.indexOf("__"), 42), + "which is not known or has not been deployed." + ); + process.exit(1) + } + const targetConstructorArgsEncoded = encodeCoreTargetConstructorArgs(targetSpecs) + return targetCode + targetConstructorArgsEncoded.slice(2) +} + +async function getProxyImplementation (from, proxyAddr) { + const proxy = await WitnetProxy.at(proxyAddr) + return await proxy.implementation.call({ from }) +} + +function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { + if (baseLibs && Array.isArray(baseLibs)) { + for (const index in baseLibs) { + const base = baseLibs[index] + const impl = networkArtifacts.libs[base] + const lib = artifacts.require(impl) + bytecode = bytecode.replaceAll(`__${impl}${"_".repeat(38 - impl.length)}`, lib.address.slice(2)) + } + } + return bytecode +} + +async function unfoldCoreTargetSpecs(domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { + if (!ancestors) ancestors = []; + else if (ancestors.includes(targetBase)) { + console.error(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`, ) + process.exit(1) + } + const specs = { + baseDeps: [], + baseLibs: [], + from, + mutables: { types: [], values: [], }, + immutables: { types: [], values: [], }, + intrinsics: { types: [], values: [], }, + isUpgradable: utils.isUpgradableArtifact(target), + vanity: networkSpecs[targetBase]?.vanity || 0, + }; + // Iterate inheritance tree from `base` to `impl` as to settle deployment specs + target.split(/(?=[A-Z])/).reduce((split, part) => { + split = split + part + if (split.indexOf(targetBase) > -1) { + specs.baseDeps = merge(specs.baseDeps, networkSpecs[split]?.baseDeps); + specs.baseLibs = merge(specs.baseLibs, networkSpecs[split]?.baseLibs); + if (networkSpecs[split]?.from && !utils.isDryRun(network)) { + specs.from = networkSpecs[split].from + } + if (networkSpecs[split]?.vanity && !utils.isUpgradableArtifact(target)) { + specs.vanity = networkSpecs[split].vanity + } + if (networkSpecs[split]?.immutables) { + specs.immutables.types.push(...networkSpecs[split]?.immutables.types); + specs.immutables.values.push(...networkSpecs[split]?.immutables.values); + } + if (networkSpecs[split]?.mutables) { + specs.mutables.types.push(...networkSpecs[split]?.mutables.types); + specs.mutables.values.push(...networkSpecs[split]?.mutables.values); + } + } + return split + }) + if (specs.baseDeps.length > 0) { + // Iterate specs.baseDeps as to add deterministic addresses as first intrinsical constructor args + specs.intrinsics.types.push(...new Array(specs.baseDeps.length).fill("address")); + for (const index in specs.baseDeps) { + const depsBase = specs.baseDeps[index] + const depsImpl = networkArtifacts.core[depsBase] + if (utils.isUpgradableArtifact(depsImpl)) { + const depsVanity = networkSpecs[depsBase]?.vanity || Object.keys(networkArtifacts[domain]).indexOf(depsBase); + const depsProxySalt = depsVanity ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(depsVanity), 32).toString("hex") : "0x0" + specs.intrinsics.values.push(await determineProxyAddr(specs.from, depsProxySalt)); + + } else { + const depsImplSpecs = await unfoldCoreTargetSpecs(domain, depsImpl, depsBase, specs.from, network, networkArtifacts, networkSpecs, [...ancestors, targetBase]) + const depsImplAddr = await determineCoreTargetAddr(depsImpl, depsImplSpecs, networkArtifacts) + specs.intrinsics.values.push(depsImplAddr); + } + } + } + if (specs.isUpgradable) { + // Add version tag to intrinsical constructor args if target artifact is expected to be upgradable + specs.intrinsics.types.push("bytes32"); + specs.intrinsics.values.push(utils.fromAscii(version)); + if (target.indexOf("Trustable") < 0) { + // Add _upgradable constructor args on non-trustable (ergo trustless) but yet upgradable targets + specs.intrinsics.types.push("bool"); + specs.intrinsics.values.push(true); + } + } + specs.constructorArgs = { + types: specs?.immutables?.types || [], + values: specs?.immutables?.values || [], + } + if (specs?.intrinsics) { + specs.constructorArgs.types.push(...specs.intrinsics.types); + specs.constructorArgs.values.push(...specs.intrinsics.values); + } + if (specs?.mutables && !specs.isUpgradable) { + specs.constructorArgs.types.push(...specs.mutables.types); + specs.constructorArgs.values.push(...specs.mutables.values); + } + return specs +} diff --git a/migrations/scripts/4_proxies.js b/migrations/scripts/4_proxies.js deleted file mode 100644 index 96ff0e0c..00000000 --- a/migrations/scripts/4_proxies.js +++ /dev/null @@ -1,151 +0,0 @@ -const ethUtils = require("ethereumjs-util") -const merge = require("lodash.merge") -const settings = require("../../settings") -const utils = require("../../src/utils") - -const version = `${ - require("../../package").version -}-${ - require("child_process").execSync("git rev-parse HEAD").toString().trim().substring(0, 7) -}` - -const WitnetDeployer = artifacts.require("WitnetDeployer") -const WitnetProxy = artifacts.require("WitnetProxy") - -module.exports = async function (_, network, [, from, reporter]) { - const targets = settings.getArtifacts(network) - const specs = settings.getSpecs(network) - - const singletons = [ - "WitOracleRadonRegistry", - "WitOracle", - "WitOracleRequestFactory", - "WitPriceFeeds", - ] - - // inject `reporter` within array of addresses as first initialization args - specs.WitOracle.mutables = merge({ - types: ["address[]"], - values: [[reporter]], - }, specs.WitOracle.mutables - ) - - // Deploy/upgrade singleton proxies, if required - for (const index in singletons) { - const key = singletons[index] - await deploy({ - network, - specs, - targets, - key, - from: utils.isDryRun(network) ? from : specs[key].from || from, - }) - } -} - -async function deploy (target) { - const { from, key, network, specs, targets } = target - - const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - if (!addresses[network]) addresses[network] = {} - - const mutables = specs[key].mutables - const proxy = artifacts.require(key) - const proxySalt = specs[key].vanity - ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(specs[key].vanity), 32).toString("hex") - : "0x0" - - let proxyAddr = addresses[network][key] || addresses?.default[key] || "" - if (utils.isNullAddress(proxyAddr) || (await web3.eth.getCode(proxyAddr)).length < 3) { - utils.traceHeader(`Deploying '${key}'...`) - console.info(" ", "> account: ", from) - console.info(" ", "> balance: ", web3.utils.fromWei(await web3.eth.getBalance(from), "ether"), "ETH") - const deployer = await WitnetDeployer.deployed() - const impl = await artifacts.require(targets[key]).deployed() - proxyAddr = await deployer.determineProxyAddr.call(proxySalt, { from }) - if ((await web3.eth.getCode(proxyAddr)).length < 3) { - const initdata = mutables ? web3.eth.abi.encodeParameters(mutables.types, mutables.values) : "0x" - if (initdata.length > 2) { - console.info(" ", "> initialize types: ", mutables.types) - console.info(" ", "> initialize params:", mutables.values) - } - const tx = await deployer.proxify(proxySalt, impl.address, initdata, { from }) - utils.traceTx(tx) - } else { - try { - const oldImplAddr = await getProxyImplementation(from, proxyAddr) - const oldImpl = await artifacts.require(targets[key]).at(oldImplAddr) - const oldClass = await oldImpl.class.call({ from }) - const newClass = await impl.class.call({ from }) - if (oldClass !== newClass) { - console.info(`Error: proxy address already taken ("${oldClass}" != "${newClass}")`) - process.exit(1) - } else { - console.info(" ", `> recovered proxy address on class "${oldClass}" ;-)`) - } - } catch (ex) { - console.info("Error: cannot check proxy recoverability:", ex) - } - } - if ((await web3.eth.getCode(proxyAddr)).length > 3) { - if (proxyAddr !== addresses?.default[key]) { - addresses[network][key] = proxyAddr - if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - } - } - } else { - console.info(`Error: Contract was not deployed on expected address: ${proxyAddr}`) - process.exit(1) - } - } else { - const oldAddr = await getProxyImplementation(from, proxyAddr) - const newImpl = await artifacts.require(targets[key]).deployed() - if (oldAddr !== newImpl.address) { - utils.traceHeader(`Upgrading '${key}'...`) - const newVersion = await newImpl.version.call({ from }) - const color = newVersion === version ? "\x1b[1;97m" : "\x1b[93m" - if ( - (process.argv.length >= 3 && process.argv[2].includes("--upgrade-all")) || ( - ["y", "yes"].includes((await - utils.prompt(` > Upgrade to ${color}${targets[key]} v${newVersion}\x1b[0m? (y/N) `) - ).toLowerCase().trim()) - ) - ) { - const initdata = mutables ? web3.eth.abi.encodeParameters(mutables.types, mutables.values) : "0x" - if (initdata.length > 2) { - console.info(" ", "> initialize types: ", mutables.types) - console.info(" ", "> initialize params:", mutables.values) - } - try { - const tx = await upgradeProxyTo(from, proxyAddr, newImpl.address, initdata) - utils.traceTx(tx) - } catch (ex) { - console.error(" ", "> Exception:\n", ex) - } - } - } else { - utils.traceHeader(`Skipped '${key}'`) - } - } - proxy.address = proxyAddr - const impl = await artifacts.require(targets[key]).at(proxy.address) - console.info(" ", "> proxy address: ", impl.address) - console.info(" ", "> proxy codehash: ", web3.utils.soliditySha3(await web3.eth.getCode(impl.address))) - console.info(" ", "> proxy operator: ", await impl.owner.call({ from })) - console.info(" ", "> impl. address: ", await getProxyImplementation(from, proxy.address)) - console.info(" ", "> impl. class: ", await impl.class.call({ from })) - console.info(" ", "> impl. version: ", await impl.version.call({ from })) - console.info() - return proxy -} - -async function getProxyImplementation (from, proxyAddr) { - const proxy = await WitnetProxy.at(proxyAddr) - return await proxy.implementation.call({ from }) -} - -async function upgradeProxyTo (from, proxyAddr, implAddr, initData) { - const proxyContract = await WitnetProxy.at(proxyAddr) - return await proxyContract.upgradeTo(implAddr, initData, { from }) -} diff --git a/migrations/scripts/5_apps.js b/migrations/scripts/5_apps.js deleted file mode 100644 index 17202997..00000000 --- a/migrations/scripts/5_apps.js +++ /dev/null @@ -1,131 +0,0 @@ -const ethUtils = require("ethereumjs-util") -const settings = require("../../settings") -const utils = require("../../src/utils") - -const WitnetDeployer = artifacts.require("WitnetDeployer") - -module.exports = async function (_, network, [, from]) { - const specs = settings.getSpecs(network) - const targets = settings.getArtifacts(network) - - // Community appliances built on top of the Witnet Oracle are meant to be immutable, - // and therefore not upgradable. Appliances can only be deployed - // once all core Witnet Oracle artifacts get deployed and initialized. - - // ========================================================================== - // --- WitRandomnessV21 -------------------------------------------------- - - if (!process.argv.includes("--no-randomness")) { - await deploy({ - network, - targets, - from: utils.isDryRun(network) ? from : specs.WitRandomness.from || from, - key: "WitRandomness", - specs: specs.WitRandomness, - intrinsics: { - types: ["address", "address"], - values: [ - /* _witOracle */ await determineProxyAddr(from, specs.WitOracle?.vanity || 3), - /* _witOracleOperator */ utils.isDryRun(network) ? from : specs?.WitRandomness?.from || from, - ], - }, - }) - } -} - -async function deploy (target) { - const { from, key, intrinsics, network, specs, targets } = target - const { libs, immutables, vanity } = specs - const salt = vanity ? "0x" + utils.padLeft(vanity.toString(16), "0", 64) : "0x0" - - const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - if (!addresses[network]) addresses[network] = {} - - const selection = utils.getWitnetArtifactsFromArgs() - const artifact = artifacts.require(key) - const contract = artifacts.require(targets[key]) - if ( - (!utils.isNullAddress(addresses[network][targets[key]] || addresses?.default[targets[key]]) && - (await web3.eth.getCode(addresses[network][targets[key]] || addresses?.default[targets[key]])).length < 3) || - addresses[network][targets[key]] === "" || - selection.includes(targets[key]) - ) { - utils.traceHeader(`Deploying '${key}'...`) - console.info(" ", "> account: ", from) - console.info(" ", "> balance: ", web3.utils.fromWei(await web3.eth.getBalance(from), "ether"), "ETH") - const deployer = await WitnetDeployer.deployed() - let { types, values } = intrinsics - if (immutables?.types) types = [...types, ...immutables.types] - if (immutables?.values) values = [...values, ...immutables.values] - const constructorArgs = web3.eth.abi.encodeParameters(types, values) - if (constructorArgs.length > 2) { - console.info(" ", "> constructor types:", JSON.stringify(types)) - console.info(" ", "> constructor args: ", constructorArgs.slice(2)) - } - const bytecode = link(contract.toJSON().bytecode, libs, targets) - if (bytecode.indexOf("__") > -1) { - console.info(bytecode) - console.info("Error: Cannot deploy due to some missing libs") - process.exit(1) - } - const initCode = bytecode + constructorArgs.slice(2) - const addr = await deployer.determineAddr.call(initCode, salt, { from }) - const tx = await deployer.deploy(initCode, salt || "0x0", { from }) - utils.traceTx(tx) - if ((await web3.eth.getCode(addr)).length > 3) { - if (addr !== addresses?.default[targets[key]]) { - addresses[network][targets[key]] = addr - // save addresses file if required - if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - const args = await utils.readJsonFromFile("./migrations/constructorArgs.json") - if (!args?.default[targets[key]] || constructorArgs.slice(2) !== args.default[targets[key]]) { - if (!args[network]) args[network] = {} - args[network][targets[key]] = constructorArgs.slice(2) - await utils.overwriteJsonFile("./migrations/constructorArgs.json", args) - } - } - } - } else { - console.info(`Error: Contract was not deployed on expected address: ${addr}`) - process.exit(1) - } - } else { - utils.traceHeader(`Skipped '${key}'`) - } - if (!utils.isNullAddress(addresses[network][targets[key]]) || addresses?.default[targets[key]]) { - artifact.address = addresses[network][targets[key]] || addresses?.default[targets[key]] - contract.address = addresses[network][targets[key]] || addresses?.default[targets[key]] - for (const index in libs) { - const libname = libs[index] - const lib = artifacts.require(libname) - contract.link(lib) - console.info(" ", "> external library: ", `${libname}@${lib.address}`) - }; - const appliance = await artifact.deployed() - console.info(" ", "> appliance address: ", appliance.address) - console.info(" ", "> appliance class: ", await appliance.class({ from })) - console.info(" ", "> appliance codehash:", web3.utils.soliditySha3(await web3.eth.getCode(appliance.address))) - console.info(" ", "> appliance specs: ", await appliance.specs({ from })) - console.info() - } - return contract -} - -async function determineProxyAddr (from, nonce) { - const salt = nonce ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(nonce), 32).toString("hex") : "0x0" - const deployer = await WitnetDeployer.deployed() - return await deployer.determineProxyAddr.call(salt, { from }) -} - -function link (bytecode, libs, targets) { - if (libs && Array.isArray(libs) && libs.length > 0) { - for (const index in libs) { - const key = targets[libs[index]] - const lib = artifacts.require(key) - bytecode = bytecode.replaceAll(`__${key}${"_".repeat(38 - key.length)}`, lib.address.slice(2)) - console.info(" ", `> linked library: ${key} => ${lib.address}`) - } - } - return bytecode -} diff --git a/settings/artifacts.js b/settings/artifacts.js index a8f84e28..084def56 100644 --- a/settings/artifacts.js +++ b/settings/artifacts.js @@ -1,65 +1,65 @@ module.exports = { default: { WitnetDeployer: "WitnetDeployer", - WitOracle: "WitOracleTrustableDefault", - WitPriceFeeds: "WitPriceFeedsV21", - WitRandomness: "WitRandomnessV21", - WitOracleRadonRegistry: "WitOracleRadonRegistryDefault", - WitOracleRequestFactory: "WitOracleRequestFactoryDefault", - WitOracleRadonEncodingLib: "WitOracleRadonEncodingLib", - WitOracleResultErrorsLib: "WitOracleResultErrorsLib", - WitPriceFeedsLib: "WitPriceFeedsLib", - WitOracleDataLib: "WitOracleDataLib", + apps: { + WitPriceFeeds: "WitPriceFeedsUpgradable", + WitRandomness: "WitRandomnessV21", + }, + core: { + WitOracle: "WitOracleTrustableDefault", + WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableDefault", + WitOracleRequestFactory: "WitOracleRequestFactorUpgradableDefault", + }, + libs: { + WitOracleDataLib: "WitOracleDataLib", + WitOracleRadonEncodingLib: "WitOracleRadonEncodingLib", + WitOracleResultErrorsLib: "WitOracleResultErrorsLib", + WitPriceFeedsLib: "WitPriceFeedsLib", + }, + }, + "polygon:amoy": { + core: { + WitOracleRequestFactory: "WitOracleRequestFactoryDefaultV21" + } }, base: { - WitOracle: "WitOracleTrustableOvm2", + core: { WitOracle: "WitOracleTrustableOvm2", }, }, boba: { - WitOracle: "WitOracleTrustableOvm2", + core: { WitOracle: "WitOracleTrustableOvm2", }, }, - "conflux:core:testnet": { - WitnetDeployer: "WitnetDeployerCfxCore", - WitOracleRequestFactory: "WitOracleRequestFactoryCfxCore", - }, - "conflux:core:mainnet": { - WitnetDeployer: "WitnetDeployerCfxCore", - WitOracleRequestFactory: "WitOracleRequestFactoryCfxCore", + "conflux:core": { + WitnetDeployer: "WitnetDeployerConfluxCore", + core: { + WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore", + }, }, mantle: { - WitOracle: "WitOracleTrustableOvm2", + core: { WitOracle: "WitOracleTrustableOvm2", }, }, meter: { WitnetDeployer: "WitnetDeployerMeter", - WitOracleRequestFactory: "WitOracleRequestFactoryCfxCore", + core: { WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore", }, }, optimism: { - WitOracle: "WitOracleTrustableOvm2", - }, - "okx:x1:mainnet": { - WitOracleRadonRegistry: "WitOracleRadonRegistryNoSha256", + core: { WitOracle: "WitOracleTrustableOvm2", }, }, - "okx:x1:sepolia": { - WitOracleRadonRegistry: "WitOracleRadonRegistryNoSha256", + "okx:x1": { + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, }, - "polygon:zkevm:goerli": { - WitOracleRadonRegistry: "WitOracleRadonRegistryNoSha256", - }, - "polygon:zkevm:mainnet": { - WitOracleRadonRegistry: "WitOracleRadonRegistryNoSha256", + "polygon:zkevm": { + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, }, reef: { - WitOracle: "WitOracleTrustableReef", + core: { WitOracle: "WitOracleTrustableReef", }, }, scroll: { - WitOracleRadonRegistry: "WitOracleRadonRegistryNoSha256", - }, - "syscoin:rollux:testnet": { - WitOracle: "WitOracleTrustableOvm2", + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, }, - "syscoin:rollux:mainnet": { - WitOracle: "WitOracleTrustableOvm2", + "syscoin:rollux": { + core: { WitOracle: "WitOracleTrustableOvm2", }, }, ten: { - WitOracle: "WitOracleTrustableObscuro", + core: { WitOracle: "WitOracleTrustableObscuro", }, }, } diff --git a/settings/index.js b/settings/index.js index c6dfc08e..6d1920c1 100644 --- a/settings/index.js +++ b/settings/index.js @@ -7,20 +7,18 @@ const utils = require("../src/utils") module.exports = { getArtifacts: (network) => { - const [eco, net] = utils.getRealmNetworkFromString(network) - return merge( - artifacts.default, - artifacts[eco], - artifacts[net] - ) + let res = artifacts.default; + utils.getNetworkTagsFromString(network).forEach(net => { + res = merge(res, artifacts[net]) + }); + return res; }, getCompilers: (network) => { - const [eco, net] = utils.getRealmNetworkFromString(network) - return merge( - solidity.default, - solidity[eco], - solidity[net], - ) + let res = solidity.default; + utils.getNetworkTagsFromString(network).forEach(net => { + res = merge(res, solidity[net]) + }); + return res; }, getNetworks: () => { return Object.fromEntries(Object.entries(networks) @@ -38,12 +36,11 @@ module.exports = { ) }, getSpecs: (network) => { - const [eco, net] = utils.getRealmNetworkFromString(network) - return merge( - specs.default, - specs[eco], - specs[net] - ) + let res = specs.default; + utils.getNetworkTagsFromString(network).forEach(net => { + res = merge(res, specs[net]) + }); + return res; }, artifacts, solidity, diff --git a/settings/specs.js b/settings/specs.js index 2f7d865e..1e3225db 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -1,97 +1,59 @@ module.exports = { default: { WitOracle: { + baseDeps: [ + "WitOracleRadonRegistry", + ], + baseLibs: [ + "WitOracleDataLib", + "WitOracleResultErrorsLib", + ], immutables: { - types: ["uint256", "uint256", "uint256", "uint256"], + types: [ "(uint32, uint32, uint32, uint32)", ], values: [ - /* _reportResultGasBase */ 58282, - /* _reportResultWithCallbackGasBase */ 65273, - /* _reportResultWithCallbackRevertGasBase */ 69546, - /* _sstoreFromZeroGas */ 20000, + [ + /* _reportResultGasBase */ 58282, + /* _reportResultWithCallbackGasBase */ 65273, + /* _reportResultWithCallbackRevertGasBase */ 69546, + /* _sstoreFromZeroGas */ 20000, + ] ], }, - libs: ["WitOracleResultErrorsLib", "WitOracleDataLib"], vanity: 13710368043, // 0x77703aE126B971c9946d562F41Dd47071dA00777 }, - WitPriceFeeds: { - from: "0xF121b71715E71DDeD592F1125a06D4ED06F0694D", - libs: ["WitPriceFeedsLib"], - vanity: 1865150170, // 0x1111AbA2164AcdC6D291b08DfB374280035E1111 - }, - WitRandomness: { - from: "0xF121b71715E71DDeD592F1125a06D4ED06F0694D", - vanity: 1060132513, // 0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB + WitOracleTrustless: { + immutables: { + types: ["uint256", "uint256", ], + values: [ + /* _evmQueryAwaitingBlocks */ 16, + /* _evmQueryReportingStake */ "1000000000000000000", + ], + }, }, WitOracleRadonRegistry: { - libs: ["WitOracleRadonEncodingLib"], + baseLibs: [ + "WitOracleRadonEncodingLib", + ], vanity: 6765579443, // 0x000B61Fe075F545fd37767f40391658275900000 }, WitOracleRequestFactory: { + baseDeps: [ + "WitOracle", + ], vanity: 1240014136, // 0x000DB36997AF1F02209A6F995883B9B699900000 }, - }, - "conflux:core:mainnet": { - WitnetDeployer: { - from: "0x1169bf81ecf738d02fd8d3824dfe02153b334ef7", - }, - WitOracle: { - vanity: 3, - }, - WitPriceFeeds: { - from: "0x1169bf81ecf738d02fd8d3824dfe02153b334ef7", - vanity: 4, - }, - WitRandomness: { - from: "0x1169bf81ecf738d02fd8d3824dfe02153b334ef7", - vanity: 5, - }, - WitOracleRadonRegistry: { - vanity: 1, - }, - WitOracleRequestFactory: { - vanity: 2, - }, - }, - "conflux:core:testnet": { - WitnetDeployer: { - from: "0x1169Bf81ecf738d02fd8d3824dfe02153B334eF7", - }, - WitOracle: { - vanity: 3, - }, WitPriceFeeds: { - from: "0x1169Bf81ecf738d02fd8d3824dfe02153B334eF7", - vanity: 4, - }, - WitRandomness: { - from: "0x1169Bf81ecf738d02fd8d3824dfe02153B334eF7", - vanity: 5, - }, - WitOracleRadonRegistry: { - vanity: 1, - }, - WitOracleRequestFactory: { - vanity: 2, - }, - }, - meter: { - WitnetDeployer: { - from: "0xE169Bf81Ecf738d02fD8d3824DFe02153b334eF7", - }, - WitPriceFeeds: { - from: "0xE169Bf81Ecf738d02fD8d3824DFe02153b334eF7", + baseLibs: [ + "WitPriceFeedsLib", + ], + vanity: 1865150170, // 0x1111AbA2164AcdC6D291b08DfB374280035E1111 }, WitRandomness: { - from: "0xE169Bf81Ecf738d02fD8d3824DFe02153b334eF7", + vanity: 1060132513, // 0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB }, }, + reef: { - WitnetDeployer: { - from: "0xB309D64D6535E95eDBA9A899A8a8D11f1BEC9357", - }, - WitPriceFeeds: { - from: "0xB309D64D6535E95eDBA9A899A8a8D11f1BEC9357", - }, WitOracle: { immutables: { values: [ @@ -99,8 +61,5 @@ module.exports = { ], }, }, - WitRandomness: { - from: "0xB309D64D6535E95eDBA9A899A8a8D11f1BEC9357", - }, }, } diff --git a/src/utils.js b/src/utils.js index 90f8fb57..e7b366c5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -6,16 +6,24 @@ const readline = require("readline") module.exports = { fromAscii, + getNetworkAppsArtifactAddress, + getNetworkArtifactAddress, + getNetworkBaseArtifactAddress, + getNetworkCoreArtifactAddress, + getNetworkLibsArtifactAddress, + getNetworkTagsFromString, getRealmNetworkFromArgs, getRealmNetworkFromString, getWitnetArtifactsFromArgs, getWitnetRequestMethodString, isDryRun, isNullAddress, + isUpgradableArtifact, padLeft, prompt, readJsonFromFile, overwriteJsonFile, + traceData, traceHeader, traceTx, traceVerify, @@ -30,6 +38,71 @@ function fromAscii (str) { return "0x" + arr1.join("") } +function getNetworkAppsArtifactAddress(network, addresses, artifact) { + const tags = getNetworkTagsFromString(network) + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network]?.apps && addresses[network].apps[artifact]) { + return addresses[network].apps[artifact] + } + } + return addresses?.default?.apps[artifact] ?? "" +} + +function getNetworkBaseArtifactAddress(network, addresses, artifact) { + const tags = getNetworkTagsFromString(network) + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network][artifact]) { + return addresses[network][artifact] + } + } + return addresses?.default[artifact] ?? "" +} + +function getNetworkArtifactAddress(network, domain, addresses, artifact) { + const tags = getNetworkTagsFromString(network) + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network][domain] && addresses[network][domain][artifact]) { + return addresses[network][domain][artifact] + } + } + return addresses?.default?.core[artifact] ?? "" +} + +function getNetworkCoreArtifactAddress(network, addresses, artifact) { + const tags = getNetworkTagsFromString(network) + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network]?.core && addresses[network].core[artifact]) { + return addresses[network].core[artifact] + } + } + return addresses?.default?.core[artifact] ?? "" +} + +function getNetworkLibsArtifactAddress(network, addresses, artifact) { + const tags = getNetworkTagsFromString(network) + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network]?.libs && addresses[network].libs[artifact]) { + return addresses[network].libs[artifact] + } + } + return addresses?.default?.libs?.[artifact] ?? "" +} + +function getNetworkTagsFromString (network) { + network = network ? network.toLowerCase() : "development" + const tags = [] + const parts = network.split(":") + for (ix = 0; ix < parts.length; ix ++) { + tags.push(parts.slice(0, ix + 1).join(":")) + } + return tags +} + function getRealmNetworkFromArgs () { let networkString = process.env.WSB_DEFAULT_CHAIN || process.argv.includes("test") ? "test" : "development" // If a `--network` argument is provided, use that instead @@ -73,6 +146,14 @@ function getWitnetArtifactsFromArgs () { } return argv }) + if (selection.length == 0) { + process.argv[2]?.split(" ").map((argv, index, args) => { + if (argv === "--artifacts") { + selection = args[index + 1].split(",") + } + return argv + }) + } return selection }; @@ -86,6 +167,12 @@ function isNullAddress (addr) { addr === "0x0000000000000000000000000000000000000000" } +function isUpgradableArtifact(impl) { + return ( + impl.indexOf("Upgradable") > -1 || impl.indexOf("Trustable") > -1 + ); +} + function padLeft (str, char, size) { if (str.length < size) { return char.repeat((size - str.length) / char.length) + str @@ -128,6 +215,17 @@ async function overwriteJsonFile (filename, extra) { lockfile.unlockSync(filename) } +function traceData(header, data, width, color) { + process.stdout.write(header) + if (color) process.stdout.write(color); + for (let ix = 0; ix < data.length / width; ix ++) { + if (ix > 0) process.stdout.write(" ".repeat(header.length)) + process.stdout.write(data.slice(width * ix, width * (ix + 1))) + process.stdout.write("\n") + } + if (color) process.stdout.write("\x1b[0m") +} + function traceHeader (header) { console.log("") console.log(" ", header) @@ -135,16 +233,16 @@ function traceHeader (header) { } function traceTx (tx) { - console.info(" ", "> transaction hash: ", tx.receipt.transactionHash) - console.info(" ", "> gas used: ", tx.receipt.gasUsed.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")) + console.info(" ", "> EVM tx sender: \x1b[93m", tx.receipt.from, "\x1b[0m") + console.info(" ", "> EVM tx hash: \x1b[33m", tx.receipt.transactionHash.slice(2), "\x1b[0m") + console.info(" ", "> EVM tx gas used: ", `\x1b[33m${tx.receipt.gasUsed.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}\x1b[0m`) if (tx.receipt?.effectiveGasPrice) { - console.info(" ", "> gas price: ", tx.receipt.effectiveGasPrice / 10 ** 9, "gwei") - console.info(" ", "> total cost: ", parseFloat( - BigInt(tx.receipt.gasUsed) * - BigInt(tx.receipt.effectiveGasPrice) / - BigInt(10 ** 18) - ).toString(), - "ETH" + console.info(" ", "> EVM tx gas price: ", `\x1b[33m${tx.receipt.effectiveGasPrice / 10 ** 9}`, "gwei\x1b[0m") + console.info(" ", "> EVM tx total cost: ", `\x1b[33m${parseFloat( + (BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice)) + / BigInt(10 ** 18) + ).toString()}`, + "ETH\x1b[0m" ) } } From 0d73169f8f0c09c3c63ea78b5c8bb1755a2c8820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 09:10:00 +0200 Subject: [PATCH 16/62] fix(test): latest refactorings --- test/mocks/WitMockedPriceFeeds.sol | 6 +++--- test/mocks/WitMockedRadonRegistry.sol | 6 +++--- test/witOracleRadonRegistry.spec.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/mocks/WitMockedPriceFeeds.sol b/test/mocks/WitMockedPriceFeeds.sol index 416feb13..02ec2bef 100644 --- a/test/mocks/WitMockedPriceFeeds.sol +++ b/test/mocks/WitMockedPriceFeeds.sol @@ -4,16 +4,16 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; import "./WitMockedOracle.sol"; -import "../../contracts/apps/WitPriceFeedsV21.sol"; +import "../../contracts/apps/WitPriceFeedsUpgradable.sol"; /// @title Mocked implementation of `WitPriceFeeds`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. /// @dev ON SUPPORTED TESTNETS AND MAINNETS, PLEASE USE /// @dev THE `WitPriceFeeds` CONTRACT ADDRESS PROVIDED /// @dev BY THE WITNET FOUNDATION. -contract WitMockedPriceFeeds is WitPriceFeedsV21 { +contract WitMockedPriceFeeds is WitPriceFeedsUpgradable { constructor(WitMockedOracle _witOracle) - WitPriceFeedsV21( + WitPriceFeedsUpgradable( _witOracle, false, bytes32("mocked") diff --git a/test/mocks/WitMockedRadonRegistry.sol b/test/mocks/WitMockedRadonRegistry.sol index d1876651..b829094b 100644 --- a/test/mocks/WitMockedRadonRegistry.sol +++ b/test/mocks/WitMockedRadonRegistry.sol @@ -3,16 +3,16 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; -import "../../contracts/core/trustless/WitOracleRadonRegistryDefault.sol"; +import "../../contracts/core/trustless/WitOracleRadonRegistryBaseUpgradableDefault.sol"; /// @title Mocked implementation of `WitOracleRadonRegistry`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. /// @dev ON SUPPORTED TESTNETS AND MAINNETS, PLEASE USE /// @dev THE `WitOracleRadonRegistry` CONTRACT ADDRESS PROVIDED /// @dev BY THE WITNET FOUNDATION. -contract WitMockedRadonRegistry is WitOracleRadonRegistryDefault { +contract WitMockedRadonRegistry is WitOracleRadonRegistryBaseUpgradableDefault { constructor() - WitOracleRadonRegistryDefault( + WitOracleRadonRegistryBaseUpgradableDefault( false, bytes32("mocked") ) diff --git a/test/witOracleRadonRegistry.spec.js b/test/witOracleRadonRegistry.spec.js index b2231163..9d808812 100644 --- a/test/witOracleRadonRegistry.spec.js +++ b/test/witOracleRadonRegistry.spec.js @@ -3,7 +3,7 @@ import("chai") const utils = require("../src/utils") const { expectEvent, expectRevert } = require("@openzeppelin/test-helpers") -const WitOracleRadonRegistry = artifacts.require("WitOracleRadonRegistryDefault") +const WitOracleRadonRegistry = artifacts.require("WitOracleRadonRegistryUpgradableDefault") const WitOracleRadonEncodingLib = artifacts.require("WitOracleRadonEncodingLib") contract("WitOracleRadonRegistry", (accounts) => { From af672fb89e7a6b187f1f7e321a05aa3dc82d2c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 09:11:59 +0200 Subject: [PATCH 17/62] chore: revisit pnpm package deps lock --- pnpm-lock.yaml | 3482 ++++++++++++++++++++++++------------------------ 1 file changed, 1721 insertions(+), 1761 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3eb7ba20..79acdc95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,73 +1,102 @@ -lockfileVersion: 5.4 - -specifiers: - '@nomicfoundation/hardhat-verify': ^2.0.4 - '@openzeppelin/contracts': ^5.0.1 - '@openzeppelin/contracts-upgradeable': ^5.0.1 - '@openzeppelin/test-helpers': ~0.5.16 - ado-contracts: 1.0.0 - bn.js: ^4.11.0 - chai: ^5.1.0 - custom-error-test-helper: ^1.0.6 - dotenv: ^16.4.4 - eslint: ^8.56.0 - eslint-config-standard: ^17.1.0 - eslint-plugin-import: ^2.29.1 - eslint-plugin-n: ^16.6.2 - eslint-plugin-promise: ^6.1.1 - eth-gas-reporter: ^0.2.27 - eth-helpers: ^1.3.0 - hardhat: ^2.19.5 - lodash.merge: ^4.6.2 - nanoassert: ^2.0.0 - proper-lockfile: ^4.1.2 - sha3-wasm: ^1.0.0 - solhint: ^4.1.1 - truffle: ^5.11.5 - truffle-assertions: ^0.9.2 - truffle-flattener: ^1.6.0 - truffle-plugin-verify: ^0.6.7 - witnet-toolkit: ^2.0.1 +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false dependencies: - dotenv: 16.4.4 - lodash.merge: 4.6.2 - proper-lockfile: 4.1.2 + dotenv: + specifier: ^16.4.4 + version: 16.4.4 + lodash.merge: + specifier: ^4.6.2 + version: 4.6.2 + proper-lockfile: + specifier: ^4.1.2 + version: 4.1.2 devDependencies: - '@nomicfoundation/hardhat-verify': 2.0.4_hardhat@2.19.5 - '@openzeppelin/contracts': 5.0.1 - '@openzeppelin/contracts-upgradeable': 5.0.1_qffjc7vved4cgcgrp7e6uufd2e - '@openzeppelin/test-helpers': 0.5.16_bn.js@4.12.0 - ado-contracts: 1.0.0 - bn.js: 4.12.0 - chai: 5.1.0 - custom-error-test-helper: 1.0.6 - eslint: 8.56.0 - eslint-config-standard: 17.1.0_ot4howdeavqht6h5s42eunnfxi - eslint-plugin-import: 2.29.1_eslint@8.56.0 - eslint-plugin-n: 16.6.2_eslint@8.56.0 - eslint-plugin-promise: 6.1.1_eslint@8.56.0 - eth-gas-reporter: 0.2.27 - eth-helpers: 1.3.1 - hardhat: 2.19.5 - nanoassert: 2.0.0 - sha3-wasm: 1.0.0 - solhint: 4.1.1 - truffle: 5.11.5 - truffle-assertions: 0.9.2 - truffle-flattener: 1.6.0 - truffle-plugin-verify: 0.6.7 - witnet-toolkit: 2.0.1 + '@nomicfoundation/hardhat-verify': + specifier: ^2.0.4 + version: 2.0.4(hardhat@2.22.13) + '@openzeppelin/contracts': + specifier: ^5.0.1 + version: 5.1.0 + '@openzeppelin/contracts-upgradeable': + specifier: ^5.0.1 + version: 5.1.0(@openzeppelin/contracts@5.1.0) + '@openzeppelin/test-helpers': + specifier: ~0.5.16 + version: 0.5.16(bn.js@4.12.0) + ado-contracts: + specifier: 1.0.0 + version: 1.0.0 + bn.js: + specifier: ^4.11.0 + version: 4.12.0 + chai: + specifier: ^5.1.0 + version: 5.1.0 + custom-error-test-helper: + specifier: ^1.0.6 + version: 1.0.6 + eslint: + specifier: ^8.56.0 + version: 8.56.0 + eslint-config-standard: + specifier: ^17.1.0 + version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0) + eslint-plugin-import: + specifier: ^2.29.1 + version: 2.29.1(eslint@8.56.0) + eslint-plugin-n: + specifier: ^16.6.2 + version: 16.6.2(eslint@8.56.0) + eslint-plugin-promise: + specifier: ^6.1.1 + version: 6.1.1(eslint@8.56.0) + eth-gas-reporter: + specifier: ^0.2.27 + version: 0.2.27 + eth-helpers: + specifier: ^1.3.0 + version: 1.3.1 + hardhat: + specifier: ^2.22.2 + version: 2.22.13 + nanoassert: + specifier: ^2.0.0 + version: 2.0.0 + sha3-wasm: + specifier: ^1.0.0 + version: 1.0.0 + solhint: + specifier: ^4.1.1 + version: 4.1.1 + truffle: + specifier: ^5.11.5 + version: 5.11.5 + truffle-assertions: + specifier: ^0.9.2 + version: 0.9.2 + truffle-flattener: + specifier: ^1.6.0 + version: 1.6.0 + truffle-plugin-verify: + specifier: ^0.6.7 + version: 0.6.7 + witnet-toolkit: + specifier: ^2.0.1 + version: 2.0.1 packages: - /@aashutoshrathi/word-wrap/1.2.6: + /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} dev: true - /@apollo/protobufjs/1.2.6: + /@apollo/protobufjs@1.2.6: resolution: {integrity: sha512-Wqo1oSHNUj/jxmsVp4iR3I480p6qdqHikn38lKrFhfzcDJ7lwd7Ck7cHRl4JE81tWNArl77xhnG/OkZhxKBYOw==} hasBin: true requiresBuild: true @@ -88,7 +117,7 @@ packages: dev: true optional: true - /@apollo/protobufjs/1.2.7: + /@apollo/protobufjs@1.2.7: resolution: {integrity: sha512-Lahx5zntHPZia35myYDBRuF58tlwPskwHc5CWBZC/4bMKB6siTBWwtMrkqXcsNwQiFSzSx5hKdRPUmemrEp3Gg==} hasBin: true requiresBuild: true @@ -108,16 +137,18 @@ packages: dev: true optional: true - /@apollo/usage-reporting-protobuf/4.1.1: + /@apollo/usage-reporting-protobuf@4.1.1: resolution: {integrity: sha512-u40dIUePHaSKVshcedO7Wp+mPiZsaU6xjv9J+VyxpoU/zL6Jle+9zWeG98tr/+SZ0nZ4OXhrbb8SNr0rAPpIDA==} + requiresBuild: true dependencies: '@apollo/protobufjs': 1.2.7 dev: true optional: true - /@apollo/utils.dropunuseddefinitions/1.1.0_graphql@15.8.0: + /@apollo/utils.dropunuseddefinitions@1.1.0(graphql@15.8.0): resolution: {integrity: sha512-jU1XjMr6ec9pPoL+BFWzEPW7VHHulVdGKMkPAMiCigpVIT11VmCbnij0bWob8uS3ODJ65tZLYKAh/55vLw2rbg==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: @@ -125,22 +156,25 @@ packages: dev: true optional: true - /@apollo/utils.keyvaluecache/1.0.2: + /@apollo/utils.keyvaluecache@1.0.2: resolution: {integrity: sha512-p7PVdLPMnPzmXSQVEsy27cYEjVON+SH/Wb7COyW3rQN8+wJgT1nv9jZouYtztWW8ZgTkii5T6tC9qfoDREd4mg==} + requiresBuild: true dependencies: '@apollo/utils.logger': 1.0.1 lru-cache: 7.13.1 dev: true optional: true - /@apollo/utils.logger/1.0.1: + /@apollo/utils.logger@1.0.1: resolution: {integrity: sha512-XdlzoY7fYNK4OIcvMD2G94RoFZbzTQaNP0jozmqqMudmaGo2I/2Jx71xlDJ801mWA/mbYRihyaw6KJii7k5RVA==} + requiresBuild: true dev: true optional: true - /@apollo/utils.printwithreducedwhitespace/1.1.0_graphql@15.8.0: + /@apollo/utils.printwithreducedwhitespace@1.1.0(graphql@15.8.0): resolution: {integrity: sha512-GfFSkAv3n1toDZ4V6u2d7L4xMwLA+lv+6hqXicMN9KELSJ9yy9RzuEXaX73c/Ry+GzRsBy/fdSUGayGqdHfT2Q==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: @@ -148,9 +182,10 @@ packages: dev: true optional: true - /@apollo/utils.removealiases/1.0.0_graphql@15.8.0: + /@apollo/utils.removealiases@1.0.0(graphql@15.8.0): resolution: {integrity: sha512-6cM8sEOJW2LaGjL/0vHV0GtRaSekrPQR4DiywaApQlL9EdROASZU5PsQibe2MWeZCOhNrPRuHh4wDMwPsWTn8A==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: @@ -158,9 +193,10 @@ packages: dev: true optional: true - /@apollo/utils.sortast/1.1.0_graphql@15.8.0: + /@apollo/utils.sortast@1.1.0(graphql@15.8.0): resolution: {integrity: sha512-VPlTsmUnOwzPK5yGZENN069y6uUHgeiSlpEhRnLFYwYNoJHsuJq2vXVwIaSmts015WTPa2fpz1inkLYByeuRQA==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: @@ -169,9 +205,10 @@ packages: dev: true optional: true - /@apollo/utils.stripsensitiveliterals/1.2.0_graphql@15.8.0: + /@apollo/utils.stripsensitiveliterals@1.2.0(graphql@15.8.0): resolution: {integrity: sha512-E41rDUzkz/cdikM5147d8nfCFVKovXxKBcjvLEQ7bjZm/cg9zEcXvS6vFY8ugTubI3fn6zoqo0CyU8zT+BGP9w==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: @@ -179,25 +216,27 @@ packages: dev: true optional: true - /@apollo/utils.usagereporting/1.0.1_graphql@15.8.0: + /@apollo/utils.usagereporting@1.0.1(graphql@15.8.0): resolution: {integrity: sha512-6dk+0hZlnDbahDBB2mP/PZ5ybrtCJdLMbeNJD+TJpKyZmSY6bA3SjI8Cr2EM9QA+AdziywuWg+SgbWUF3/zQqQ==} engines: {node: '>=12.13.0'} + requiresBuild: true peerDependencies: graphql: 14.x || 15.x || 16.x dependencies: '@apollo/usage-reporting-protobuf': 4.1.1 - '@apollo/utils.dropunuseddefinitions': 1.1.0_graphql@15.8.0 - '@apollo/utils.printwithreducedwhitespace': 1.1.0_graphql@15.8.0 - '@apollo/utils.removealiases': 1.0.0_graphql@15.8.0 - '@apollo/utils.sortast': 1.1.0_graphql@15.8.0 - '@apollo/utils.stripsensitiveliterals': 1.2.0_graphql@15.8.0 + '@apollo/utils.dropunuseddefinitions': 1.1.0(graphql@15.8.0) + '@apollo/utils.printwithreducedwhitespace': 1.1.0(graphql@15.8.0) + '@apollo/utils.removealiases': 1.0.0(graphql@15.8.0) + '@apollo/utils.sortast': 1.1.0(graphql@15.8.0) + '@apollo/utils.stripsensitiveliterals': 1.2.0(graphql@15.8.0) graphql: 15.8.0 dev: true optional: true - /@apollographql/apollo-tools/0.5.4_graphql@15.8.0: + /@apollographql/apollo-tools@0.5.4(graphql@15.8.0): resolution: {integrity: sha512-shM3q7rUbNyXVVRkQJQseXv6bnYM3BUma/eZhwXR4xsuM+bqWnJKvW7SAfRjP7LuSCocrexa5AXhjjawNHrIlw==} engines: {node: '>=8', npm: '>=6'} + requiresBuild: true peerDependencies: graphql: ^14.2.1 || ^15.0.0 || ^16.0.0 dependencies: @@ -205,14 +244,15 @@ packages: dev: true optional: true - /@apollographql/graphql-playground-html/1.6.29: + /@apollographql/graphql-playground-html@1.6.29: resolution: {integrity: sha512-xCcXpoz52rI4ksJSdOCxeOCn2DLocxwHf9dVT/Q90Pte1LX+LY+91SFtJF3KXVHH8kEin+g1KKCQPKBjZJfWNA==} + requiresBuild: true dependencies: xss: 1.0.14 dev: true optional: true - /@babel/code-frame/7.23.5: + /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} dependencies: @@ -220,12 +260,12 @@ packages: chalk: 2.4.2 dev: true - /@babel/helper-validator-identifier/7.22.20: + /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} dev: true - /@babel/highlight/7.23.4: + /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} dependencies: @@ -234,50 +274,19 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/runtime/7.23.9: + /@babel/runtime@7.23.9: resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 dev: true - /@chainsafe/as-sha256/0.3.1: - resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==} - dev: true - - /@chainsafe/persistent-merkle-tree/0.4.2: - resolution: {integrity: sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - dev: true - - /@chainsafe/persistent-merkle-tree/0.5.0: - resolution: {integrity: sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - dev: true - - /@chainsafe/ssz/0.10.2: - resolution: {integrity: sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - '@chainsafe/persistent-merkle-tree': 0.5.0 - dev: true - - /@chainsafe/ssz/0.9.4: - resolution: {integrity: sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - '@chainsafe/persistent-merkle-tree': 0.4.2 - case: 1.6.3 - dev: true - - /@colors/colors/1.6.0: + /@colors/colors@1.6.0: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} dev: true - /@dabh/diagnostics/2.0.3: + /@dabh/diagnostics@2.0.3: resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} dependencies: colorspace: 1.1.4 @@ -285,7 +294,7 @@ packages: kuler: 2.0.0 dev: true - /@ensdomains/address-encoder/0.1.9: + /@ensdomains/address-encoder@0.1.9: resolution: {integrity: sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==} dependencies: bech32: 1.1.4 @@ -297,7 +306,7 @@ packages: ripemd160: 2.0.2 dev: true - /@ensdomains/ens/0.4.5: + /@ensdomains/ens@0.4.5: resolution: {integrity: sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==} deprecated: Please use @ensdomains/ens-contracts dependencies: @@ -308,7 +317,7 @@ packages: web3-utils: 1.10.4 dev: true - /@ensdomains/ensjs/2.1.0: + /@ensdomains/ensjs@2.1.0: resolution: {integrity: sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==} dependencies: '@babel/runtime': 7.23.9 @@ -324,12 +333,12 @@ packages: - utf-8-validate dev: true - /@ensdomains/resolver/0.2.4: + /@ensdomains/resolver@0.2.4: resolution: {integrity: sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==} deprecated: Please use @ensdomains/ens-contracts dev: true - /@eslint-community/eslint-utils/4.4.0_eslint@8.56.0: + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -339,17 +348,17 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp/4.10.0: + /@eslint-community/regexpp@4.10.0: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc/2.1.4: + /@eslint/eslintrc@2.1.4: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -361,46 +370,46 @@ packages: - supports-color dev: true - /@eslint/js/8.56.0: + /@eslint/js@8.56.0: resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@ethereumjs/common/2.5.0: + /@ethereumjs/common@2.5.0: resolution: {integrity: sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==} dependencies: crc-32: 1.2.2 ethereumjs-util: 7.1.5 dev: true - /@ethereumjs/common/2.6.5: + /@ethereumjs/common@2.6.5: resolution: {integrity: sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==} dependencies: crc-32: 1.2.2 ethereumjs-util: 7.1.5 dev: true - /@ethereumjs/rlp/4.0.1: + /@ethereumjs/rlp@4.0.1: resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} engines: {node: '>=14'} hasBin: true dev: true - /@ethereumjs/tx/3.3.2: + /@ethereumjs/tx@3.3.2: resolution: {integrity: sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==} dependencies: '@ethereumjs/common': 2.5.0 ethereumjs-util: 7.1.5 dev: true - /@ethereumjs/tx/3.5.2: + /@ethereumjs/tx@3.5.2: resolution: {integrity: sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==} dependencies: '@ethereumjs/common': 2.6.5 ethereumjs-util: 7.1.5 dev: true - /@ethereumjs/util/8.0.2: + /@ethereumjs/util@8.0.2: resolution: {integrity: sha512-b1Fcxmq+ckCdoLPhVIBkTcH8szigMapPuEmD8EDakvtI5Na5rzmX1sBW73YQqaPc7iUxGCAzZP1LrFQ7aEMugA==} engines: {node: '>=14'} dependencies: @@ -409,7 +418,7 @@ packages: ethereum-cryptography: 1.2.0 dev: true - /@ethereumjs/util/8.1.0: + /@ethereumjs/util@8.1.0: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} dependencies: @@ -418,7 +427,7 @@ packages: micro-ftch: 0.3.1 dev: true - /@ethersproject/abi/5.2.0: + /@ethersproject/abi@5.2.0: resolution: {integrity: sha512-24ExfHa0VbIOUHbB36b6lCVmWkaIVmrd9/m8MICtmSsRKzlugWqUD0B8g0zrRylXNxAOc3V6T4xKJ8jEDSvp3w==} dependencies: '@ethersproject/address': 5.7.0 @@ -432,7 +441,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/abi/5.7.0: + /@ethersproject/abi@5.7.0: resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} dependencies: '@ethersproject/address': 5.7.0 @@ -446,7 +455,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/abstract-provider/5.2.0: + /@ethersproject/abstract-provider@5.2.0: resolution: {integrity: sha512-Xi7Pt+CulRijc/vskBGIaYMEhafKjoNx8y4RNj/dnSpXHXScOJUSTtypqGBUngZddRbcwZGbHwEr6DZoKZwIZA==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -458,7 +467,7 @@ packages: '@ethersproject/web': 5.7.1 dev: true - /@ethersproject/abstract-provider/5.7.0: + /@ethersproject/abstract-provider@5.7.0: resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -470,7 +479,7 @@ packages: '@ethersproject/web': 5.7.1 dev: true - /@ethersproject/abstract-signer/5.2.0: + /@ethersproject/abstract-signer@5.2.0: resolution: {integrity: sha512-JTXzLUrtoxpOEq1ecH86U7tstkEa9POKAGbGBb+gicbjGgzYYkLR4/LD83SX2/JNWvtYyY8t5errt5ehiy1gxQ==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -480,7 +489,7 @@ packages: '@ethersproject/properties': 5.7.0 dev: true - /@ethersproject/abstract-signer/5.7.0: + /@ethersproject/abstract-signer@5.7.0: resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -490,7 +499,7 @@ packages: '@ethersproject/properties': 5.7.0 dev: true - /@ethersproject/address/5.2.0: + /@ethersproject/address@5.2.0: resolution: {integrity: sha512-2YfZlalWefOEfnr/CdqKRrgMgbKidYc+zG4/ilxSdcryZSux3eBU5/5btAT/hSiaHipUjd8UrWK8esCBHU6QNQ==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -500,7 +509,7 @@ packages: '@ethersproject/rlp': 5.7.0 dev: true - /@ethersproject/address/5.7.0: + /@ethersproject/address@5.7.0: resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -510,33 +519,33 @@ packages: '@ethersproject/rlp': 5.7.0 dev: true - /@ethersproject/base64/5.2.0: + /@ethersproject/base64@5.2.0: resolution: {integrity: sha512-D9wOvRE90QBI+yFsKMv0hnANiMzf40Xicq9JZbV9XYzh7srImmwmMcReU2wHjOs9FtEgSJo51Tt+sI1dKPYKDg==} dependencies: '@ethersproject/bytes': 5.7.0 dev: true - /@ethersproject/base64/5.7.0: + /@ethersproject/base64@5.7.0: resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} dependencies: '@ethersproject/bytes': 5.7.0 dev: true - /@ethersproject/basex/5.2.0: + /@ethersproject/basex@5.2.0: resolution: {integrity: sha512-Oo7oX7BmaHLY/8ZsOLI5W0mrSwPBb1iboosN17jfK/4vGAtKjAInDai9I72CzN4NRJaMN5FkFLoPYywGqgGHlg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/properties': 5.7.0 dev: true - /@ethersproject/basex/5.7.0: + /@ethersproject/basex@5.7.0: resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/properties': 5.7.0 dev: true - /@ethersproject/bignumber/5.2.0: + /@ethersproject/bignumber@5.2.0: resolution: {integrity: sha512-+MNQTxwV7GEiA4NH/i51UqQ+lY36O0rxPdV+0qzjFSySiyBlJpLk6aaa4UTvKmYWlI7YKZm6vuyCENeYn7qAOw==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -544,7 +553,7 @@ packages: bn.js: 4.12.0 dev: true - /@ethersproject/bignumber/5.7.0: + /@ethersproject/bignumber@5.7.0: resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -552,31 +561,31 @@ packages: bn.js: 5.2.1 dev: true - /@ethersproject/bytes/5.2.0: + /@ethersproject/bytes@5.2.0: resolution: {integrity: sha512-O1CRpvJDnRTB47vvW8vyqojUZxVookb4LJv/s06TotriU3Xje5WFvlvXJu1yTchtxTz9BbvJw0lFXKpyO6Dn7w==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/bytes/5.7.0: + /@ethersproject/bytes@5.7.0: resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/constants/5.2.0: + /@ethersproject/constants@5.2.0: resolution: {integrity: sha512-p+34YG0KbHS20NGdE+Ic0M6egzd7cDvcfoO9RpaAgyAYm3V5gJVqL7UynS87yCt6O6Nlx6wRFboPiM5ctAr+jA==} dependencies: '@ethersproject/bignumber': 5.7.0 dev: true - /@ethersproject/constants/5.7.0: + /@ethersproject/constants@5.7.0: resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} dependencies: '@ethersproject/bignumber': 5.7.0 dev: true - /@ethersproject/contracts/5.2.0: + /@ethersproject/contracts@5.2.0: resolution: {integrity: sha512-/2fg5tWPG6Z4pciEWpwGji3ggGA5j0ChVNF7NTmkOhvFrrJuWnRpzbvYA00nz8tBDNCOV3cwub5zfWRpgwYEJQ==} dependencies: '@ethersproject/abi': 5.7.0 @@ -591,7 +600,7 @@ packages: '@ethersproject/transactions': 5.7.0 dev: true - /@ethersproject/contracts/5.7.0: + /@ethersproject/contracts@5.7.0: resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} dependencies: '@ethersproject/abi': 5.7.0 @@ -606,7 +615,7 @@ packages: '@ethersproject/transactions': 5.7.0 dev: true - /@ethersproject/hash/5.2.0: + /@ethersproject/hash@5.2.0: resolution: {integrity: sha512-wEGry2HFFSssFiNEkFWMzj1vpdFv4rQlkBp41UfL6J58zKGNycoAWimokITDMk8p7548MKr27h48QfERnNKkRw==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -619,7 +628,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/hash/5.7.0: + /@ethersproject/hash@5.7.0: resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -633,7 +642,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/hdnode/5.2.0: + /@ethersproject/hdnode@5.2.0: resolution: {integrity: sha512-ffq2JrW5AftCmfWZ8DxpdWdw/x06Yn+e9wrWHLpj8If1+w87W4LbTMRUaUmO1DUSN8H8g/6kMUKCTJPVuxsuOw==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -650,7 +659,7 @@ packages: '@ethersproject/wordlists': 5.7.0 dev: true - /@ethersproject/hdnode/5.7.0: + /@ethersproject/hdnode@5.7.0: resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -667,7 +676,7 @@ packages: '@ethersproject/wordlists': 5.7.0 dev: true - /@ethersproject/json-wallets/5.2.0: + /@ethersproject/json-wallets@5.2.0: resolution: {integrity: sha512-iWxSm9XiugEtaehYD6w1ImmXeatjcGcrQvffZVJHH1UqV4FckDzrOYnZBRHPQRYlnhNVrGTld1+S0Cu4MB8gdw==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -685,7 +694,7 @@ packages: scrypt-js: 3.0.1 dev: true - /@ethersproject/json-wallets/5.7.0: + /@ethersproject/json-wallets@5.7.0: resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} dependencies: '@ethersproject/abstract-signer': 5.7.0 @@ -703,67 +712,67 @@ packages: scrypt-js: 3.0.1 dev: true - /@ethersproject/keccak256/5.2.0: + /@ethersproject/keccak256@5.2.0: resolution: {integrity: sha512-LqyxTwVANga5Y3L1yo184czW6b3PibabN8xyE/eOulQLLfXNrHHhwrOTpOhoVRWCICVCD/5SjQfwqTrczjS7jQ==} dependencies: '@ethersproject/bytes': 5.7.0 js-sha3: 0.5.7 dev: true - /@ethersproject/keccak256/5.7.0: + /@ethersproject/keccak256@5.7.0: resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} dependencies: '@ethersproject/bytes': 5.7.0 js-sha3: 0.8.0 dev: true - /@ethersproject/logger/5.2.0: + /@ethersproject/logger@5.2.0: resolution: {integrity: sha512-dPZ6/E3YiArgG8dI/spGkaRDry7YZpCntf4gm/c6SI8Mbqiihd7q3nuLN5VvDap/0K3xm3RE1AIUOcUwwh2ezQ==} dev: true - /@ethersproject/logger/5.7.0: + /@ethersproject/logger@5.7.0: resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} dev: true - /@ethersproject/networks/5.2.0: + /@ethersproject/networks@5.2.0: resolution: {integrity: sha512-q+htMgq7wQoEnjlkdHM6t1sktKxNbEB/F6DQBPNwru7KpQ1R0n0UTIXJB8Rb7lSnvjqcAQ40X3iVqm94NJfYDw==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/networks/5.7.1: + /@ethersproject/networks@5.7.1: resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/pbkdf2/5.2.0: + /@ethersproject/pbkdf2@5.2.0: resolution: {integrity: sha512-qKOoO6yir/qnAgg6OP3U4gRuZ6jl9P7xwggRu/spVfnuaR+wa490AatWLqB1WOXKf6JFjm5yOaT/T5fCICQVdQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 dev: true - /@ethersproject/pbkdf2/5.7.0: + /@ethersproject/pbkdf2@5.7.0: resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 dev: true - /@ethersproject/properties/5.2.0: + /@ethersproject/properties@5.2.0: resolution: {integrity: sha512-oNFkzcoGwXXV+/Yp/MLcDLrL/2i360XIy2YN9yRZJPnIbLwjroFNLiRzLs6PyPw1D09Xs8OcPR1/nHv6xDKE2A==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/properties/5.7.0: + /@ethersproject/properties@5.7.0: resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} dependencies: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/providers/5.2.0: + /@ethersproject/providers@5.2.0: resolution: {integrity: sha512-Yf/ZUqCrVr+jR0SHA9GuNZs4R1xnV9Ibnh1TlOa0ZzI6o+Qf8bEyE550k9bYI4zk2f9x9baX2RRs6BJY7Jz/WA==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -790,7 +799,7 @@ packages: - utf-8-validate dev: true - /@ethersproject/providers/5.7.2: + /@ethersproject/providers@5.7.2: resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -818,35 +827,35 @@ packages: - utf-8-validate dev: true - /@ethersproject/random/5.2.0: + /@ethersproject/random@5.2.0: resolution: {integrity: sha512-7Nd3qjivBGlDCGDuGYjPi8CXdtVhRZ7NeyBXoJgtnJBwn1S01ahrbMeOUVmRVWrFM0YiSEPEGo7i4xEu2gRPcg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/random/5.7.0: + /@ethersproject/random@5.7.0: resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/rlp/5.2.0: + /@ethersproject/rlp@5.2.0: resolution: {integrity: sha512-RqGsELtPWxcFhOOhSr0lQ2hBNT9tBE08WK0tb6VQbCk97EpqkbgP8yXED9PZlWMiRGchJTw6S+ExzK62XMX/fw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/rlp/5.7.0: + /@ethersproject/rlp@5.7.0: resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/sha2/5.2.0: + /@ethersproject/sha2@5.2.0: resolution: {integrity: sha512-Wqqptfn0PRO2mvmpktPW1HOLrrCyGtxhVQxO1ZyePoGrcEOurhICOlIvkTogoX4Q928D3Z9XtSSCUbdOJUF2kg==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -854,7 +863,7 @@ packages: hash.js: 1.1.3 dev: true - /@ethersproject/sha2/5.7.0: + /@ethersproject/sha2@5.7.0: resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -862,7 +871,7 @@ packages: hash.js: 1.1.7 dev: true - /@ethersproject/signing-key/5.2.0: + /@ethersproject/signing-key@5.2.0: resolution: {integrity: sha512-9A+dVSkrVAPuhJnWqLWV/NkKi/KB4iagTKEuojfuApUfeIHEhpwQ0Jx3cBimk7qWISSSKdgiAmIqpvVtZ5FEkg==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -872,7 +881,7 @@ packages: elliptic: 6.5.4 dev: true - /@ethersproject/signing-key/5.7.0: + /@ethersproject/signing-key@5.7.0: resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -883,7 +892,7 @@ packages: hash.js: 1.1.7 dev: true - /@ethersproject/solidity/5.2.0: + /@ethersproject/solidity@5.2.0: resolution: {integrity: sha512-EEFlNyEnONW3CWF8UGWPcqxJUHiaIoofO7itGwO/2gvGpnwlL+WUV+GmQoHNxmn+QJeOHspnZuh6NOVrJL6H1g==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -893,7 +902,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/solidity/5.7.0: + /@ethersproject/solidity@5.7.0: resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -904,7 +913,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/strings/5.2.0: + /@ethersproject/strings@5.2.0: resolution: {integrity: sha512-RmjX800wRYKgrzo2ZCSlA8OCQYyq4+M46VgjSVDVyYkLZctBXC3epqlppDA24R7eo856KNbXqezZsMnHT+sSuA==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -912,7 +921,7 @@ packages: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/strings/5.7.0: + /@ethersproject/strings@5.7.0: resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -920,7 +929,7 @@ packages: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/transactions/5.2.0: + /@ethersproject/transactions@5.2.0: resolution: {integrity: sha512-QrGbhGYsouNNclUp3tWMbckMsuXJTOsA56kT3BuRrLlXJcUH7myIihajXdSfKcyJsvHJPrGZP+U3TKh+sLzZtg==} dependencies: '@ethersproject/address': 5.7.0 @@ -934,7 +943,7 @@ packages: '@ethersproject/signing-key': 5.7.0 dev: true - /@ethersproject/transactions/5.7.0: + /@ethersproject/transactions@5.7.0: resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} dependencies: '@ethersproject/address': 5.7.0 @@ -948,7 +957,7 @@ packages: '@ethersproject/signing-key': 5.7.0 dev: true - /@ethersproject/units/5.2.0: + /@ethersproject/units@5.2.0: resolution: {integrity: sha512-yrwlyomXcBBHp5oSrLxlLkyHN7dVu3PO7hMbQXc00h388zU4TF3o/PAIUhh+x695wgJ19Fa8YgUWCab3a1RDwA==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -956,7 +965,7 @@ packages: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/units/5.7.0: + /@ethersproject/units@5.7.0: resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} dependencies: '@ethersproject/bignumber': 5.7.0 @@ -964,7 +973,7 @@ packages: '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/wallet/5.2.0: + /@ethersproject/wallet@5.2.0: resolution: {integrity: sha512-uPdjZwUmAJLo1+ybR/G/rL9pv/NEcCqOsjn6RJFvG7RmwP2kS1v5C+F+ysgx2W/PxBIVT+2IEsfXLbBz8s/6Rg==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -984,7 +993,7 @@ packages: '@ethersproject/wordlists': 5.7.0 dev: true - /@ethersproject/wallet/5.7.0: + /@ethersproject/wallet@5.7.0: resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -1004,7 +1013,7 @@ packages: '@ethersproject/wordlists': 5.7.0 dev: true - /@ethersproject/web/5.2.0: + /@ethersproject/web@5.2.0: resolution: {integrity: sha512-mYb9qxGlOBFR2pR6t1CZczuqqX6r8RQGn7MtwrBciMex3cvA/qs+wbmcDgl+/OZY0Pco/ih6WHQRnVi+4sBeCQ==} dependencies: '@ethersproject/base64': 5.7.0 @@ -1014,7 +1023,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/web/5.7.1: + /@ethersproject/web@5.7.1: resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} dependencies: '@ethersproject/base64': 5.7.0 @@ -1024,7 +1033,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/wordlists/5.2.0: + /@ethersproject/wordlists@5.2.0: resolution: {integrity: sha512-/7TG5r/Zm8Wd9WhoqQ4QnntgMkIfIZ8QVrpU81muiChLD26XLOgmyiqKPL7K058uYt7UZ0wzbXjxyCYadU3xFQ==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -1034,7 +1043,7 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@ethersproject/wordlists/5.7.0: + /@ethersproject/wordlists@5.7.0: resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} dependencies: '@ethersproject/bytes': 5.7.0 @@ -1044,19 +1053,19 @@ packages: '@ethersproject/strings': 5.7.0 dev: true - /@fastify/busboy/2.1.0: + /@fastify/busboy@2.1.0: resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} engines: {node: '>=14'} dev: true - /@ganache/console.log/0.3.0: + /@ganache/console.log@0.3.0: resolution: {integrity: sha512-cRkjY3gn1zxPxy+PKK/xl12p3KbGwXeS7oGTkXFeey4bhQgd5QBa/+HNMVPflT2BcWLZ91Ir+CRRiRekeyHUWQ==} dependencies: '@ethereumjs/util': 8.0.2 '@ganache/utils': 0.3.0 dev: true - /@ganache/utils/0.3.0: + /@ganache/utils@0.3.0: resolution: {integrity: sha512-cxoG8KQxkYPl71BPdKZihjVKqN2AE7WLXjU65BVOQ5jEYrUH3CWSxA9v7CCUJj4e0HoXFpVFIZ+1HRkiBKKiKg==} dependencies: emittery: 0.10.0 @@ -1066,12 +1075,13 @@ packages: '@trufflesuite/bigint-buffer': 1.1.9 dev: true - /@graphql-tools/batch-execute/8.5.1_graphql@15.8.0: + /@graphql-tools/batch-execute@8.5.1(graphql@15.8.0): resolution: {integrity: sha512-hRVDduX0UDEneVyEWtc2nu5H2PxpfSfM/riUlgZvo/a/nG475uyehxR5cFGvTEPEQUKY3vGIlqvtRigzqTfCew==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.9.0_graphql@15.8.0 + '@graphql-tools/utils': 8.9.0(graphql@15.8.0) dataloader: 2.1.0 graphql: 15.8.0 tslib: 2.4.1 @@ -1079,14 +1089,15 @@ packages: dev: true optional: true - /@graphql-tools/delegate/8.8.1_graphql@15.8.0: + /@graphql-tools/delegate@8.8.1(graphql@15.8.0): resolution: {integrity: sha512-NDcg3GEQmdEHlnF7QS8b4lM1PSF+DKeFcIlLEfZFBvVq84791UtJcDj8734sIHLukmyuAxXMfA1qLd2l4lZqzA==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/batch-execute': 8.5.1_graphql@15.8.0 - '@graphql-tools/schema': 8.5.1_graphql@15.8.0 - '@graphql-tools/utils': 8.9.0_graphql@15.8.0 + '@graphql-tools/batch-execute': 8.5.1(graphql@15.8.0) + '@graphql-tools/schema': 8.5.1(graphql@15.8.0) + '@graphql-tools/utils': 8.9.0(graphql@15.8.0) dataloader: 2.1.0 graphql: 15.8.0 tslib: 2.4.1 @@ -1094,69 +1105,75 @@ packages: dev: true optional: true - /@graphql-tools/merge/8.3.1_graphql@15.8.0: + /@graphql-tools/merge@8.3.1(graphql@15.8.0): resolution: {integrity: sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.9.0_graphql@15.8.0 + '@graphql-tools/utils': 8.9.0(graphql@15.8.0) graphql: 15.8.0 tslib: 2.6.2 dev: true optional: true - /@graphql-tools/merge/8.4.2_graphql@15.8.0: + /@graphql-tools/merge@8.4.2(graphql@15.8.0): resolution: {integrity: sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 9.2.1_graphql@15.8.0 + '@graphql-tools/utils': 9.2.1(graphql@15.8.0) graphql: 15.8.0 tslib: 2.6.2 dev: true optional: true - /@graphql-tools/mock/8.7.20_graphql@15.8.0: + /@graphql-tools/mock@8.7.20(graphql@15.8.0): resolution: {integrity: sha512-ljcHSJWjC/ZyzpXd5cfNhPI7YljRVvabKHPzKjEs5ElxWu2cdlLGvyNYepApXDsM/OJG/2xuhGM+9GWu5gEAPQ==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/schema': 9.0.19_graphql@15.8.0 - '@graphql-tools/utils': 9.2.1_graphql@15.8.0 + '@graphql-tools/schema': 9.0.19(graphql@15.8.0) + '@graphql-tools/utils': 9.2.1(graphql@15.8.0) fast-json-stable-stringify: 2.1.0 graphql: 15.8.0 tslib: 2.6.2 dev: true optional: true - /@graphql-tools/schema/8.5.1_graphql@15.8.0: + /@graphql-tools/schema@8.5.1(graphql@15.8.0): resolution: {integrity: sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/merge': 8.3.1_graphql@15.8.0 - '@graphql-tools/utils': 8.9.0_graphql@15.8.0 + '@graphql-tools/merge': 8.3.1(graphql@15.8.0) + '@graphql-tools/utils': 8.9.0(graphql@15.8.0) graphql: 15.8.0 tslib: 2.6.2 value-or-promise: 1.0.11 dev: true optional: true - /@graphql-tools/schema/9.0.19_graphql@15.8.0: + /@graphql-tools/schema@9.0.19(graphql@15.8.0): resolution: {integrity: sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/merge': 8.4.2_graphql@15.8.0 - '@graphql-tools/utils': 9.2.1_graphql@15.8.0 + '@graphql-tools/merge': 8.4.2(graphql@15.8.0) + '@graphql-tools/utils': 9.2.1(graphql@15.8.0) graphql: 15.8.0 tslib: 2.6.2 value-or-promise: 1.0.12 dev: true optional: true - /@graphql-tools/utils/8.9.0_graphql@15.8.0: + /@graphql-tools/utils@8.9.0(graphql@15.8.0): resolution: {integrity: sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: @@ -1165,18 +1182,19 @@ packages: dev: true optional: true - /@graphql-tools/utils/9.2.1_graphql@15.8.0: + /@graphql-tools/utils@9.2.1(graphql@15.8.0): resolution: {integrity: sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==} + requiresBuild: true peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-typed-document-node/core': 3.2.0_graphql@15.8.0 + '@graphql-typed-document-node/core': 3.2.0(graphql@15.8.0) graphql: 15.8.0 tslib: 2.6.2 dev: true optional: true - /@graphql-typed-document-node/core/3.2.0_graphql@14.7.0: + /@graphql-typed-document-node/core@3.2.0(graphql@14.7.0): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 @@ -1184,7 +1202,7 @@ packages: graphql: 14.7.0 dev: true - /@graphql-typed-document-node/core/3.2.0_graphql@15.8.0: + /@graphql-typed-document-node/core@3.2.0(graphql@15.8.0): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 @@ -1193,32 +1211,33 @@ packages: dev: true optional: true - /@humanwhocodes/config-array/0.11.14: + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color dev: true - /@humanwhocodes/module-importer/1.0.1: + /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema/2.0.2: + /@humanwhocodes/object-schema@2.0.2: resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true - /@josephg/resolvable/1.0.1: + /@josephg/resolvable@1.0.1: resolution: {integrity: sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==} + requiresBuild: true dev: true optional: true - /@metamask/eth-sig-util/4.0.1: + /@metamask/eth-sig-util@4.0.1: resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} engines: {node: '>=12.0.0'} dependencies: @@ -1229,26 +1248,26 @@ packages: tweetnacl-util: 0.15.1 dev: true - /@noble/curves/1.3.0: + /@noble/curves@1.3.0: resolution: {integrity: sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==} dependencies: '@noble/hashes': 1.3.3 dev: true - /@noble/hashes/1.2.0: + /@noble/hashes@1.2.0: resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} dev: true - /@noble/hashes/1.3.3: + /@noble/hashes@1.3.3: resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} engines: {node: '>= 16'} dev: true - /@noble/secp256k1/1.7.1: + /@noble/secp256k1@1.7.1: resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} dev: true - /@nodelib/fs.scandir/2.1.5: + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} dependencies: @@ -1256,12 +1275,12 @@ packages: run-parallel: 1.2.0 dev: true - /@nodelib/fs.stat/2.0.5: + /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} dev: true - /@nodelib/fs.walk/1.2.8: + /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} dependencies: @@ -1269,165 +1288,97 @@ packages: fastq: 1.17.1 dev: true - /@nomicfoundation/ethereumjs-block/5.0.2: - resolution: {integrity: sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-trie': 6.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - ethereum-cryptography: 0.1.3 - ethers: 5.7.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate + /@nomicfoundation/edr-darwin-arm64@0.6.4: + resolution: {integrity: sha512-QNQErISLgssV9+qia8sIjRANqtbW8snSDvjspixT/kSQ5ZSGxxctTg7x72wPSrcu8+EBEveIe5uqENIp5GH8HQ==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-blockchain/7.0.2: - resolution: {integrity: sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-ethash': 3.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-trie': 6.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - abstract-level: 1.0.4 - debug: 4.3.4 - ethereum-cryptography: 0.1.3 - level: 8.0.1 - lru-cache: 5.1.1 - memory-level: 1.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-darwin-x64@0.6.4: + resolution: {integrity: sha512-cjVmREiwByyc9+oGfvAh49IAw+oVJHF9WWYRD+Tm/ZlSpnEVWxrGNBak2bd/JSYjn+mZE7gmWS4SMRi4nKaLUg==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-common/4.0.2: - resolution: {integrity: sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==} - dependencies: - '@nomicfoundation/ethereumjs-util': 9.0.2 - crc-32: 1.2.2 + /@nomicfoundation/edr-linux-arm64-gnu@0.6.4: + resolution: {integrity: sha512-96o9kRIVD6W5VkgKvUOGpWyUGInVQ5BRlME2Fa36YoNsRQMaKtmYJEU0ACosYES6ZTpYC8U5sjMulvPtVoEfOA==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-ethash/3.0.2: - resolution: {integrity: sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - abstract-level: 1.0.4 - bigint-crypto-utils: 3.3.0 - ethereum-cryptography: 0.1.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate + /@nomicfoundation/edr-linux-arm64-musl@0.6.4: + resolution: {integrity: sha512-+JVEW9e5plHrUfQlSgkEj/UONrIU6rADTEk+Yp9pbe+mzNkJdfJYhs5JYiLQRP4OjxH4QOrXI97bKU6FcEbt5Q==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-evm/2.0.2: - resolution: {integrity: sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==} - engines: {node: '>=14'} - dependencies: - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - debug: 4.3.4 - ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-linux-x64-gnu@0.6.4: + resolution: {integrity: sha512-nzYWW+fO3EZItOeP4CrdMgDXfaGBIBkKg0Y/7ySpUxLqzut40O4Mb0/+quqLAFkacUSWMlFp8nsmypJfOH5zoA==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-rlp/5.0.2: - resolution: {integrity: sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==} - engines: {node: '>=14'} - hasBin: true + /@nomicfoundation/edr-linux-x64-musl@0.6.4: + resolution: {integrity: sha512-QFRoE9qSQ2boRrVeQ1HdzU+XN7NUgwZ1SIy5DQt4d7jCP+5qTNsq8LBNcqhRBOATgO63nsweNUhxX/Suj5r1Sw==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-statemanager/2.0.2: - resolution: {integrity: sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==} - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - debug: 4.3.4 - ethereum-cryptography: 0.1.3 - ethers: 5.7.2 - js-sdsl: 4.4.2 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-win32-x64-msvc@0.6.4: + resolution: {integrity: sha512-2yopjelNkkCvIjUgBGhrn153IBPLwnsDeNiq6oA0WkeM8tGmQi4td+PGi9jAriUDAkc59Yoi2q9hYA6efiY7Zw==} + engines: {node: '>= 18'} dev: true - /@nomicfoundation/ethereumjs-trie/6.0.2: - resolution: {integrity: sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==} - engines: {node: '>=14'} + /@nomicfoundation/edr@0.6.4: + resolution: {integrity: sha512-YgrSuT3yo5ZQkbvBGqQ7hG+RDvz3YygSkddg4tb1Z0Y6pLXFzwrcEwWaJCFAVeeZxdxGfCgGMUYgRVneK+WXkw==} + engines: {node: '>= 18'} dependencies: - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - '@types/readable-stream': 2.3.15 - ethereum-cryptography: 0.1.3 - readable-stream: 3.6.2 + '@nomicfoundation/edr-darwin-arm64': 0.6.4 + '@nomicfoundation/edr-darwin-x64': 0.6.4 + '@nomicfoundation/edr-linux-arm64-gnu': 0.6.4 + '@nomicfoundation/edr-linux-arm64-musl': 0.6.4 + '@nomicfoundation/edr-linux-x64-gnu': 0.6.4 + '@nomicfoundation/edr-linux-x64-musl': 0.6.4 + '@nomicfoundation/edr-win32-x64-msvc': 0.6.4 dev: true - /@nomicfoundation/ethereumjs-tx/5.0.2: - resolution: {integrity: sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-common@4.0.4: + resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} dependencies: - '@chainsafe/ssz': 0.9.4 - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - ethereum-cryptography: 0.1.3 + '@nomicfoundation/ethereumjs-util': 9.0.4 transitivePeerDependencies: - - bufferutil - - utf-8-validate + - c-kzg dev: true - /@nomicfoundation/ethereumjs-util/9.0.2: - resolution: {integrity: sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-rlp@5.0.4: + resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} + engines: {node: '>=18'} + hasBin: true + dev: true + + /@nomicfoundation/ethereumjs-tx@5.0.4: + resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true dependencies: - '@chainsafe/ssz': 0.10.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-rlp': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 ethereum-cryptography: 0.1.3 dev: true - /@nomicfoundation/ethereumjs-vm/7.0.2: - resolution: {integrity: sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-util@9.0.4: + resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true dependencies: - '@nomicfoundation/ethereumjs-block': 5.0.2 - '@nomicfoundation/ethereumjs-blockchain': 7.0.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-evm': 2.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-statemanager': 2.0.2 - '@nomicfoundation/ethereumjs-trie': 6.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - debug: 4.3.4 + '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate dev: true - /@nomicfoundation/hardhat-verify/2.0.4_hardhat@2.19.5: + /@nomicfoundation/hardhat-verify@2.0.4(hardhat@2.22.13): resolution: {integrity: sha512-B8ZjhOrmbbRWqJi65jvQblzjsfYktjqj2vmOm+oc2Vu8drZbT2cjeSCRHZKbS7lOtfW78aJZSFvw+zRLCiABJA==} peerDependencies: hardhat: ^2.0.4 @@ -1436,8 +1387,8 @@ packages: '@ethersproject/address': 5.7.0 cbor: 8.1.0 chalk: 2.4.2 - debug: 4.3.4 - hardhat: 2.19.5 + debug: 4.3.4(supports-color@8.1.1) + hardhat: 2.22.13 lodash.clonedeep: 4.5.0 semver: 6.3.1 table: 6.8.1 @@ -1446,7 +1397,7 @@ packages: - supports-color dev: true - /@nomicfoundation/solidity-analyzer-darwin-arm64/0.1.1: + /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1: resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==} engines: {node: '>= 10'} cpu: [arm64] @@ -1455,7 +1406,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-darwin-x64/0.1.1: + /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1: resolution: {integrity: sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==} engines: {node: '>= 10'} cpu: [x64] @@ -1464,7 +1415,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-freebsd-x64/0.1.1: + /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1: resolution: {integrity: sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==} engines: {node: '>= 10'} cpu: [x64] @@ -1473,7 +1424,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-linux-arm64-gnu/0.1.1: + /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1: resolution: {integrity: sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==} engines: {node: '>= 10'} cpu: [arm64] @@ -1482,7 +1433,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-linux-arm64-musl/0.1.1: + /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1: resolution: {integrity: sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==} engines: {node: '>= 10'} cpu: [arm64] @@ -1491,7 +1442,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-linux-x64-gnu/0.1.1: + /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1: resolution: {integrity: sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==} engines: {node: '>= 10'} cpu: [x64] @@ -1500,7 +1451,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-linux-x64-musl/0.1.1: + /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1: resolution: {integrity: sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==} engines: {node: '>= 10'} cpu: [x64] @@ -1509,7 +1460,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-win32-arm64-msvc/0.1.1: + /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1: resolution: {integrity: sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==} engines: {node: '>= 10'} cpu: [arm64] @@ -1518,7 +1469,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-win32-ia32-msvc/0.1.1: + /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1: resolution: {integrity: sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==} engines: {node: '>= 10'} cpu: [ia32] @@ -1527,7 +1478,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer-win32-x64-msvc/0.1.1: + /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1: resolution: {integrity: sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==} engines: {node: '>= 10'} cpu: [x64] @@ -1536,7 +1487,7 @@ packages: dev: true optional: true - /@nomicfoundation/solidity-analyzer/0.1.1: + /@nomicfoundation/solidity-analyzer@0.1.1: resolution: {integrity: sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==} engines: {node: '>= 12'} optionalDependencies: @@ -1552,37 +1503,37 @@ packages: '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 dev: true - /@openzeppelin/contract-loader/0.6.3: + /@openzeppelin/contract-loader@0.6.3: resolution: {integrity: sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==} dependencies: find-up: 4.1.0 fs-extra: 8.1.0 dev: true - /@openzeppelin/contracts-upgradeable/5.0.1_qffjc7vved4cgcgrp7e6uufd2e: - resolution: {integrity: sha512-MvaLoPnVcoZr/qqZP+4cl9piuR4gg0iIGgxVSZ/AL1iId3M6IdEHzz9Naw5Lirl4KKBI6ciTVnX07yL4dOMIJg==} + /@openzeppelin/contracts-upgradeable@5.1.0(@openzeppelin/contracts@5.1.0): + resolution: {integrity: sha512-AIElwP5Ck+cslNE+Hkemf5SxjJoF4wBvvjxc27Rp+9jaPs/CLIaUBMYe1FNzhdiN0cYuwGRmYaRHmmntuiju4Q==} peerDependencies: - '@openzeppelin/contracts': 5.0.1 + '@openzeppelin/contracts': 5.1.0 dependencies: - '@openzeppelin/contracts': 5.0.1 + '@openzeppelin/contracts': 5.1.0 dev: true - /@openzeppelin/contracts/4.9.5: - resolution: {integrity: sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==} + /@openzeppelin/contracts@4.8.0: + resolution: {integrity: sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==} dev: true - /@openzeppelin/contracts/5.0.1: - resolution: {integrity: sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w==} + /@openzeppelin/contracts@5.1.0: + resolution: {integrity: sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==} dev: true - /@openzeppelin/test-helpers/0.5.16_bn.js@4.12.0: + /@openzeppelin/test-helpers@0.5.16(bn.js@4.12.0): resolution: {integrity: sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==} dependencies: '@openzeppelin/contract-loader': 0.6.3 '@truffle/contract': 4.6.31 ansi-colors: 3.2.4 chai: 4.4.1 - chai-bn: 0.2.2_bn.js@4.12.0+chai@4.4.1 + chai-bn: 0.2.2(bn.js@4.12.0)(chai@4.4.1) ethjs-abi: 0.2.1 lodash.flatten: 4.4.0 semver: 5.7.2 @@ -1596,19 +1547,19 @@ packages: - utf-8-validate dev: true - /@pnpm/config.env-replace/1.1.0: + /@pnpm/config.env-replace@1.1.0: resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} dev: true - /@pnpm/network.ca-file/1.0.2: + /@pnpm/network.ca-file@1.0.2: resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} engines: {node: '>=12.22.0'} dependencies: graceful-fs: 4.2.10 dev: true - /@pnpm/npm-conf/2.2.2: + /@pnpm/npm-conf@2.2.2: resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} engines: {node: '>=12'} dependencies: @@ -1617,60 +1568,70 @@ packages: config-chain: 1.1.13 dev: true - /@protobufjs/aspromise/1.1.2: + /@protobufjs/aspromise@1.1.2: resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + requiresBuild: true dev: true optional: true - /@protobufjs/base64/1.1.2: + /@protobufjs/base64@1.1.2: resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + requiresBuild: true dev: true optional: true - /@protobufjs/codegen/2.0.4: + /@protobufjs/codegen@2.0.4: resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + requiresBuild: true dev: true optional: true - /@protobufjs/eventemitter/1.1.0: + /@protobufjs/eventemitter@1.1.0: resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + requiresBuild: true dev: true optional: true - /@protobufjs/fetch/1.1.0: + /@protobufjs/fetch@1.1.0: resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + requiresBuild: true dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/inquire': 1.1.0 dev: true optional: true - /@protobufjs/float/1.0.2: + /@protobufjs/float@1.0.2: resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + requiresBuild: true dev: true optional: true - /@protobufjs/inquire/1.1.0: + /@protobufjs/inquire@1.1.0: resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + requiresBuild: true dev: true optional: true - /@protobufjs/path/1.1.2: + /@protobufjs/path@1.1.2: resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + requiresBuild: true dev: true optional: true - /@protobufjs/pool/1.1.0: + /@protobufjs/pool@1.1.0: resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + requiresBuild: true dev: true optional: true - /@protobufjs/utf8/1.1.0: + /@protobufjs/utf8@1.1.0: resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + requiresBuild: true dev: true optional: true - /@redux-saga/core/1.3.0: + /@redux-saga/core@1.3.0: resolution: {integrity: sha512-L+i+qIGuyWn7CIg7k1MteHGfttKPmxwZR5E7OsGikCL2LzYA0RERlaUY00Y3P3ZV2EYgrsYlBrGs6cJP5OKKqA==} dependencies: '@babel/runtime': 7.23.9 @@ -1682,32 +1643,32 @@ packages: typescript-tuple: 2.2.1 dev: true - /@redux-saga/deferred/1.2.1: + /@redux-saga/deferred@1.2.1: resolution: {integrity: sha512-cmin3IuuzMdfQjA0lG4B+jX+9HdTgHZZ+6u3jRAOwGUxy77GSlTi4Qp2d6PM1PUoTmQUR5aijlA39scWWPF31g==} dev: true - /@redux-saga/delay-p/1.2.1: + /@redux-saga/delay-p@1.2.1: resolution: {integrity: sha512-MdiDxZdvb1m+Y0s4/hgdcAXntpUytr9g0hpcOO1XFVyyzkrDu3SKPgBFOtHn7lhu7n24ZKIAT1qtKyQjHqRd+w==} dependencies: '@redux-saga/symbols': 1.1.3 dev: true - /@redux-saga/is/1.1.3: + /@redux-saga/is@1.1.3: resolution: {integrity: sha512-naXrkETG1jLRfVfhOx/ZdLj0EyAzHYbgJWkXbB3qFliPcHKiWbv/ULQryOAEKyjrhiclmr6AMdgsXFyx7/yE6Q==} dependencies: '@redux-saga/symbols': 1.1.3 '@redux-saga/types': 1.2.1 dev: true - /@redux-saga/symbols/1.1.3: + /@redux-saga/symbols@1.1.3: resolution: {integrity: sha512-hCx6ZvU4QAEUojETnX8EVg4ubNLBFl1Lps4j2tX7o45x/2qg37m3c6v+kSp8xjDJY+2tJw4QB3j8o8dsl1FDXg==} dev: true - /@redux-saga/types/1.2.1: + /@redux-saga/types@1.2.1: resolution: {integrity: sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==} dev: true - /@resolver-engine/core/0.2.1: + /@resolver-engine/core@0.2.1: resolution: {integrity: sha512-nsLQHmPJ77QuifqsIvqjaF5B9aHnDzJjp73Q1z6apY3e9nqYrx4Dtowhpsf7Jwftg/XzVDEMQC+OzUBNTS+S1A==} dependencies: debug: 3.2.7 @@ -1716,7 +1677,7 @@ packages: - supports-color dev: true - /@resolver-engine/fs/0.2.1: + /@resolver-engine/fs@0.2.1: resolution: {integrity: sha512-7kJInM1Qo2LJcKyDhuYzh9ZWd+mal/fynfL9BNjWOiTcOpX+jNfqb/UmGUqros5pceBITlWGqS4lU709yHFUbg==} dependencies: '@resolver-engine/core': 0.2.1 @@ -1725,7 +1686,7 @@ packages: - supports-color dev: true - /@resolver-engine/imports-fs/0.2.2: + /@resolver-engine/imports-fs@0.2.2: resolution: {integrity: sha512-gFCgMvCwyppjwq0UzIjde/WI+yDs3oatJhozG9xdjJdewwtd7LiF0T5i9lrHAUtqrQbqoFE4E+ZMRVHWpWHpKQ==} dependencies: '@resolver-engine/fs': 0.2.1 @@ -1735,7 +1696,7 @@ packages: - supports-color dev: true - /@resolver-engine/imports/0.2.2: + /@resolver-engine/imports@0.2.2: resolution: {integrity: sha512-u5/HUkvo8q34AA+hnxxqqXGfby5swnH0Myw91o3Sm2TETJlNKXibFGSKBavAH+wvWdBi4Z5gS2Odu0PowgVOUg==} dependencies: '@resolver-engine/core': 0.2.1 @@ -1745,11 +1706,11 @@ packages: - supports-color dev: true - /@scure/base/1.1.5: + /@scure/base@1.1.5: resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} dev: true - /@scure/bip32/1.1.5: + /@scure/bip32@1.1.5: resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} dependencies: '@noble/hashes': 1.2.0 @@ -1757,7 +1718,7 @@ packages: '@scure/base': 1.1.5 dev: true - /@scure/bip32/1.3.3: + /@scure/bip32@1.3.3: resolution: {integrity: sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==} dependencies: '@noble/curves': 1.3.0 @@ -1765,21 +1726,21 @@ packages: '@scure/base': 1.1.5 dev: true - /@scure/bip39/1.1.1: + /@scure/bip39@1.1.1: resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} dependencies: '@noble/hashes': 1.2.0 '@scure/base': 1.1.5 dev: true - /@scure/bip39/1.2.2: + /@scure/bip39@1.2.2: resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} dependencies: '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 dev: true - /@sentry/core/5.30.0: + /@sentry/core@5.30.0: resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} engines: {node: '>=6'} dependencies: @@ -1790,7 +1751,7 @@ packages: tslib: 1.14.1 dev: true - /@sentry/hub/5.30.0: + /@sentry/hub@5.30.0: resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} engines: {node: '>=6'} dependencies: @@ -1799,7 +1760,7 @@ packages: tslib: 1.14.1 dev: true - /@sentry/minimal/5.30.0: + /@sentry/minimal@5.30.0: resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} engines: {node: '>=6'} dependencies: @@ -1808,7 +1769,7 @@ packages: tslib: 1.14.1 dev: true - /@sentry/node/5.30.0: + /@sentry/node@5.30.0: resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} engines: {node: '>=6'} dependencies: @@ -1825,7 +1786,7 @@ packages: - supports-color dev: true - /@sentry/tracing/5.30.0: + /@sentry/tracing@5.30.0: resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} engines: {node: '>=6'} dependencies: @@ -1836,12 +1797,12 @@ packages: tslib: 1.14.1 dev: true - /@sentry/types/5.30.0: + /@sentry/types@5.30.0: resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} engines: {node: '>=6'} dev: true - /@sentry/utils/5.30.0: + /@sentry/utils@5.30.0: resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} engines: {node: '>=6'} dependencies: @@ -1849,48 +1810,49 @@ packages: tslib: 1.14.1 dev: true - /@sindresorhus/is/4.6.0: + /@sindresorhus/is@4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} dev: true - /@sindresorhus/is/5.6.0: + /@sindresorhus/is@5.6.0: resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} engines: {node: '>=14.16'} dev: true - /@solidity-parser/parser/0.14.5: + /@solidity-parser/parser@0.14.5: resolution: {integrity: sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==} dependencies: antlr4ts: 0.5.0-alpha.4 dev: true - /@solidity-parser/parser/0.16.2: + /@solidity-parser/parser@0.16.2: resolution: {integrity: sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg==} dependencies: antlr4ts: 0.5.0-alpha.4 dev: true - /@solidity-parser/parser/0.17.0: + /@solidity-parser/parser@0.17.0: resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} + requiresBuild: true dev: true optional: true - /@szmarczak/http-timer/4.0.6: + /@szmarczak/http-timer@4.0.6: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} dependencies: defer-to-connect: 2.0.1 dev: true - /@szmarczak/http-timer/5.0.1: + /@szmarczak/http-timer@5.0.1: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} dependencies: defer-to-connect: 2.0.1 dev: true - /@truffle/abi-utils/1.0.3: + /@truffle/abi-utils@1.0.3: resolution: {integrity: sha512-AWhs01HCShaVKjml7Z4AbVREr/u4oiWxCcoR7Cktm0mEvtT04pvnxW5xB/cI4znRkrbPdFQlFt67kgrAjesYkw==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -1899,19 +1861,19 @@ packages: web3-utils: 1.10.0 dev: true - /@truffle/blockchain-utils/0.1.9: + /@truffle/blockchain-utils@0.1.9: resolution: {integrity: sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg==} engines: {node: ^16.20 || ^18.16 || >=20} dev: true - /@truffle/code-utils/3.0.4: + /@truffle/code-utils@3.0.4: resolution: {integrity: sha512-MWK3TMisIFaBpSjK7tt1GoQan7DQDBqT2iSsdQOGD74C7r9NMwsIdnL2EYoB/DPcEJ7B8yP4grlG2fQTrPF96g==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: cbor: 5.2.0 dev: true - /@truffle/codec/0.17.3: + /@truffle/codec@0.17.3: resolution: {integrity: sha512-Ko/+dsnntNyrJa57jUD9u4qx9nQby+H4GsUO6yjiCPSX0TQnEHK08XWqBSg0WdmCH2+h0y1nr2CXSx8gbZapxg==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -1920,7 +1882,7 @@ packages: big.js: 6.2.1 bn.js: 5.2.1 cbor: 5.2.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) lodash: 4.17.21 semver: 7.6.0 utf8: 3.0.0 @@ -1929,7 +1891,7 @@ packages: - supports-color dev: true - /@truffle/compile-common/0.9.8: + /@truffle/compile-common@0.9.8: resolution: {integrity: sha512-DTpiyo32t/YhLI1spn84D3MHYHrnoVqO+Gp7ZHrYNwDs86mAxtNiH5lsVzSb8cPgiqlvNsRCU9nm9R0YmKMTBQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -1937,7 +1899,7 @@ packages: colors: 1.4.0 dev: true - /@truffle/compile-solidity/6.0.79: + /@truffle/compile-solidity@6.0.79: resolution: {integrity: sha512-sdKYTrXwNr70p17MOzkV277ayNA7evECPFRGTvi6qDea697EXTqq694coH1ffmSjArhrqpinMMenF1v421A/AA==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -1946,9 +1908,9 @@ packages: '@truffle/contract-sources': 0.2.1 '@truffle/expect': 0.1.7 '@truffle/profiler': 0.1.53 - axios: 1.5.0_debug@4.3.4 + axios: 1.5.0(debug@4.3.4) axios-retry: 3.9.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fs-extra: 9.1.0 iter-tools: 7.5.3 lodash: 4.17.21 @@ -1956,7 +1918,7 @@ packages: original-require: 1.0.1 require-from-string: 2.0.2 semver: 7.6.0 - solc: 0.8.21_debug@4.3.4 + solc: 0.8.21(debug@4.3.4) transitivePeerDependencies: - bufferutil - encoding @@ -1964,7 +1926,7 @@ packages: - utf-8-validate dev: true - /@truffle/config/1.3.61: + /@truffle/config@1.3.61: resolution: {integrity: sha512-L4uyG47V+k0NrSoVJ9D+hp2jcMstihW1QlNuXiu5g3mU24BjrozlJT34DFkczh/TtRceLjdrQJKA8WJCMICutw==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -1972,7 +1934,7 @@ packages: '@truffle/events': 0.1.25 '@truffle/provider': 0.3.13 conf: 10.2.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) find-up: 2.1.0 lodash: 4.17.21 original-require: 1.0.1 @@ -1983,27 +1945,27 @@ packages: - utf-8-validate dev: true - /@truffle/contract-schema/3.4.16: + /@truffle/contract-schema@3.4.16: resolution: {integrity: sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true - /@truffle/contract-sources/0.2.1: + /@truffle/contract-sources@0.2.1: resolution: {integrity: sha512-C7l+lySN2V327s0CAX52mN4h3ag1WpIn6l45hsB92GKhY1t5h5txPUXvuKamQpalQWCTLfMS4+YbtN0AxPxCug==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) glob: 7.2.3 transitivePeerDependencies: - supports-color dev: true - /@truffle/contract/4.6.31: + /@truffle/contract@4.6.31: resolution: {integrity: sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2014,7 +1976,7 @@ packages: '@truffle/error': 0.2.2 '@truffle/interface-adapter': 0.5.37 bignumber.js: 7.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) ethers: 4.0.49 web3: 1.10.0 web3-core-helpers: 1.10.0 @@ -2028,16 +1990,16 @@ packages: - utf-8-validate dev: true - /@truffle/dashboard-message-bus-client/0.1.12: + /@truffle/dashboard-message-bus-client@0.1.12: resolution: {integrity: sha512-pI9G0La9tTstb2J2wxUZIMx6H+ZF0XBlsGN3HBkffr4edT0oT12WMCK9GxmKE22Q5VnpXl7wGjatRSEx0C9qDQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@truffle/dashboard-message-bus-common': 0.1.7 '@truffle/promise-tracker': 0.1.7 - axios: 1.5.0_debug@4.3.4 - debug: 4.3.4 + axios: 1.5.0(debug@4.3.4) + debug: 4.3.4(supports-color@8.1.1) delay: 5.0.0 - isomorphic-ws: 4.0.1_ws@7.5.9 + isomorphic-ws: 4.0.1(ws@7.5.9) node-abort-controller: 3.1.1 tiny-typed-emitter: 2.1.0 ws: 7.5.9 @@ -2047,12 +2009,12 @@ packages: - utf-8-validate dev: true - /@truffle/dashboard-message-bus-common/0.1.7: + /@truffle/dashboard-message-bus-common@0.1.7: resolution: {integrity: sha512-jN7q8LBmwQRldSzT/YJE33mnDLrp3EFFDuZyLwtQGInlfcRTXcr5yPY42jxr3Ln19dQe2Chx3I6dWtDByeKLIQ==} engines: {node: ^16.20 || ^18.16 || >=20} dev: true - /@truffle/db-loader/0.2.36: + /@truffle/db-loader@0.2.36: resolution: {integrity: sha512-Cm8uVc2eoihquMOSZm8UOuGGUvBo+/GHkxRoPAZ5pftOpSlRAug0okVOp6ETj1BujgLJ02izU/qdrwSGWwGR9A==} engines: {node: ^16.20 || ^18.16 || >=20} optionalDependencies: @@ -2064,23 +2026,23 @@ packages: - utf-8-validate dev: true - /@truffle/db/2.0.36: + /@truffle/db@2.0.36: resolution: {integrity: sha512-PpUjOXZgf9Gy8RlP8bJhl5pjJRkghZUcCiGOsS0YbCCI//PGDDoKmS+3QUjXWhiMwTeld3gfUV2ip4p2hMbyVA==} engines: {node: ^16.20 || ^18.16 || >=20} deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. requiresBuild: true dependencies: - '@graphql-tools/delegate': 8.8.1_graphql@15.8.0 - '@graphql-tools/schema': 8.5.1_graphql@15.8.0 + '@graphql-tools/delegate': 8.8.1(graphql@15.8.0) + '@graphql-tools/schema': 8.5.1(graphql@15.8.0) '@truffle/abi-utils': 1.0.3 '@truffle/code-utils': 3.0.4 '@truffle/config': 1.3.61 abstract-leveldown: 7.2.0 - apollo-server: 3.13.0_graphql@15.8.0 - debug: 4.3.4 + apollo-server: 3.13.0(graphql@15.8.0) + debug: 4.3.4(supports-color@8.1.1) fs-extra: 9.1.0 graphql: 15.8.0 - graphql-tag: 2.12.6_graphql@15.8.0 + graphql-tag: 2.12.6(graphql@15.8.0) json-stable-stringify: 1.1.1 pascal-case: 2.0.1 pluralize: 8.0.0 @@ -2097,7 +2059,7 @@ packages: dev: true optional: true - /@truffle/debug-utils/6.0.57: + /@truffle/debug-utils@6.0.57: resolution: {integrity: sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2105,13 +2067,13 @@ packages: '@trufflesuite/chromafi': 3.0.0 bn.js: 5.2.1 chalk: 2.4.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) highlightjs-solidity: 2.0.6 transitivePeerDependencies: - supports-color dev: true - /@truffle/debugger/12.1.5: + /@truffle/debugger@12.1.5: resolution: {integrity: sha512-m6FQoddmptcXZkO+OABcz4Ka7YDLAPW9/GhnTSqYonlaOeV7g5dMzybhHq6whaQet34rhNteomep7JpskKW9Mw==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2120,7 +2082,7 @@ packages: '@truffle/codec': 0.17.3 '@truffle/source-map-utils': 1.3.119 bn.js: 5.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) json-pointer: 0.6.2 json-stable-stringify: 1.1.1 lodash: 4.17.21 @@ -2137,18 +2099,18 @@ packages: - utf-8-validate dev: true - /@truffle/error/0.2.2: + /@truffle/error@0.2.2: resolution: {integrity: sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==} engines: {node: ^16.20 || ^18.16 || >=20} dev: true - /@truffle/events/0.1.25: + /@truffle/events@0.1.25: resolution: {integrity: sha512-5elJxNXPVuXDMOoIcCVox0sz95ovRhRbte/H9ht18vyOvtualb4bTjwYyRoWw6Y7j0pom0tPI3OLZWqCdKQNdA==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@truffle/dashboard-message-bus-client': 0.1.12 '@truffle/spinners': 0.2.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) emittery: 0.4.1 web3-utils: 1.10.0 transitivePeerDependencies: @@ -2157,12 +2119,12 @@ packages: - utf-8-validate dev: true - /@truffle/expect/0.1.7: + /@truffle/expect@0.1.7: resolution: {integrity: sha512-YWLdtIDA2Xl7RdkmurQw2KCV/b59KJJ2Csm4GYNPAsnngvVOH6qvHjqm1JNyDzBN7AzqT+Tb3s8RdD+EZC3HJw==} engines: {node: ^16.20 || ^18.16 || >=20} dev: true - /@truffle/interface-adapter/0.5.37: + /@truffle/interface-adapter@0.5.37: resolution: {integrity: sha512-lPH9MDgU+7sNDlJSClwyOwPCfuOimqsCx0HfGkznL3mcFRymc1pukAR1k17zn7ErHqBwJjiKAZ6Ri72KkS+IWw==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2176,29 +2138,29 @@ packages: - utf-8-validate dev: true - /@truffle/profiler/0.1.53: + /@truffle/profiler@0.1.53: resolution: {integrity: sha512-3+wfDaa0JdHlZpjJaNjgsi6vJfeq4osPz146uNYhDH5ilnDGAG1OMrjnuCbkpG3/oXycKsUZFMnVtkbCbbaISw==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@truffle/contract-sources': 0.2.1 '@truffle/expect': 0.1.7 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true - /@truffle/promise-tracker/0.1.7: + /@truffle/promise-tracker@0.1.7: resolution: {integrity: sha512-NiPXNJvdei8MRZRUjEZoL0Y7TPDR1TaeCfGUgB3md6Q7TBiqSKo2p5OT36JO106B2j57SLmXOiDn8fLb+u2sjA==} engines: {node: ^16.20 || ^18.16 || >=20} dev: true - /@truffle/provider/0.3.13: + /@truffle/provider@0.3.13: resolution: {integrity: sha512-W9yZO0ZUwA0LhFvf7+NNNXVSCOd4x5pTbFiXUVURjyqp7f4YooLAqnlLPSpV+6qwIwThc+86CeLlOiFslYdDIA==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@truffle/error': 0.2.2 '@truffle/interface-adapter': 0.5.37 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) web3: 1.10.0 transitivePeerDependencies: - bufferutil @@ -2207,7 +2169,7 @@ packages: - utf-8-validate dev: true - /@truffle/provisioner/0.2.84: + /@truffle/provisioner@0.2.84: resolution: {integrity: sha512-zgDeSq+ZAcgtKSDlShtn1bsJWTRgeOdTTVzthjXMJisKnRQChkOAp7ehIr0RoIp5o2T1IVxYILAk7IPYDHNzuQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2219,7 +2181,7 @@ packages: - utf-8-validate dev: true - /@truffle/resolver/9.0.53: + /@truffle/resolver@9.0.53: resolution: {integrity: sha512-jYqHIucs6yMCOpKFwnvcW6cfpn/WEWJQ8FN0EUhf0r0HMz9TjG9HnabBZSvfMBFPAmKklGR/GI0GESWf3alpXQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: @@ -2230,7 +2192,7 @@ packages: '@truffle/expect': 0.1.7 '@truffle/provisioner': 0.2.84 abi-to-sol: 0.7.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) detect-installed: 2.0.4 fs-extra: 9.1.0 get-installed-path: 4.0.8 @@ -2243,13 +2205,13 @@ packages: - utf-8-validate dev: true - /@truffle/source-map-utils/1.3.119: + /@truffle/source-map-utils@1.3.119: resolution: {integrity: sha512-TFYi3XvanY8WZBOfBwDHQe9HfZUXJ2ejnmFNjsq1//sbM4fUNWjeNshGqkWGxfKPh3OAzXgD4iTnPG3YeXM8YQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@truffle/code-utils': 3.0.4 '@truffle/codec': 0.17.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) json-pointer: 0.6.2 node-interval-tree: 1.3.3 web3-utils: 1.10.0 @@ -2257,14 +2219,14 @@ packages: - supports-color dev: true - /@truffle/spinners/0.2.5: + /@truffle/spinners@0.2.5: resolution: {integrity: sha512-emYyLEuoY62MQV/RNjyVIuTPEjMyIA0WiYMG2N3yfh8OSjD/TC0HRc2oyDWtVkNNox/5D2tH2m5fFB8HOt80FQ==} engines: {node: ^16.20 || ^18.16 || >=20} dependencies: '@trufflesuite/spinnies': 0.1.1 dev: true - /@trufflesuite/bigint-buffer/1.1.10: + /@trufflesuite/bigint-buffer@1.1.10: resolution: {integrity: sha512-pYIQC5EcMmID74t26GCC67946mgTJFiLXOT/BYozgrd4UEY2JHEGLhWi9cMiQCt5BSqFEvKkCHNnoj82SRjiEw==} engines: {node: '>= 14.0.0'} requiresBuild: true @@ -2272,7 +2234,7 @@ packages: node-gyp-build: 4.4.0 dev: true - /@trufflesuite/bigint-buffer/1.1.9: + /@trufflesuite/bigint-buffer@1.1.9: resolution: {integrity: sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw==} engines: {node: '>= 10.0.0'} requiresBuild: true @@ -2281,7 +2243,7 @@ packages: dev: true optional: true - /@trufflesuite/chromafi/3.0.0: + /@trufflesuite/chromafi@3.0.0: resolution: {integrity: sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==} dependencies: camelcase: 4.1.0 @@ -2294,7 +2256,7 @@ packages: strip-indent: 2.0.0 dev: true - /@trufflesuite/spinnies/0.1.1: + /@trufflesuite/spinnies@0.1.1: resolution: {integrity: sha512-jltEtmFJj6xmQqr85gP8OqBHCEiId+zw+uAsb3DyLLRD17O6sySW6Afa2Z/jpzSafj+32ssDfLJ+c0of1NLqcA==} dependencies: chalk: 4.1.2 @@ -2302,51 +2264,54 @@ packages: strip-ansi: 6.0.1 dev: true - /@trufflesuite/uws-js-unofficial/20.30.0-unofficial.0: + /@trufflesuite/uws-js-unofficial@20.30.0-unofficial.0: resolution: {integrity: sha512-r5X0aOQcuT6pLwTRLD+mPnAM/nlKtvIK4Z+My++A8tTOR0qTjNRx8UB8jzRj3D+p9PMAp5LnpCUUGmz7/TppwA==} dependencies: - ws: 8.13.0_2adebc2xdjqbcvbjxkodkhadp4 + ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@6.0.3) optionalDependencies: bufferutil: 4.0.7 utf-8-validate: 6.0.3 dev: true - /@types/accepts/1.3.7: + /@types/accepts@1.3.7: resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} + requiresBuild: true dependencies: '@types/node': 20.11.17 dev: true optional: true - /@types/bn.js/4.11.6: + /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: '@types/node': 20.11.17 dev: true - /@types/bn.js/5.1.5: + /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} dependencies: '@types/node': 20.11.17 dev: true - /@types/body-parser/1.19.2: + /@types/body-parser@1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} + requiresBuild: true dependencies: '@types/connect': 3.4.38 '@types/node': 20.11.17 dev: true optional: true - /@types/body-parser/1.19.5: + /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + requiresBuild: true dependencies: '@types/connect': 3.4.38 '@types/node': 20.11.17 dev: true optional: true - /@types/cacheable-request/6.0.3: + /@types/cacheable-request@6.0.3: resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} dependencies: '@types/http-cache-semantics': 4.0.4 @@ -2355,26 +2320,29 @@ packages: '@types/responselike': 1.0.3 dev: true - /@types/concat-stream/1.6.1: + /@types/concat-stream@1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: '@types/node': 20.11.17 dev: true - /@types/connect/3.4.38: + /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + requiresBuild: true dependencies: '@types/node': 20.11.17 dev: true optional: true - /@types/cors/2.8.12: + /@types/cors@2.8.12: resolution: {integrity: sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==} + requiresBuild: true dev: true optional: true - /@types/express-serve-static-core/4.17.31: + /@types/express-serve-static-core@4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} + requiresBuild: true dependencies: '@types/node': 20.11.17 '@types/qs': 6.9.11 @@ -2382,8 +2350,9 @@ packages: dev: true optional: true - /@types/express-serve-static-core/4.17.43: + /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} + requiresBuild: true dependencies: '@types/node': 20.11.17 '@types/qs': 6.9.11 @@ -2392,8 +2361,9 @@ packages: dev: true optional: true - /@types/express/4.17.14: + /@types/express@4.17.14: resolution: {integrity: sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==} + requiresBuild: true dependencies: '@types/body-parser': 1.19.5 '@types/express-serve-static-core': 4.17.43 @@ -2402,116 +2372,116 @@ packages: dev: true optional: true - /@types/form-data/0.0.33: + /@types/form-data@0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: '@types/node': 20.11.17 dev: true - /@types/http-cache-semantics/4.0.4: + /@types/http-cache-semantics@4.0.4: resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} dev: true - /@types/http-errors/2.0.4: + /@types/http-errors@2.0.4: resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} + requiresBuild: true dev: true optional: true - /@types/json5/0.0.29: + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/keyv/3.1.4: + /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 20.11.17 dev: true - /@types/long/4.0.2: + /@types/long@4.0.2: resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + requiresBuild: true dev: true optional: true - /@types/lru-cache/5.1.1: + /@types/lru-cache@5.1.1: resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} dev: true - /@types/mime/1.3.5: + /@types/mime@1.3.5: resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + requiresBuild: true dev: true optional: true - /@types/mime/3.0.4: + /@types/mime@3.0.4: resolution: {integrity: sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==} + requiresBuild: true dev: true optional: true - /@types/node/10.17.60: + /@types/node@10.17.60: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: true - /@types/node/12.20.55: + /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node/20.11.17: + /@types/node@20.11.17: resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==} dependencies: undici-types: 5.26.5 dev: true - /@types/node/8.10.66: + /@types/node@8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: true - /@types/pbkdf2/3.1.2: + /@types/pbkdf2@3.1.2: resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} dependencies: '@types/node': 20.11.17 dev: true - /@types/qs/6.9.11: + /@types/qs@6.9.11: resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==} dev: true - /@types/range-parser/1.2.7: + /@types/range-parser@1.2.7: resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + requiresBuild: true dev: true optional: true - /@types/readable-stream/2.3.15: - resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} - dependencies: - '@types/node': 20.11.17 - safe-buffer: 5.1.2 - dev: true - - /@types/responselike/1.0.3: + /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: '@types/node': 20.11.17 dev: true - /@types/secp256k1/4.0.6: + /@types/secp256k1@4.0.6: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: '@types/node': 20.11.17 dev: true - /@types/seedrandom/3.0.1: + /@types/seedrandom@3.0.1: resolution: {integrity: sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==} dev: true - /@types/send/0.17.4: + /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} + requiresBuild: true dependencies: '@types/mime': 1.3.5 '@types/node': 20.11.17 dev: true optional: true - /@types/serve-static/1.15.5: + /@types/serve-static@1.15.5: resolution: {integrity: sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==} + requiresBuild: true dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 @@ -2519,45 +2489,46 @@ packages: dev: true optional: true - /@types/triple-beam/1.3.5: + /@types/triple-beam@1.3.5: resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} dev: true - /@ungap/structured-clone/1.2.0: + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /abi-to-sol/0.7.1: + /abi-to-sol@0.7.1: resolution: {integrity: sha512-GcpyiHA+sTbmSEAbBWsXS5iO3WBGuqhsiBo3WH9VHthNFF/k438mXFJtS/SUxtm8HmbCMv/BnxokUX6w4y2eFg==} hasBin: true dependencies: '@truffle/abi-utils': 1.0.3 '@truffle/contract-schema': 3.4.16 ajv: 6.12.6 - better-ajv-errors: 0.8.2_ajv@6.12.6 + better-ajv-errors: 0.8.2(ajv@6.12.6) neodoc: 2.0.2 semver: 7.6.0 source-map-support: 0.5.21 optionalDependencies: prettier: 2.8.8 - prettier-plugin-solidity: 1.3.1_prettier@2.8.8 + prettier-plugin-solidity: 1.3.1(prettier@2.8.8) transitivePeerDependencies: - supports-color dev: true - /abort-controller/3.0.0: + /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + requiresBuild: true dependencies: event-target-shim: 5.0.1 dev: true optional: true - /abortcontroller-polyfill/1.7.5: + /abortcontroller-polyfill@1.7.5: resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} dev: true - /abstract-level/1.0.3: + /abstract-level@1.0.3: resolution: {integrity: sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==} engines: {node: '>=12'} dependencies: @@ -2570,29 +2541,18 @@ packages: queue-microtask: 1.2.3 dev: true - /abstract-level/1.0.4: - resolution: {integrity: sha512-eUP/6pbXBkMbXFdx4IH2fVgvB7M0JvR7/lIL33zcs0IBcwjdzSSl31TOJsaCzmKSSDF9h8QYSOJux4Nd4YJqFg==} - engines: {node: '>=12'} - dependencies: - buffer: 6.0.3 - catering: 2.1.1 - is-buffer: 2.0.5 - level-supports: 4.0.1 - level-transcoder: 1.0.1 - module-error: 1.0.2 - queue-microtask: 1.2.3 - dev: true - - /abstract-leveldown/2.7.2: + /abstract-leveldown@2.7.2: resolution: {integrity: sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==} + requiresBuild: true dependencies: xtend: 4.0.2 dev: true optional: true - /abstract-leveldown/6.2.3: + /abstract-leveldown@6.2.3: resolution: {integrity: sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==} engines: {node: '>=6'} + requiresBuild: true dependencies: buffer: 5.7.1 immediate: 3.3.0 @@ -2602,7 +2562,7 @@ packages: dev: true optional: true - /abstract-leveldown/7.2.0: + /abstract-leveldown@7.2.0: resolution: {integrity: sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==} engines: {node: '>=10'} dependencies: @@ -2614,7 +2574,7 @@ packages: queue-microtask: 1.2.3 dev: true - /accepts/1.3.8: + /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} dependencies: @@ -2622,7 +2582,7 @@ packages: negotiator: 0.6.3 dev: true - /acorn-jsx/5.3.2_acorn@8.11.3: + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2630,37 +2590,37 @@ packages: acorn: 8.11.3 dev: true - /acorn/8.11.3: + /acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true - /adm-zip/0.4.16: + /adm-zip@0.4.16: resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} engines: {node: '>=0.3.0'} dev: true - /ado-contracts/1.0.0: + /ado-contracts@1.0.0: resolution: {integrity: sha512-tLJdlGed3Fcwih4m9yNaI3+PqfxKarbLBR2OavM8RiPX8zo5TrLUZ6akrqkK+BFBInhaxONnMKsWiHj4QNPdCw==} dependencies: - '@openzeppelin/contracts': 4.9.5 + '@openzeppelin/contracts': 4.8.0 dev: true - /aes-js/3.0.0: + /aes-js@3.0.0: resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} dev: true - /agent-base/6.0.2: + /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true - /aggregate-error/3.1.0: + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} dependencies: @@ -2668,8 +2628,10 @@ packages: indent-string: 4.0.0 dev: true - /ajv-formats/2.1.1: + /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 peerDependenciesMeta: ajv: optional: true @@ -2677,7 +2639,7 @@ packages: ajv: 8.12.0 dev: true - /ajv/6.12.6: + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 @@ -2686,7 +2648,7 @@ packages: uri-js: 4.4.1 dev: true - /ajv/8.12.0: + /ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 @@ -2695,73 +2657,73 @@ packages: uri-js: 4.4.1 dev: true - /ansi-align/3.0.1: + /ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} dependencies: string-width: 4.2.3 dev: true - /ansi-colors/3.2.4: + /ansi-colors@3.2.4: resolution: {integrity: sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==} engines: {node: '>=6'} dev: true - /ansi-colors/4.1.1: + /ansi-colors@4.1.1: resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} engines: {node: '>=6'} dev: true - /ansi-colors/4.1.3: + /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} dev: true - /ansi-escapes/4.3.2: + /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} dependencies: type-fest: 0.21.3 dev: true - /ansi-regex/2.1.1: + /ansi-regex@2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} dev: true - /ansi-regex/3.0.1: + /ansi-regex@3.0.1: resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} engines: {node: '>=4'} dev: true - /ansi-regex/5.0.1: + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: true - /ansi-styles/3.2.1: + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} dependencies: color-convert: 1.9.3 dev: true - /ansi-styles/4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 dev: true - /antlr4/4.13.1: + /antlr4@4.13.1: resolution: {integrity: sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==} engines: {node: '>=16'} dev: true - /antlr4ts/0.5.0-alpha.4: + /antlr4ts@0.5.0-alpha.4: resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} dev: true - /anymatch/3.1.3: + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} dependencies: @@ -2769,10 +2731,11 @@ packages: picomatch: 2.3.1 dev: true - /apollo-datasource/3.3.2: + /apollo-datasource@3.3.2: resolution: {integrity: sha512-L5TiS8E2Hn/Yz7SSnWIVbZw0ZfEIXZCa5VUiVxD9P53JvSrf4aStvsFDlGWPvpIdCR+aly2CfoB79B9/JjKFqg==} engines: {node: '>=12.0'} deprecated: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true dependencies: '@apollo/utils.keyvaluecache': 1.0.2 apollo-server-env: 4.2.1 @@ -2781,38 +2744,40 @@ packages: dev: true optional: true - /apollo-reporting-protobuf/3.4.0: + /apollo-reporting-protobuf@3.4.0: resolution: {integrity: sha512-h0u3EbC/9RpihWOmcSsvTW2O6RXVaD/mPEjfrPkxRPTEPWqncsgOoRJw+wih4OqfH3PvTJvoEIf4LwKrUaqWog==} deprecated: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true dependencies: '@apollo/protobufjs': 1.2.6 dev: true optional: true - /apollo-server-core/3.13.0_graphql@15.8.0: + /apollo-server-core@3.13.0(graphql@15.8.0): resolution: {integrity: sha512-v/g6DR6KuHn9DYSdtQijz8dLOkP78I5JSVJzPkARhDbhpH74QNwrQ2PP2URAPPEDJ2EeZNQDX8PvbYkAKqg+kg==} engines: {node: '>=12.0'} + requiresBuild: true peerDependencies: graphql: ^15.3.0 || ^16.0.0 dependencies: '@apollo/utils.keyvaluecache': 1.0.2 '@apollo/utils.logger': 1.0.1 - '@apollo/utils.usagereporting': 1.0.1_graphql@15.8.0 - '@apollographql/apollo-tools': 0.5.4_graphql@15.8.0 + '@apollo/utils.usagereporting': 1.0.1(graphql@15.8.0) + '@apollographql/apollo-tools': 0.5.4(graphql@15.8.0) '@apollographql/graphql-playground-html': 1.6.29 - '@graphql-tools/mock': 8.7.20_graphql@15.8.0 - '@graphql-tools/schema': 8.5.1_graphql@15.8.0 + '@graphql-tools/mock': 8.7.20(graphql@15.8.0) + '@graphql-tools/schema': 8.5.1(graphql@15.8.0) '@josephg/resolvable': 1.0.1 apollo-datasource: 3.3.2 apollo-reporting-protobuf: 3.4.0 apollo-server-env: 4.2.1 - apollo-server-errors: 3.3.1_graphql@15.8.0 - apollo-server-plugin-base: 3.7.2_graphql@15.8.0 - apollo-server-types: 3.8.0_graphql@15.8.0 + apollo-server-errors: 3.3.1(graphql@15.8.0) + apollo-server-plugin-base: 3.7.2(graphql@15.8.0) + apollo-server-types: 3.8.0(graphql@15.8.0) async-retry: 1.3.3 fast-json-stable-stringify: 2.1.0 graphql: 15.8.0 - graphql-tag: 2.12.6_graphql@15.8.0 + graphql-tag: 2.12.6(graphql@15.8.0) loglevel: 1.9.1 lru-cache: 6.0.0 node-abort-controller: 3.1.1 @@ -2824,10 +2789,11 @@ packages: dev: true optional: true - /apollo-server-env/4.2.1: + /apollo-server-env@4.2.1: resolution: {integrity: sha512-vm/7c7ld+zFMxibzqZ7SSa5tBENc4B0uye9LTfjJwGoQFY5xsUPH5FpO5j0bMUDZ8YYNbrF9SNtzc5Cngcr90g==} engines: {node: '>=12.0'} deprecated: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -2835,10 +2801,11 @@ packages: dev: true optional: true - /apollo-server-errors/3.3.1_graphql@15.8.0: + /apollo-server-errors@3.3.1(graphql@15.8.0): resolution: {integrity: sha512-xnZJ5QWs6FixHICXHxUfm+ZWqqxrNuPlQ+kj5m6RtEgIpekOPssH/SD9gf2B4HuWV0QozorrygwZnux8POvyPA==} engines: {node: '>=12.0'} deprecated: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true peerDependencies: graphql: ^15.3.0 || ^16.0.0 dependencies: @@ -2846,9 +2813,10 @@ packages: dev: true optional: true - /apollo-server-express/3.13.0_4mq2c443wwzwcb6dpxnwkfvrzm: + /apollo-server-express@3.13.0(express@4.18.2)(graphql@15.8.0): resolution: {integrity: sha512-iSxICNbDUyebOuM8EKb3xOrpIwOQgKxGbR2diSr4HP3IW8T3njKFOoMce50vr+moOCe1ev8BnLcw9SNbuUtf7g==} engines: {node: '>=12.0'} + requiresBuild: true peerDependencies: express: ^4.17.1 graphql: ^15.3.0 || ^16.0.0 @@ -2859,8 +2827,8 @@ packages: '@types/express': 4.17.14 '@types/express-serve-static-core': 4.17.31 accepts: 1.3.8 - apollo-server-core: 3.13.0_graphql@15.8.0 - apollo-server-types: 3.8.0_graphql@15.8.0 + apollo-server-core: 3.13.0(graphql@15.8.0) + apollo-server-types: 3.8.0(graphql@15.8.0) body-parser: 1.20.2 cors: 2.8.5 express: 4.18.2 @@ -2872,24 +2840,26 @@ packages: dev: true optional: true - /apollo-server-plugin-base/3.7.2_graphql@15.8.0: + /apollo-server-plugin-base@3.7.2(graphql@15.8.0): resolution: {integrity: sha512-wE8dwGDvBOGehSsPTRZ8P/33Jan6/PmL0y0aN/1Z5a5GcbFhDaaJCjK5cav6npbbGL2DPKK0r6MPXi3k3N45aw==} engines: {node: '>=12.0'} deprecated: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true peerDependencies: graphql: ^15.3.0 || ^16.0.0 dependencies: - apollo-server-types: 3.8.0_graphql@15.8.0 + apollo-server-types: 3.8.0(graphql@15.8.0) graphql: 15.8.0 transitivePeerDependencies: - encoding dev: true optional: true - /apollo-server-types/3.8.0_graphql@15.8.0: + /apollo-server-types@3.8.0(graphql@15.8.0): resolution: {integrity: sha512-ZI/8rTE4ww8BHktsVpb91Sdq7Cb71rdSkXELSwdSR0eXu600/sY+1UXhTWdiJvk+Eq5ljqoHLwLbY2+Clq2b9A==} engines: {node: '>=12.0'} deprecated: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. + requiresBuild: true peerDependencies: graphql: ^15.3.0 || ^16.0.0 dependencies: @@ -2903,14 +2873,15 @@ packages: dev: true optional: true - /apollo-server/3.13.0_graphql@15.8.0: + /apollo-server@3.13.0(graphql@15.8.0): resolution: {integrity: sha512-hgT/MswNB5G1r+oBhggVX4Fjw53CFLqG15yB5sN+OrYkCVWF5YwPbJWHfSWa7699JMEXJGaoVfFzcvLZK0UlDg==} + requiresBuild: true peerDependencies: graphql: ^15.3.0 || ^16.0.0 dependencies: '@types/express': 4.17.14 - apollo-server-core: 3.13.0_graphql@15.8.0 - apollo-server-express: 3.13.0_4mq2c443wwzwcb6dpxnwkfvrzm + apollo-server-core: 3.13.0(graphql@15.8.0) + apollo-server-express: 3.13.0(express@4.18.2)(graphql@15.8.0) express: 4.18.2 graphql: 15.8.0 transitivePeerDependencies: @@ -2919,20 +2890,21 @@ packages: dev: true optional: true - /app-module-path/2.2.0: + /app-module-path@2.2.0: resolution: {integrity: sha512-gkco+qxENJV+8vFcDiiFhuoSvRXb2a/QPqpSoWhVz829VNJfOTnELbBmPmNKFxf3xdNnw4DWCkzkDaavcX/1YQ==} dev: true - /argparse/2.0.1: + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /argsarray/0.0.1: + /argsarray@0.0.1: resolution: {integrity: sha512-u96dg2GcAKtpTrBdDoFIM7PjcBA+6rSP0OR94MOReNRyUECL6MtQt5XXmRr4qrftYaef9+l5hcpO5te7sML1Cg==} + requiresBuild: true dev: true optional: true - /array-buffer-byte-length/1.0.1: + /array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} dependencies: @@ -2940,11 +2912,11 @@ packages: is-array-buffer: 3.0.4 dev: true - /array-flatten/1.1.1: + /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: true - /array-includes/3.1.7: + /array-includes@3.1.7: resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} engines: {node: '>= 0.4'} dependencies: @@ -2955,7 +2927,7 @@ packages: is-string: 1.0.7 dev: true - /array.prototype.filter/1.0.3: + /array.prototype.filter@1.0.3: resolution: {integrity: sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==} engines: {node: '>= 0.4'} dependencies: @@ -2966,7 +2938,7 @@ packages: is-string: 1.0.7 dev: true - /array.prototype.findlastindex/1.2.4: + /array.prototype.findlastindex@1.2.4: resolution: {integrity: sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==} engines: {node: '>= 0.4'} dependencies: @@ -2977,7 +2949,7 @@ packages: es-shim-unscopables: 1.0.2 dev: true - /array.prototype.flat/1.3.2: + /array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} dependencies: @@ -2987,7 +2959,7 @@ packages: es-shim-unscopables: 1.0.2 dev: true - /array.prototype.flatmap/1.3.2: + /array.prototype.flatmap@1.3.2: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: @@ -2997,7 +2969,7 @@ packages: es-shim-unscopables: 1.0.2 dev: true - /arraybuffer.prototype.slice/1.0.3: + /arraybuffer.prototype.slice@1.0.3: resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} dependencies: @@ -3011,153 +2983,154 @@ packages: is-shared-array-buffer: 1.0.2 dev: true - /asap/2.0.6: + /asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: true - /asn1/0.2.6: + /asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} dependencies: safer-buffer: 2.1.2 dev: true - /assert-plus/1.0.0: + /assert-plus@1.0.0: resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} engines: {node: '>=0.8'} dev: true - /assertion-error/1.1.0: + /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /assertion-error/2.0.1: + /assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} dev: true - /ast-parents/0.0.1: + /ast-parents@0.0.1: resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} dev: true - /astral-regex/2.0.0: + /astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} dev: true - /async-eventemitter/0.2.4: + /async-eventemitter@0.2.4: resolution: {integrity: sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==} dependencies: async: 2.6.4 dev: true - /async-limiter/1.0.1: + /async-limiter@1.0.1: resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} dev: true - /async-retry/1.3.3: + /async-retry@1.3.3: resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} + requiresBuild: true dependencies: retry: 0.13.1 dev: true optional: true - /async/2.6.4: + /async@2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: lodash: 4.17.21 dev: true - /async/3.2.5: + /async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} dev: true - /asynckit/0.4.0: + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /at-least-node/1.0.0: + /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} dev: true - /atomically/1.7.0: + /atomically@1.7.0: resolution: {integrity: sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==} engines: {node: '>=10.12.0'} dev: true - /available-typed-arrays/1.0.6: + /available-typed-arrays@1.0.6: resolution: {integrity: sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==} engines: {node: '>= 0.4'} dev: true - /aws-sign2/0.7.0: + /aws-sign2@0.7.0: resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} dev: true - /aws4/1.12.0: + /aws4@1.12.0: resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} dev: true - /axios-retry/3.9.1: + /axios-retry@3.9.1: resolution: {integrity: sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w==} dependencies: '@babel/runtime': 7.23.9 is-retry-allowed: 2.2.0 dev: true - /axios/0.26.1: + /axios@0.26.1: resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} dependencies: - follow-redirects: 1.15.5 + follow-redirects: 1.15.5(debug@4.3.4) transitivePeerDependencies: - debug dev: true - /axios/1.5.0_debug@4.3.4: + /axios@1.5.0(debug@4.3.4): resolution: {integrity: sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==} dependencies: - follow-redirects: 1.15.5 + follow-redirects: 1.15.5(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug dev: true - /axios/1.6.7: + /axios@1.6.7: resolution: {integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==} dependencies: - follow-redirects: 1.15.5 + follow-redirects: 1.15.5(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug dev: true - /balanced-match/1.0.2: + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true - /base-x/3.0.9: + /base-x@3.0.9: resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} dependencies: safe-buffer: 5.2.1 dev: true - /base64-js/1.5.1: + /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true - /bcrypt-pbkdf/1.0.2: + /bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} dependencies: tweetnacl: 0.14.5 dev: true - /bech32/1.1.4: + /bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} dev: true - /better-ajv-errors/0.8.2_ajv@6.12.6: + /better-ajv-errors@0.8.2(ajv@6.12.6): resolution: {integrity: sha512-FnODTBJSQSHmJXDLPiC7ca0dC4S1HSTPv1+Hg2sm/C71i3Dj0l1jcUEaq/3OQ6MmnUveshTsUvUj65pDSr3Qow==} peerDependencies: ajv: 4.11.8 - 8 @@ -3172,54 +3145,49 @@ packages: leven: 3.1.0 dev: true - /big-integer/1.6.36: + /big-integer@1.6.36: resolution: {integrity: sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==} engines: {node: '>=0.6'} dev: true - /big.js/6.2.1: + /big.js@6.2.1: resolution: {integrity: sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==} dev: true - /bigint-crypto-utils/3.3.0: - resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} - engines: {node: '>=14.0.0'} - dev: true - - /bignumber.js/7.2.1: + /bignumber.js@7.2.1: resolution: {integrity: sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==} dev: true - /bignumber.js/9.1.2: + /bignumber.js@9.1.2: resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} dev: true - /binary-extensions/2.2.0: + /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: true - /blakejs/1.2.1: + /blakejs@1.2.1: resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} dev: true - /bluebird/3.7.2: + /bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true - /bn.js/4.11.6: + /bn.js@4.11.6: resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} dev: true - /bn.js/4.12.0: + /bn.js@4.12.0: resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} dev: true - /bn.js/5.2.1: + /bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} dev: true - /body-parser/1.19.2: + /body-parser@1.19.2: resolution: {integrity: sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==} engines: {node: '>= 0.8'} dependencies: @@ -3237,7 +3205,7 @@ packages: - supports-color dev: true - /body-parser/1.20.1: + /body-parser@1.20.1: resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: @@ -3257,7 +3225,7 @@ packages: - supports-color dev: true - /body-parser/1.20.2: + /body-parser@1.20.2: resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: @@ -3277,11 +3245,11 @@ packages: - supports-color dev: true - /boolbase/1.0.0: + /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: true - /boxen/5.1.2: + /boxen@5.1.2: resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} engines: {node: '>=10'} dependencies: @@ -3295,44 +3263,35 @@ packages: wrap-ansi: 7.0.0 dev: true - /brace-expansion/1.1.11: + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 dev: true - /brace-expansion/2.0.1: + /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 dev: true - /braces/3.0.2: + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} dependencies: fill-range: 7.0.1 dev: true - /brorand/1.1.0: + /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} dev: true - /browser-level/1.0.1: - resolution: {integrity: sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==} - dependencies: - abstract-level: 1.0.4 - catering: 2.1.1 - module-error: 1.0.2 - run-parallel-limit: 1.1.0 - dev: true - - /browser-stdout/1.3.1: + /browser-stdout@1.3.1: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} dev: true - /browserify-aes/1.2.0: + /browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} dependencies: buffer-xor: 1.0.3 @@ -3343,13 +3302,13 @@ packages: safe-buffer: 5.2.1 dev: true - /bs58/4.0.1: + /bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} dependencies: base-x: 3.0.9 dev: true - /bs58check/2.1.2: + /bs58check@2.1.2: resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} dependencies: bs58: 4.0.1 @@ -3357,33 +3316,33 @@ packages: safe-buffer: 5.2.1 dev: true - /buffer-from/1.1.2: + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true - /buffer-to-arraybuffer/0.0.5: + /buffer-to-arraybuffer@0.0.5: resolution: {integrity: sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==} dev: true - /buffer-xor/1.0.3: + /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} dev: true - /buffer/5.7.1: + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true - /buffer/6.0.3: + /buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true - /bufferutil/4.0.5: + /bufferutil@4.0.5: resolution: {integrity: sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -3392,7 +3351,7 @@ packages: dev: true optional: true - /bufferutil/4.0.7: + /bufferutil@4.0.7: resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -3400,7 +3359,7 @@ packages: node-gyp-build: 4.8.0 dev: true - /bufferutil/4.0.8: + /bufferutil@4.0.8: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -3408,38 +3367,38 @@ packages: node-gyp-build: 4.8.0 dev: true - /builtin-modules/3.3.0: + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} dev: true - /builtins/5.0.1: + /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: semver: 7.6.0 dev: true - /bytes/3.1.2: + /bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} dev: true - /cacheable-lookup/5.0.4: + /cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} dev: true - /cacheable-lookup/6.1.0: + /cacheable-lookup@6.1.0: resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} engines: {node: '>=10.6.0'} dev: true - /cacheable-lookup/7.0.0: + /cacheable-lookup@7.0.0: resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} engines: {node: '>=14.16'} dev: true - /cacheable-request/10.2.14: + /cacheable-request@10.2.14: resolution: {integrity: sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==} engines: {node: '>=14.16'} dependencies: @@ -3452,7 +3411,7 @@ packages: responselike: 3.0.0 dev: true - /cacheable-request/7.0.4: + /cacheable-request@7.0.4: resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} engines: {node: '>=8'} dependencies: @@ -3465,7 +3424,7 @@ packages: responselike: 2.0.1 dev: true - /call-bind/1.0.7: + /call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} dependencies: @@ -3476,48 +3435,43 @@ packages: set-function-length: 1.2.1 dev: true - /callsites/3.1.0: + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} dev: true - /camel-case/3.0.0: + /camel-case@3.0.0: resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} dependencies: no-case: 2.3.2 upper-case: 1.1.3 dev: true - /camelcase/3.0.0: + /camelcase@3.0.0: resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==} engines: {node: '>=0.10.0'} dev: true - /camelcase/4.1.0: + /camelcase@4.1.0: resolution: {integrity: sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==} engines: {node: '>=4'} dev: true - /camelcase/6.3.0: + /camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} dev: true - /case/1.6.3: - resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} - engines: {node: '>= 0.8.0'} - dev: true - - /caseless/0.12.0: + /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: true - /catering/2.1.1: + /catering@2.1.1: resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} engines: {node: '>=6'} dev: true - /cbor/5.2.0: + /cbor@5.2.0: resolution: {integrity: sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==} engines: {node: '>=6.0.0'} dependencies: @@ -3525,21 +3479,21 @@ packages: nofilter: 1.0.4 dev: true - /cbor/8.1.0: + /cbor@8.1.0: resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} engines: {node: '>=12.19'} dependencies: nofilter: 3.1.0 dev: true - /cbor/9.0.2: + /cbor@9.0.2: resolution: {integrity: sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==} engines: {node: '>=16'} dependencies: nofilter: 3.1.0 dev: true - /chai-bn/0.2.2_bn.js@4.12.0+chai@4.4.1: + /chai-bn@0.2.2(bn.js@4.12.0)(chai@4.4.1): resolution: {integrity: sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==} peerDependencies: bn.js: ^4.11.0 @@ -3549,7 +3503,7 @@ packages: chai: 4.4.1 dev: true - /chai/4.4.1: + /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} dependencies: @@ -3562,7 +3516,7 @@ packages: type-detect: 4.0.8 dev: true - /chai/5.1.0: + /chai@5.1.0: resolution: {integrity: sha512-kDZ7MZyM6Q1DhR9jy7dalKohXQ2yrlXkk59CR52aRKxJrobmlBNqnFQxX9xOX8w+4mz8SYlKJa/7D7ddltFXCw==} engines: {node: '>=12'} dependencies: @@ -3573,7 +3527,7 @@ packages: pathval: 2.0.0 dev: true - /chalk/2.4.2: + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} dependencies: @@ -3582,7 +3536,7 @@ packages: supports-color: 5.5.0 dev: true - /chalk/4.1.2: + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} dependencies: @@ -3590,7 +3544,7 @@ packages: supports-color: 7.2.0 dev: true - /change-case/3.0.2: + /change-case@3.0.2: resolution: {integrity: sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==} dependencies: camel-case: 3.0.0 @@ -3613,22 +3567,22 @@ packages: upper-case-first: 1.1.2 dev: true - /charenc/0.0.2: + /charenc@0.0.2: resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: true - /check-error/1.0.3: + /check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} dependencies: get-func-name: 2.0.2 dev: true - /check-error/2.0.0: + /check-error@2.0.0: resolution: {integrity: sha512-tjLAOBHKVxtPoHe/SA7kNOMvhCRdCJ3vETdeY0RuAc9popf+hyaSV6ZEg9hr4cpWF7jmo/JSWEnLDrnijS9Tog==} engines: {node: '>= 16'} dev: true - /cheerio-select/2.1.0: + /cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} dependencies: boolbase: 1.0.0 @@ -3639,7 +3593,7 @@ packages: domutils: 3.1.0 dev: true - /cheerio/1.0.0-rc.12: + /cheerio@1.0.0-rc.12: resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} engines: {node: '>= 6'} dependencies: @@ -3652,7 +3606,7 @@ packages: parse5-htmlparser2-tree-adapter: 7.0.0 dev: true - /chokidar/3.5.3: + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} dependencies: @@ -3667,30 +3621,22 @@ packages: fsevents: 2.3.3 dev: true - /chokidar/3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} + /chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 + readdirp: 4.0.2 dev: true - /chownr/1.1.4: + /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} dev: true - /ci-info/2.0.0: + /ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: true - /cids/0.7.5: + /cids@0.7.5: resolution: {integrity: sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==} engines: {node: '>=4.0.0', npm: '>=3.0.0'} deprecated: This module has been superseded by the multiformats module @@ -3702,62 +3648,50 @@ packages: multihashes: 0.4.21 dev: true - /cipher-base/1.0.4: + /cipher-base@1.0.4: resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 dev: true - /circular/1.0.5: + /circular@1.0.5: resolution: {integrity: sha512-n4Sspha+wxUl5zeA3JYp1zFCjsLz2VfXIe2gRKNQBrIX+7iPdGcCGZOF8W8IULtllZ/aejXtySfdFFt1wy/3JQ==} dev: true - /class-is/1.1.0: + /class-is@1.1.0: resolution: {integrity: sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==} dev: true - /classic-level/1.4.1: - resolution: {integrity: sha512-qGx/KJl3bvtOHrGau2WklEZuXhS3zme+jf+fsu6Ej7W7IP/C49v7KNlWIsT1jZu0YnfzSIYDGcEWpCa1wKGWXQ==} - engines: {node: '>=12'} - requiresBuild: true - dependencies: - abstract-level: 1.0.4 - catering: 2.1.1 - module-error: 1.0.2 - napi-macros: 2.2.2 - node-gyp-build: 4.8.0 - dev: true - - /clean-stack/2.2.0: + /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} dev: true - /cli-boxes/2.2.1: + /cli-boxes@2.2.1: resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} engines: {node: '>=6'} dev: true - /cli-cursor/3.1.0: + /cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} dependencies: restore-cursor: 3.1.0 dev: true - /cli-logger/0.5.40: + /cli-logger@0.5.40: resolution: {integrity: sha512-piXVCa0TLm/+A7xdVEhw7t4OSrsmJaZIekWcoGrVMY1bHtLJTXgiNzgHlKT0EVHQ14sCKWorQJazU7UWgZhXOQ==} dependencies: circular: 1.0.5 cli-util: 1.1.27 dev: true - /cli-regexp/0.1.2: + /cli-regexp@0.1.2: resolution: {integrity: sha512-L++cAQ5g0Nu6aV56B3uaR+c7jEGSAa4WApY1ZN7XiD8niJ5jRfXE/qvMwgz3uZBG0rft4hJS75Vpz2F3mSm4Mg==} dev: true - /cli-table3/0.5.1: + /cli-table3@0.5.1: resolution: {integrity: sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==} engines: {node: '>=6'} dependencies: @@ -3767,13 +3701,13 @@ packages: colors: 1.4.0 dev: true - /cli-util/1.1.27: + /cli-util@1.1.27: resolution: {integrity: sha512-Z6+zI0kIrqf9Oi+PmUm8J9AELp8bTf2vCLYseudYtdOPNJvzpNiExO95aHIm477IbPdu/8SE9Wvc/M1kJl4Anw==} dependencies: cli-regexp: 0.1.2 dev: true - /cliui/3.2.0: + /cliui@3.2.0: resolution: {integrity: sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==} dependencies: string-width: 1.0.2 @@ -3781,7 +3715,7 @@ packages: wrap-ansi: 2.1.0 dev: true - /cliui/7.0.4: + /cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: string-width: 4.2.3 @@ -3789,110 +3723,108 @@ packages: wrap-ansi: 7.0.0 dev: true - /clone-buffer/1.0.0: + /clone-buffer@1.0.0: resolution: {integrity: sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==} engines: {node: '>= 0.10'} + requiresBuild: true dev: true optional: true - /clone-response/1.0.3: + /clone-response@1.0.3: resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} dependencies: mimic-response: 1.0.1 dev: true - /code-error-fragment/0.0.230: + /code-error-fragment@0.0.230: resolution: {integrity: sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==} engines: {node: '>= 4'} dev: true - /code-point-at/1.1.0: + /code-point-at@1.1.0: resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} engines: {node: '>=0.10.0'} dev: true - /color-convert/1.9.3: + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 dev: true - /color-convert/2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 dev: true - /color-name/1.1.3: + /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /color-string/1.9.1: + /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 dev: true - /color/3.2.1: + /color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} dependencies: color-convert: 1.9.3 color-string: 1.9.1 dev: true - /colors/1.4.0: + /colors@1.4.0: resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} engines: {node: '>=0.1.90'} dev: true - /colorspace/1.1.4: + /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} dependencies: color: 3.2.1 text-hex: 1.0.0 dev: true - /combined-stream/1.0.8: + /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 dev: true - /command-exists/1.2.9: + /command-exists@1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} dev: true - /commander/10.0.1: + /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} dev: true - /commander/2.20.3: + /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + requiresBuild: true dev: true optional: true - /commander/3.0.2: - resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} - dev: true - - /commander/8.3.0: + /commander@8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} dev: true - /concat-map/0.0.1: + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /concat-stream/1.6.2: + /concat-stream@1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} engines: {'0': node >= 0.8} dependencies: @@ -3902,12 +3834,12 @@ packages: typedarray: 0.0.6 dev: true - /conf/10.2.0: + /conf@10.2.0: resolution: {integrity: sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg==} engines: {node: '>=12'} dependencies: ajv: 8.12.0 - ajv-formats: 2.1.1 + ajv-formats: 2.1.1(ajv@8.12.0) atomically: 1.7.0 debounce-fn: 4.0.0 dot-prop: 6.0.1 @@ -3918,28 +3850,28 @@ packages: semver: 7.6.0 dev: true - /config-chain/1.1.13: + /config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} dependencies: ini: 1.3.8 proto-list: 1.2.4 dev: true - /constant-case/2.0.0: + /constant-case@2.0.0: resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} dependencies: snake-case: 2.1.0 upper-case: 1.1.3 dev: true - /content-disposition/0.5.4: + /content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 dev: true - /content-hash/2.5.2: + /content-hash@2.5.2: resolution: {integrity: sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==} dependencies: cids: 0.7.5 @@ -3947,39 +3879,39 @@ packages: multihashes: 0.4.21 dev: true - /content-type/1.0.5: + /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} dev: true - /cookie-signature/1.0.6: + /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: true - /cookie/0.4.2: + /cookie@0.4.2: resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} engines: {node: '>= 0.6'} dev: true - /cookie/0.5.0: + /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} dev: true - /core-js/3.36.0: + /core-js@3.36.0: resolution: {integrity: sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw==} requiresBuild: true dev: true - /core-util-is/1.0.2: + /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} dev: true - /core-util-is/1.0.3: + /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cors/2.8.5: + /cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} dependencies: @@ -3987,7 +3919,7 @@ packages: vary: 1.1.2 dev: true - /cosmiconfig/8.3.6: + /cosmiconfig@8.3.6: resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} peerDependencies: @@ -4002,13 +3934,13 @@ packages: path-type: 4.0.0 dev: true - /crc-32/1.2.2: + /crc-32@1.2.2: resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} engines: {node: '>=0.8'} hasBin: true dev: true - /create-hash/1.2.0: + /create-hash@1.2.0: resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} dependencies: cipher-base: 1.0.4 @@ -4018,7 +3950,7 @@ packages: sha.js: 2.4.11 dev: true - /create-hmac/1.1.7: + /create-hmac@1.1.7: resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} dependencies: cipher-base: 1.0.4 @@ -4029,7 +3961,7 @@ packages: sha.js: 2.4.11 dev: true - /cross-env/7.0.3: + /cross-env@7.0.3: resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true @@ -4037,7 +3969,7 @@ packages: cross-spawn: 7.0.3 dev: true - /cross-fetch/3.1.8: + /cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} dependencies: node-fetch: 2.7.0 @@ -4045,7 +3977,7 @@ packages: - encoding dev: true - /cross-fetch/4.0.0: + /cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} dependencies: node-fetch: 2.7.0 @@ -4053,7 +3985,7 @@ packages: - encoding dev: true - /cross-spawn/7.0.3: + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} dependencies: @@ -4062,11 +3994,11 @@ packages: which: 2.0.2 dev: true - /crypt/0.0.2: + /crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: true - /crypto-addr-codec/0.1.8: + /crypto-addr-codec@0.1.8: resolution: {integrity: sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g==} dependencies: base-x: 3.0.9 @@ -4078,7 +4010,7 @@ packages: sha3: 2.1.4 dev: true - /css-select/5.1.0: + /css-select@5.1.0: resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} dependencies: boolbase: 1.0.0 @@ -4088,17 +4020,18 @@ packages: nth-check: 2.1.1 dev: true - /css-what/6.1.0: + /css-what@6.1.0: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} dev: true - /cssfilter/0.0.10: + /cssfilter@0.0.10: resolution: {integrity: sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==} + requiresBuild: true dev: true optional: true - /custom-error-test-helper/1.0.6: + /custom-error-test-helper@1.0.6: resolution: {integrity: sha512-mtSur97B5c2Nxx0HS7VQtVl9FMNl/Xf13RxTWwfMLIKnNVror/e43ll6VWjs+J5gP2E6AZn5+Z0AqTNF5UXIcw==} dependencies: '@ethersproject/abi': 5.7.0 @@ -4107,33 +4040,34 @@ packages: chai: 4.4.1 dev: true - /d/1.0.1: + /d@1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} dependencies: es5-ext: 0.10.62 type: 1.2.0 dev: true - /dashdash/1.14.1: + /dashdash@1.14.1: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} dependencies: assert-plus: 1.0.0 dev: true - /dataloader/2.1.0: + /dataloader@2.1.0: resolution: {integrity: sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==} + requiresBuild: true dev: true optional: true - /debounce-fn/4.0.0: + /debounce-fn@4.0.0: resolution: {integrity: sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==} engines: {node: '>=10'} dependencies: mimic-fn: 3.1.0 dev: true - /debug/2.6.9: + /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: supports-color: '*' @@ -4144,8 +4078,9 @@ packages: ms: 2.0.0 dev: true - /debug/3.1.0: + /debug@3.1.0: resolution: {integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==} + requiresBuild: true peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -4156,7 +4091,7 @@ packages: dev: true optional: true - /debug/3.2.7: + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: supports-color: '*' @@ -4167,19 +4102,7 @@ packages: ms: 2.1.3 dev: true - /debug/4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - - /debug/4.3.4_supports-color@8.1.1: + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -4192,71 +4115,72 @@ packages: supports-color: 8.1.1 dev: true - /decamelize/1.2.0: + /decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} dev: true - /decamelize/4.0.0: + /decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} engines: {node: '>=10'} dev: true - /decode-uri-component/0.2.2: + /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} dev: true - /decompress-response/3.3.0: + /decompress-response@3.3.0: resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} engines: {node: '>=4'} dependencies: mimic-response: 1.0.1 dev: true - /decompress-response/6.0.0: + /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} dependencies: mimic-response: 3.1.0 dev: true - /deep-eql/4.1.3: + /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} dependencies: type-detect: 4.0.8 dev: true - /deep-eql/5.0.1: + /deep-eql@5.0.1: resolution: {integrity: sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==} engines: {node: '>=6'} dev: true - /deep-extend/0.6.0: + /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} dev: true - /deep-is/0.1.4: + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /defer-to-connect/2.0.1: + /defer-to-connect@2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} dev: true - /deferred-leveldown/5.3.0: + /deferred-leveldown@5.3.0: resolution: {integrity: sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==} engines: {node: '>=6'} + requiresBuild: true dependencies: abstract-leveldown: 6.2.3 inherits: 2.0.4 dev: true optional: true - /define-data-property/1.1.4: + /define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} dependencies: @@ -4265,7 +4189,7 @@ packages: gopd: 1.0.1 dev: true - /define-properties/1.2.1: + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: @@ -4274,71 +4198,71 @@ packages: object-keys: 1.1.1 dev: true - /delay/5.0.0: + /delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} dev: true - /delayed-stream/1.0.0: + /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: true - /depd/1.1.2: + /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} engines: {node: '>= 0.6'} dev: true - /depd/2.0.0: + /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} dev: true - /destroy/1.0.4: + /destroy@1.0.4: resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} dev: true - /destroy/1.2.0: + /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dev: true - /detect-indent/5.0.0: + /detect-indent@5.0.0: resolution: {integrity: sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==} engines: {node: '>=4'} dev: true - /detect-installed/2.0.4: + /detect-installed@2.0.4: resolution: {integrity: sha512-IpGo06Ff/rMGTKjFvVPbY9aE4mRT2XP3eYHC/ZS25LKDr2h8Gbv74Ez2q/qd7IYDqD9ZjI/VGedHNXsbKZ/Eig==} engines: {node: '>=4', npm: '>=2'} dependencies: get-installed-path: 2.1.1 dev: true - /diff/5.0.0: + /diff@5.0.0: resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} engines: {node: '>=0.3.1'} dev: true - /dlv/1.1.3: + /dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} dev: true - /doctrine/2.1.0: + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} dependencies: esutils: 2.0.3 dev: true - /doctrine/3.0.0: + /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 dev: true - /dom-serializer/2.0.0: + /dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} dependencies: domelementtype: 2.3.0 @@ -4346,22 +4270,22 @@ packages: entities: 4.5.0 dev: true - /dom-walk/0.1.2: + /dom-walk@0.1.2: resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==} dev: true - /domelementtype/2.3.0: + /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true - /domhandler/5.0.3: + /domhandler@5.0.3: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} dependencies: domelementtype: 2.3.0 dev: true - /domutils/3.1.0: + /domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} dependencies: dom-serializer: 2.0.0 @@ -4369,46 +4293,47 @@ packages: domhandler: 5.0.3 dev: true - /dot-case/2.1.1: + /dot-case@2.1.1: resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} dependencies: no-case: 2.3.2 dev: true - /dot-prop/6.0.1: + /dot-prop@6.0.1: resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==} engines: {node: '>=10'} dependencies: is-obj: 2.0.0 dev: true - /dotenv/10.0.0: + /dotenv@10.0.0: resolution: {integrity: sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==} engines: {node: '>=10'} dev: true - /dotenv/16.4.4: + /dotenv@16.4.4: resolution: {integrity: sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==} engines: {node: '>=12'} dev: false - /double-ended-queue/2.1.0-0: + /double-ended-queue@2.1.0-0: resolution: {integrity: sha512-+BNfZ+deCo8hMNpDqDnvT+c0XpJ5cUa6mqYq89bho2Ifze4URTqRkcwR399hWoTrTkbZ/XJYDgP6rc7pRgffEQ==} + requiresBuild: true dev: true optional: true - /ecc-jsbn/0.1.2: + /ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} dependencies: jsbn: 0.1.1 safer-buffer: 2.1.2 dev: true - /ee-first/1.1.1: + /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true - /elliptic/6.5.4: + /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: bn.js: 4.12.0 @@ -4420,32 +4345,33 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: true - /emittery/0.10.0: + /emittery@0.10.0: resolution: {integrity: sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==} engines: {node: '>=12'} dev: true - /emittery/0.4.1: + /emittery@0.4.1: resolution: {integrity: sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==} engines: {node: '>=6'} dev: true - /emoji-regex/8.0.0: + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /enabled/2.0.0: + /enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} dev: true - /encodeurl/1.0.2: + /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} dev: true - /encoding-down/6.3.0: + /encoding-down@6.3.0: resolution: {integrity: sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==} engines: {node: '>=6'} + requiresBuild: true dependencies: abstract-leveldown: 6.2.3 inherits: 2.0.4 @@ -4454,20 +4380,21 @@ packages: dev: true optional: true - /end-of-stream/1.4.4: + /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: once: 1.4.0 dev: true - /end-stream/0.1.0: + /end-stream@0.1.0: resolution: {integrity: sha512-Brl10T8kYnc75IepKizW6Y9liyW8ikz1B7n/xoHrJxoVSSjoqPn30sb7XVFfQERK4QfUMYRGs9dhWwtt2eu6uA==} + requiresBuild: true dependencies: write-stream: 0.4.3 dev: true optional: true - /enquirer/2.4.1: + /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} dependencies: @@ -4475,31 +4402,32 @@ packages: strip-ansi: 6.0.1 dev: true - /entities/4.5.0: + /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} dev: true - /env-paths/2.2.1: + /env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} dev: true - /errno/0.1.8: + /errno@0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true + requiresBuild: true dependencies: prr: 1.0.1 dev: true optional: true - /error-ex/1.3.2: + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: true - /es-abstract/1.22.4: + /es-abstract@1.22.4: resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} engines: {node: '>= 0.4'} dependencies: @@ -4546,23 +4474,23 @@ packages: which-typed-array: 1.1.14 dev: true - /es-array-method-boxes-properly/1.0.0: + /es-array-method-boxes-properly@1.0.0: resolution: {integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==} dev: true - /es-define-property/1.0.0: + /es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 dev: true - /es-errors/1.3.0: + /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} dev: true - /es-set-tostringtag/2.0.2: + /es-set-tostringtag@2.0.2: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: @@ -4571,13 +4499,13 @@ packages: hasown: 2.0.1 dev: true - /es-shim-unscopables/1.0.2: + /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: hasown: 2.0.1 dev: true - /es-to-primitive/1.2.1: + /es-to-primitive@1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} dependencies: @@ -4586,7 +4514,7 @@ packages: is-symbol: 1.0.4 dev: true - /es5-ext/0.10.62: + /es5-ext@0.10.62: resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==} engines: {node: '>=0.10'} requiresBuild: true @@ -4596,7 +4524,7 @@ packages: next-tick: 1.1.0 dev: true - /es6-iterator/2.0.3: + /es6-iterator@2.0.3: resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} dependencies: d: 1.0.1 @@ -4604,37 +4532,37 @@ packages: es6-symbol: 3.1.3 dev: true - /es6-promise/4.2.8: + /es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} dev: true - /es6-symbol/3.1.3: + /es6-symbol@3.1.3: resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==} dependencies: d: 1.0.1 ext: 1.7.0 dev: true - /escalade/3.1.2: + /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} dev: true - /escape-html/1.0.3: + /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} dev: true - /escape-string-regexp/1.0.5: + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: true - /escape-string-regexp/4.0.0: + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} dev: true - /eslint-compat-utils/0.1.2_eslint@8.56.0: + /eslint-compat-utils@0.1.2(eslint@8.56.0): resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} engines: {node: '>=12'} peerDependencies: @@ -4643,7 +4571,7 @@ packages: eslint: 8.56.0 dev: true - /eslint-config-standard/17.1.0_ot4howdeavqht6h5s42eunnfxi: + /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0): resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4653,12 +4581,12 @@ packages: eslint-plugin-promise: ^6.0.0 dependencies: eslint: 8.56.0 - eslint-plugin-import: 2.29.1_eslint@8.56.0 - eslint-plugin-n: 16.6.2_eslint@8.56.0 - eslint-plugin-promise: 6.1.1_eslint@8.56.0 + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 16.6.2(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) dev: true - /eslint-import-resolver-node/0.3.9: + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 @@ -4668,7 +4596,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.8.0_rzg3ygvhoewmy7caurhnki56y4: + /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -4696,19 +4624,19 @@ packages: - supports-color dev: true - /eslint-plugin-es-x/7.5.0_eslint@8.56.0: + /eslint-plugin-es-x@7.5.0(eslint@8.56.0): resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.56.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 eslint: 8.56.0 - eslint-compat-utils: 0.1.2_eslint@8.56.0 + eslint-compat-utils: 0.1.2(eslint@8.56.0) dev: true - /eslint-plugin-import/2.29.1_eslint@8.56.0: + /eslint-plugin-import@2.29.1(eslint@8.56.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -4726,7 +4654,7 @@ packages: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0_rzg3ygvhoewmy7caurhnki56y4 + eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -4742,16 +4670,16 @@ packages: - supports-color dev: true - /eslint-plugin-n/16.6.2_eslint@8.56.0: + /eslint-plugin-n@16.6.2(eslint@8.56.0): resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.56.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) builtins: 5.0.1 eslint: 8.56.0 - eslint-plugin-es-x: 7.5.0_eslint@8.56.0 + eslint-plugin-es-x: 7.5.0(eslint@8.56.0) get-tsconfig: 4.7.2 globals: 13.24.0 ignore: 5.3.1 @@ -4762,7 +4690,7 @@ packages: semver: 7.6.0 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.56.0: + /eslint-plugin-promise@6.1.1(eslint@8.56.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4771,7 +4699,7 @@ packages: eslint: 8.56.0 dev: true - /eslint-scope/7.2.2: + /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: @@ -4779,17 +4707,17 @@ packages: estraverse: 5.3.0 dev: true - /eslint-visitor-keys/3.4.3: + /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.56.0: + /eslint@8.56.0: resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.56.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.56.0 @@ -4800,7 +4728,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -4831,52 +4759,52 @@ packages: - supports-color dev: true - /espree/9.6.1: + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.11.3 - acorn-jsx: 5.3.2_acorn@8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true - /esquery/1.5.0: + /esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 dev: true - /esrecurse/4.3.0: + /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 dev: true - /estraverse/5.3.0: + /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} dev: true - /esutils/2.0.3: + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} dev: true - /etag/1.8.1: + /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} dev: true - /eth-ens-namehash/2.0.8: + /eth-ens-namehash@2.0.8: resolution: {integrity: sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==} dependencies: idna-uts46-hx: 2.3.1 js-sha3: 0.5.7 dev: true - /eth-gas-reporter/0.2.27: + /eth-gas-reporter@0.2.27: resolution: {integrity: sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==} peerDependencies: '@codechecks/client': ^0.1.0 @@ -4903,13 +4831,13 @@ packages: - utf-8-validate dev: true - /eth-helpers/1.3.1: + /eth-helpers@1.3.1: resolution: {integrity: sha512-iEcqhro1pqnZbnE3te0KDargTadc1J4zAiV0J1dwBDPo5nbHYBMxPDLQFA+0sMKUxe7cjHtMger6/75ukN3P5A==} dependencies: nanoassert: 2.0.0 dev: true - /eth-lib/0.1.29: + /eth-lib@0.1.29: resolution: {integrity: sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==} dependencies: bn.js: 4.12.0 @@ -4924,7 +4852,7 @@ packages: - utf-8-validate dev: true - /eth-lib/0.2.8: + /eth-lib@0.2.8: resolution: {integrity: sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==} dependencies: bn.js: 4.12.0 @@ -4932,13 +4860,13 @@ packages: xhr-request-promise: 0.1.3 dev: true - /ethereum-bloom-filters/1.0.10: + /ethereum-bloom-filters@1.0.10: resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} dependencies: js-sha3: 0.8.0 dev: true - /ethereum-cryptography/0.1.3: + /ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} dependencies: '@types/pbkdf2': 3.1.2 @@ -4958,7 +4886,7 @@ packages: setimmediate: 1.0.5 dev: true - /ethereum-cryptography/1.2.0: + /ethereum-cryptography@1.2.0: resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} dependencies: '@noble/hashes': 1.2.0 @@ -4967,7 +4895,7 @@ packages: '@scure/bip39': 1.1.1 dev: true - /ethereum-cryptography/2.1.3: + /ethereum-cryptography@2.1.3: resolution: {integrity: sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==} dependencies: '@noble/curves': 1.3.0 @@ -4976,14 +4904,14 @@ packages: '@scure/bip39': 1.2.2 dev: true - /ethereumjs-abi/0.6.8: + /ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} dependencies: bn.js: 4.12.0 ethereumjs-util: 6.2.1 dev: true - /ethereumjs-util/6.2.1: + /ethereumjs-util@6.2.1: resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} dependencies: '@types/bn.js': 4.11.6 @@ -4995,7 +4923,7 @@ packages: rlp: 2.2.7 dev: true - /ethereumjs-util/7.1.5: + /ethereumjs-util@7.1.5: resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} engines: {node: '>=10.0.0'} dependencies: @@ -5006,7 +4934,7 @@ packages: rlp: 2.2.7 dev: true - /ethers/4.0.49: + /ethers@4.0.49: resolution: {integrity: sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==} dependencies: aes-js: 3.0.0 @@ -5020,7 +4948,7 @@ packages: xmlhttprequest: 1.8.0 dev: true - /ethers/5.2.0: + /ethers@5.2.0: resolution: {integrity: sha512-HqFGU2Qab0mAg3y1eHKVMXS4i1gTObMY0/4+x4LiO72NHhJL3Z795gnqyivmwG1J8e5NLSlRSfyIR7TL0Hw3ig==} dependencies: '@ethersproject/abi': 5.2.0 @@ -5058,7 +4986,7 @@ packages: - utf-8-validate dev: true - /ethers/5.7.2: + /ethers@5.7.2: resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} dependencies: '@ethersproject/abi': 5.7.0 @@ -5096,7 +5024,7 @@ packages: - utf-8-validate dev: true - /ethjs-abi/0.2.1: + /ethjs-abi@0.2.1: resolution: {integrity: sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==} engines: {node: '>=6.5.0', npm: '>=3'} dependencies: @@ -5105,7 +5033,7 @@ packages: number-to-bn: 1.7.0 dev: true - /ethjs-unit/0.1.6: + /ethjs-unit@0.1.6: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} engines: {node: '>=6.5.0', npm: '>=3'} dependencies: @@ -5113,7 +5041,7 @@ packages: number-to-bn: 1.7.0 dev: true - /ethjs-util/0.1.6: + /ethjs-util@0.1.6: resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} engines: {node: '>=6.5.0', npm: '>=3'} dependencies: @@ -5121,31 +5049,32 @@ packages: strip-hex-prefix: 1.0.0 dev: true - /event-target-shim/5.0.1: + /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} + requiresBuild: true dev: true optional: true - /eventemitter3/4.0.4: + /eventemitter3@4.0.4: resolution: {integrity: sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==} dev: true - /evp_bytestokey/1.0.3: + /evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 dev: true - /expand-tilde/2.0.2: + /expand-tilde@2.0.2: resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} engines: {node: '>=0.10.0'} dependencies: homedir-polyfill: 1.0.3 dev: true - /express/4.17.3: + /express@4.17.3: resolution: {integrity: sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==} engines: {node: '>= 0.10.0'} dependencies: @@ -5183,7 +5112,7 @@ packages: - supports-color dev: true - /express/4.18.2: + /express@4.18.2: resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} engines: {node: '>= 0.10.0'} dependencies: @@ -5222,82 +5151,83 @@ packages: - supports-color dev: true - /ext/1.7.0: + /ext@1.7.0: resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} dependencies: type: 2.7.2 dev: true - /extend/3.0.2: + /extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} dev: true - /extract-files/9.0.0: + /extract-files@9.0.0: resolution: {integrity: sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==} engines: {node: ^10.17.0 || ^12.0.0 || >= 13.7.0} dev: true - /extsprintf/1.3.0: + /extsprintf@1.3.0: resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} engines: {'0': node >=0.6.0} dev: true - /fast-check/3.1.1: + /fast-check@3.1.1: resolution: {integrity: sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==} engines: {node: '>=8.0.0'} dependencies: pure-rand: 5.0.5 dev: true - /fast-deep-equal/3.1.3: + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-diff/1.3.0: + /fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true - /fast-json-stable-stringify/2.1.0: + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true - /fast-levenshtein/2.0.6: + /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq/1.17.1: + /fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 dev: true - /fecha/4.2.3: + /fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} dev: true - /fetch-cookie/0.11.0: + /fetch-cookie@0.11.0: resolution: {integrity: sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA==} engines: {node: '>=8'} + requiresBuild: true dependencies: tough-cookie: 4.1.3 dev: true optional: true - /file-entry-cache/6.0.1: + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.2.0 dev: true - /fill-range/7.0.1: + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 dev: true - /finalhandler/1.1.2: + /finalhandler@1.1.2: resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} engines: {node: '>= 0.8'} dependencies: @@ -5312,7 +5242,7 @@ packages: - supports-color dev: true - /finalhandler/1.2.0: + /finalhandler@1.2.0: resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} engines: {node: '>= 0.8'} dependencies: @@ -5327,7 +5257,7 @@ packages: - supports-color dev: true - /find-up/1.1.2: + /find-up@1.1.2: resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==} engines: {node: '>=0.10.0'} dependencies: @@ -5335,21 +5265,21 @@ packages: pinkie-promise: 2.0.1 dev: true - /find-up/2.1.0: + /find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} dependencies: locate-path: 2.0.0 dev: true - /find-up/3.0.0: + /find-up@3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} dependencies: locate-path: 3.0.0 dev: true - /find-up/4.1.0: + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} dependencies: @@ -5357,7 +5287,7 @@ packages: path-exists: 4.0.0 dev: true - /find-up/5.0.0: + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} dependencies: @@ -5365,7 +5295,7 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache/3.2.0: + /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: @@ -5374,20 +5304,20 @@ packages: rimraf: 3.0.2 dev: true - /flat/5.0.2: + /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true dev: true - /flatted/3.2.9: + /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /fn.name/1.1.0: + /fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} dev: true - /follow-redirects/1.15.5: + /follow-redirects@1.15.5(debug@4.3.4): resolution: {integrity: sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==} engines: {node: '>=4.0'} peerDependencies: @@ -5395,32 +5325,34 @@ packages: peerDependenciesMeta: debug: optional: true + dependencies: + debug: 4.3.4(supports-color@8.1.1) dev: true - /for-each/0.3.3: + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 dev: true - /foreach/2.0.6: + /foreach@2.0.6: resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} dev: true - /forever-agent/0.6.1: + /forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true - /form-data-encoder/1.7.1: + /form-data-encoder@1.7.1: resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} dev: true - /form-data-encoder/2.1.4: + /form-data-encoder@2.1.4: resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} engines: {node: '>= 14.17'} dev: true - /form-data/2.3.3: + /form-data@2.3.3: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} dependencies: @@ -5429,7 +5361,7 @@ packages: mime-types: 2.1.35 dev: true - /form-data/2.5.1: + /form-data@2.5.1: resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==} engines: {node: '>= 0.12'} dependencies: @@ -5438,7 +5370,7 @@ packages: mime-types: 2.1.35 dev: true - /form-data/3.0.1: + /form-data@3.0.1: resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} engines: {node: '>= 6'} dependencies: @@ -5447,7 +5379,7 @@ packages: mime-types: 2.1.35 dev: true - /form-data/4.0.0: + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} dependencies: @@ -5456,21 +5388,21 @@ packages: mime-types: 2.1.35 dev: true - /forwarded/0.2.0: + /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} dev: true - /fp-ts/1.19.3: + /fp-ts@1.19.3: resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} dev: true - /fresh/0.5.2: + /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: true - /fs-extra/0.30.0: + /fs-extra@0.30.0: resolution: {integrity: sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==} dependencies: graceful-fs: 4.2.11 @@ -5480,7 +5412,7 @@ packages: rimraf: 2.7.1 dev: true - /fs-extra/4.0.3: + /fs-extra@4.0.3: resolution: {integrity: sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==} dependencies: graceful-fs: 4.2.11 @@ -5488,7 +5420,7 @@ packages: universalify: 0.1.2 dev: true - /fs-extra/7.0.1: + /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} dependencies: @@ -5497,7 +5429,7 @@ packages: universalify: 0.1.2 dev: true - /fs-extra/8.1.0: + /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} dependencies: @@ -5506,7 +5438,7 @@ packages: universalify: 0.1.2 dev: true - /fs-extra/9.1.0: + /fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} dependencies: @@ -5516,21 +5448,21 @@ packages: universalify: 2.0.1 dev: true - /fs-minipass/1.2.7: + /fs-minipass@1.2.7: resolution: {integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==} dependencies: minipass: 2.9.0 dev: true - /fs-readdir-recursive/1.1.0: + /fs-readdir-recursive@1.1.0: resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==} dev: true - /fs.realpath/1.0.0: + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents/2.3.3: + /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] @@ -5538,11 +5470,11 @@ packages: dev: true optional: true - /function-bind/1.1.2: + /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: true - /function.prototype.name/1.1.6: + /function.prototype.name@1.1.6: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: @@ -5552,15 +5484,17 @@ packages: functions-have-names: 1.2.3 dev: true - /functional-red-black-tree/1.0.1: + /functional-red-black-tree@1.0.1: resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + requiresBuild: true dev: true + optional: true - /functions-have-names/1.2.3: + /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /ganache/7.9.1: + /ganache@7.9.1: resolution: {integrity: sha512-Tqhd4J3cpiLeYTD6ek/zlchSB107IVPMIm4ypyg+xz1sdkeALUnYYZnmY4Bdjqj3i6QwtlZPCu7U4qKy7HlWTA==} hasBin: true dependencies: @@ -5586,33 +5520,33 @@ packages: - leveldown - secp256k1 - /get-caller-file/1.0.3: + /get-caller-file@1.0.3: resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} dev: true - /get-caller-file/2.0.5: + /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-func-name/2.0.2: + /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true - /get-installed-path/2.1.1: + /get-installed-path@2.1.1: resolution: {integrity: sha512-Qkn9eq6tW5/q9BDVdMpB8tOHljX9OSP0jRC5TRNVA4qRc839t4g8KQaR8t0Uv0EFVL0MlyG7m/ofjEgAROtYsA==} dependencies: global-modules: 1.0.0 dev: true - /get-installed-path/4.0.8: + /get-installed-path@4.0.8: resolution: {integrity: sha512-PmANK1xElIHlHH2tXfOoTnSDUjX1X3GvKK6ZyLbUnSCCn1pADwu67eVWttuPzJWrXDDT2MfO6uAaKILOFfitmA==} engines: {node: '>=6', npm: '>=5', yarn: '>=1'} dependencies: global-modules: 1.0.0 dev: true - /get-intrinsic/1.2.4: + /get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} dependencies: @@ -5623,24 +5557,24 @@ packages: hasown: 2.0.1 dev: true - /get-port/3.2.0: + /get-port@3.2.0: resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==} engines: {node: '>=4'} dev: true - /get-stream/5.2.0: + /get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} dependencies: pump: 3.0.0 dev: true - /get-stream/6.0.1: + /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} dev: true - /get-symbol-description/1.0.2: + /get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} dependencies: @@ -5649,34 +5583,35 @@ packages: get-intrinsic: 1.2.4 dev: true - /get-tsconfig/4.7.2: + /get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} dependencies: resolve-pkg-maps: 1.0.0 dev: true - /getpass/0.1.7: + /getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} dependencies: assert-plus: 1.0.0 dev: true - /glob-parent/5.1.2: + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 dev: true - /glob-parent/6.0.2: + /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 dev: true - /glob/7.2.0: + /glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -5686,7 +5621,7 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob/7.2.3: + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: fs.realpath: 1.0.0 @@ -5697,7 +5632,7 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob/8.1.0: + /glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} dependencies: @@ -5708,7 +5643,7 @@ packages: once: 1.4.0 dev: true - /global-modules/1.0.0: + /global-modules@1.0.0: resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} engines: {node: '>=0.10.0'} dependencies: @@ -5717,7 +5652,7 @@ packages: resolve-dir: 1.0.1 dev: true - /global-prefix/1.0.2: + /global-prefix@1.0.2: resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} engines: {node: '>=0.10.0'} dependencies: @@ -5728,34 +5663,34 @@ packages: which: 1.3.1 dev: true - /global/4.4.0: + /global@4.4.0: resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} dependencies: min-document: 2.19.0 process: 0.11.10 dev: true - /globals/13.24.0: + /globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 dev: true - /globalthis/1.0.3: + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 dev: true - /gopd/1.0.1: + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 dev: true - /got/11.8.6: + /got@11.8.6: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} engines: {node: '>=10.19.0'} dependencies: @@ -5772,7 +5707,7 @@ packages: responselike: 2.0.1 dev: true - /got/12.1.0: + /got@12.1.0: resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} engines: {node: '>=14.16'} dependencies: @@ -5791,7 +5726,7 @@ packages: responselike: 2.0.1 dev: true - /got/12.6.1: + /got@12.6.1: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} dependencies: @@ -5808,33 +5743,33 @@ packages: responselike: 3.0.0 dev: true - /graceful-fs/4.2.10: + /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true - /graceful-fs/4.2.11: + /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - /grapheme-splitter/1.0.4: + /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true - /graphemer/1.4.0: + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /graphql-query-compress/1.2.4: + /graphql-query-compress@1.2.4: resolution: {integrity: sha512-W5SMy8/2RAsC9uMOV9VTwnUkp+8N3BZz6qef6jRCIxOVrVxRBiX2btvpaKrEnPU4nchnc1bCfmMDkEtCRzJUiw==} dependencies: tokenizr: 1.5.7 dev: true - /graphql-request/5.2.0_graphql@14.7.0: + /graphql-request@5.2.0(graphql@14.7.0): resolution: {integrity: sha512-pLhKIvnMyBERL0dtFI3medKqWOz/RhHdcgbZ+hMMIb32mEPa5MJSzS4AuXxfI4sRAu6JVVk5tvXuGfCWl9JYWQ==} peerDependencies: graphql: 14 - 16 dependencies: - '@graphql-typed-document-node/core': 3.2.0_graphql@14.7.0 + '@graphql-typed-document-node/core': 3.2.0(graphql@14.7.0) cross-fetch: 3.1.8 extract-files: 9.0.0 form-data: 3.0.1 @@ -5843,9 +5778,10 @@ packages: - encoding dev: true - /graphql-tag/2.12.6_graphql@15.8.0: + /graphql-tag@2.12.6(graphql@15.8.0): resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} engines: {node: '>=10'} + requiresBuild: true peerDependencies: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: @@ -5854,25 +5790,26 @@ packages: dev: true optional: true - /graphql/14.7.0: + /graphql@14.7.0: resolution: {integrity: sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==} engines: {node: '>= 6.x'} dependencies: iterall: 1.3.0 dev: true - /graphql/15.8.0: + /graphql@15.8.0: resolution: {integrity: sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==} engines: {node: '>= 10.x'} + requiresBuild: true dev: true optional: true - /har-schema/2.0.0: + /har-schema@2.0.0: resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} engines: {node: '>=4'} dev: true - /har-validator/5.1.5: + /har-validator@5.1.5: resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} engines: {node: '>=6'} deprecated: this library is no longer supported @@ -5881,8 +5818,8 @@ packages: har-schema: 2.0.0 dev: true - /hardhat/2.19.5: - resolution: {integrity: sha512-vx8R7zWCYVgM56vA6o0Wqx2bIIptkN4TMs9QwDqZVNGRhMzBfzqUeEYbp+69gxWp1neg2V2nYQUaaUv7aom1kw==} + /hardhat@2.22.13: + resolution: {integrity: sha512-psVJX4FSXDpSXwsU8OcKTJN04pQEj9cFBMX5OPko+OFwbIoiOpvRmafa954/UaA1934npTj8sV3gaTSdx9bPbA==} hasBin: true peerDependencies: ts-node: '*' @@ -5895,16 +5832,10 @@ packages: dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 - '@nomicfoundation/ethereumjs-block': 5.0.2 - '@nomicfoundation/ethereumjs-blockchain': 7.0.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-evm': 2.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-statemanager': 2.0.2 - '@nomicfoundation/ethereumjs-trie': 6.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - '@nomicfoundation/ethereumjs-vm': 7.0.2 + '@nomicfoundation/edr': 0.6.4 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-tx': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 '@nomicfoundation/solidity-analyzer': 0.1.1 '@sentry/node': 5.30.0 '@types/bn.js': 5.1.5 @@ -5914,9 +5845,9 @@ packages: ansi-escapes: 4.3.2 boxen: 5.1.2 chalk: 2.4.2 - chokidar: 3.6.0 + chokidar: 4.0.1 ci-info: 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) enquirer: 2.4.1 env-paths: 2.2.1 ethereum-cryptography: 1.2.0 @@ -5927,6 +5858,7 @@ packages: glob: 7.2.0 immutable: 4.3.5 io-ts: 1.10.4 + json-stream-stringify: 3.1.6 keccak: 3.0.4 lodash: 4.17.21 mnemonist: 0.38.5 @@ -5935,7 +5867,7 @@ packages: raw-body: 2.5.2 resolve: 1.17.0 semver: 6.3.1 - solc: 0.7.3_debug@4.3.4 + solc: 0.8.26(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 tsort: 0.0.1 @@ -5944,48 +5876,49 @@ packages: ws: 7.5.9 transitivePeerDependencies: - bufferutil + - c-kzg - supports-color - utf-8-validate dev: true - /has-bigints/1.0.2: + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true - /has-flag/3.0.0: + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: true - /has-flag/4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} dev: true - /has-property-descriptors/1.0.2: + /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 dev: true - /has-proto/1.0.1: + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} dev: true - /has-symbols/1.0.3: + /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} dev: true - /has-tostringtag/1.0.2: + /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /hash-base/3.1.0: + /hash-base@3.1.0: resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} engines: {node: '>=4'} dependencies: @@ -5994,48 +5927,48 @@ packages: safe-buffer: 5.2.1 dev: true - /hash.js/1.1.3: + /hash.js@1.1.3: resolution: {integrity: sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==} dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 dev: true - /hash.js/1.1.7: + /hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 dev: true - /hasown/2.0.1: + /hasown@2.0.1: resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 dev: true - /he/1.2.0: + /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true dev: true - /header-case/1.0.1: + /header-case@1.0.1: resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} dependencies: no-case: 2.3.2 upper-case: 1.1.3 dev: true - /highlight.js/10.7.3: + /highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} dev: true - /highlightjs-solidity/2.0.6: + /highlightjs-solidity@2.0.6: resolution: {integrity: sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==} dev: true - /hmac-drbg/1.0.1: + /hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} dependencies: hash.js: 1.1.7 @@ -6043,18 +5976,18 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: true - /homedir-polyfill/1.0.3: + /homedir-polyfill@1.0.3: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} engines: {node: '>=0.10.0'} dependencies: parse-passwd: 1.0.0 dev: true - /hosted-git-info/2.8.9: + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /htmlparser2/8.0.2: + /htmlparser2@8.0.2: resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} dependencies: domelementtype: 2.3.0 @@ -6063,7 +5996,7 @@ packages: entities: 4.5.0 dev: true - /http-basic/8.1.3: + /http-basic@8.1.3: resolution: {integrity: sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==} engines: {node: '>=6.0.0'} dependencies: @@ -6073,11 +6006,11 @@ packages: parse-cache-control: 1.0.1 dev: true - /http-cache-semantics/4.1.1: + /http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} dev: true - /http-errors/1.8.1: + /http-errors@1.8.1: resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} engines: {node: '>= 0.6'} dependencies: @@ -6088,7 +6021,7 @@ packages: toidentifier: 1.0.1 dev: true - /http-errors/2.0.0: + /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} dependencies: @@ -6099,17 +6032,17 @@ packages: toidentifier: 1.0.1 dev: true - /http-https/1.0.0: + /http-https@1.0.0: resolution: {integrity: sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==} dev: true - /http-response-object/3.0.2: + /http-response-object@3.0.2: resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==} dependencies: '@types/node': 10.17.60 dev: true - /http-signature/1.2.0: + /http-signature@1.2.0: resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} engines: {node: '>=0.8', npm: '>=1.3.7'} dependencies: @@ -6118,7 +6051,7 @@ packages: sshpk: 1.18.0 dev: true - /http2-wrapper/1.0.3: + /http2-wrapper@1.0.3: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} dependencies: @@ -6126,7 +6059,7 @@ packages: resolve-alpn: 1.2.1 dev: true - /http2-wrapper/2.2.1: + /http2-wrapper@2.2.1: resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} engines: {node: '>=10.19.0'} dependencies: @@ -6134,49 +6067,50 @@ packages: resolve-alpn: 1.2.1 dev: true - /https-proxy-agent/5.0.1: + /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true - /iconv-lite/0.4.24: + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: true - /idna-uts46-hx/2.3.1: + /idna-uts46-hx@2.3.1: resolution: {integrity: sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==} engines: {node: '>=4.0.0'} dependencies: punycode: 2.1.0 dev: true - /ieee754/1.2.1: + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /ignore/5.3.1: + /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} dev: true - /immediate/3.3.0: + /immediate@3.3.0: resolution: {integrity: sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==} + requiresBuild: true dev: true optional: true - /immutable/4.3.5: + /immutable@4.3.5: resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} dev: true - /import-fresh/3.3.0: + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} dependencies: @@ -6184,32 +6118,32 @@ packages: resolve-from: 4.0.0 dev: true - /imurmurhash/0.1.4: + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} dev: true - /indent-string/4.0.0: + /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} dev: true - /inflight/1.0.6: + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 dev: true - /inherits/2.0.4: + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true - /ini/1.3.8: + /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true - /internal-slot/1.0.7: + /internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} dependencies: @@ -6218,23 +6152,23 @@ packages: side-channel: 1.0.5 dev: true - /invert-kv/1.0.0: + /invert-kv@1.0.0: resolution: {integrity: sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==} engines: {node: '>=0.10.0'} dev: true - /io-ts/1.10.4: + /io-ts@1.10.4: resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} dependencies: fp-ts: 1.19.3 dev: true - /ipaddr.js/1.9.1: + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} dev: true - /is-arguments/1.1.1: + /is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} dependencies: @@ -6242,7 +6176,7 @@ packages: has-tostringtag: 1.0.2 dev: true - /is-array-buffer/3.0.4: + /is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} dependencies: @@ -6250,28 +6184,28 @@ packages: get-intrinsic: 1.2.4 dev: true - /is-arrayish/0.2.1: + /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true - /is-arrayish/0.3.2: + /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} dev: true - /is-bigint/1.0.4: + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 dev: true - /is-binary-path/2.1.0: + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 dev: true - /is-boolean-object/1.1.2: + /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: @@ -6279,120 +6213,120 @@ packages: has-tostringtag: 1.0.2 dev: true - /is-buffer/2.0.5: + /is-buffer@2.0.5: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} dev: true - /is-builtin-module/3.2.1: + /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} dependencies: builtin-modules: 3.3.0 dev: true - /is-callable/1.2.7: + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} dev: true - /is-core-module/2.13.1: + /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: hasown: 2.0.1 dev: true - /is-date-object/1.0.5: + /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true - /is-extglob/2.1.1: + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} dev: true - /is-fullwidth-code-point/1.0.0: + /is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} engines: {node: '>=0.10.0'} dependencies: number-is-nan: 1.0.1 dev: true - /is-fullwidth-code-point/2.0.0: + /is-fullwidth-code-point@2.0.0: resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} engines: {node: '>=4'} dev: true - /is-fullwidth-code-point/3.0.0: + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} dev: true - /is-function/1.0.2: + /is-function@1.0.2: resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==} dev: true - /is-generator-function/1.0.10: + /is-generator-function@1.0.10: resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true - /is-glob/4.0.3: + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 dev: true - /is-hex-prefixed/1.0.0: + /is-hex-prefixed@1.0.0: resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} engines: {node: '>=6.5.0', npm: '>=3'} dev: true - /is-lower-case/1.1.3: + /is-lower-case@1.1.3: resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} dependencies: lower-case: 1.1.4 dev: true - /is-negative-zero/2.0.2: + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} dev: true - /is-number-object/1.0.7: + /is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true - /is-number/7.0.0: + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} dev: true - /is-obj/2.0.0: + /is-obj@2.0.0: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} dev: true - /is-path-inside/3.0.3: + /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} dev: true - /is-plain-obj/2.1.0: + /is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} dev: true - /is-regex/1.1.4: + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: @@ -6400,91 +6334,92 @@ packages: has-tostringtag: 1.0.2 dev: true - /is-retry-allowed/2.2.0: + /is-retry-allowed@2.2.0: resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==} engines: {node: '>=10'} dev: true - /is-shared-array-buffer/1.0.2: + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: call-bind: 1.0.7 dev: true - /is-stream/2.0.1: + /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} dev: true - /is-string/1.0.7: + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true - /is-symbol/1.0.4: + /is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /is-typed-array/1.1.13: + /is-typed-array@1.1.13: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.14 dev: true - /is-typedarray/1.0.0: + /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true - /is-unicode-supported/0.1.0: + /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} dev: true - /is-upper-case/1.1.2: + /is-upper-case@1.1.2: resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} dependencies: upper-case: 1.1.3 dev: true - /is-utf8/0.2.1: + /is-utf8@0.2.1: resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} dev: true - /is-weakref/1.0.2: + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.7 dev: true - /is-windows/1.0.2: + /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} dev: true - /isarray/0.0.1: + /isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} + requiresBuild: true dev: true optional: true - /isarray/1.0.0: + /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true - /isarray/2.0.5: + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true - /isexe/2.0.0: + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true - /isomorphic-ws/4.0.1_ws@7.5.9: + /isomorphic-ws@4.0.1(ws@7.5.9): resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: ws: '*' @@ -6492,90 +6427,86 @@ packages: ws: 7.5.9 dev: true - /isstream/0.1.2: + /isstream@0.1.2: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true - /iter-tools/7.5.3: + /iter-tools@7.5.3: resolution: {integrity: sha512-iEcHpgM9cn6tsI5MewqxyEega9KPbIDytQTEnu6c0MtlQQhQFofssYuRqxCarZgUdzliepRZPwwwflE4wAIjaA==} dependencies: '@babel/runtime': 7.23.9 dev: true - /iterall/1.3.0: + /iterall@1.3.0: resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} dev: true - /js-sdsl/4.4.2: - resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} - dev: true - - /js-sha3/0.5.5: + /js-sha3@0.5.5: resolution: {integrity: sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==} dev: true - /js-sha3/0.5.7: + /js-sha3@0.5.7: resolution: {integrity: sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==} dev: true - /js-sha3/0.8.0: + /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} dev: true - /js-tokens/4.0.0: + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - /js-yaml/4.1.0: + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 dev: true - /jsbn/0.1.1: + /jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} dev: true - /json-buffer/3.0.1: + /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true - /json-parse-even-better-errors/2.3.1: + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true - /json-pointer/0.6.2: + /json-pointer@0.6.2: resolution: {integrity: sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==} dependencies: foreach: 2.0.6 dev: true - /json-rpc-2.0/0.2.19: + /json-rpc-2.0@0.2.19: resolution: {integrity: sha512-tegZKneDQjWintJS5Zlw8xNvJK0/xq4sct2M5AgfFmcCJFMjvrLgk1noH7OPfFgEQ+ScueuWdaGfikCPr+qBtg==} dev: true - /json-schema-traverse/0.4.1: + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true - /json-schema-traverse/1.0.0: + /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: true - /json-schema-typed/7.0.3: + /json-schema-typed@7.0.3: resolution: {integrity: sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==} dev: true - /json-schema/0.4.0: + /json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} dev: true - /json-stable-stringify-without-jsonify/1.0.1: + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true - /json-stable-stringify/1.1.1: + /json-stable-stringify@1.1.1: resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==} engines: {node: '>= 0.4'} dependencies: @@ -6585,11 +6516,16 @@ packages: object-keys: 1.1.1 dev: true - /json-stringify-safe/5.0.1: + /json-stream-stringify@3.1.6: + resolution: {integrity: sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==} + engines: {node: '>=7.10.1'} + dev: true + + /json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} dev: true - /json-to-ast/2.1.0: + /json-to-ast@2.1.0: resolution: {integrity: sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==} engines: {node: '>= 4'} dependencies: @@ -6597,32 +6533,32 @@ packages: grapheme-splitter: 1.0.4 dev: true - /json5/1.0.2: + /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true dependencies: minimist: 1.2.8 dev: true - /json5/2.2.3: + /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true dev: true - /jsonfile/2.4.0: + /jsonfile@2.4.0: resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} optionalDependencies: graceful-fs: 4.2.11 dev: true - /jsonfile/4.0.0: + /jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.11 dev: true - /jsonfile/6.1.0: + /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: universalify: 2.0.1 @@ -6630,16 +6566,17 @@ packages: graceful-fs: 4.2.11 dev: true - /jsonify/0.0.1: + /jsonify@0.0.1: resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} + requiresBuild: true dev: true - /jsonpointer/5.0.1: + /jsonpointer@5.0.1: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} dev: true - /jsprim/1.4.2: + /jsprim@1.4.2: resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} engines: {node: '>=0.6.0'} dependencies: @@ -6649,7 +6586,7 @@ packages: verror: 1.10.0 dev: true - /keccak/3.0.1: + /keccak@3.0.1: resolution: {integrity: sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==} engines: {node: '>=10.0.0'} requiresBuild: true @@ -6658,7 +6595,7 @@ packages: node-gyp-build: 4.8.0 dev: true - /keccak/3.0.2: + /keccak@3.0.2: resolution: {integrity: sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==} engines: {node: '>=10.0.0'} requiresBuild: true @@ -6668,7 +6605,7 @@ packages: readable-stream: 3.6.2 dev: true - /keccak/3.0.4: + /keccak@3.0.4: resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} engines: {node: '>=10.0.0'} requiresBuild: true @@ -6678,68 +6615,73 @@ packages: readable-stream: 3.6.2 dev: true - /keyv/4.5.4: + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: json-buffer: 3.0.1 dev: true - /klaw/1.3.1: + /klaw@1.3.1: resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} optionalDependencies: graceful-fs: 4.2.11 dev: true - /kuler/2.0.0: + /kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} dev: true - /latest-version/7.0.0: + /latest-version@7.0.0: resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} engines: {node: '>=14.16'} dependencies: package-json: 8.1.1 dev: true - /lcid/1.0.0: + /lcid@1.0.0: resolution: {integrity: sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==} engines: {node: '>=0.10.0'} dependencies: invert-kv: 1.0.0 dev: true - /level-codec/9.0.2: + /level-codec@9.0.2: resolution: {integrity: sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==} engines: {node: '>=6'} + requiresBuild: true dependencies: buffer: 5.7.1 dev: true optional: true - /level-concat-iterator/2.0.1: + /level-concat-iterator@2.0.1: resolution: {integrity: sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==} engines: {node: '>=6'} + requiresBuild: true dev: true optional: true - /level-concat-iterator/3.1.0: + /level-concat-iterator@3.1.0: resolution: {integrity: sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==} engines: {node: '>=10'} + requiresBuild: true dependencies: catering: 2.1.1 dev: true - /level-errors/2.0.1: + /level-errors@2.0.1: resolution: {integrity: sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==} engines: {node: '>=6'} + requiresBuild: true dependencies: errno: 0.1.8 dev: true optional: true - /level-iterator-stream/4.0.2: + /level-iterator-stream@4.0.2: resolution: {integrity: sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==} engines: {node: '>=6'} + requiresBuild: true dependencies: inherits: 2.0.4 readable-stream: 3.6.2 @@ -6747,8 +6689,9 @@ packages: dev: true optional: true - /level-js/5.0.2: + /level-js@5.0.2: resolution: {integrity: sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==} + requiresBuild: true dependencies: abstract-leveldown: 6.2.3 buffer: 5.7.1 @@ -6757,34 +6700,37 @@ packages: dev: true optional: true - /level-packager/5.1.1: + /level-packager@5.1.1: resolution: {integrity: sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==} engines: {node: '>=6'} + requiresBuild: true dependencies: encoding-down: 6.3.0 levelup: 4.4.0 dev: true optional: true - /level-supports/1.0.1: + /level-supports@1.0.1: resolution: {integrity: sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==} engines: {node: '>=6'} + requiresBuild: true dependencies: xtend: 4.0.2 dev: true optional: true - /level-supports/2.1.0: + /level-supports@2.1.0: resolution: {integrity: sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==} engines: {node: '>=10'} + requiresBuild: true dev: true - /level-supports/4.0.1: + /level-supports@4.0.1: resolution: {integrity: sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==} engines: {node: '>=12'} dev: true - /level-transcoder/1.0.1: + /level-transcoder@1.0.1: resolution: {integrity: sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==} engines: {node: '>=12'} dependencies: @@ -6792,16 +6738,18 @@ packages: module-error: 1.0.2 dev: true - /level-write-stream/1.0.0: + /level-write-stream@1.0.0: resolution: {integrity: sha512-bBNKOEOMl8msO+uIM9YX/gUO6ckokZ/4pCwTm/lwvs46x6Xs8Zy0sn3Vh37eDqse4mhy4fOMIb/JsSM2nyQFtw==} + requiresBuild: true dependencies: end-stream: 0.1.0 dev: true optional: true - /level/6.0.1: + /level@6.0.1: resolution: {integrity: sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==} engines: {node: '>=8.6.0'} + requiresBuild: true dependencies: level-js: 5.0.2 level-packager: 5.1.1 @@ -6809,16 +6757,7 @@ packages: dev: true optional: true - /level/8.0.1: - resolution: {integrity: sha512-oPBGkheysuw7DmzFQYyFe8NAia5jFLAgEnkgWnK3OXAuJr8qFT+xBQIwokAZPME2bhPFzS8hlYcL16m8UZrtwQ==} - engines: {node: '>=12'} - dependencies: - abstract-level: 1.0.4 - browser-level: 1.0.1 - classic-level: 1.4.1 - dev: true - - /leveldown/5.6.0: + /leveldown@5.6.0: resolution: {integrity: sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==} engines: {node: '>=8.6.0'} requiresBuild: true @@ -6829,7 +6768,7 @@ packages: dev: true optional: true - /leveldown/6.1.0: + /leveldown@6.1.0: resolution: {integrity: sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==} engines: {node: '>=10.12.0'} requiresBuild: true @@ -6839,9 +6778,10 @@ packages: node-gyp-build: 4.8.0 dev: true - /levelup/4.4.0: + /levelup@4.4.0: resolution: {integrity: sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==} engines: {node: '>=6'} + requiresBuild: true dependencies: deferred-leveldown: 5.3.0 level-errors: 2.0.1 @@ -6851,12 +6791,12 @@ packages: dev: true optional: true - /leven/3.1.0: + /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} dev: true - /levn/0.4.1: + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} dependencies: @@ -6864,11 +6804,11 @@ packages: type-check: 0.4.0 dev: true - /lines-and-columns/1.2.4: + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /load-json-file/1.1.0: + /load-json-file@1.1.0: resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==} engines: {node: '>=0.10.0'} dependencies: @@ -6879,7 +6819,7 @@ packages: strip-bom: 2.0.0 dev: true - /locate-path/2.0.0: + /locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} dependencies: @@ -6887,7 +6827,7 @@ packages: path-exists: 3.0.0 dev: true - /locate-path/3.0.0: + /locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} dependencies: @@ -6895,57 +6835,58 @@ packages: path-exists: 3.0.0 dev: true - /locate-path/5.0.0: + /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} dependencies: p-locate: 4.1.0 dev: true - /locate-path/6.0.0: + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} dependencies: p-locate: 5.0.0 dev: true - /lodash-es/4.17.21: + /lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: true - /lodash.assign/4.2.0: + /lodash.assign@4.2.0: resolution: {integrity: sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==} dev: true - /lodash.clonedeep/4.5.0: + /lodash.clonedeep@4.5.0: resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} dev: true - /lodash.flatten/4.4.0: + /lodash.flatten@4.4.0: resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} dev: true - /lodash.isequal/4.5.0: + /lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} dev: true - /lodash.merge/4.6.2: + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - /lodash.sortby/4.7.0: + /lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + requiresBuild: true dev: true optional: true - /lodash.truncate/4.4.2: + /lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} dev: true - /lodash/4.17.21: + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true - /log-symbols/4.1.0: + /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} dependencies: @@ -6953,7 +6894,7 @@ packages: is-unicode-supported: 0.1.0 dev: true - /logform/2.6.0: + /logform@2.6.0: resolution: {integrity: sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==} engines: {node: '>= 12.0.0'} dependencies: @@ -6965,94 +6906,87 @@ packages: triple-beam: 1.4.1 dev: true - /loglevel/1.9.1: + /loglevel@1.9.1: resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} engines: {node: '>= 0.6.0'} + requiresBuild: true dev: true optional: true - /long/4.0.0: + /long@4.0.0: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + requiresBuild: true dev: true optional: true - /loose-envify/1.4.0: + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true dependencies: js-tokens: 4.0.0 dev: true - /loupe/2.3.7: + /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 dev: true - /loupe/3.1.0: + /loupe@3.1.0: resolution: {integrity: sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==} dependencies: get-func-name: 2.0.2 dev: true - /lower-case-first/1.0.2: + /lower-case-first@1.0.2: resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} dependencies: lower-case: 1.1.4 dev: true - /lower-case/1.1.4: + /lower-case@1.1.4: resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} dev: true - /lowercase-keys/2.0.0: + /lowercase-keys@2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} dev: true - /lowercase-keys/3.0.0: + /lowercase-keys@3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /lru-cache/5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - dependencies: - yallist: 3.1.1 - dev: true - - /lru-cache/6.0.0: + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} dependencies: yallist: 4.0.0 dev: true - /lru-cache/7.13.1: + /lru-cache@7.13.1: resolution: {integrity: sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ==} engines: {node: '>=12'} + requiresBuild: true dev: true optional: true - /lru_map/0.3.3: + /lru_map@0.3.3: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} dev: true - /ltgt/2.2.1: + /ltgt@2.2.1: resolution: {integrity: sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==} + requiresBuild: true dev: true optional: true - /markdown-table/1.1.3: + /markdown-table@1.1.3: resolution: {integrity: sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==} dev: true - /mcl-wasm/0.7.9: - resolution: {integrity: sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==} - engines: {node: '>=8.9.0'} - dev: true - - /md5.js/1.3.5: + /md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} dependencies: hash-base: 3.1.0 @@ -7060,13 +6994,14 @@ packages: safe-buffer: 5.2.1 dev: true - /media-typer/0.3.0: + /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: true - /memdown/1.4.1: + /memdown@1.4.1: resolution: {integrity: sha512-iVrGHZB8i4OQfM155xx8akvG9FIj+ht14DX5CQkCTG4EHzZ3d3sgckIf/Lm9ivZalEsFuEVnWv2B2WZvbrro2w==} + requiresBuild: true dependencies: abstract-leveldown: 2.7.2 functional-red-black-tree: 1.0.1 @@ -7077,128 +7012,119 @@ packages: dev: true optional: true - /memory-level/1.0.0: - resolution: {integrity: sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==} - engines: {node: '>=12'} - dependencies: - abstract-level: 1.0.4 - functional-red-black-tree: 1.0.1 - module-error: 1.0.2 - dev: true - - /memorystream/0.3.1: + /memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} dev: true - /merge-descriptors/1.0.1: + /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true - /methods/1.1.2: + /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} dev: true - /micro-ftch/0.3.1: + /micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} dev: true - /mime-db/1.52.0: + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} dev: true - /mime-types/2.1.35: + /mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 dev: true - /mime/1.6.0: + /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true dev: true - /mimic-fn/2.1.0: + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} dev: true - /mimic-fn/3.1.0: + /mimic-fn@3.1.0: resolution: {integrity: sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==} engines: {node: '>=8'} dev: true - /mimic-response/1.0.1: + /mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} dev: true - /mimic-response/3.1.0: + /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} dev: true - /mimic-response/4.0.0: + /mimic-response@4.0.0: resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /min-document/2.19.0: + /min-document@2.19.0: resolution: {integrity: sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==} dependencies: dom-walk: 0.1.2 dev: true - /minimalistic-assert/1.0.1: + /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} dev: true - /minimalistic-crypto-utils/1.0.1: + /minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} dev: true - /minimatch/3.1.2: + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: true - /minimatch/5.0.1: + /minimatch@5.0.1: resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true - /minimatch/5.1.6: + /minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true - /minimist/1.2.8: + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - /minipass/2.9.0: + /minipass@2.9.0: resolution: {integrity: sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==} dependencies: safe-buffer: 5.2.1 yallist: 3.1.1 dev: true - /minizlib/1.3.3: + /minizlib@1.3.3: resolution: {integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==} dependencies: minipass: 2.9.0 dev: true - /mkdirp-promise/5.0.1: + /mkdirp-promise@5.0.1: resolution: {integrity: sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==} engines: {node: '>=4'} deprecated: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. @@ -7206,32 +7132,32 @@ packages: mkdirp: 3.0.1 dev: true - /mkdirp/0.5.6: + /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: minimist: 1.2.8 dev: true - /mkdirp/1.0.4: + /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true dev: true - /mkdirp/3.0.1: + /mkdirp@3.0.1: resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} hasBin: true dev: true - /mnemonist/0.38.5: + /mnemonist@0.38.5: resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} dependencies: obliterator: 2.0.4 dev: true - /mocha/10.1.0: + /mocha@10.1.0: resolution: {integrity: sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==} engines: {node: '>= 14.0.0'} hasBin: true @@ -7239,7 +7165,7 @@ packages: ansi-colors: 4.1.1 browser-stdout: 1.3.1 chokidar: 3.5.3 - debug: 4.3.4_supports-color@8.1.1 + debug: 4.3.4(supports-color@8.1.1) diff: 5.0.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 @@ -7259,7 +7185,7 @@ packages: yargs-unparser: 2.0.0 dev: true - /mocha/10.3.0: + /mocha@10.3.0: resolution: {integrity: sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==} engines: {node: '>= 14.0.0'} hasBin: true @@ -7267,7 +7193,7 @@ packages: ansi-colors: 4.1.1 browser-stdout: 1.3.1 chokidar: 3.5.3 - debug: 4.3.4_supports-color@8.1.1 + debug: 4.3.4(supports-color@8.1.1) diff: 5.0.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 @@ -7286,28 +7212,28 @@ packages: yargs-unparser: 2.0.0 dev: true - /mock-fs/4.14.0: + /mock-fs@4.14.0: resolution: {integrity: sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==} dev: true - /module-error/1.0.2: + /module-error@1.0.2: resolution: {integrity: sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==} engines: {node: '>=10'} dev: true - /ms/2.0.0: + /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true - /ms/2.1.2: + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /ms/2.1.3: + /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /multibase/0.6.1: + /multibase@0.6.1: resolution: {integrity: sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==} deprecated: This module has been superseded by the multiformats module dependencies: @@ -7315,7 +7241,7 @@ packages: buffer: 5.7.1 dev: true - /multibase/0.7.0: + /multibase@0.7.0: resolution: {integrity: sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==} deprecated: This module has been superseded by the multiformats module dependencies: @@ -7323,14 +7249,14 @@ packages: buffer: 5.7.1 dev: true - /multicodec/0.5.7: + /multicodec@0.5.7: resolution: {integrity: sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==} deprecated: This module has been superseded by the multiformats module dependencies: varint: 5.0.2 dev: true - /multicodec/1.0.4: + /multicodec@1.0.4: resolution: {integrity: sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==} deprecated: This module has been superseded by the multiformats module dependencies: @@ -7338,7 +7264,7 @@ packages: varint: 5.0.2 dev: true - /multihashes/0.4.21: + /multihashes@0.4.21: resolution: {integrity: sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==} dependencies: buffer: 5.7.1 @@ -7346,68 +7272,66 @@ packages: varint: 5.0.2 dev: true - /nano-base32/1.0.1: + /nano-base32@1.0.1: resolution: {integrity: sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==} dev: true - /nano-json-stream-parser/0.1.2: + /nano-json-stream-parser@0.1.2: resolution: {integrity: sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==} dev: true - /nanoassert/2.0.0: + /nanoassert@2.0.0: resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} dev: true - /nanoid/3.3.3: + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true - /napi-macros/2.0.0: + /napi-macros@2.0.0: resolution: {integrity: sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==} + requiresBuild: true dev: true - /napi-macros/2.2.2: - resolution: {integrity: sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==} - dev: true - - /natural-compare/1.4.0: + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /negotiator/0.6.3: + /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} dev: true - /neodoc/2.0.2: + /neodoc@2.0.2: resolution: {integrity: sha512-NAppJ0YecKWdhSXFYCHbo6RutiX8vOt/Jo3l46mUg6pQlpJNaqc5cGxdrW2jITQm5JIYySbFVPDl3RrREXNyPw==} dependencies: ansi-regex: 2.1.1 dev: true - /next-tick/1.1.0: + /next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /no-case/2.3.2: + /no-case@2.3.2: resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} dependencies: lower-case: 1.1.4 dev: true - /node-abort-controller/3.1.1: + /node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} dev: true - /node-addon-api/2.0.2: + /node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} dev: true - /node-fetch/2.6.7: + /node-fetch@2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} engines: {node: 4.x || >=6.0.0} + requiresBuild: true peerDependencies: encoding: ^0.1.0 peerDependenciesMeta: @@ -7418,7 +7342,7 @@ packages: dev: true optional: true - /node-fetch/2.7.0: + /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -7430,46 +7354,49 @@ packages: whatwg-url: 5.0.0 dev: true - /node-gyp-build/4.1.1: + /node-gyp-build@4.1.1: resolution: {integrity: sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==} hasBin: true + requiresBuild: true dev: true optional: true - /node-gyp-build/4.3.0: + /node-gyp-build@4.3.0: resolution: {integrity: sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==} hasBin: true + requiresBuild: true dev: true optional: true - /node-gyp-build/4.4.0: + /node-gyp-build@4.4.0: resolution: {integrity: sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==} hasBin: true dev: true - /node-gyp-build/4.8.0: + /node-gyp-build@4.8.0: resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true dev: true - /node-interval-tree/1.3.3: + /node-interval-tree@1.3.3: resolution: {integrity: sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw==} engines: {node: '>= 7.6.0'} dependencies: shallowequal: 1.1.0 dev: true - /nofilter/1.0.4: + /nofilter@1.0.4: resolution: {integrity: sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==} engines: {node: '>=8'} + requiresBuild: true dev: true - /nofilter/3.1.0: + /nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} engines: {node: '>=12.19'} dev: true - /normalize-package-data/2.5.0: + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 @@ -7478,33 +7405,33 @@ packages: validate-npm-package-license: 3.0.4 dev: true - /normalize-path/3.0.0: + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} dev: true - /normalize-url/6.1.0: + /normalize-url@6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} dev: true - /normalize-url/8.0.0: + /normalize-url@8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} engines: {node: '>=14.16'} dev: true - /nth-check/2.1.1: + /nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: boolbase: 1.0.0 dev: true - /number-is-nan/1.0.1: + /number-is-nan@1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} dev: true - /number-to-bn/1.7.0: + /number-to-bn@1.7.0: resolution: {integrity: sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==} engines: {node: '>=6.5.0', npm: '>=3'} dependencies: @@ -7512,25 +7439,25 @@ packages: strip-hex-prefix: 1.0.0 dev: true - /oauth-sign/0.9.0: + /oauth-sign@0.9.0: resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} dev: true - /object-assign/4.1.1: + /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} dev: true - /object-inspect/1.13.1: + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true - /object-keys/1.1.1: + /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} dev: true - /object.assign/4.1.5: + /object.assign@4.1.5: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: @@ -7540,7 +7467,7 @@ packages: object-keys: 1.1.1 dev: true - /object.fromentries/2.0.7: + /object.fromentries@2.0.7: resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} engines: {node: '>= 0.4'} dependencies: @@ -7549,7 +7476,7 @@ packages: es-abstract: 1.22.4 dev: true - /object.groupby/1.0.2: + /object.groupby@1.0.2: resolution: {integrity: sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==} dependencies: array.prototype.filter: 1.0.3 @@ -7559,7 +7486,7 @@ packages: es-errors: 1.3.0 dev: true - /object.values/1.1.7: + /object.values@1.1.7: resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: @@ -7568,50 +7495,50 @@ packages: es-abstract: 1.22.4 dev: true - /obliterator/2.0.4: + /obliterator@2.0.4: resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} dev: true - /oboe/2.1.5: + /oboe@2.1.5: resolution: {integrity: sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==} dependencies: http-https: 1.0.0 dev: true - /on-finished/2.3.0: + /on-finished@2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 dev: true - /on-finished/2.4.1: + /on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 dev: true - /once/1.4.0: + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true - /one-time/1.0.0: + /one-time@1.0.0: resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} dependencies: fn.name: 1.1.0 dev: true - /onetime/5.1.2: + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} dependencies: mimic-fn: 2.1.0 dev: true - /optionator/0.9.3: + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} dependencies: @@ -7623,99 +7550,99 @@ packages: type-check: 0.4.0 dev: true - /original-require/1.0.1: + /original-require@1.0.1: resolution: {integrity: sha512-5vdKMbE58WaE61uVD+PKyh8xdM398UnjPBLotW2sjG5MzHARwta/+NtMBCBA0t2WQblGYBvq5vsiZpWokwno+A==} dev: true - /os-locale/1.4.0: + /os-locale@1.4.0: resolution: {integrity: sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==} engines: {node: '>=0.10.0'} dependencies: lcid: 1.0.0 dev: true - /os-tmpdir/1.0.2: + /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} dev: true - /p-cancelable/2.1.1: + /p-cancelable@2.1.1: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} dev: true - /p-cancelable/3.0.0: + /p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} dev: true - /p-limit/1.3.0: + /p-limit@1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} dependencies: p-try: 1.0.0 dev: true - /p-limit/2.3.0: + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} dependencies: p-try: 2.2.0 dev: true - /p-limit/3.1.0: + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 dev: true - /p-locate/2.0.0: + /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} dependencies: p-limit: 1.3.0 dev: true - /p-locate/3.0.0: + /p-locate@3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} dependencies: p-limit: 2.3.0 dev: true - /p-locate/4.1.0: + /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} dependencies: p-limit: 2.3.0 dev: true - /p-locate/5.0.0: + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 dev: true - /p-map/4.0.0: + /p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 dev: true - /p-try/1.0.0: + /p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} dev: true - /p-try/2.2.0: + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} dev: true - /package-json/8.1.1: + /package-json@8.1.1: resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} engines: {node: '>=14.16'} dependencies: @@ -7725,35 +7652,35 @@ packages: semver: 7.6.0 dev: true - /param-case/2.1.1: + /param-case@2.1.1: resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} dependencies: no-case: 2.3.2 dev: true - /parent-module/1.0.1: + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 dev: true - /parse-cache-control/1.0.1: + /parse-cache-control@1.0.1: resolution: {integrity: sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==} dev: true - /parse-headers/2.0.5: + /parse-headers@2.0.5: resolution: {integrity: sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==} dev: true - /parse-json/2.2.0: + /parse-json@2.2.0: resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} engines: {node: '>=0.10.0'} dependencies: error-ex: 1.3.2 dev: true - /parse-json/5.2.0: + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: @@ -7763,78 +7690,78 @@ packages: lines-and-columns: 1.2.4 dev: true - /parse-passwd/1.0.0: + /parse-passwd@1.0.0: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} dev: true - /parse5-htmlparser2-tree-adapter/7.0.0: + /parse5-htmlparser2-tree-adapter@7.0.0: resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} dependencies: domhandler: 5.0.3 parse5: 7.1.2 dev: true - /parse5/7.1.2: + /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: entities: 4.5.0 dev: true - /parseurl/1.3.3: + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} dev: true - /pascal-case/2.0.1: + /pascal-case@2.0.1: resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} dependencies: camel-case: 3.0.0 upper-case-first: 1.1.2 dev: true - /path-case/2.1.1: + /path-case@2.1.1: resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} dependencies: no-case: 2.3.2 dev: true - /path-exists/2.1.0: + /path-exists@2.1.0: resolution: {integrity: sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==} engines: {node: '>=0.10.0'} dependencies: pinkie-promise: 2.0.1 dev: true - /path-exists/3.0.0: + /path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} dev: true - /path-exists/4.0.0: + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} dev: true - /path-is-absolute/1.0.1: + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} dev: true - /path-key/3.1.1: + /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} dev: true - /path-parse/1.0.7: + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /path-to-regexp/0.1.7: + /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: true - /path-type/1.1.0: + /path-type@1.1.0: resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==} engines: {node: '>=0.10.0'} dependencies: @@ -7843,21 +7770,21 @@ packages: pinkie-promise: 2.0.1 dev: true - /path-type/4.0.0: + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} dev: true - /pathval/1.1.1: + /pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /pathval/2.0.0: + /pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} dev: true - /pbkdf2/3.1.2: + /pbkdf2@3.1.2: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} engines: {node: '>=0.12'} dependencies: @@ -7868,46 +7795,47 @@ packages: sha.js: 2.4.11 dev: true - /performance-now/2.1.0: + /performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} dev: true - /picomatch/2.3.1: + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} dev: true - /pify/2.3.0: + /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} dev: true - /pinkie-promise/2.0.1: + /pinkie-promise@2.0.1: resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} engines: {node: '>=0.10.0'} dependencies: pinkie: 2.0.4 dev: true - /pinkie/2.0.4: + /pinkie@2.0.4: resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} engines: {node: '>=0.10.0'} dev: true - /pkg-up/3.1.0: + /pkg-up@3.1.0: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} dependencies: find-up: 3.0.0 dev: true - /pluralize/8.0.0: + /pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} dev: true - /pouchdb-abstract-mapreduce/7.3.1: + /pouchdb-abstract-mapreduce@7.3.1: resolution: {integrity: sha512-0zKXVFBvrfc1KnN0ggrB762JDmZnUpePHywo9Bq3Jy+L1FnoG7fXM5luFfvv5/T0gEw+ZTIwoocZECMnESBI9w==} + requiresBuild: true dependencies: pouchdb-binary-utils: 7.3.1 pouchdb-collate: 7.3.1 @@ -7922,8 +7850,9 @@ packages: dev: true optional: true - /pouchdb-adapter-leveldb-core/7.3.1: + /pouchdb-adapter-leveldb-core@7.3.1: resolution: {integrity: sha512-mxShHlqLMPz2gChrgtA9okV1ogFmQrRAoM/O4EN0CrQWPLXqYtpL1f7sI2asIvFe7SmpnvbLx7kkZyFmLTfwjA==} + requiresBuild: true dependencies: argsarray: 0.0.1 buffer-from: 1.1.2 @@ -7942,8 +7871,9 @@ packages: dev: true optional: true - /pouchdb-adapter-memory/7.3.1: + /pouchdb-adapter-memory@7.3.1: resolution: {integrity: sha512-iHdWGJAHONqQv0we3Oi1MYen69ZS8McLW9wUyaAYcWTJnAIIAr2ZM0/TeTDVSHfMUwYqEYk7X8jRtJZEMwLnwg==} + requiresBuild: true dependencies: memdown: 1.4.1 pouchdb-adapter-leveldb-core: 7.3.1 @@ -7951,8 +7881,9 @@ packages: dev: true optional: true - /pouchdb-adapter-utils/7.3.1: + /pouchdb-adapter-utils@7.3.1: resolution: {integrity: sha512-uKLG6dClwTs/sLIJ4WkLAi9wlnDBpOnfyhpeAgOjlOGN/XLz5nKHrA4UJRnURDyc+uv79S9r/Unc4hVpmbSPUw==} + requiresBuild: true dependencies: pouchdb-binary-utils: 7.3.1 pouchdb-collections: 7.3.1 @@ -7963,25 +7894,29 @@ packages: dev: true optional: true - /pouchdb-binary-utils/7.3.1: + /pouchdb-binary-utils@7.3.1: resolution: {integrity: sha512-crZJNfAEOnUoRk977Qtmk4cxEv6sNKllQ6vDDKgQrQLFjMUXma35EHzNyIJr1s76J77Q4sqKQAmxz9Y40yHGtw==} + requiresBuild: true dependencies: buffer-from: 1.1.2 dev: true optional: true - /pouchdb-collate/7.3.1: + /pouchdb-collate@7.3.1: resolution: {integrity: sha512-o4gyGqDMLMSNzf6EDTr3eHaH/JRMoqRhdc+eV+oA8u00nTBtr9wD+jypVe2LbgKLJ4NWqx2qVkXiTiQdUFtsLQ==} + requiresBuild: true dev: true optional: true - /pouchdb-collections/7.3.1: + /pouchdb-collections@7.3.1: resolution: {integrity: sha512-yUyDqR+OJmtwgExOSJegpBJXDLAEC84TWnbAYycyh+DZoA51Yw0+XVQF5Vh8Ii90/Ut2xo88fmrmp0t6kqom8w==} + requiresBuild: true dev: true optional: true - /pouchdb-debug/7.2.1: + /pouchdb-debug@7.2.1: resolution: {integrity: sha512-eP3ht/AKavLF2RjTzBM6S9gaI2/apcW6xvaKRQhEdOfiANqerFuksFqHCal3aikVQuDO+cB/cw+a4RyJn/glBw==} + requiresBuild: true dependencies: debug: 3.1.0 transitivePeerDependencies: @@ -7989,15 +7924,17 @@ packages: dev: true optional: true - /pouchdb-errors/7.3.1: + /pouchdb-errors@7.3.1: resolution: {integrity: sha512-Zktz4gnXEUcZcty8FmyvtYUYsHskoST05m6H5/E2gg/0mCfEXq/XeyyLkZHaZmqD0ZPS9yNmASB1VaFWEKEaDw==} + requiresBuild: true dependencies: inherits: 2.0.4 dev: true optional: true - /pouchdb-fetch/7.3.1: + /pouchdb-fetch@7.3.1: resolution: {integrity: sha512-205xAtvdHRPQ4fp1h9+RmT9oQabo9gafuPmWsS9aEl3ER54WbY8Vaj1JHZGbU4KtMTYvW7H5088zLS7Nrusuag==} + requiresBuild: true dependencies: abort-controller: 3.0.0 fetch-cookie: 0.11.0 @@ -8007,8 +7944,9 @@ packages: dev: true optional: true - /pouchdb-find/7.3.1: + /pouchdb-find@7.3.1: resolution: {integrity: sha512-AeqUfAVY1c7IFaY36BRT0vIz9r4VTKq/YOWTmiqndOZUQ/pDGxyO2fNFal6NN3PyYww0JijlD377cPvhnrhJVA==} + requiresBuild: true dependencies: pouchdb-abstract-mapreduce: 7.3.1 pouchdb-collate: 7.3.1 @@ -8022,15 +7960,17 @@ packages: dev: true optional: true - /pouchdb-json/7.3.1: + /pouchdb-json@7.3.1: resolution: {integrity: sha512-AyOKsmc85/GtHjMZyEacqzja8qLVfycS1hh1oskR+Bm5PIITX52Fb8zyi0hEetV6VC0yuGbn0RqiLjJxQePeqQ==} + requiresBuild: true dependencies: vuvuzela: 1.0.3 dev: true optional: true - /pouchdb-mapreduce-utils/7.3.1: + /pouchdb-mapreduce-utils@7.3.1: resolution: {integrity: sha512-oUMcq82+4pTGQ6dtrhgORHOVHZSr6w/5tFIUGlv7RABIDvJarL4snMawADjlpiEwPdiQ/ESG8Fqt8cxqvqsIgg==} + requiresBuild: true dependencies: argsarray: 0.0.1 inherits: 2.0.4 @@ -8039,29 +7979,33 @@ packages: dev: true optional: true - /pouchdb-md5/7.3.1: + /pouchdb-md5@7.3.1: resolution: {integrity: sha512-aDV8ui/mprnL3xmt0gT/81DFtTtJiKyn+OxIAbwKPMfz/rDFdPYvF0BmDC9QxMMzGfkV+JJUjU6at0PPs2mRLg==} + requiresBuild: true dependencies: pouchdb-binary-utils: 7.3.1 spark-md5: 3.0.2 dev: true optional: true - /pouchdb-merge/7.3.1: + /pouchdb-merge@7.3.1: resolution: {integrity: sha512-FeK3r35mKimokf2PQ2tUI523QWyZ4lYZ0Yd75FfSch/SPY6wIokz5XBZZ6PHdu5aOJsEKzoLUxr8CpSg9DhcAw==} + requiresBuild: true dev: true optional: true - /pouchdb-selector-core/7.3.1: + /pouchdb-selector-core@7.3.1: resolution: {integrity: sha512-HBX+nNGXcaL9z0uNpwSMRq2GNZd3EZXW+fe9rJHS0hvJohjZL7aRJLoaXfEdHPRTNW+CpjM3Rny60eGekQdI/w==} + requiresBuild: true dependencies: pouchdb-collate: 7.3.1 pouchdb-utils: 7.3.1 dev: true optional: true - /pouchdb-utils/7.3.1: + /pouchdb-utils@7.3.1: resolution: {integrity: sha512-R3hHBo1zTdTu/NFs3iqkcaQAPwhIH0gMIdfVKd5lbDYlmP26rCG5pdS+v7NuoSSFLJ4xxnaGV+Gjf4duYsJ8wQ==} + requiresBuild: true dependencies: argsarray: 0.0.1 clone-buffer: 1.0.0 @@ -8074,8 +8018,9 @@ packages: dev: true optional: true - /pouchdb/7.3.0: + /pouchdb@7.3.0: resolution: {integrity: sha512-OwsIQGXsfx3TrU1pLruj6PGSwFH+h5k4hGNxFkZ76Um7/ZI8F5TzUHFrpldVVIhfXYi2vP31q0q7ot1FSLFYOw==} + requiresBuild: true dependencies: abort-controller: 3.0.0 argsarray: 0.0.1 @@ -8102,12 +8047,12 @@ packages: dev: true optional: true - /prelude-ls/1.2.1: + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} dev: true - /prettier-plugin-solidity/1.3.1_prettier@2.8.8: + /prettier-plugin-solidity@1.3.1(prettier@2.8.8): resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} engines: {node: '>=16'} requiresBuild: true @@ -8121,7 +8066,7 @@ packages: dev: true optional: true - /prettier/2.8.8: + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true @@ -8129,28 +8074,28 @@ packages: dev: true optional: true - /prettier/3.2.4: + /prettier@3.2.4: resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} engines: {node: '>=14'} hasBin: true dev: true - /process-nextick-args/2.0.1: + /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true - /process/0.11.10: + /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} dev: true - /promise/8.3.0: + /promise@8.3.0: resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==} dependencies: asap: 2.0.6 dev: true - /proper-lockfile/4.1.2: + /proper-lockfile@4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} dependencies: graceful-fs: 4.2.11 @@ -8158,11 +8103,11 @@ packages: signal-exit: 3.0.7 dev: false - /proto-list/1.2.4: + /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} dev: true - /proxy-addr/2.0.7: + /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} dependencies: @@ -8170,65 +8115,66 @@ packages: ipaddr.js: 1.9.1 dev: true - /proxy-from-env/1.1.0: + /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true - /prr/1.0.1: + /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true - /psl/1.9.0: + /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true - /pump/3.0.0: + /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 dev: true - /punycode/2.1.0: + /punycode@2.1.0: resolution: {integrity: sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==} engines: {node: '>=6'} dev: true - /punycode/2.3.1: + /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: true - /pure-rand/5.0.5: + /pure-rand@5.0.5: resolution: {integrity: sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==} dev: true - /qs/6.11.0: + /qs@6.11.0: resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} dependencies: side-channel: 1.0.5 dev: true - /qs/6.11.2: + /qs@6.11.2: resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} engines: {node: '>=0.6'} dependencies: side-channel: 1.0.5 dev: true - /qs/6.5.3: + /qs@6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} engines: {node: '>=0.6'} dev: true - /qs/6.9.7: + /qs@6.9.7: resolution: {integrity: sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==} engines: {node: '>=0.6'} dev: true - /query-string/5.1.1: + /query-string@5.1.1: resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==} engines: {node: '>=0.10.0'} dependencies: @@ -8237,38 +8183,39 @@ packages: strict-uri-encode: 1.1.0 dev: true - /querystring/0.2.1: + /querystring@0.2.1: resolution: {integrity: sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==} engines: {node: '>=0.4.x'} deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. dev: true - /querystringify/2.2.0: + /querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + requiresBuild: true dev: true optional: true - /queue-microtask/1.2.3: + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /quick-lru/5.1.1: + /quick-lru@5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} dev: true - /randombytes/2.1.0: + /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 dev: true - /range-parser/1.2.1: + /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} dev: true - /raw-body/2.4.3: + /raw-body@2.4.3: resolution: {integrity: sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==} engines: {node: '>= 0.8'} dependencies: @@ -8278,7 +8225,7 @@ packages: unpipe: 1.0.0 dev: true - /raw-body/2.5.1: + /raw-body@2.5.1: resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} engines: {node: '>= 0.8'} dependencies: @@ -8288,7 +8235,7 @@ packages: unpipe: 1.0.0 dev: true - /raw-body/2.5.2: + /raw-body@2.5.2: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} dependencies: @@ -8298,7 +8245,7 @@ packages: unpipe: 1.0.0 dev: true - /rc/1.2.8: + /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true dependencies: @@ -8308,7 +8255,7 @@ packages: strip-json-comments: 2.0.1 dev: true - /read-pkg-up/1.0.1: + /read-pkg-up@1.0.1: resolution: {integrity: sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==} engines: {node: '>=0.10.0'} dependencies: @@ -8316,7 +8263,7 @@ packages: read-pkg: 1.1.0 dev: true - /read-pkg/1.1.0: + /read-pkg@1.1.0: resolution: {integrity: sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==} engines: {node: '>=0.10.0'} dependencies: @@ -8325,13 +8272,15 @@ packages: path-type: 1.1.0 dev: true - /readable-stream/0.0.4: + /readable-stream@0.0.4: resolution: {integrity: sha512-azrivNydKRYt7zwLV5wWUK7YzKTWs3q87xSmY6DlHapPrCvaT6ZrukvM5erV+yCSSPmZT8zkSdttOHQpWWm9zw==} + requiresBuild: true dev: true optional: true - /readable-stream/1.1.14: + /readable-stream@1.1.14: resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} + requiresBuild: true dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -8340,7 +8289,7 @@ packages: dev: true optional: true - /readable-stream/2.3.8: + /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: core-util-is: 1.0.3 @@ -8352,7 +8301,7 @@ packages: util-deprecate: 1.0.2 dev: true - /readable-stream/3.6.2: + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} dependencies: @@ -8361,20 +8310,25 @@ packages: util-deprecate: 1.0.2 dev: true - /readdirp/3.6.0: + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 dev: true - /redux-saga/1.0.0: + /readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + dev: true + + /redux-saga@1.0.0: resolution: {integrity: sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA==} dependencies: '@redux-saga/core': 1.3.0 dev: true - /redux/3.7.2: + /redux@3.7.2: resolution: {integrity: sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==} dependencies: lodash: 4.17.21 @@ -8383,11 +8337,11 @@ packages: symbol-observable: 1.2.0 dev: true - /regenerator-runtime/0.14.1: + /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true - /regexp.prototype.flags/1.5.2: + /regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} dependencies: @@ -8397,35 +8351,35 @@ packages: set-function-name: 2.0.1 dev: true - /registry-auth-token/5.0.2: + /registry-auth-token@5.0.2: resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} engines: {node: '>=14'} dependencies: '@pnpm/npm-conf': 2.2.2 dev: true - /registry-url/6.0.1: + /registry-url@6.0.1: resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} engines: {node: '>=12'} dependencies: rc: 1.2.8 dev: true - /req-cwd/2.0.0: + /req-cwd@2.0.0: resolution: {integrity: sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==} engines: {node: '>=4'} dependencies: req-from: 2.0.0 dev: true - /req-from/2.0.0: + /req-from@2.0.0: resolution: {integrity: sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==} engines: {node: '>=4'} dependencies: resolve-from: 3.0.0 dev: true - /request/2.88.2: + /request@2.88.2: resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==} engines: {node: '>= 6'} deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 @@ -8452,31 +8406,32 @@ packages: uuid: 3.4.0 dev: true - /require-directory/2.1.1: + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: true - /require-from-string/1.2.1: + /require-from-string@1.2.1: resolution: {integrity: sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==} engines: {node: '>=0.10.0'} dev: true - /require-from-string/2.0.2: + /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} dev: true - /require-main-filename/1.0.1: + /require-main-filename@1.0.1: resolution: {integrity: sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==} dev: true - /requires-port/1.0.0: + /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + requiresBuild: true dev: true optional: true - /reselect-tree/1.3.7: + /reselect-tree@1.3.7: resolution: {integrity: sha512-kZN+C1cVJ6fFN2smSb0l4UvYZlRzttgnu183svH4NrU22cBY++ikgr2QT75Uuk4MYpv5gXSVijw4c5U6cx6GKg==} dependencies: debug: 3.2.7 @@ -8486,15 +8441,15 @@ packages: - supports-color dev: true - /reselect/4.1.8: + /reselect@4.1.8: resolution: {integrity: sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==} dev: true - /resolve-alpn/1.2.1: + /resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} dev: true - /resolve-dir/1.0.1: + /resolve-dir@1.0.1: resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} engines: {node: '>=0.10.0'} dependencies: @@ -8502,27 +8457,27 @@ packages: global-modules: 1.0.0 dev: true - /resolve-from/3.0.0: + /resolve-from@3.0.0: resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} engines: {node: '>=4'} dev: true - /resolve-from/4.0.0: + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true - /resolve-pkg-maps/1.0.0: + /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true - /resolve/1.17.0: + /resolve@1.17.0: resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} dependencies: path-parse: 1.0.7 dev: true - /resolve/1.22.8: + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: @@ -8531,20 +8486,20 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /responselike/2.0.1: + /responselike@2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} dependencies: lowercase-keys: 2.0.0 dev: true - /responselike/3.0.0: + /responselike@3.0.0: resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} engines: {node: '>=14.16'} dependencies: lowercase-keys: 3.0.0 dev: true - /restore-cursor/3.1.0: + /restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} dependencies: @@ -8552,56 +8507,57 @@ packages: signal-exit: 3.0.7 dev: true - /retry/0.12.0: + /retry@0.12.0: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} dev: false - /retry/0.13.1: + /retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} + requiresBuild: true dev: true optional: true - /reusify/1.0.4: + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rimraf/2.7.1: + /rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} hasBin: true dependencies: glob: 7.2.0 dev: true - /rimraf/3.0.2: + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 dev: true - /ripemd160-min/0.0.6: + /ripemd160-min@0.0.6: resolution: {integrity: sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==} engines: {node: '>=8'} dev: true - /ripemd160/2.0.2: + /ripemd160@2.0.2: resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} dependencies: hash-base: 3.1.0 inherits: 2.0.4 dev: true - /rlp/2.2.7: + /rlp@2.2.7: resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} hasBin: true dependencies: bn.js: 5.2.1 dev: true - /rosetta/1.1.0: + /rosetta@1.1.0: resolution: {integrity: sha512-3jQaCo2ySoDqLIPjy7+AvN3rluLfkG8A27hg0virL0gRAB5BJ3V35IBdkL/t6k1dGK0TVTyUEwXVUJsygyx4pA==} engines: {node: '>=8'} dependencies: @@ -8609,23 +8565,13 @@ packages: templite: 1.2.0 dev: true - /run-parallel-limit/1.1.0: - resolution: {integrity: sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==} - dependencies: - queue-microtask: 1.2.3 - dev: true - - /run-parallel/1.2.0: + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: true - /rustbn.js/0.2.0: - resolution: {integrity: sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==} - dev: true - - /safe-array-concat/1.1.0: + /safe-array-concat@1.1.0: resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} engines: {node: '>=0.4'} dependencies: @@ -8635,15 +8581,15 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer/5.1.2: + /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true - /safe-buffer/5.2.1: + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safe-regex-test/1.0.3: + /safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} engines: {node: '>= 0.4'} dependencies: @@ -8652,24 +8598,24 @@ packages: is-regex: 1.1.4 dev: true - /safe-stable-stringify/2.4.3: + /safe-stable-stringify@2.4.3: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} dev: true - /safer-buffer/2.1.2: + /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /scrypt-js/2.0.4: + /scrypt-js@2.0.4: resolution: {integrity: sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==} dev: true - /scrypt-js/3.0.1: + /scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} dev: true - /secp256k1/4.0.3: + /secp256k1@4.0.3: resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} engines: {node: '>=10.0.0'} requiresBuild: true @@ -8679,21 +8625,21 @@ packages: node-gyp-build: 4.8.0 dev: true - /seedrandom/3.0.5: + /seedrandom@3.0.5: resolution: {integrity: sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==} dev: true - /semver/5.7.2: + /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: true - /semver/6.3.1: + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: true - /semver/7.6.0: + /semver@7.6.0: resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} hasBin: true @@ -8701,7 +8647,7 @@ packages: lru-cache: 6.0.0 dev: true - /send/0.17.2: + /send@0.17.2: resolution: {integrity: sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==} engines: {node: '>= 0.8.0'} dependencies: @@ -8722,7 +8668,7 @@ packages: - supports-color dev: true - /send/0.18.0: + /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} dependencies: @@ -8743,20 +8689,20 @@ packages: - supports-color dev: true - /sentence-case/2.1.1: + /sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} dependencies: no-case: 2.3.2 upper-case-first: 1.1.2 dev: true - /serialize-javascript/6.0.0: + /serialize-javascript@6.0.0: resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} dependencies: randombytes: 2.1.0 dev: true - /serve-static/1.14.2: + /serve-static@1.14.2: resolution: {integrity: sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==} engines: {node: '>= 0.8.0'} dependencies: @@ -8768,7 +8714,7 @@ packages: - supports-color dev: true - /serve-static/1.15.0: + /serve-static@1.15.0: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} dependencies: @@ -8780,7 +8726,7 @@ packages: - supports-color dev: true - /servify/0.1.12: + /servify@0.1.12: resolution: {integrity: sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==} engines: {node: '>=6'} dependencies: @@ -8793,11 +8739,11 @@ packages: - supports-color dev: true - /set-blocking/2.0.0: + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true - /set-function-length/1.2.1: + /set-function-length@1.2.1: resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} engines: {node: '>= 0.4'} dependencies: @@ -8809,7 +8755,7 @@ packages: has-property-descriptors: 1.0.2 dev: true - /set-function-name/2.0.1: + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: @@ -8818,19 +8764,19 @@ packages: has-property-descriptors: 1.0.2 dev: true - /setimmediate/1.0.4: + /setimmediate@1.0.4: resolution: {integrity: sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==} dev: true - /setimmediate/1.0.5: + /setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} dev: true - /setprototypeof/1.2.0: + /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true - /sha.js/2.4.11: + /sha.js@2.4.11: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} hasBin: true dependencies: @@ -8838,42 +8784,42 @@ packages: safe-buffer: 5.2.1 dev: true - /sha1/1.1.1: + /sha1@1.1.1: resolution: {integrity: sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==} dependencies: charenc: 0.0.2 crypt: 0.0.2 dev: true - /sha3-wasm/1.0.0: + /sha3-wasm@1.0.0: resolution: {integrity: sha512-yX0ULD3VD8U80YlM+6FapExy9uzYBpEOZzXRHwdhJn/+3PBbKhRHiNhknBqmMkW110zglXrJoZ52gtRbDGK4tg==} dependencies: nanoassert: 2.0.0 dev: true - /sha3/2.1.4: + /sha3@2.1.4: resolution: {integrity: sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==} dependencies: buffer: 6.0.3 dev: true - /shallowequal/1.1.0: + /shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} dev: true - /shebang-command/2.0.0: + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 dev: true - /shebang-regex/3.0.0: + /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} dev: true - /side-channel/1.0.5: + /side-channel@1.0.5: resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==} engines: {node: '>= 0.4'} dependencies: @@ -8883,14 +8829,14 @@ packages: object-inspect: 1.13.1 dev: true - /signal-exit/3.0.7: + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - /simple-concat/1.0.1: + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: true - /simple-get/2.8.2: + /simple-get@2.8.2: resolution: {integrity: sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==} dependencies: decompress-response: 3.3.0 @@ -8898,13 +8844,13 @@ packages: simple-concat: 1.0.1 dev: true - /simple-swizzle/0.2.2: + /simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} dependencies: is-arrayish: 0.3.2 dev: true - /slice-ansi/4.0.0: + /slice-ansi@4.0.0: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} engines: {node: '>=10'} dependencies: @@ -8913,13 +8859,13 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /snake-case/2.1.0: + /snake-case@2.1.0: resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} dependencies: no-case: 2.3.2 dev: true - /solc/0.4.26: + /solc@0.4.26: resolution: {integrity: sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==} hasBin: true dependencies: @@ -8930,32 +8876,30 @@ packages: yargs: 4.8.1 dev: true - /solc/0.7.3_debug@4.3.4: - resolution: {integrity: sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==} - engines: {node: '>=8.0.0'} + /solc@0.8.21(debug@4.3.4): + resolution: {integrity: sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==} + engines: {node: '>=10.0.0'} hasBin: true dependencies: command-exists: 1.2.9 - commander: 3.0.2 - follow-redirects: 1.15.5 - fs-extra: 0.30.0 + commander: 8.3.0 + follow-redirects: 1.15.5(debug@4.3.4) js-sha3: 0.8.0 memorystream: 0.3.1 - require-from-string: 2.0.2 semver: 5.7.2 tmp: 0.0.33 transitivePeerDependencies: - debug dev: true - /solc/0.8.21_debug@4.3.4: - resolution: {integrity: sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==} + /solc@0.8.26(debug@4.3.4): + resolution: {integrity: sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==} engines: {node: '>=10.0.0'} hasBin: true dependencies: command-exists: 1.2.9 commander: 8.3.0 - follow-redirects: 1.15.5 + follow-redirects: 1.15.5(debug@4.3.4) js-sha3: 0.8.0 memorystream: 0.3.1 semver: 5.7.2 @@ -8964,7 +8908,7 @@ packages: - debug dev: true - /solhint/4.1.1: + /solhint@4.1.1: resolution: {integrity: sha512-7G4iF8H5hKHc0tR+/uyZesSKtfppFIMvPSW+Ku6MSL25oVRuyFeqNhOsXHfkex64wYJyXs4fe+pvhB069I19Tw==} hasBin: true dependencies: @@ -8992,51 +8936,53 @@ packages: - typescript dev: true - /solidity-comments-extractor/0.0.8: + /solidity-comments-extractor@0.0.8: resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} + requiresBuild: true dev: true optional: true - /source-map-support/0.5.21: + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 dev: true - /source-map/0.6.1: + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} dev: true - /spark-md5/3.0.2: + /spark-md5@3.0.2: resolution: {integrity: sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==} + requiresBuild: true dev: true optional: true - /spdx-correct/3.2.0: + /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.17 dev: true - /spdx-exceptions/2.4.0: + /spdx-exceptions@2.4.0: resolution: {integrity: sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==} dev: true - /spdx-expression-parse/3.0.1: + /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.4.0 spdx-license-ids: 3.0.17 dev: true - /spdx-license-ids/3.0.17: + /spdx-license-ids@3.0.17: resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} dev: true - /sshpk/1.18.0: + /sshpk@1.18.0: resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} engines: {node: '>=0.10.0'} hasBin: true @@ -9052,33 +8998,33 @@ packages: tweetnacl: 0.14.5 dev: true - /stack-trace/0.0.10: + /stack-trace@0.0.10: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} dev: true - /stacktrace-parser/0.1.10: + /stacktrace-parser@0.1.10: resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} engines: {node: '>=6'} dependencies: type-fest: 0.7.1 dev: true - /statuses/1.5.0: + /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} dev: true - /statuses/2.0.1: + /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} dev: true - /strict-uri-encode/1.1.0: + /strict-uri-encode@1.1.0: resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} engines: {node: '>=0.10.0'} dev: true - /string-width/1.0.2: + /string-width@1.0.2: resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} engines: {node: '>=0.10.0'} dependencies: @@ -9087,7 +9033,7 @@ packages: strip-ansi: 3.0.1 dev: true - /string-width/2.1.1: + /string-width@2.1.1: resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} engines: {node: '>=4'} dependencies: @@ -9095,7 +9041,7 @@ packages: strip-ansi: 4.0.0 dev: true - /string-width/4.2.3: + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: @@ -9104,7 +9050,7 @@ packages: strip-ansi: 6.0.1 dev: true - /string.prototype.trim/1.2.8: + /string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: @@ -9113,7 +9059,7 @@ packages: es-abstract: 1.22.4 dev: true - /string.prototype.trimend/1.0.7: + /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: call-bind: 1.0.7 @@ -9121,7 +9067,7 @@ packages: es-abstract: 1.22.4 dev: true - /string.prototype.trimstart/1.0.7: + /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: call-bind: 1.0.7 @@ -9129,80 +9075,82 @@ packages: es-abstract: 1.22.4 dev: true - /string_decoder/0.10.31: + /string_decoder@0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} + requiresBuild: true dev: true optional: true - /string_decoder/1.1.1: + /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 dev: true - /string_decoder/1.3.0: + /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 dev: true - /strip-ansi/3.0.1: + /strip-ansi@3.0.1: resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} engines: {node: '>=0.10.0'} dependencies: ansi-regex: 2.1.1 dev: true - /strip-ansi/4.0.0: + /strip-ansi@4.0.0: resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} engines: {node: '>=4'} dependencies: ansi-regex: 3.0.1 dev: true - /strip-ansi/6.0.1: + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 dev: true - /strip-bom/2.0.0: + /strip-bom@2.0.0: resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} engines: {node: '>=0.10.0'} dependencies: is-utf8: 0.2.1 dev: true - /strip-bom/3.0.0: + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: true - /strip-hex-prefix/1.0.0: + /strip-hex-prefix@1.0.0: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} dependencies: is-hex-prefixed: 1.0.0 dev: true - /strip-indent/2.0.0: + /strip-indent@2.0.0: resolution: {integrity: sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==} engines: {node: '>=4'} dev: true - /strip-json-comments/2.0.1: + /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} dev: true - /strip-json-comments/3.1.1: + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} dev: true - /sublevel-pouchdb/7.3.1: + /sublevel-pouchdb@7.3.1: resolution: {integrity: sha512-n+4fK72F/ORdqPwoGgMGYeOrW2HaPpW9o9k80bT1B3Cim5BSvkKkr9WbWOWynni/GHkbCEdvLVFJL1ktosAdhQ==} + requiresBuild: true dependencies: inherits: 2.0.4 level-codec: 9.0.2 @@ -9211,40 +9159,40 @@ packages: dev: true optional: true - /supports-color/5.5.0: + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} dependencies: has-flag: 3.0.0 dev: true - /supports-color/7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 dev: true - /supports-color/8.1.1: + /supports-color@8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} dependencies: has-flag: 4.0.0 dev: true - /supports-preserve-symlinks-flag/1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: true - /swap-case/1.1.2: + /swap-case@1.1.2: resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} dependencies: lower-case: 1.1.4 upper-case: 1.1.3 dev: true - /swarm-js/0.1.42: + /swarm-js@0.1.42: resolution: {integrity: sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==} dependencies: bluebird: 3.7.2 @@ -9264,12 +9212,12 @@ packages: - utf-8-validate dev: true - /symbol-observable/1.2.0: + /symbol-observable@1.2.0: resolution: {integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==} engines: {node: '>=0.10.0'} dev: true - /sync-request/6.1.0: + /sync-request@6.1.0: resolution: {integrity: sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==} engines: {node: '>=8.0.0'} dependencies: @@ -9278,13 +9226,13 @@ packages: then-request: 6.0.2 dev: true - /sync-rpc/1.3.6: + /sync-rpc@1.3.6: resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==} dependencies: get-port: 3.2.0 dev: true - /table/6.8.1: + /table@6.8.1: resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} engines: {node: '>=10.0.0'} dependencies: @@ -9295,7 +9243,7 @@ packages: strip-ansi: 6.0.1 dev: true - /tar/4.4.19: + /tar@4.4.19: resolution: {integrity: sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==} engines: {node: '>=4.5'} dependencies: @@ -9308,24 +9256,24 @@ packages: yallist: 3.1.1 dev: true - /templite/1.2.0: + /templite@1.2.0: resolution: {integrity: sha512-O9BpPXF44a9Pg84Be6mjzlrqOtbP2I/B5PNLWu5hb1n9UQ1GTLsjdMg1z5ROCkF6NFXsO5LQfRXEpgTGrZ7Q0Q==} dev: true - /testrpc/0.0.1: + /testrpc@0.0.1: resolution: {integrity: sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==} deprecated: testrpc has been renamed to ganache-cli, please use this package from now on. dev: true - /text-hex/1.0.0: + /text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} dev: true - /text-table/0.2.0: + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /then-request/6.0.2: + /then-request@6.0.2: resolution: {integrity: sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==} engines: {node: '>=6.0.0'} dependencies: @@ -9342,54 +9290,55 @@ packages: qs: 6.11.2 dev: true - /through2/3.0.2: + /through2@3.0.2: resolution: {integrity: sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==} + requiresBuild: true dependencies: inherits: 2.0.4 readable-stream: 3.6.2 dev: true optional: true - /timed-out/4.0.1: + /timed-out@4.0.1: resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} engines: {node: '>=0.10.0'} dev: true - /tiny-typed-emitter/2.1.0: + /tiny-typed-emitter@2.1.0: resolution: {integrity: sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==} dev: true - /title-case/2.1.1: + /title-case@2.1.1: resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} dependencies: no-case: 2.3.2 upper-case: 1.1.3 dev: true - /tmp/0.0.33: + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 dev: true - /to-regex-range/5.0.1: + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 dev: true - /toidentifier/1.0.1: + /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} dev: true - /tokenizr/1.5.7: + /tokenizr@1.5.7: resolution: {integrity: sha512-w6qS6F5PNtY30DxoRD4a7nC7zOlPM2SlpQ4zLhOmqBaB1VCZrlV82bLpc/lKNOdNmrwIwcsJLDcjEJ8f7UG6Mg==} dev: true - /tough-cookie/2.5.0: + /tough-cookie@2.5.0: resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} engines: {node: '>=0.8'} dependencies: @@ -9397,9 +9346,10 @@ packages: punycode: 2.3.1 dev: true - /tough-cookie/4.1.3: + /tough-cookie@4.1.3: resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} engines: {node: '>=6'} + requiresBuild: true dependencies: psl: 1.9.0 punycode: 2.3.1 @@ -9408,16 +9358,16 @@ packages: dev: true optional: true - /tr46/0.0.3: + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /triple-beam/1.4.1: + /triple-beam@1.4.1: resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} engines: {node: '>= 14.0.0'} dev: true - /truffle-assertions/0.9.2: + /truffle-assertions@0.9.2: resolution: {integrity: sha512-9g2RhaxU2F8DeWhqoGQvL/bV8QVoSnQ6PY+ZPvYRP5eF7+/8LExb4mjLx/FeliLTjc3Tv1SABG05Gu5qQ/ErmA==} deprecated: Truffle was sunset, so this package will be deprecated alongside Truffle dependencies: @@ -9425,7 +9375,7 @@ packages: lodash.isequal: 4.5.0 dev: true - /truffle-flattener/1.6.0: + /truffle-flattener@1.6.0: resolution: {integrity: sha512-scS5Bsi4CZyvlrmD4iQcLHTiG2RQFUXVheTgWeH6PuafmI+Lk5U87Es98loM3w3ImqC9/fPHq+3QIXbcPuoJ1Q==} hasBin: true dependencies: @@ -9438,7 +9388,7 @@ packages: - supports-color dev: true - /truffle-plugin-verify/0.6.7: + /truffle-plugin-verify@0.6.7: resolution: {integrity: sha512-Z+kk3i0rc58nXYWVLuiUKWYrcK1ws9lSa2+EJLFfDegV3WPl0k0P6htIYwb5ifG/fHztAS79n8bgNZ9hxStxtg==} deprecated: Truffle was sunset, so this package will be deprecated alongside Truffle dependencies: @@ -9456,7 +9406,7 @@ packages: - utf-8-validate dev: true - /truffle/5.11.5: + /truffle@5.11.5: resolution: {integrity: sha512-yCa2uWs5DmL0spuJUuIMtnVayRQrVuWLtcRXHMB0NLrtWDcRo7VM9RViveV4+oi9LdZ8VpFmmqHGm43LbzUxOA==} engines: {node: ^16.20 || ^18.16 || >=20} hasBin: true @@ -9477,7 +9427,7 @@ packages: - utf-8-validate dev: true - /tsconfig-paths/3.15.0: + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: '@types/json5': 0.0.29 @@ -9486,75 +9436,77 @@ packages: strip-bom: 3.0.0 dev: true - /tslib/1.14.1: + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib/2.4.1: + /tslib@2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + requiresBuild: true dev: true optional: true - /tslib/2.6.2: + /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + requiresBuild: true dev: true optional: true - /tsort/0.0.1: + /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} dev: true - /tunnel-agent/0.6.0: + /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: safe-buffer: 5.2.1 dev: true - /tunnel/0.0.6: + /tunnel@0.0.6: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: true - /tweetnacl-util/0.15.1: + /tweetnacl-util@0.15.1: resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} dev: true - /tweetnacl/0.14.5: + /tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} dev: true - /tweetnacl/1.0.3: + /tweetnacl@1.0.3: resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} dev: true - /type-check/0.4.0: + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 dev: true - /type-detect/4.0.8: + /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} dev: true - /type-fest/0.20.2: + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} dev: true - /type-fest/0.21.3: + /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} dev: true - /type-fest/0.7.1: + /type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} dev: true - /type-is/1.6.18: + /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} dependencies: @@ -9562,15 +9514,15 @@ packages: mime-types: 2.1.35 dev: true - /type/1.2.0: + /type@1.2.0: resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==} dev: true - /type/2.7.2: + /type@2.7.2: resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} dev: true - /typed-array-buffer/1.0.1: + /typed-array-buffer@1.0.1: resolution: {integrity: sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==} engines: {node: '>= 0.4'} dependencies: @@ -9579,7 +9531,7 @@ packages: is-typed-array: 1.1.13 dev: true - /typed-array-byte-length/1.0.0: + /typed-array-byte-length@1.0.0: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: @@ -9589,7 +9541,7 @@ packages: is-typed-array: 1.1.13 dev: true - /typed-array-byte-offset/1.0.1: + /typed-array-byte-offset@1.0.1: resolution: {integrity: sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==} engines: {node: '>= 0.4'} dependencies: @@ -9601,7 +9553,7 @@ packages: is-typed-array: 1.1.13 dev: true - /typed-array-length/1.0.4: + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: call-bind: 1.0.7 @@ -9609,37 +9561,37 @@ packages: is-typed-array: 1.1.13 dev: true - /typedarray-to-buffer/3.1.5: + /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: is-typedarray: 1.0.0 dev: true - /typedarray/0.0.6: + /typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typescript-compare/0.0.2: + /typescript-compare@0.0.2: resolution: {integrity: sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==} dependencies: typescript-logic: 0.0.0 dev: true - /typescript-logic/0.0.0: + /typescript-logic@0.0.0: resolution: {integrity: sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==} dev: true - /typescript-tuple/2.2.1: + /typescript-tuple@2.2.1: resolution: {integrity: sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==} dependencies: typescript-compare: 0.0.2 dev: true - /ultron/1.1.1: + /ultron@1.1.1: resolution: {integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==} dev: true - /unbox-primitive/1.0.2: + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: call-bind: 1.0.7 @@ -9648,67 +9600,69 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /undici-types/5.26.5: + /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true - /undici/5.28.3: + /undici@5.28.3: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} dependencies: '@fastify/busboy': 2.1.0 dev: true - /universalify/0.1.2: + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} dev: true - /universalify/0.2.0: + /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} + requiresBuild: true dev: true optional: true - /universalify/2.0.1: + /universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} dev: true - /unpipe/1.0.0: + /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} dev: true - /upper-case-first/1.1.2: + /upper-case-first@1.1.2: resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} dependencies: upper-case: 1.1.3 dev: true - /upper-case/1.1.3: + /upper-case@1.1.3: resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} dev: true - /uri-js/4.4.1: + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.1 dev: true - /url-parse/1.5.10: + /url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + requiresBuild: true dependencies: querystringify: 2.2.0 requires-port: 1.0.0 dev: true optional: true - /url-set-query/1.0.0: + /url-set-query@1.0.0: resolution: {integrity: sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==} dev: true - /utf-8-validate/5.0.10: + /utf-8-validate@5.0.10: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -9716,7 +9670,7 @@ packages: node-gyp-build: 4.8.0 dev: true - /utf-8-validate/5.0.7: + /utf-8-validate@5.0.7: resolution: {integrity: sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -9725,7 +9679,7 @@ packages: dev: true optional: true - /utf-8-validate/6.0.3: + /utf-8-validate@6.0.3: resolution: {integrity: sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==} engines: {node: '>=6.14.2'} requiresBuild: true @@ -9733,15 +9687,15 @@ packages: node-gyp-build: 4.8.0 dev: true - /utf8/3.0.0: + /utf8@3.0.0: resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} dev: true - /util-deprecate/1.0.2: + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /util/0.12.5: + /util@0.12.5: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} dependencies: inherits: 2.0.4 @@ -9751,61 +9705,63 @@ packages: which-typed-array: 1.1.14 dev: true - /utils-merge/1.0.1: + /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: true - /uuid/2.0.1: + /uuid@2.0.1: resolution: {integrity: sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. dev: true - /uuid/3.4.0: + /uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. hasBin: true dev: true - /uuid/8.3.2: + /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true dev: true - /uuid/9.0.1: + /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true dev: true - /validate-npm-package-license/3.0.4: + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 dev: true - /value-or-promise/1.0.11: + /value-or-promise@1.0.11: resolution: {integrity: sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==} engines: {node: '>=12'} + requiresBuild: true dev: true optional: true - /value-or-promise/1.0.12: + /value-or-promise@1.0.12: resolution: {integrity: sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==} engines: {node: '>=12'} + requiresBuild: true dev: true optional: true - /varint/5.0.2: + /varint@5.0.2: resolution: {integrity: sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==} dev: true - /vary/1.1.2: + /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} dev: true - /verror/1.10.0: + /verror@1.10.0: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} dependencies: @@ -9814,12 +9770,13 @@ packages: extsprintf: 1.3.0 dev: true - /vuvuzela/1.0.3: + /vuvuzela@1.0.3: resolution: {integrity: sha512-Tm7jR1xTzBbPW+6y1tknKiEhz04Wf/1iZkcTJjSFcpNko43+dFW6+OOeQe9taJIug3NdfUAjFKgUSyQrIKaDvQ==} + requiresBuild: true dev: true optional: true - /web3-bzz/1.10.0: + /web3-bzz@1.10.0: resolution: {integrity: sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -9833,7 +9790,7 @@ packages: - utf-8-validate dev: true - /web3-bzz/1.10.4: + /web3-bzz@1.10.4: resolution: {integrity: sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -9847,7 +9804,7 @@ packages: - utf-8-validate dev: true - /web3-core-helpers/1.10.0: + /web3-core-helpers@1.10.0: resolution: {integrity: sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==} engines: {node: '>=8.0.0'} dependencies: @@ -9855,7 +9812,7 @@ packages: web3-utils: 1.10.0 dev: true - /web3-core-helpers/1.10.4: + /web3-core-helpers@1.10.4: resolution: {integrity: sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==} engines: {node: '>=8.0.0'} dependencies: @@ -9863,7 +9820,7 @@ packages: web3-utils: 1.10.4 dev: true - /web3-core-method/1.10.0: + /web3-core-method@1.10.0: resolution: {integrity: sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==} engines: {node: '>=8.0.0'} dependencies: @@ -9874,7 +9831,7 @@ packages: web3-utils: 1.10.0 dev: true - /web3-core-method/1.10.4: + /web3-core-method@1.10.4: resolution: {integrity: sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==} engines: {node: '>=8.0.0'} dependencies: @@ -9885,21 +9842,21 @@ packages: web3-utils: 1.10.4 dev: true - /web3-core-promievent/1.10.0: + /web3-core-promievent@1.10.0: resolution: {integrity: sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==} engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.4 dev: true - /web3-core-promievent/1.10.4: + /web3-core-promievent@1.10.4: resolution: {integrity: sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==} engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.4 dev: true - /web3-core-requestmanager/1.10.0: + /web3-core-requestmanager@1.10.0: resolution: {integrity: sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==} engines: {node: '>=8.0.0'} dependencies: @@ -9913,7 +9870,7 @@ packages: - supports-color dev: true - /web3-core-requestmanager/1.10.4: + /web3-core-requestmanager@1.10.4: resolution: {integrity: sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==} engines: {node: '>=8.0.0'} dependencies: @@ -9927,7 +9884,7 @@ packages: - supports-color dev: true - /web3-core-subscriptions/1.10.0: + /web3-core-subscriptions@1.10.0: resolution: {integrity: sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==} engines: {node: '>=8.0.0'} dependencies: @@ -9935,7 +9892,7 @@ packages: web3-core-helpers: 1.10.0 dev: true - /web3-core-subscriptions/1.10.4: + /web3-core-subscriptions@1.10.4: resolution: {integrity: sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==} engines: {node: '>=8.0.0'} dependencies: @@ -9943,7 +9900,7 @@ packages: web3-core-helpers: 1.10.4 dev: true - /web3-core/1.10.0: + /web3-core@1.10.0: resolution: {integrity: sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==} engines: {node: '>=8.0.0'} dependencies: @@ -9959,7 +9916,7 @@ packages: - supports-color dev: true - /web3-core/1.10.4: + /web3-core@1.10.4: resolution: {integrity: sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==} engines: {node: '>=8.0.0'} dependencies: @@ -9975,7 +9932,7 @@ packages: - supports-color dev: true - /web3-eth-abi/1.10.0: + /web3-eth-abi@1.10.0: resolution: {integrity: sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==} engines: {node: '>=8.0.0'} dependencies: @@ -9983,7 +9940,7 @@ packages: web3-utils: 1.10.0 dev: true - /web3-eth-abi/1.10.4: + /web3-eth-abi@1.10.4: resolution: {integrity: sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==} engines: {node: '>=8.0.0'} dependencies: @@ -9991,7 +9948,7 @@ packages: web3-utils: 1.10.4 dev: true - /web3-eth-accounts/1.10.0: + /web3-eth-accounts@1.10.0: resolution: {integrity: sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==} engines: {node: '>=8.0.0'} dependencies: @@ -10010,7 +9967,7 @@ packages: - supports-color dev: true - /web3-eth-accounts/1.10.4: + /web3-eth-accounts@1.10.4: resolution: {integrity: sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==} engines: {node: '>=8.0.0'} dependencies: @@ -10029,7 +9986,7 @@ packages: - supports-color dev: true - /web3-eth-contract/1.10.0: + /web3-eth-contract@1.10.0: resolution: {integrity: sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==} engines: {node: '>=8.0.0'} dependencies: @@ -10046,7 +10003,7 @@ packages: - supports-color dev: true - /web3-eth-contract/1.10.4: + /web3-eth-contract@1.10.4: resolution: {integrity: sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==} engines: {node: '>=8.0.0'} dependencies: @@ -10063,7 +10020,7 @@ packages: - supports-color dev: true - /web3-eth-ens/1.10.0: + /web3-eth-ens@1.10.0: resolution: {integrity: sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==} engines: {node: '>=8.0.0'} dependencies: @@ -10080,7 +10037,7 @@ packages: - supports-color dev: true - /web3-eth-ens/1.10.4: + /web3-eth-ens@1.10.4: resolution: {integrity: sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==} engines: {node: '>=8.0.0'} dependencies: @@ -10097,7 +10054,7 @@ packages: - supports-color dev: true - /web3-eth-iban/1.10.0: + /web3-eth-iban@1.10.0: resolution: {integrity: sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==} engines: {node: '>=8.0.0'} dependencies: @@ -10105,7 +10062,7 @@ packages: web3-utils: 1.10.0 dev: true - /web3-eth-iban/1.10.4: + /web3-eth-iban@1.10.4: resolution: {integrity: sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==} engines: {node: '>=8.0.0'} dependencies: @@ -10113,7 +10070,7 @@ packages: web3-utils: 1.10.4 dev: true - /web3-eth-personal/1.10.0: + /web3-eth-personal@1.10.0: resolution: {integrity: sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==} engines: {node: '>=8.0.0'} dependencies: @@ -10128,7 +10085,7 @@ packages: - supports-color dev: true - /web3-eth-personal/1.10.4: + /web3-eth-personal@1.10.4: resolution: {integrity: sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==} engines: {node: '>=8.0.0'} dependencies: @@ -10143,7 +10100,7 @@ packages: - supports-color dev: true - /web3-eth/1.10.0: + /web3-eth@1.10.0: resolution: {integrity: sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==} engines: {node: '>=8.0.0'} dependencies: @@ -10164,7 +10121,7 @@ packages: - supports-color dev: true - /web3-eth/1.10.4: + /web3-eth@1.10.4: resolution: {integrity: sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==} engines: {node: '>=8.0.0'} dependencies: @@ -10185,7 +10142,7 @@ packages: - supports-color dev: true - /web3-jsonrpc-gateway/1.9.1: + /web3-jsonrpc-gateway@1.9.1: resolution: {integrity: sha512-MdO9KzrX8ucYmmcl8UM7sVJkWOTRL+jWp5ICmIXCDSEw6G+EHXVLkDe51bc73FOkV8iWT2wkv+YGr0Sqsysh6A==} hasBin: true dependencies: @@ -10196,7 +10153,7 @@ packages: ethers: 5.2.0 express: 4.17.3 graphql: 14.7.0 - graphql-request: 5.2.0_graphql@14.7.0 + graphql-request: 5.2.0(graphql@14.7.0) json-rpc-2.0: 0.2.19 winston: 3.7.2 transitivePeerDependencies: @@ -10207,7 +10164,7 @@ packages: - utf-8-validate dev: true - /web3-net/1.10.0: + /web3-net@1.10.0: resolution: {integrity: sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==} engines: {node: '>=8.0.0'} dependencies: @@ -10219,7 +10176,7 @@ packages: - supports-color dev: true - /web3-net/1.10.4: + /web3-net@1.10.4: resolution: {integrity: sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==} engines: {node: '>=8.0.0'} dependencies: @@ -10231,7 +10188,7 @@ packages: - supports-color dev: true - /web3-providers-http/1.10.0: + /web3-providers-http@1.10.0: resolution: {integrity: sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==} engines: {node: '>=8.0.0'} dependencies: @@ -10243,7 +10200,7 @@ packages: - encoding dev: true - /web3-providers-http/1.10.4: + /web3-providers-http@1.10.4: resolution: {integrity: sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==} engines: {node: '>=8.0.0'} dependencies: @@ -10255,7 +10212,7 @@ packages: - encoding dev: true - /web3-providers-ipc/1.10.0: + /web3-providers-ipc@1.10.0: resolution: {integrity: sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==} engines: {node: '>=8.0.0'} dependencies: @@ -10263,7 +10220,7 @@ packages: web3-core-helpers: 1.10.0 dev: true - /web3-providers-ipc/1.10.4: + /web3-providers-ipc@1.10.4: resolution: {integrity: sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==} engines: {node: '>=8.0.0'} dependencies: @@ -10271,7 +10228,7 @@ packages: web3-core-helpers: 1.10.4 dev: true - /web3-providers-ws/1.10.0: + /web3-providers-ws@1.10.0: resolution: {integrity: sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==} engines: {node: '>=8.0.0'} dependencies: @@ -10282,7 +10239,7 @@ packages: - supports-color dev: true - /web3-providers-ws/1.10.4: + /web3-providers-ws@1.10.4: resolution: {integrity: sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==} engines: {node: '>=8.0.0'} dependencies: @@ -10293,7 +10250,7 @@ packages: - supports-color dev: true - /web3-shh/1.10.0: + /web3-shh@1.10.0: resolution: {integrity: sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -10307,7 +10264,7 @@ packages: - supports-color dev: true - /web3-shh/1.10.4: + /web3-shh@1.10.4: resolution: {integrity: sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -10321,7 +10278,7 @@ packages: - supports-color dev: true - /web3-utils/1.10.0: + /web3-utils@1.10.0: resolution: {integrity: sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==} engines: {node: '>=8.0.0'} dependencies: @@ -10334,7 +10291,7 @@ packages: utf8: 3.0.0 dev: true - /web3-utils/1.10.4: + /web3-utils@1.10.4: resolution: {integrity: sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==} engines: {node: '>=8.0.0'} dependencies: @@ -10348,7 +10305,7 @@ packages: utf8: 3.0.0 dev: true - /web3/1.10.0: + /web3@1.10.0: resolution: {integrity: sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -10367,7 +10324,7 @@ packages: - utf-8-validate dev: true - /web3/1.10.4: + /web3@1.10.4: resolution: {integrity: sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==} engines: {node: '>=8.0.0'} requiresBuild: true @@ -10386,11 +10343,11 @@ packages: - utf-8-validate dev: true - /webidl-conversions/3.0.1: + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true - /websocket/1.0.34: + /websocket@1.0.34: resolution: {integrity: sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==} engines: {node: '>=4.0.0'} dependencies: @@ -10404,20 +10361,21 @@ packages: - supports-color dev: true - /whatwg-mimetype/3.0.0: + /whatwg-mimetype@3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} + requiresBuild: true dev: true optional: true - /whatwg-url/5.0.0: + /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 dev: true - /which-boxed-primitive/1.0.2: + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: is-bigint: 1.0.4 @@ -10427,11 +10385,11 @@ packages: is-symbol: 1.0.4 dev: true - /which-module/1.0.0: + /which-module@1.0.0: resolution: {integrity: sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==} dev: true - /which-typed-array/1.1.14: + /which-typed-array@1.1.14: resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} engines: {node: '>= 0.4'} dependencies: @@ -10442,14 +10400,14 @@ packages: has-tostringtag: 1.0.2 dev: true - /which/1.3.1: + /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 dev: true - /which/2.0.2: + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true @@ -10457,20 +10415,20 @@ packages: isexe: 2.0.0 dev: true - /widest-line/3.1.0: + /widest-line@3.1.0: resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} engines: {node: '>=8'} dependencies: string-width: 4.2.3 dev: true - /window-size/0.2.0: + /window-size@0.2.0: resolution: {integrity: sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==} engines: {node: '>= 0.10.0'} hasBin: true dev: true - /winston-transport/4.7.0: + /winston-transport@4.7.0: resolution: {integrity: sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==} engines: {node: '>= 12.0.0'} dependencies: @@ -10479,7 +10437,7 @@ packages: triple-beam: 1.4.1 dev: true - /winston/3.7.2: + /winston@3.7.2: resolution: {integrity: sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==} engines: {node: '>= 12.0.0'} dependencies: @@ -10495,7 +10453,7 @@ packages: winston-transport: 4.7.0 dev: true - /witnet-radon-js/2.0.0: + /witnet-radon-js@2.0.0: resolution: {integrity: sha512-dObjZAdug55OItK/d2xX5x/Y5d5J7ckroq3GnR84yCgbY813grHufQ6a6zxrYfFdHJqwuznLnMw8I/PwBksTKA==} dependencies: '@types/node': 20.11.17 @@ -10504,7 +10462,7 @@ packages: rosetta: 1.1.0 dev: true - /witnet-toolkit/2.0.1: + /witnet-toolkit@2.0.1: resolution: {integrity: sha512-+/5XTBaA1DNBVgaxt+Nmy53CB6DGFGlK8NmII0Oe6jrDUa9sqzbUvxuJPPxc7B7NhyzS5/7eGP1NQfVGedLPWA==} hasBin: true dependencies: @@ -10521,11 +10479,11 @@ packages: - utf-8-validate dev: true - /workerpool/6.2.1: + /workerpool@6.2.1: resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true - /wrap-ansi/2.1.0: + /wrap-ansi@2.1.0: resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} engines: {node: '>=0.10.0'} dependencies: @@ -10533,7 +10491,7 @@ packages: strip-ansi: 3.0.1 dev: true - /wrap-ansi/7.0.0: + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} dependencies: @@ -10542,18 +10500,19 @@ packages: strip-ansi: 6.0.1 dev: true - /wrappy/1.0.2: + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true - /write-stream/0.4.3: + /write-stream@0.4.3: resolution: {integrity: sha512-IJrvkhbAnj89W/GAVdVgbnPiVw5Ntg/B4tc/MUCIEwj/g6JIww1DWJyB/yBMT3yw2/TkT6IUZ0+IYef3flEw8A==} + requiresBuild: true dependencies: readable-stream: 0.0.4 dev: true optional: true - /ws/3.3.3: + /ws@3.3.3: resolution: {integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==} peerDependencies: bufferutil: ^4.0.1 @@ -10569,7 +10528,7 @@ packages: ultron: 1.1.1 dev: true - /ws/7.2.3: + /ws@7.2.3: resolution: {integrity: sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==} engines: {node: '>=8.3.0'} peerDependencies: @@ -10582,7 +10541,7 @@ packages: optional: true dev: true - /ws/7.4.6: + /ws@7.4.6: resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} engines: {node: '>=8.3.0'} peerDependencies: @@ -10595,7 +10554,7 @@ packages: optional: true dev: true - /ws/7.5.9: + /ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} peerDependencies: @@ -10608,7 +10567,7 @@ packages: optional: true dev: true - /ws/8.13.0_2adebc2xdjqbcvbjxkodkhadp4: + /ws@8.13.0(bufferutil@4.0.7)(utf-8-validate@6.0.3): resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} engines: {node: '>=10.0.0'} peerDependencies: @@ -10624,13 +10583,13 @@ packages: utf-8-validate: 6.0.3 dev: true - /xhr-request-promise/0.1.3: + /xhr-request-promise@0.1.3: resolution: {integrity: sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==} dependencies: xhr-request: 1.1.0 dev: true - /xhr-request/1.1.0: + /xhr-request@1.1.0: resolution: {integrity: sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==} dependencies: buffer-to-arraybuffer: 0.0.5 @@ -10642,7 +10601,7 @@ packages: xhr: 2.6.0 dev: true - /xhr/2.6.0: + /xhr@2.6.0: resolution: {integrity: sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==} dependencies: global: 4.4.0 @@ -10651,61 +10610,62 @@ packages: xtend: 4.0.2 dev: true - /xmlhttprequest/1.8.0: + /xmlhttprequest@1.8.0: resolution: {integrity: sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==} engines: {node: '>=0.4.0'} dev: true - /xss/1.0.14: + /xss@1.0.14: resolution: {integrity: sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==} engines: {node: '>= 0.10.0'} hasBin: true + requiresBuild: true dependencies: commander: 2.20.3 cssfilter: 0.0.10 dev: true optional: true - /xtend/4.0.2: + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} dev: true - /y18n/3.2.2: + /y18n@3.2.2: resolution: {integrity: sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==} dev: true - /y18n/5.0.8: + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: true - /yaeti/0.0.6: + /yaeti@0.0.6: resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} engines: {node: '>=0.10.32'} dev: true - /yallist/3.1.1: + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true - /yallist/4.0.0: + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yargs-parser/2.4.1: + /yargs-parser@2.4.1: resolution: {integrity: sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==} dependencies: camelcase: 3.0.0 lodash.assign: 4.2.0 dev: true - /yargs-parser/20.2.4: + /yargs-parser@20.2.4: resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} engines: {node: '>=10'} dev: true - /yargs-unparser/2.0.0: + /yargs-unparser@2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} dependencies: @@ -10715,7 +10675,7 @@ packages: is-plain-obj: 2.1.0 dev: true - /yargs/16.2.0: + /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} dependencies: @@ -10728,7 +10688,7 @@ packages: yargs-parser: 20.2.4 dev: true - /yargs/4.8.1: + /yargs@4.8.1: resolution: {integrity: sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==} dependencies: cliui: 3.2.0 @@ -10747,7 +10707,7 @@ packages: yargs-parser: 2.4.1 dev: true - /yocto-queue/0.1.0: + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true From 4d619eaa373e1b096589265585d15ff1175c10b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 09:19:42 +0200 Subject: [PATCH 18/62] chore: fmt! --- migrations/scripts/1_base.js | 16 +-- migrations/scripts/2_libs.js | 10 +- migrations/scripts/3_framework.js | 207 +++++++++++++++--------------- settings/artifacts.js | 30 ++--- settings/index.js | 18 +-- settings/specs.js | 20 +-- src/utils.js | 36 +++--- 7 files changed, 171 insertions(+), 166 deletions(-) diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index c8d00f75..5c11355f 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -1,4 +1,3 @@ -const ethUtils = require("ethereumjs-util") const fs = require("fs") const settings = require("../../settings") const utils = require("../../src/utils") @@ -7,14 +6,14 @@ const WitnetDeployer = artifacts.require("WitnetDeployer") module.exports = async function (truffleDeployer, network, [,,, master]) { const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - if (!addresses[network]) addresses[network] = {}; + if (!addresses[network]) addresses[network] = {} const deployerAddr = utils.getNetworkBaseArtifactAddress(network, addresses, "WitnetDeployer") if (utils.isNullAddress(deployerAddr) || (await web3.eth.getCode(deployerAddr)).length < 3) { // Settle WitnetDeployer bytecode and source code as to guarantee // salted addresses remain as expected no matter if the solc version // is changed in migrations/witnet.settings.js - const impl = settings.getArtifacts(network).WitnetDeployer; + const impl = settings.getArtifacts(network).WitnetDeployer utils.traceHeader("Defrosted 'WitnetDeployer'") fs.writeFileSync( `build/contracts/${impl}.json`, @@ -29,25 +28,24 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetDeployer.toJSON().deployedBytecode)) - await truffleDeployer.deploy(WitnetDeployer, { + await truffleDeployer.deploy(WitnetDeployer, { from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), }) addresses[network].WitnetDeployer = WitnetDeployer.address await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - } else { - WitnetDeployer.address = addresses[network].WitnetDeployer; + WitnetDeployer.address = addresses[network].WitnetDeployer utils.traceHeader("Deployed 'WitnetDeployer'") console.info(" ", "> contract address: \x1b[95m", WitnetDeployer.address, "\x1b[0m") console.info() } - + // Settle WitnetDeployer bytecode and source code as to guarantee // that proxified base artifacts can get automatically verified utils.traceHeader("Defrosting 'WitnetProxy'") fs.writeFileSync( - `build/contracts/WitnetProxy.json`, - fs.readFileSync(`migrations/frosts/WitnetProxy.json`), + "build/contracts/WitnetProxy.json", + fs.readFileSync("migrations/frosts/WitnetProxy.json"), { encoding: "utf8", flag: "w" } ) const WitnetProxy = artifacts.require("WitnetProxy") diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index 53fe9b1f..929e683e 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -9,7 +9,7 @@ module.exports = async function (_, network, [, from]) { if (!addresses[network]?.libs) addresses[network].libs = {} const deployer = await WitnetDeployer.deployed() - const networkArtifacts = settings.getArtifacts(network); + const networkArtifacts = settings.getArtifacts(network) const selection = utils.getWitnetArtifactsFromArgs() for (const index in networkArtifacts.libs) { @@ -22,7 +22,7 @@ module.exports = async function (_, network, [, from]) { let libNetworkAddr = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if ( // lib implementation artifact is listed as --artifacts on CLI - selection.includes(impl) || + selection.includes(impl) || // or, no address found in addresses file but code is already deployed into target address (utils.isNullAddress(libNetworkAddr) && libTargetCode.length > 3) || // or, address found in addresses file but no code currently deployed in such @@ -41,16 +41,16 @@ module.exports = async function (_, network, [, from]) { addresses[network].libs[impl] = libTargetAddr libNetworkAddr = libTargetAddr // if (!utils.isDryRun(network)) { - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) // } } else { utils.traceHeader(`Deployed '${impl}'`) } libImplArtifact.address = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if (libTargetAddr !== libNetworkAddr) { - console.info(" ", "> library address: \x1b[96m", libImplArtifact.address, `\x1b[0m!== \x1b[30;43m${libTargetAddr}\x1b[0m`) + console.info(" > library address: \x1b[96m", libImplArtifact.address, `\x1b[0m!== \x1b[30;43m${libTargetAddr}\x1b[0m`) } else { - console.info(" ", "> library address: \x1b[96m", libImplArtifact.address, "\x1b[0m") + console.info(" > library address: \x1b[96m", libImplArtifact.address, "\x1b[0m") } console.info() } diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index fe63444e..b344c2b6 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -8,48 +8,47 @@ const version = `${ require("child_process").execSync("git rev-parse HEAD").toString().trim().substring(0, 7) }` -const selection = utils.getWitnetArtifactsFromArgs(); +const selection = utils.getWitnetArtifactsFromArgs() const WitnetDeployer = artifacts.require("WitnetDeployer") const WitnetProxy = artifacts.require("WitnetProxy") -module.exports = async function (_, network, [, from, reporter, curator, ]) { - - const addresses = await utils.readJsonFromFile("./migrations/addresses.json"); - const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json"); +module.exports = async function (_, network, [, from, reporter, curator]) { + const addresses = await utils.readJsonFromFile("./migrations/addresses.json") + const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") if (!constructorArgs[network]) constructorArgs[network] = {} - + const networkArtifacts = settings.getArtifacts(network) const networkSpecs = settings.getSpecs(network) // Settle the order in which (some of the) framework artifacts must be deployed first const framework = { - core: merge(Object.keys(networkArtifacts.core), [ "WitOracleRadonRegistry", "WitOracle", ], ), - apps: merge(Object.keys(networkArtifacts.apps), [], ), - }; + core: merge(Object.keys(networkArtifacts.core), ["WitOracleRadonRegistry", "WitOracle"],), + apps: merge(Object.keys(networkArtifacts.apps), [],), + } // Settle WitOracle as first dependency on all Wit/oracle appliances - framework.apps.map(appliance => { - networkSpecs[appliance].baseDeps = merge([], networkSpecs[appliance]?.baseDeps, [ "WitOracle", ]) - }); - + framework.apps.forEach(appliance => { + networkSpecs[appliance].baseDeps = merge([], networkSpecs[appliance]?.baseDeps, ["WitOracle"]) + }) + // Settle network-specific initialization params, if any... networkSpecs.WitOracle.mutables = merge(networkSpecs.WitOracle?.mutables, { - types: [ "address[]", ], values: [ [ reporter, ] ], - }); + types: ["address[]"], values: [[reporter]], + }) networkSpecs.WitRandomness.mutables = merge(networkSpecs.WitRandomness?.mutables, { - types: [ "address", ], values: [ curator ], - }); - + types: ["address"], values: [curator], + }) + // Loop on framework domains ... - for (domain in framework) { + for (const domain in framework) { if (!addresses[network][domain]) addresses[network][domain] = {} - + // Loop on domain artifacts ... for (const index in framework[domain]) { const base = framework[domain][index] const impl = networkArtifacts[domain][base] - + if (impl.indexOf(base) < 0) { console.error(`Mismatching inheriting artifact names on settings/artifacts.js: ${base} constructor values: ", encodeCoreTargetConstructorArgs(targetSpecs).slice(2), 64, "\x1b[90m") } await deployCoreTarget(impl, targetSpecs, networkArtifacts) - // save constructor args + // save constructor args constructorArgs[network][impl] = encodeCoreTargetConstructorArgs(targetSpecs).slice(2) await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) } - + if (targetSpecs.isUpgradable) { - if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { // a proxy address with deployed code is found in the addresses file... const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) @@ -94,11 +92,9 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") ) { implArtifact.address = targetAddr - } else { implArtifact.address = proxyImplAddr } - } else { targetBaseAddr = await deployCoreBase(targetSpecs, targetAddr) implArtifact.address = targetAddr @@ -107,14 +103,14 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { await utils.overwriteJsonFile("./migrations/addresses.json", addresses) } baseArtifact.address = targetBaseAddr - + // link implementation artifact to external libs so it can get eventually verified for (const index in targetSpecs?.baseLibs) { const libArtifact = artifacts.require(networkArtifacts.libs[targetSpecs.baseLibs[index]]) implArtifact.link(libArtifact) }; - - // determines whether a new implementation is available, and ask the user to upgrade the proxy if so: + + // determines whether a new implementation is available, and ask the user to upgrade the proxy if so: let upgradeProxy = targetAddr !== await getProxyImplementation(targetSpecs.from, targetBaseAddr) if (upgradeProxy) { const target = await implArtifact.at(targetAddr) @@ -123,28 +119,28 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { const legacy = await implArtifact.at(targetBaseAddr) const legacyVersion = await target.version.call({ from: targetSpecs.from }) const legacyGithubTag = legacyVersion.slice(-7) - + if (targetGithubTag === legacyGithubTag && network !== "develop") { - console.info(` > \x1b[41mPlease, commit your latest changes before upgrading.\x1b[0m`) + console.info(" > \x1b[41mPlease, commit your latest changes before upgrading.\x1b[0m") upgradeProxy = false - } else if (!selection.includes(base) && !process.argv.includes("--upgrade-all") && network !== "develop") { - const targetClass = await target.class.call({ from: targetSpecs.from}) - const legacyClass = await legacy.class.call({ from: targetSpecs.from}) + const targetClass = await target.class.call({ from: targetSpecs.from }) + const legacyClass = await legacy.class.call({ from: targetSpecs.from }) if (legacyClass !== targetClass || legacyVersion !== targetVersion) { - upgradeProxy = ["y", "yes", ].includes((await - utils.prompt(` > Upgrade artifact from ${legacyClass}:${legacyVersion} to \x1b[1;39m${targetClass}:${targetVersion}\x1b[0m? (y/N) `) - )) + upgradeProxy = ["y", "yes"].includes((await utils.prompt( + ` > Upgrade artifact from ${legacyClass}:${legacyVersion} to ` + + `\x1b[1;39m${targetClass}:${targetVersion}\x1b[0m? (y/N) ` + ))) } else { const legacyCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(legacy.address)) const targetCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(target.address)) if (legacyCodeHash !== targetCodeHash) { - upgradeProxy = ["y", "yes", ].includes((await - utils.prompt(` > Upgrade artifact to \x1b[1;39mlatest compilation of v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) `) + upgradeProxy = ["y", "yes"].includes((await utils.prompt( + " > Upgrade artifact to \x1b[1;39mlatest compilation of " + + `v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) `) )) } } - } else { upgradeProxy = selection.includes(base) || process.argv.includes("--upgrade-all") } @@ -152,22 +148,23 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { if (upgradeProxy) { utils.traceHeader(`Upgrading '${base}'...`) await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) - } else { utils.traceHeader(`Upgradable '${base}'`) } - + if (implArtifact.address !== targetAddr) { console.info(" ", "> contract address: \x1b[96m", baseArtifact.address, "\x1b[0m") - console.info(" ", " \x1b[96m -->\x1b[36m", implArtifact.address, "!==", `\x1b[30;43m${targetAddr}\x1b[0m`) - + console.info(" ", + " \x1b[96m -->\x1b[36m", + implArtifact.address, + "!==", `\x1b[30;43m${targetAddr}\x1b[0m` + ) } else { - console.info(" ", "> contract address: \x1b[96m", - baseArtifact.address, "-->\x1b[36m", + console.info(" ", "> contract address: \x1b[96m", + baseArtifact.address, "-->\x1b[36m", implArtifact.address, "\x1b[0m" - ); + ) } - } else { utils.traceHeader(`Immutable '${base}'`) // if (targetCode.length > 3) { @@ -177,22 +174,24 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { // utils.traceData(" > constructor values: ", constructorArgs[network][impl], 64, "\x1b[90m") // } // } - if (selection.includes(impl) || utils.isNullAddress(targetBaseAddr) || (await web3.eth.getCode(targetBaseAddr)).length < 3) { + if ( + selection.includes(impl) || utils.isNullAddress(targetBaseAddr) || + (await web3.eth.getCode(targetBaseAddr)).length < 3 + ) { baseArtifact.address = targetAddr implArtifact.address = targetAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { console.info(" ", "> contract address: \x1b[36m", targetBaseAddr, "\x1b[0m==>", `\x1b[96m${targetAddr}\x1b[0m`) } else { console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") - } - + } } else { baseArtifact.address = targetBaseAddr implArtifact.address = targetBaseAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { console.info(" ", "> contract address: \x1b[96m", targetBaseAddr, "\x1b[0m!==", `\x1b[41m${targetAddr}\x1b[0m`) } else { - console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") + console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") } } addresses[network][domain][base] = baseArtifact.address @@ -209,7 +208,6 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { const nextCoreVersion = await nextCore.version.call({ from }) if (implArtifact.address !== targetAddr && coreVersion !== nextCoreVersion) { console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m!==", `\x1b[33m${nextCoreVersion}\x1b[0m`) - } else { console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m") } @@ -221,21 +219,21 @@ module.exports = async function (_, network, [, from, reporter, curator, ]) { } async function deployCoreBase (targetSpecs, targetAddr) { const deployer = await WitnetDeployer.deployed() - const proxyInitArgs = targetSpecs.mutables + const proxyInitArgs = targetSpecs.mutables const proxySalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const proxyAddr = await deployer.determineProxyAddr.call(proxySalt, { from: targetSpecs.from }) - if ((await web3.eth.getCode(proxyAddr)).length < 3) { + if ((await web3.eth.getCode(proxyAddr)).length < 3) { // if no contract is yet deployed on the expected address // proxify to last deployed implementation, and initialize it: - utils.traceHeader(`Deploying new 'WitnetProxy'...`) + utils.traceHeader("Deploying new 'WitnetProxy'...") const initdata = proxyInitArgs ? web3.eth.abi.encodeParameters(proxyInitArgs.types, proxyInitArgs.values) : "0x" if (initdata.length > 2) { console.info(" ", "> initdata types: \x1b[90m", proxyInitArgs.types, "\x1b[0m") utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") } - utils.traceTx(await deployer.proxify(proxySalt, targetAddr, initdata, { from: targetSpecs.from })) + utils.traceTx(await deployer.proxify(proxySalt, targetAddr, initdata, { from: targetSpecs.from })) } - if ((await web3.eth.getCode(proxyAddr)).length < 3) { + if ((await web3.eth.getCode(proxyAddr)).length < 3) { console.error(`Error: WitnetProxy was not deployed on the expected address: ${proxyAddr}`) process.exit(1) } @@ -243,7 +241,10 @@ async function deployCoreBase (targetSpecs, targetAddr) { } async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { - const initdata = targetSpecs.mutables?.types ? web3.eth.abi.encodeParameters(targetSpecs.mutables.types, targetSpecs.mutables.values) : "0x" + const initdata = (targetSpecs.mutables?.types + ? web3.eth.abi.encodeParameters(targetSpecs.mutables.types, targetSpecs.mutables.values) + : "0x" + ) if (initdata.length > 2) { console.info(" ", "> initdata types: \x1b[90m", targetSpecs.mutables.types, "\x1b[0m") utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") @@ -253,14 +254,13 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { return proxyAddr } - async function deployCoreTarget (target, targetSpecs, networkArtifacts) { const deployer = await WitnetDeployer.deployed() console.log(target, targetSpecs) const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) - utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) + utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) if ((await web3.eth.getCode(targetAddr)).length <= 3) { console.error(`Error: Contract ${target} was not deployed on the expected address: ${targetAddr}`) process.exit(1) @@ -268,7 +268,7 @@ async function deployCoreTarget (target, targetSpecs, networkArtifacts) { return targetAddr } -async function determineCoreTargetAddr(target, targetSpecs, networkArtifacts) { +async function determineCoreTargetAddr (target, targetSpecs, networkArtifacts) { const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") return (await WitnetDeployer.deployed()).determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) @@ -280,14 +280,14 @@ async function determineProxyAddr (from, nonce) { return await deployer.determineProxyAddr.call(salt, { from }) } -function encodeCoreTargetConstructorArgs(targetSpecs) { +function encodeCoreTargetConstructorArgs (targetSpecs) { return web3.eth.abi.encodeParameters(targetSpecs.constructorArgs.types, targetSpecs.constructorArgs.values) } -function encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) { +function encodeCoreTargetInitCode (target, targetSpecs, networkArtifacts) { // extract bytecode from target's artifact, replacing lib references to actual addresses const targetCode = linkBaseLibs( - artifacts.require(target).toJSON().bytecode, + artifacts.require(target).toJSON().bytecode, targetSpecs.baseLibs, networkArtifacts ) @@ -297,7 +297,7 @@ function encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) { `Error: artifact ${target} depends on library`, targetCode.substring(targetCode.indexOf("__"), 42), "which is not known or has not been deployed." - ); + ) process.exit(1) } const targetConstructorArgsEncoded = encodeCoreTargetConstructorArgs(targetSpecs) @@ -321,28 +321,28 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } -async function unfoldCoreTargetSpecs(domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { - if (!ancestors) ancestors = []; +async function unfoldCoreTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { + if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { - console.error(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`, ) + console.error(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`,) process.exit(1) } const specs = { baseDeps: [], baseLibs: [], - from, - mutables: { types: [], values: [], }, - immutables: { types: [], values: [], }, - intrinsics: { types: [], values: [], }, + from, + mutables: { types: [], values: [] }, + immutables: { types: [], values: [] }, + intrinsics: { types: [], values: [] }, isUpgradable: utils.isUpgradableArtifact(target), vanity: networkSpecs[targetBase]?.vanity || 0, - }; + } // Iterate inheritance tree from `base` to `impl` as to settle deployment specs target.split(/(?=[A-Z])/).reduce((split, part) => { split = split + part if (split.indexOf(targetBase) > -1) { - specs.baseDeps = merge(specs.baseDeps, networkSpecs[split]?.baseDeps); - specs.baseLibs = merge(specs.baseLibs, networkSpecs[split]?.baseLibs); + specs.baseDeps = merge(specs.baseDeps, networkSpecs[split]?.baseDeps) + specs.baseLibs = merge(specs.baseLibs, networkSpecs[split]?.baseLibs) if (networkSpecs[split]?.from && !utils.isDryRun(network)) { specs.from = networkSpecs[split].from } @@ -350,42 +350,47 @@ async function unfoldCoreTargetSpecs(domain, target, targetBase, from, network, specs.vanity = networkSpecs[split].vanity } if (networkSpecs[split]?.immutables) { - specs.immutables.types.push(...networkSpecs[split]?.immutables.types); - specs.immutables.values.push(...networkSpecs[split]?.immutables.values); + specs.immutables.types.push(...networkSpecs[split]?.immutables.types) + specs.immutables.values.push(...networkSpecs[split]?.immutables.values) } if (networkSpecs[split]?.mutables) { - specs.mutables.types.push(...networkSpecs[split]?.mutables.types); - specs.mutables.values.push(...networkSpecs[split]?.mutables.values); + specs.mutables.types.push(...networkSpecs[split]?.mutables.types) + specs.mutables.values.push(...networkSpecs[split]?.mutables.values) } } return split }) if (specs.baseDeps.length > 0) { // Iterate specs.baseDeps as to add deterministic addresses as first intrinsical constructor args - specs.intrinsics.types.push(...new Array(specs.baseDeps.length).fill("address")); + specs.intrinsics.types.push(...new Array(specs.baseDeps.length).fill("address")) for (const index in specs.baseDeps) { const depsBase = specs.baseDeps[index] const depsImpl = networkArtifacts.core[depsBase] if (utils.isUpgradableArtifact(depsImpl)) { - const depsVanity = networkSpecs[depsBase]?.vanity || Object.keys(networkArtifacts[domain]).indexOf(depsBase); - const depsProxySalt = depsVanity ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(depsVanity), 32).toString("hex") : "0x0" - specs.intrinsics.values.push(await determineProxyAddr(specs.from, depsProxySalt)); - + const depsVanity = networkSpecs[depsBase]?.vanity || Object.keys(networkArtifacts[domain]).indexOf(depsBase) + const depsProxySalt = (depsVanity + ? "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(depsVanity), 32).toString("hex") + : "0x0" + ) + specs.intrinsics.values.push(await determineProxyAddr(specs.from, depsProxySalt)) } else { - const depsImplSpecs = await unfoldCoreTargetSpecs(domain, depsImpl, depsBase, specs.from, network, networkArtifacts, networkSpecs, [...ancestors, targetBase]) + const depsImplSpecs = await unfoldCoreTargetSpecs( + domain, depsImpl, depsBase, specs.from, network, networkArtifacts, networkSpecs, + [...ancestors, targetBase] + ) const depsImplAddr = await determineCoreTargetAddr(depsImpl, depsImplSpecs, networkArtifacts) - specs.intrinsics.values.push(depsImplAddr); + specs.intrinsics.values.push(depsImplAddr) } } } if (specs.isUpgradable) { // Add version tag to intrinsical constructor args if target artifact is expected to be upgradable - specs.intrinsics.types.push("bytes32"); - specs.intrinsics.values.push(utils.fromAscii(version)); + specs.intrinsics.types.push("bytes32") + specs.intrinsics.values.push(utils.fromAscii(version)) if (target.indexOf("Trustable") < 0) { // Add _upgradable constructor args on non-trustable (ergo trustless) but yet upgradable targets - specs.intrinsics.types.push("bool"); - specs.intrinsics.values.push(true); + specs.intrinsics.types.push("bool") + specs.intrinsics.values.push(true) } } specs.constructorArgs = { @@ -393,12 +398,12 @@ async function unfoldCoreTargetSpecs(domain, target, targetBase, from, network, values: specs?.immutables?.values || [], } if (specs?.intrinsics) { - specs.constructorArgs.types.push(...specs.intrinsics.types); - specs.constructorArgs.values.push(...specs.intrinsics.values); + specs.constructorArgs.types.push(...specs.intrinsics.types) + specs.constructorArgs.values.push(...specs.intrinsics.values) } if (specs?.mutables && !specs.isUpgradable) { - specs.constructorArgs.types.push(...specs.mutables.types); - specs.constructorArgs.values.push(...specs.mutables.values); + specs.constructorArgs.types.push(...specs.mutables.types) + specs.constructorArgs.values.push(...specs.mutables.values) } return specs } diff --git a/settings/artifacts.js b/settings/artifacts.js index 084def56..633148bc 100644 --- a/settings/artifacts.js +++ b/settings/artifacts.js @@ -19,47 +19,47 @@ module.exports = { }, "polygon:amoy": { core: { - WitOracleRequestFactory: "WitOracleRequestFactoryDefaultV21" - } + WitOracleRequestFactory: "WitOracleRequestFactoryDefaultV21", + }, }, base: { - core: { WitOracle: "WitOracleTrustableOvm2", }, + core: { WitOracle: "WitOracleTrustableOvm2" }, }, boba: { - core: { WitOracle: "WitOracleTrustableOvm2", }, + core: { WitOracle: "WitOracleTrustableOvm2" }, }, "conflux:core": { WitnetDeployer: "WitnetDeployerConfluxCore", - core: { - WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore", + core: { + WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore", }, }, mantle: { - core: { WitOracle: "WitOracleTrustableOvm2", }, + core: { WitOracle: "WitOracleTrustableOvm2" }, }, meter: { WitnetDeployer: "WitnetDeployerMeter", - core: { WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore", }, + core: { WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableConfluxCore" }, }, optimism: { - core: { WitOracle: "WitOracleTrustableOvm2", }, + core: { WitOracle: "WitOracleTrustableOvm2" }, }, "okx:x1": { - core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256" }, }, "polygon:zkevm": { - core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256" }, }, reef: { - core: { WitOracle: "WitOracleTrustableReef", }, + core: { WitOracle: "WitOracleTrustableReef" }, }, scroll: { - core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256", }, + core: { WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableNoSha256" }, }, "syscoin:rollux": { - core: { WitOracle: "WitOracleTrustableOvm2", }, + core: { WitOracle: "WitOracleTrustableOvm2" }, }, ten: { - core: { WitOracle: "WitOracleTrustableObscuro", }, + core: { WitOracle: "WitOracleTrustableObscuro" }, }, } diff --git a/settings/index.js b/settings/index.js index 6d1920c1..9e0e239d 100644 --- a/settings/index.js +++ b/settings/index.js @@ -7,18 +7,18 @@ const utils = require("../src/utils") module.exports = { getArtifacts: (network) => { - let res = artifacts.default; + let res = artifacts.default utils.getNetworkTagsFromString(network).forEach(net => { res = merge(res, artifacts[net]) - }); - return res; + }) + return res }, getCompilers: (network) => { - let res = solidity.default; + let res = solidity.default utils.getNetworkTagsFromString(network).forEach(net => { res = merge(res, solidity[net]) - }); - return res; + }) + return res }, getNetworks: () => { return Object.fromEntries(Object.entries(networks) @@ -36,11 +36,11 @@ module.exports = { ) }, getSpecs: (network) => { - let res = specs.default; + let res = specs.default utils.getNetworkTagsFromString(network).forEach(net => { res = merge(res, specs[net]) - }); - return res; + }) + return res }, artifacts, solidity, diff --git a/settings/specs.js b/settings/specs.js index 1e3225db..c5c114bc 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -1,29 +1,29 @@ module.exports = { default: { WitOracle: { - baseDeps: [ - "WitOracleRadonRegistry", + baseDeps: [ + "WitOracleRadonRegistry", ], - baseLibs: [ + baseLibs: [ "WitOracleDataLib", "WitOracleResultErrorsLib", ], immutables: { - types: [ "(uint32, uint32, uint32, uint32)", ], + types: ["(uint32, uint32, uint32, uint32)"], values: [ [ /* _reportResultGasBase */ 58282, /* _reportResultWithCallbackGasBase */ 65273, /* _reportResultWithCallbackRevertGasBase */ 69546, /* _sstoreFromZeroGas */ 20000, - ] + ], ], }, vanity: 13710368043, // 0x77703aE126B971c9946d562F41Dd47071dA00777 }, WitOracleTrustless: { immutables: { - types: ["uint256", "uint256", ], + types: ["uint256", "uint256"], values: [ /* _evmQueryAwaitingBlocks */ 16, /* _evmQueryReportingStake */ "1000000000000000000", @@ -31,14 +31,14 @@ module.exports = { }, }, WitOracleRadonRegistry: { - baseLibs: [ - "WitOracleRadonEncodingLib", + baseLibs: [ + "WitOracleRadonEncodingLib", ], vanity: 6765579443, // 0x000B61Fe075F545fd37767f40391658275900000 }, WitOracleRequestFactory: { - baseDeps: [ - "WitOracle", + baseDeps: [ + "WitOracle", ], vanity: 1240014136, // 0x000DB36997AF1F02209A6F995883B9B699900000 }, diff --git a/src/utils.js b/src/utils.js index e7b366c5..b0319535 100644 --- a/src/utils.js +++ b/src/utils.js @@ -38,7 +38,7 @@ function fromAscii (str) { return "0x" + arr1.join("") } -function getNetworkAppsArtifactAddress(network, addresses, artifact) { +function getNetworkAppsArtifactAddress (network, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { const network = tags[index] @@ -49,7 +49,7 @@ function getNetworkAppsArtifactAddress(network, addresses, artifact) { return addresses?.default?.apps[artifact] ?? "" } -function getNetworkBaseArtifactAddress(network, addresses, artifact) { +function getNetworkBaseArtifactAddress (network, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { const network = tags[index] @@ -60,7 +60,7 @@ function getNetworkBaseArtifactAddress(network, addresses, artifact) { return addresses?.default[artifact] ?? "" } -function getNetworkArtifactAddress(network, domain, addresses, artifact) { +function getNetworkArtifactAddress (network, domain, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { const network = tags[index] @@ -71,7 +71,7 @@ function getNetworkArtifactAddress(network, domain, addresses, artifact) { return addresses?.default?.core[artifact] ?? "" } -function getNetworkCoreArtifactAddress(network, addresses, artifact) { +function getNetworkCoreArtifactAddress (network, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { const network = tags[index] @@ -82,7 +82,7 @@ function getNetworkCoreArtifactAddress(network, addresses, artifact) { return addresses?.default?.core[artifact] ?? "" } -function getNetworkLibsArtifactAddress(network, addresses, artifact) { +function getNetworkLibsArtifactAddress (network, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { const network = tags[index] @@ -90,14 +90,14 @@ function getNetworkLibsArtifactAddress(network, addresses, artifact) { return addresses[network].libs[artifact] } } - return addresses?.default?.libs?.[artifact] ?? "" + return addresses?.default?.libs?.[artifact] ?? "" } function getNetworkTagsFromString (network) { network = network ? network.toLowerCase() : "development" const tags = [] const parts = network.split(":") - for (ix = 0; ix < parts.length; ix ++) { + for (let ix = 0; ix < parts.length; ix++) { tags.push(parts.slice(0, ix + 1).join(":")) } return tags @@ -146,7 +146,7 @@ function getWitnetArtifactsFromArgs () { } return argv }) - if (selection.length == 0) { + if (selection.length === 0) { process.argv[2]?.split(" ").map((argv, index, args) => { if (argv === "--artifacts") { selection = args[index + 1].split(",") @@ -167,10 +167,10 @@ function isNullAddress (addr) { addr === "0x0000000000000000000000000000000000000000" } -function isUpgradableArtifact(impl) { +function isUpgradableArtifact (impl) { return ( impl.indexOf("Upgradable") > -1 || impl.indexOf("Trustable") > -1 - ); + ) } function padLeft (str, char, size) { @@ -215,14 +215,14 @@ async function overwriteJsonFile (filename, extra) { lockfile.unlockSync(filename) } -function traceData(header, data, width, color) { +function traceData (header, data, width, color) { process.stdout.write(header) - if (color) process.stdout.write(color); - for (let ix = 0; ix < data.length / width; ix ++) { + if (color) process.stdout.write(color) + for (let ix = 0; ix < data.length / width; ix++) { if (ix > 0) process.stdout.write(" ".repeat(header.length)) process.stdout.write(data.slice(width * ix, width * (ix + 1))) process.stdout.write("\n") - } + } if (color) process.stdout.write("\x1b[0m") } @@ -235,12 +235,14 @@ function traceHeader (header) { function traceTx (tx) { console.info(" ", "> EVM tx sender: \x1b[93m", tx.receipt.from, "\x1b[0m") console.info(" ", "> EVM tx hash: \x1b[33m", tx.receipt.transactionHash.slice(2), "\x1b[0m") - console.info(" ", "> EVM tx gas used: ", `\x1b[33m${tx.receipt.gasUsed.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}\x1b[0m`) + console.info(" ", "> EVM tx gas used: ", + `\x1b[33m${tx.receipt.gasUsed.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}\x1b[0m` + ) if (tx.receipt?.effectiveGasPrice) { console.info(" ", "> EVM tx gas price: ", `\x1b[33m${tx.receipt.effectiveGasPrice / 10 ** 9}`, "gwei\x1b[0m") console.info(" ", "> EVM tx total cost: ", `\x1b[33m${parseFloat( - (BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice)) - / BigInt(10 ** 18) + (BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice)) / + BigInt(10 ** 18) ).toString()}`, "ETH\x1b[0m" ) From bd1a73a4b8e54034a5d1459d435c4dd22e62a7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:00:47 +0200 Subject: [PATCH 19/62] refactor: Upgradable --> WitOracle*Upgradable* --- contracts/apps/WitPriceFeedsUpgradable.sol | 49 +++++-------------- contracts/core/WitnetUpgradableBase.sol | 26 +++++++++- .../core/base/WitOracleBaseTrustable.sol | 43 +--------------- .../core/base/WitOracleBaseUpgradable.sol | 49 +++---------------- .../WitOracleRadonRegistryBaseUpgradable.sol | 32 ++---------- .../core/base/WitOracleRequestFactoryBase.sol | 2 + .../WitOracleRequestFactoryBaseUpgradable.sol | 46 +++-------------- contracts/patterns/Upgradeable.sol | 1 + 8 files changed, 60 insertions(+), 188 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 285b72d6..1dc01d35 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -91,53 +91,28 @@ contract WitPriceFeedsUpgradable // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------ /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - public - override - { - address _owner = owner(); - if (_owner == address(0)) { - // set owner as specified by first argument in _initData - _owner = abi.decode(_initData, (address)); - _transferOwnership(_owner); - // settle default Radon SLA upon first initialization + function __initializeUpgradableData(bytes memory _initData) virtual override internal { + if (__proxiable().codehash == bytes32(0)) { __defaultRadonSLA = Witnet.RadonSLA({ witNumWitnesses: 10, - witUnitaryReward: 2 * 10 ** 8, // 0.2 $WIT + witUnitaryReward: 2 * 10 ** 8, maxTallyResultSize: 16 }); // settle default base fee overhead percentage __baseFeeOverheadPercentage = 10; } else { - // only the owner can initialize: - _require( - msg.sender == _owner, - "not the owner" - ); + // otherwise, store beacon read from _initData, if any + if (_initData.length > 0) { + (uint16 _baseFeeOverheadPercentage, Witnet.RadonSLA memory _defaultRadonSLA) = abi.decode( + _initData, (uint16, Witnet.RadonSLA) + ); + __baseFeeOverheadPercentage = _baseFeeOverheadPercentage; + __defaultRadonSLA = _defaultRadonSLA; + } } - - if ( - __proxiable().codehash != bytes32(0) - && __proxiable().codehash == codehash() - ) { - _revert("already upgraded"); - } - __proxiable().codehash = codehash(); - - _require( - address(witOracle).code.length > 0, - "inexistent oracle" - ); - _require( - witOracle.specs() == ( - type(IWitAppliance).interfaceId - ^ type(IWitOracle).interfaceId - ), "uncompliant oracle" - ); - emit Upgraded(_owner, base(), codehash(), version()); } + /// Tells whether provided address could eventually upgrade the contract. function isUpgradableFrom(address _from) external view override returns (bool) { address _owner = owner(); diff --git a/contracts/core/WitnetUpgradableBase.sol b/contracts/core/WitnetUpgradableBase.sol index df162530..765821ab 100644 --- a/contracts/core/WitnetUpgradableBase.sol +++ b/contracts/core/WitnetUpgradableBase.sol @@ -56,7 +56,31 @@ abstract contract WitnetUpgradableBase // ================================================================================================================ - // --- Overrides 'Upgradeable' -------------------------------------------------------------------------------------- + // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------ + + /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. + /// @dev Must fail when trying to upgrade to same logic contract more than once. + function initialize(bytes memory _initData) virtual override public { + address _owner = owner(); + if (_owner == address(0)) { + // upon first upgrade, extract decode owner address from _intidata + (_owner, _initData) = abi.decode(_initData, (address, bytes)); + _transferOwnership(_owner); + + } else { + // only owner can initialize an existing proxy: + require(msg.sender == _owner, "not the owner"); + } + __initializeUpgradableData(_initData); + if ( + __proxiable().codehash != bytes32(0) + && __proxiable().codehash == codehash() + ) { + revert("already initialized codehash"); + } + __proxiable().codehash = codehash(); + emit Upgraded(owner(), base(), codehash(), version()); + } /// Tells whether provided address could eventually upgrade the contract. function isUpgradableFrom(address _from) external view virtual override returns (bool) { diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 95c4e868..cb17954b 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -44,47 +44,8 @@ abstract contract WitOracleBaseTrustable // --- Upgradeable ------------------------------------------------------------------------------------------------ /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) virtual override public { - address _owner = owner(); - address[] memory _newReporters; - - if (_owner == address(0)) { - // get owner (and reporters) from _initData - bytes memory _newReportersRaw; - (_owner, _newReportersRaw) = abi.decode(_initData, (address, bytes)); - _transferOwnership(_owner); - _newReporters = abi.decode(_newReportersRaw, (address[])); - } else { - // only owner can initialize: - _require( - msg.sender == _owner, - "not the owner" - ); - // get reporters from _initData - _newReporters = abi.decode(_initData, (address[])); - } - - if ( - __proxiable().codehash != bytes32(0) - && __proxiable().codehash == codehash() - ) { - _revert("already upgraded"); - } - __proxiable().codehash = codehash(); - - _require(address(registry).code.length > 0, "inexistent registry"); - _require( - registry.specs() == ( - type(IWitAppliance).interfaceId - ^ type(IWitOracleRadonRegistry).interfaceId - ), "uncompliant registry" - ); - - // Set reporters, if any - WitOracleDataLib.setReporters(_newReporters); - - emit Upgraded(_owner, base(), codehash(), version()); + function __initializeUpgradableData(bytes memory _initData) virtual override internal { + WitOracleDataLib.setReporters(abi.decode(_initData, (address[]))); } diff --git a/contracts/core/base/WitOracleBaseUpgradable.sol b/contracts/core/base/WitOracleBaseUpgradable.sol index 19ed3ada..f33cdfba 100644 --- a/contracts/core/base/WitOracleBaseUpgradable.sol +++ b/contracts/core/base/WitOracleBaseUpgradable.sol @@ -31,17 +31,9 @@ abstract contract WitOracleBaseUpgradable // ---Upgradeable ------------------------------------------------------------------------------------------------- /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) virtual override public { - address _owner = owner(); - - if (_owner == address(0)) { - // initializing for the first time... - - // transfer ownership to first initializer - _transferOwnership(_owner); - - // save into storage genesis beacon + function __initializeUpgradableData(bytes memory _initData) virtual override internal { + if (__proxiable().codehash == bytes32(0)) { + // upon first initialization, store genesis beacon WitOracleDataLib.data().beacons[ Witnet.WIT_2_GENESIS_BEACON_INDEX ] = Witnet.Beacon({ @@ -57,37 +49,12 @@ abstract contract WitOracleBaseUpgradable Witnet.WIT_2_GENESIS_BEACON_NEXT_COMMITTEE_AGG_PUBKEY_3 ] }); - } else { - // only owner can initialize a new upgrade: - _require( - msg.sender == _owner, - "not the owner" - ); + // otherwise, store beacon read from _initData, if any + if (_initData.length > 0) { + Witnet.Beacon memory _initBeacon = abi.decode(_initData, (Witnet.Beacon)); + WitOracleDataLib.data().beacons[_initBeacon.index] = _initBeacon; + } } - - if ( - __proxiable().codehash != bytes32(0) - && __proxiable().codehash == codehash() - ) { - _revert("already upgraded"); - } - __proxiable().codehash = codehash(); - - _require(address(registry).code.length > 0, "inexistent registry"); - _require( - registry.specs() == ( - type(IWitAppliance).interfaceId - ^ type(IWitOracleRadonRegistry).interfaceId - ), "uncompliant registry" - ); - - // Settle given beacon, if any: - if (_initData.length > 0) { - Witnet.Beacon memory _beacon = abi.decode(_initData, (Witnet.Beacon)); - WitOracleDataLib.data().beacons[_beacon.index] = _beacon; - } - - emit Upgraded(_owner, base(), codehash(), version()); } } diff --git a/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol b/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol index 98555b2e..d328c716 100644 --- a/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol +++ b/contracts/core/base/WitOracleRadonRegistryBaseUpgradable.sol @@ -27,37 +27,11 @@ abstract contract WitOracleRadonRegistryBaseUpgradable ) {} - // ================================================================================================================ - // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- - /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - public - override - { - address _owner = __bytecodes().owner; - if (_owner == address(0)) { - // set owner from the one specified in _initData - _owner = abi.decode(_initData, (address)); - __bytecodes().owner = _owner; - } else { - // only owner can initialize: - if (msg.sender != _owner) { - _revert("not the owner"); - } - } - - if (__bytecodes().base != address(0)) { - // current implementation cannot be initialized more than once: - if(__bytecodes().base == base()) { - _revert("already initialized"); - } - } - __bytecodes().base = base(); + // ================================================================================================================ + // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------ - emit Upgraded(_owner, base(), codehash(), version()); - } + function __initializeUpgradableData(bytes memory) virtual override internal {} // ================================================================================================================ // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- diff --git a/contracts/core/base/WitOracleRequestFactoryBase.sol b/contracts/core/base/WitOracleRequestFactoryBase.sol index 116f4b17..a44312ce 100644 --- a/contracts/core/base/WitOracleRequestFactoryBase.sol +++ b/contracts/core/base/WitOracleRequestFactoryBase.sol @@ -117,8 +117,10 @@ abstract contract WitOracleRequestFactoryBase function class() virtual override public view returns (string memory) { if (__witOracleRequest().radHash != bytes32(0)) { return type(WitOracleRequest).name; + } else if (__witOracleRequestTemplate().tallyReduceHash != bytes16(0)) { return type(WitOracleRequestTemplate).name; + } else { return type(WitOracleRequestFactory).name; } diff --git a/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol b/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol index f836a9b5..31856d82 100644 --- a/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol +++ b/contracts/core/base/WitOracleRequestFactoryBaseUpgradable.sol @@ -63,51 +63,19 @@ abstract contract WitOracleRequestFactoryBaseUpgradable return WitnetUpgradableBase.version(); } + // ================================================================================================================ - // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------- + // --- Overrides 'Upgradeable' ------------------------------------------------------------------------------------ /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. - /// @dev Must fail when trying to upgrade to same logic contract more than once. - function initialize(bytes memory _initData) - virtual override public - onlyDelegateCalls - { - _require(!initialized(), "already initialized"); - - // Trying to intialize an upgradable factory instance... - { - address _owner = __witOracleRequestFactory().owner; - if (_owner == address(0)) { - // Upon first initialization of an upgradable factory, - // set owner from the one specified in _initData - _owner = abi.decode(_initData, (address)); - __witOracleRequestFactory().owner = _owner; - } else { - // only the owner can upgrade an upgradable factory - _require( - msg.sender == _owner, - "not the owner" - ); - } - - if (__proxiable().proxy == address(0)) { - // first initialization of the proxy - __proxiable().proxy = address(this); - } - __proxiable().implementation = base(); - - _require(address(witOracle).code.length > 0, "inexistent request board"); - _require( - witOracle.specs() == ( - type(IWitAppliance).interfaceId - ^ type(IWitOracle).interfaceId - ), "uncompliant request board" - ); - - emit Upgraded(msg.sender, base(), codehash(), version()); + function __initializeUpgradableData(bytes memory) virtual override internal { + if (__proxiable().codehash == bytes32(0)) { + __proxiable().proxy = address(this); } + __proxiable().implementation = base(); } + // ================================================================================================================ // --- Overrides 'Ownable2Step' ----------------------------------------------------------------------------------- diff --git a/contracts/patterns/Upgradeable.sol b/contracts/patterns/Upgradeable.sol index 20eec288..8e741f20 100644 --- a/contracts/patterns/Upgradeable.sol +++ b/contracts/patterns/Upgradeable.sol @@ -65,6 +65,7 @@ abstract contract Upgradeable is Initializable, Proxiable { /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. /// @dev Must fail when trying to upgrade to same logic contract more than once. function initialize(bytes memory) virtual external; + function __initializeUpgradableData(bytes memory _initData) virtual internal; /// @dev Retrieves human-redable named version of current implementation. function version() virtual public view returns (string memory); From 39cf7dc8f010d315468d3146318a2b72818ec89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:03:33 +0200 Subject: [PATCH 20/62] chore: move deps compliancy to base constructors --- contracts/apps/WitPriceFeedsUpgradable.sol | 10 ++++++++++ contracts/core/base/WitOracleBase.sol | 12 ++++++++++-- contracts/core/base/WitOracleRequestFactoryBase.sol | 10 ++++++++++ .../core/trustable/WitOracleTrustableDefault.sol | 2 -- .../core/trustable/WitOracleTrustableObscuro.sol | 2 -- contracts/core/trustable/WitOracleTrustableOvm2.sol | 2 -- contracts/core/trustable/WitOracleTrustableReef.sol | 2 -- .../core/trustless/WitOracleTrustlessDefaultV21.sol | 11 +---------- .../WitOracleTrustlessUpgradableDefault.sol | 4 +--- 9 files changed, 32 insertions(+), 23 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 1dc01d35..739f943c 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -53,6 +53,16 @@ contract WitPriceFeedsUpgradable "io.witnet.proxiable.feeds.price" ) { + _require( + address(_witOracle).code.length > 0, + "inexistent oracle" + ); + _require( + _witOracle.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ), "uncompliant oracle" + ); witOracle = _witOracle; } diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 685ed710..88e7a732 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -93,11 +93,19 @@ abstract contract WitOracleBase constructor( EvmImmutables memory _immutables, WitOracleRadonRegistry _registry - // WitOracleRequestFactory _factory ) { + _require( + address(_registry).code.length > 0, + "inexistent registry" + ); + _require( + _registry.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracleRadonRegistry).interfaceId + ), "uncompliant registry" + ); registry = _registry; - // factory = _factory; __reportResultGasBase = _immutables.reportResultGasBase; __reportResultWithCallbackGasBase = _immutables.reportResultWithCallbackGasBase; diff --git a/contracts/core/base/WitOracleRequestFactoryBase.sol b/contracts/core/base/WitOracleRequestFactoryBase.sol index a44312ce..78123d9a 100644 --- a/contracts/core/base/WitOracleRequestFactoryBase.sol +++ b/contracts/core/base/WitOracleRequestFactoryBase.sol @@ -48,6 +48,16 @@ abstract contract WitOracleRequestFactoryBase } constructor(WitOracle _witOracle) { + _require( + address(_witOracle).code.length > 0, + "inexistent oracle" + ); + _require( + _witOracle.specs() == ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ), "uncompliant WitOracle" + ); witOracle = _witOracle; } diff --git a/contracts/core/trustable/WitOracleTrustableDefault.sol b/contracts/core/trustable/WitOracleTrustableDefault.sol index 8fb08ff8..d015effa 100644 --- a/contracts/core/trustable/WitOracleTrustableDefault.sol +++ b/contracts/core/trustable/WitOracleTrustableDefault.sol @@ -20,13 +20,11 @@ contract WitOracleTrustableDefault constructor( EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - // WitOracleRequestFactory _factory, bytes32 _versionTag ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustable(_versionTag) {} diff --git a/contracts/core/trustable/WitOracleTrustableObscuro.sol b/contracts/core/trustable/WitOracleTrustableObscuro.sol index cdb506b8..fc9fee61 100644 --- a/contracts/core/trustable/WitOracleTrustableObscuro.sol +++ b/contracts/core/trustable/WitOracleTrustableObscuro.sol @@ -20,13 +20,11 @@ contract WitOracleTrustableObscuro constructor( EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - // WitOracleRequestFactory _factory, bytes32 _versionTag ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustable(_versionTag) {} diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index 76bdaa71..d52e930a 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -25,13 +25,11 @@ contract WitOracleTrustableOvm2 constructor( EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - // WitOracleRequestFactory _factory, bytes32 _versionTag ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustable(_versionTag) { diff --git a/contracts/core/trustable/WitOracleTrustableReef.sol b/contracts/core/trustable/WitOracleTrustableReef.sol index def29053..d0b2aa43 100644 --- a/contracts/core/trustable/WitOracleTrustableReef.sol +++ b/contracts/core/trustable/WitOracleTrustableReef.sol @@ -22,13 +22,11 @@ contract WitOracleTrustableReef constructor( EvmImmutables memory _immutables, WitOracleRadonRegistry _registry, - // WitOracleRequestFactory _factory, bytes32 _versionTag ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustable(_versionTag) {} diff --git a/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol b/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol index 2ae1edfe..42c96ef6 100644 --- a/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol +++ b/contracts/core/trustless/WitOracleTrustlessDefaultV21.sol @@ -22,23 +22,14 @@ contract WitOracleTrustlessDefaultV21 uint256 _queryAwaitingBlocks, uint256 _queryReportingStake, WitOracleRadonRegistry _registry - // WitOracleRequestFactory _factory ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustless( _queryAwaitingBlocks, _queryReportingStake ) - { - // _require( - // _registry.specs() == ( - // type(IWitAppliance).interfaceId - // ^ type(IWitOracleRadonRegistry).interfaceId - // ), "uncompliant registry" - // ); - } + {} } diff --git a/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol index 3f9e70e7..3e1f4850 100644 --- a/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol +++ b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol @@ -10,7 +10,7 @@ import "../base/WitOracleBaseUpgradable.sol"; /// @dev This contract enables posting requests that Witnet bridges will insert into the Witnet network. /// The result of the requests will be posted back to this contract by the bridge nodes too. /// @author The Witnet Foundation -abstract contract WitOracleTrustlessUpgradableDefault +contract WitOracleTrustlessUpgradableDefault is WitOracleBaseUpgradable { @@ -23,14 +23,12 @@ abstract contract WitOracleTrustlessUpgradableDefault uint256 _queryAwaitingBlocks, uint256 _queryReportingStake, WitOracleRadonRegistry _registry, - // WitOracleRequestFactory _factory, bytes32 _versionTag, bool _upgradable ) WitOracleBase( _immutables, _registry - // _factory ) WitOracleBaseTrustless( _queryAwaitingBlocks, From 90e1eab791e35a61ce32ef39d142e9d9b35a2d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:04:21 +0200 Subject: [PATCH 21/62] chore: polish migrations console colors --- migrations/scripts/1_base.js | 3 +- migrations/scripts/3_framework.js | 101 +++++++++++++++++------------- 2 files changed, 60 insertions(+), 44 deletions(-) diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index 5c11355f..9adf4196 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -27,7 +27,6 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetDeployer.toJSON().deployedBytecode)) - await truffleDeployer.deploy(WitnetDeployer, { from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), }) @@ -36,7 +35,7 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { } else { WitnetDeployer.address = addresses[network].WitnetDeployer utils.traceHeader("Deployed 'WitnetDeployer'") - console.info(" ", "> contract address: \x1b[95m", WitnetDeployer.address, "\x1b[0m") + console.info(" ", "> contract address: \x1b[93m", WitnetDeployer.address, "\x1b[0m") console.info() } diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index b344c2b6..5a23274d 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -41,16 +41,19 @@ module.exports = async function (_, network, [, from, reporter, curator]) { }) // Loop on framework domains ... + const palette = [ 6, 4, ] for (const domain in framework) { if (!addresses[network][domain]) addresses[network][domain] = {} - + const color = palette[Object.keys(framework).indexOf(domain)] + + let first = true // Loop on domain artifacts ... for (const index in framework[domain]) { const base = framework[domain][index] const impl = networkArtifacts[domain][base] if (impl.indexOf(base) < 0) { - console.error(`Mismatching inheriting artifact names on settings/artifacts.js: ${base} 0) { - console.info(" ", "> constructor types: \x1b[90m", targetSpecs.constructorArgs.types, "\x1b[0m") - utils.traceData(" > constructor values: ", encodeCoreTargetConstructorArgs(targetSpecs).slice(2), 64, "\x1b[90m") + console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") + utils.traceData(" > constructor values: ", encodeTargetConstructorArgs(targetSpecs).slice(2), 64, "\x1b[90m") } - await deployCoreTarget(impl, targetSpecs, networkArtifacts) + await deployTarget(impl, targetSpecs, networkArtifacts) // save constructor args - constructorArgs[network][impl] = encodeCoreTargetConstructorArgs(targetSpecs).slice(2) + constructorArgs[network][impl] = encodeTargetConstructorArgs(targetSpecs).slice(2) await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) } if (targetSpecs.isUpgradable) { if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { // a proxy address with deployed code is found in the addresses file... - const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) - if ( - proxyImplAddr === targetAddr || - utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") - ) { - implArtifact.address = targetAddr - } else { - implArtifact.address = proxyImplAddr + try { + const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) + if ( + proxyImplAddr === targetAddr || + utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") + ) { + implArtifact.address = targetAddr + } else { + implArtifact.address = proxyImplAddr + } + } catch (ex) { + console.info("Error: trying to upgrade from non-upgradable artifact?") + console.info(ex) + process.exit(1) } } else { targetBaseAddr = await deployCoreBase(targetSpecs, targetAddr) @@ -153,15 +167,14 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } if (implArtifact.address !== targetAddr) { - console.info(" ", "> contract address: \x1b[96m", baseArtifact.address, "\x1b[0m") + console.info(" ", `> contract address: \x1b[9${color}m${baseArtifact.address} \x1b[0m`) console.info(" ", - " \x1b[96m -->\x1b[36m", + ` \x1b[9${color}m -->\x1b[3${color}m`, implArtifact.address, "!==", `\x1b[30;43m${targetAddr}\x1b[0m` ) } else { - console.info(" ", "> contract address: \x1b[96m", - baseArtifact.address, "-->\x1b[36m", + console.info(" ", `> contract address: \x1b[9${color}m ${baseArtifact.address} -->\x1b[3${color}m`, implArtifact.address, "\x1b[0m" ) } @@ -181,17 +194,17 @@ module.exports = async function (_, network, [, from, reporter, curator]) { baseArtifact.address = targetAddr implArtifact.address = targetAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { - console.info(" ", "> contract address: \x1b[36m", targetBaseAddr, "\x1b[0m==>", `\x1b[96m${targetAddr}\x1b[0m`) + console.info(" ", `> contract address: \x1b[3${color}m ${targetBaseAddr} \x1b[0m==> \x1b[9${color}m${targetAddr}\x1b[0m`) } else { - console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") + console.info(" ", `> contract address: \x1b[9${color}m`, targetAddr, "\x1b[0m") } } else { baseArtifact.address = targetBaseAddr implArtifact.address = targetBaseAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { - console.info(" ", "> contract address: \x1b[96m", targetBaseAddr, "\x1b[0m!==", `\x1b[41m${targetAddr}\x1b[0m`) + console.info(" ", `> contract address: \x1b[9${color}m ${targetBaseAddr}\x1b[0m !==`, `\x1b[41m${targetAddr}\x1b[0m`) } else { - console.info(" ", "> contract address: \x1b[96m", targetAddr, "\x1b[0m") + console.info(" ", `> contract address: \x1b[9${color}m ${targetAddr}\x1b[0m`) } } addresses[network][domain][base] = baseArtifact.address @@ -199,7 +212,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } const core = await implArtifact.at(baseArtifact.address) try { - console.info(" ", "> contract curator: \x1b[95m", await core.owner.call({ from }), "\x1b[0m") + console.info(" ", "> contract curator: \x1b[33m", await core.owner.call({ from }), "\x1b[0m") } catch {} console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") if (targetSpecs.isUpgradable) { @@ -234,7 +247,7 @@ async function deployCoreBase (targetSpecs, targetAddr) { utils.traceTx(await deployer.proxify(proxySalt, targetAddr, initdata, { from: targetSpecs.from })) } if ((await web3.eth.getCode(proxyAddr)).length < 3) { - console.error(`Error: WitnetProxy was not deployed on the expected address: ${proxyAddr}`) + console.info(`Error: WitnetProxy was not deployed on the expected address: ${proxyAddr}`) process.exit(1) } return proxyAddr @@ -254,22 +267,21 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { return proxyAddr } -async function deployCoreTarget (target, targetSpecs, networkArtifacts) { +async function deployTarget (target, targetSpecs, networkArtifacts) { const deployer = await WitnetDeployer.deployed() - console.log(target, targetSpecs) - const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) + const targetInitCode = encodeTargetInitCode(target, targetSpecs, networkArtifacts) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) if ((await web3.eth.getCode(targetAddr)).length <= 3) { - console.error(`Error: Contract ${target} was not deployed on the expected address: ${targetAddr}`) + console.info(`Error: Contract ${target} was not deployed on the expected address: ${targetAddr}`) process.exit(1) } return targetAddr } -async function determineCoreTargetAddr (target, targetSpecs, networkArtifacts) { - const targetInitCode = encodeCoreTargetInitCode(target, targetSpecs, networkArtifacts) +async function determineTargetAddr (target, targetSpecs, networkArtifacts) { + const targetInitCode = encodeTargetInitCode(target, targetSpecs, networkArtifacts) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") return (await WitnetDeployer.deployed()).determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) } @@ -280,27 +292,32 @@ async function determineProxyAddr (from, nonce) { return await deployer.determineProxyAddr.call(salt, { from }) } -function encodeCoreTargetConstructorArgs (targetSpecs) { +function encodeTargetConstructorArgs (targetSpecs) { return web3.eth.abi.encodeParameters(targetSpecs.constructorArgs.types, targetSpecs.constructorArgs.values) } -function encodeCoreTargetInitCode (target, targetSpecs, networkArtifacts) { +function encodeTargetInitCode (target, targetSpecs, networkArtifacts) { // extract bytecode from target's artifact, replacing lib references to actual addresses + const targetCodeUnlinked = artifacts.require(target).toJSON().bytecode + if (targetCodeUnlinked.length < 3) { + console.info(`Error: cannot deploy abstract arfifact ${target}.`) + process.exit(1) + } const targetCode = linkBaseLibs( - artifacts.require(target).toJSON().bytecode, + targetCodeUnlinked, targetSpecs.baseLibs, networkArtifacts ) if (targetCode.indexOf("__") > -1) { - console.info(targetCode) - console.error( + // console.info(targetCode) + console.info( `Error: artifact ${target} depends on library`, targetCode.substring(targetCode.indexOf("__"), 42), "which is not known or has not been deployed." ) process.exit(1) } - const targetConstructorArgsEncoded = encodeCoreTargetConstructorArgs(targetSpecs) + const targetConstructorArgsEncoded = encodeTargetConstructorArgs(targetSpecs) return targetCode + targetConstructorArgsEncoded.slice(2) } @@ -321,10 +338,10 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } -async function unfoldCoreTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { +async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { - console.error(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`,) + console.info(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`,) process.exit(1) } const specs = { @@ -374,11 +391,11 @@ async function unfoldCoreTargetSpecs (domain, target, targetBase, from, network, ) specs.intrinsics.values.push(await determineProxyAddr(specs.from, depsProxySalt)) } else { - const depsImplSpecs = await unfoldCoreTargetSpecs( + const depsImplSpecs = await unfoldTargetSpecs( domain, depsImpl, depsBase, specs.from, network, networkArtifacts, networkSpecs, [...ancestors, targetBase] ) - const depsImplAddr = await determineCoreTargetAddr(depsImpl, depsImplSpecs, networkArtifacts) + const depsImplAddr = await determineTargetAddr(depsImpl, depsImplSpecs, networkArtifacts) specs.intrinsics.values.push(depsImplAddr) } } From 7b408915d99798db6d12f1f10f9f44b0ee1315a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:05:02 +0200 Subject: [PATCH 22/62] chore: vanity2gen: read constructorArgs from file if not specified on CLI --- scripts/vanity2gen.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/vanity2gen.js b/scripts/vanity2gen.js index 05597990..697f5117 100644 --- a/scripts/vanity2gen.js +++ b/scripts/vanity2gen.js @@ -3,6 +3,7 @@ const fs = require("fs") const utils = require("../src/utils") const addresses = require("../migrations/addresses") +const constructorArgs = require("../migrations/constructorArgs.json") module.exports = async function () { let artifact @@ -46,6 +47,9 @@ module.exports = async function () { }) try { from = from || addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer + if (hexArgs === "" && artifact !== "") { + hextArgs = constructorArgs[network][artifact] + } } catch { console.error(`WitnetDeployer must have been previously deployed on network '${network}'.\n`) console.info("Usage:\n") From ade4534e90b2e50a20cdddcafed3937d174b28ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:05:31 +0200 Subject: [PATCH 23/62] chore: fix tests --- package.json | 2 +- test/TestWitnet.sol | 3 ++- test/mocks/WitMockedOracle.sol | 6 ++---- test/mocks/WitMockedPriceFeeds.sol | 4 ++-- test/mocks/WitMockedRadonRegistry.sol | 10 +++++----- test/mocks/WitMockedRequestFactory.sol | 10 +++++----- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 100b4863..9deba75c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "networks": "node ./scripts/networks.js 2>&1", "ops:rng:sla": "npx truffle migrate --migrations_directory ./migrations/ops/rng/sla --network", "prepare": "npx truffle compile --all && npx hardhat compile --force && node ./scripts/prepare.js", - "test": "pnpm run clean && npx truffle test", + "test": "npx truffle test", "verify:apps": "node ./scripts/verify-apps.js 2>&1", "verify:core": "node ./scripts/verify-core.js 2>&1", "verify:libs": "node ./scripts/verify-libs.js 2>&1", diff --git a/test/TestWitnet.sol b/test/TestWitnet.sol index d415e163..edecd732 100644 --- a/test/TestWitnet.sol +++ b/test/TestWitnet.sol @@ -65,7 +65,8 @@ contract TestWitnetV2 { finality: uint64(block.number), resultTimestamp: uint32(block.timestamp), resultDrTxHash: blockhash(block.number - 1), - resultCborBytes: hex"010203040506" + resultCborBytes: hex"010203040506", + disputer: address(0) }); } diff --git a/test/mocks/WitMockedOracle.sol b/test/mocks/WitMockedOracle.sol index 6578cadf..d18d3c29 100644 --- a/test/mocks/WitMockedOracle.sol +++ b/test/mocks/WitMockedOracle.sol @@ -21,11 +21,9 @@ contract WitMockedOracle { constructor(WitMockedRadonRegistry _registry) WitOracleTrustableDefault( + EvmImmutables(60000, 65000, 70000, 20000), WitOracleRadonRegistry(_registry), - WitOracleRequestFactory(address(0)), - false, - bytes32("mocked"), - 60000, 65000, 70000, 20000 + bytes32("mocked") ) { address[] memory _reporters = new address[](1); diff --git a/test/mocks/WitMockedPriceFeeds.sol b/test/mocks/WitMockedPriceFeeds.sol index 02ec2bef..89f67f94 100644 --- a/test/mocks/WitMockedPriceFeeds.sol +++ b/test/mocks/WitMockedPriceFeeds.sol @@ -15,8 +15,8 @@ contract WitMockedPriceFeeds is WitPriceFeedsUpgradable { constructor(WitMockedOracle _witOracle) WitPriceFeedsUpgradable( _witOracle, - false, - bytes32("mocked") + bytes32("mocked"), + false ) {} } diff --git a/test/mocks/WitMockedRadonRegistry.sol b/test/mocks/WitMockedRadonRegistry.sol index b829094b..93ef0699 100644 --- a/test/mocks/WitMockedRadonRegistry.sol +++ b/test/mocks/WitMockedRadonRegistry.sol @@ -3,18 +3,18 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; -import "../../contracts/core/trustless/WitOracleRadonRegistryBaseUpgradableDefault.sol"; +import "../../contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol"; /// @title Mocked implementation of `WitOracleRadonRegistry`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. /// @dev ON SUPPORTED TESTNETS AND MAINNETS, PLEASE USE /// @dev THE `WitOracleRadonRegistry` CONTRACT ADDRESS PROVIDED /// @dev BY THE WITNET FOUNDATION. -contract WitMockedRadonRegistry is WitOracleRadonRegistryBaseUpgradableDefault { +contract WitMockedRadonRegistry is WitOracleRadonRegistryUpgradableDefault { constructor() - WitOracleRadonRegistryBaseUpgradableDefault( - false, - bytes32("mocked") + WitOracleRadonRegistryUpgradableDefault( + bytes32("mocked"), + false ) {} } diff --git a/test/mocks/WitMockedRequestFactory.sol b/test/mocks/WitMockedRequestFactory.sol index 67d23258..ca68b3f1 100644 --- a/test/mocks/WitMockedRequestFactory.sol +++ b/test/mocks/WitMockedRequestFactory.sol @@ -4,7 +4,7 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; import "./WitMockedOracle.sol"; -import "../../contracts/core/trustless/WitOracleRequestFactoryDefault.sol"; +import "../../contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol"; /// @title Mocked implementation of `WitOracleRequestFactory`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. @@ -13,13 +13,13 @@ import "../../contracts/core/trustless/WitOracleRequestFactoryDefault.sol"; /// @dev BY THE WITNET FOUNDATION. contract WitMockedRequestFactory is - WitOracleRequestFactoryDefault + WitOracleRequestFactoryUpgradableDefault { constructor (WitMockedOracle _witOracle) - WitOracleRequestFactoryDefault( + WitOracleRequestFactoryUpgradableDefault( WitOracle(address(_witOracle)), - false, - bytes32("mocked") + bytes32("mocked"), + false ) {} } \ No newline at end of file From 72ad7ebcde16255611867776ed60932189d3a949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:11:40 +0200 Subject: [PATCH 24/62] chore: fmt! --- migrations/scripts/3_framework.js | 14 ++++++++++---- scripts/vanity2gen.js | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 5a23274d..e466c4a0 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -41,11 +41,11 @@ module.exports = async function (_, network, [, from, reporter, curator]) { }) // Loop on framework domains ... - const palette = [ 6, 4, ] + const palette = [6, 4] for (const domain in framework) { if (!addresses[network][domain]) addresses[network][domain] = {} const color = palette[Object.keys(framework).indexOf(domain)] - + let first = true // Loop on domain artifacts ... for (const index in framework[domain]) { @@ -194,7 +194,10 @@ module.exports = async function (_, network, [, from, reporter, curator]) { baseArtifact.address = targetAddr implArtifact.address = targetAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { - console.info(" ", `> contract address: \x1b[3${color}m ${targetBaseAddr} \x1b[0m==> \x1b[9${color}m${targetAddr}\x1b[0m`) + console.info(" ", + `> contract address: \x1b[3${color}m ${targetBaseAddr} \x1b[0m==>`, + `\x1b[9${color}m${targetAddr}\x1b[0m` + ) } else { console.info(" ", `> contract address: \x1b[9${color}m`, targetAddr, "\x1b[0m") } @@ -202,7 +205,10 @@ module.exports = async function (_, network, [, from, reporter, curator]) { baseArtifact.address = targetBaseAddr implArtifact.address = targetBaseAddr if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { - console.info(" ", `> contract address: \x1b[9${color}m ${targetBaseAddr}\x1b[0m !==`, `\x1b[41m${targetAddr}\x1b[0m`) + console.info(" ", + `> contract address: \x1b[9${color}m ${targetBaseAddr}\x1b[0m !==`, + `\x1b[41m${targetAddr}\x1b[0m` + ) } else { console.info(" ", `> contract address: \x1b[9${color}m ${targetAddr}\x1b[0m`) } diff --git a/scripts/vanity2gen.js b/scripts/vanity2gen.js index 697f5117..e535b72a 100644 --- a/scripts/vanity2gen.js +++ b/scripts/vanity2gen.js @@ -47,8 +47,8 @@ module.exports = async function () { }) try { from = from || addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer - if (hexArgs === "" && artifact !== "") { - hextArgs = constructorArgs[network][artifact] + if (hexArgs === "" && artifact !== "") { + hexArgs = constructorArgs[network][artifact] } } catch { console.error(`WitnetDeployer must have been previously deployed on network '${network}'.\n`) From 191b03fd844be98151e0d70d137afc0ff85b3de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 18:54:19 +0200 Subject: [PATCH 25/62] chore: polish migration scripts --- migrations/scripts/1_base.js | 5 +- migrations/scripts/2_libs.js | 8 +- migrations/scripts/3_framework.js | 119 ++++++++++++++++++------------ settings/artifacts.js | 2 +- settings/specs.js | 2 +- src/utils.js | 2 +- 6 files changed, 84 insertions(+), 54 deletions(-) diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index 9adf4196..6a662fd9 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -32,10 +32,11 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { }) addresses[network].WitnetDeployer = WitnetDeployer.address await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + } else { - WitnetDeployer.address = addresses[network].WitnetDeployer + WitnetDeployer.address = addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer utils.traceHeader("Deployed 'WitnetDeployer'") - console.info(" ", "> contract address: \x1b[93m", WitnetDeployer.address, "\x1b[0m") + console.info(" ", "> contract address: \x1b[95m", WitnetDeployer.address, "\x1b[0m") console.info() } diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index 929e683e..e37971de 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -26,7 +26,9 @@ module.exports = async function (_, network, [, from]) { // or, no address found in addresses file but code is already deployed into target address (utils.isNullAddress(libNetworkAddr) && libTargetCode.length > 3) || // or, address found in addresses file but no code currently deployed in such - (await web3.eth.getCode(libNetworkAddr)).length < 3 + (await web3.eth.getCode(libNetworkAddr)).length < 3 || + // or. --libs specified on CLI + (libTargetAddr !== libNetworkAddr && process.argv.includes("--upgrade-all")) ) { if (libTargetCode.length < 3) { utils.traceHeader(`Deploying '${impl}'...`) @@ -48,9 +50,9 @@ module.exports = async function (_, network, [, from]) { } libImplArtifact.address = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if (libTargetAddr !== libNetworkAddr) { - console.info(" > library address: \x1b[96m", libImplArtifact.address, `\x1b[0m!== \x1b[30;43m${libTargetAddr}\x1b[0m`) + console.info(" > library address: \x1b[92m", libImplArtifact.address, `\x1b[0m!== \x1b[30;42m${libTargetAddr}\x1b[0m`) } else { - console.info(" > library address: \x1b[96m", libImplArtifact.address, "\x1b[0m") + console.info(" > library address: \x1b[92m", libImplArtifact.address, "\x1b[0m") } console.info() } diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index e466c4a0..c19cf8dd 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -12,11 +12,11 @@ const selection = utils.getWitnetArtifactsFromArgs() const WitnetDeployer = artifacts.require("WitnetDeployer") const WitnetProxy = artifacts.require("WitnetProxy") +const WitnetUpgradableBase = artifacts.require("WitnetUpgradableBase") module.exports = async function (_, network, [, from, reporter, curator]) { - const addresses = await utils.readJsonFromFile("./migrations/addresses.json") - const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") - if (!constructorArgs[network]) constructorArgs[network] = {} + + let addresses = await utils.readJsonFromFile("./migrations/addresses.json") const networkArtifacts = settings.getArtifacts(network) const networkSpecs = settings.getSpecs(network) @@ -43,7 +43,6 @@ module.exports = async function (_, network, [, from, reporter, curator]) { // Loop on framework domains ... const palette = [6, 4] for (const domain in framework) { - if (!addresses[network][domain]) addresses[network][domain] = {} const color = palette[Object.keys(framework).indexOf(domain)] let first = true @@ -67,7 +66,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { continue } else { if (first) { - console.info(` \x1b[1;39;4${color}m`, domain.toUpperCase(), "ARTIFACTS", " ".repeat(106 - domain.length), "\x1b[0m") + console.info(`\n \x1b[1;39;4${color}m`, domain.toUpperCase(), "ARTIFACTS", " ".repeat(106 - domain.length), "\x1b[0m") first = false } } @@ -76,31 +75,34 @@ module.exports = async function (_, network, [, from, reporter, curator]) { const implArtifact = artifacts.require(impl) const targetSpecs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) - const targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) + let targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) const targetCode = await web3.eth.getCode(targetAddr) - if (targetCode.length < 3) { - utils.traceHeader(`Deploying '${impl}'...`) - if (targetSpecs?.constructorArgs?.types.length > 0) { - console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") - utils.traceData(" > constructor values: ", encodeTargetConstructorArgs(targetSpecs).slice(2), 64, "\x1b[90m") - } - await deployTarget(impl, targetSpecs, networkArtifacts) - // save constructor args - constructorArgs[network][impl] = encodeTargetConstructorArgs(targetSpecs).slice(2) - await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) - } - if (targetSpecs.isUpgradable) { + if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { - // a proxy address with deployed code is found in the addresses file... + // a proxy address with actual code is found in the addresses file... try { const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) + if (targetCode.length < 3) { + const proxyImpl = await WitnetUpgradableBase.at(proxyImplAddr) + const proxyGithubTag = (await proxyImpl.version.call({ from: targetSpecs.from })).slice(-7) + // if new implementation is not yet deployed, + // but github tag equals to that of the proxy's current implementation: + if (proxyGithubTag === version.slice(-7) && !utils.isDryRun(network)) { + console.info(" > \x1b[41mPlease, commit your latest changes before upgrading on a public chain.\x1b[0m") + process.exit(1) + + } else { + targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts) + } + } if ( proxyImplAddr === targetAddr || utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") ) { implArtifact.address = targetAddr + } else { implArtifact.address = proxyImplAddr } @@ -109,12 +111,12 @@ module.exports = async function (_, network, [, from, reporter, curator]) { console.info(ex) process.exit(1) } + } else { targetBaseAddr = await deployCoreBase(targetSpecs, targetAddr) - implArtifact.address = targetAddr - // save new proxy address in file - addresses[network][domain][base] = targetBaseAddr - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + implArtifact.address = await deployTarget(network, target, targetSpecs, networkArtifacts) + // settle new proxy address in file + addresses = await settleArtifactAddress(addresses, network, domain, base, targetBaseAddr) } baseArtifact.address = targetBaseAddr @@ -129,30 +131,26 @@ module.exports = async function (_, network, [, from, reporter, curator]) { if (upgradeProxy) { const target = await implArtifact.at(targetAddr) const targetVersion = await target.version.call({ from: targetSpecs.from }) - const targetGithubTag = targetVersion.slice(-7) const legacy = await implArtifact.at(targetBaseAddr) - const legacyVersion = await target.version.call({ from: targetSpecs.from }) - const legacyGithubTag = legacyVersion.slice(-7) - - if (targetGithubTag === legacyGithubTag && network !== "develop") { - console.info(" > \x1b[41mPlease, commit your latest changes before upgrading.\x1b[0m") - upgradeProxy = false - } else if (!selection.includes(base) && !process.argv.includes("--upgrade-all") && network !== "develop") { + const legacyVersion = await legacy.version.call({ from: targetSpecs.from }) + if (!selection.includes(base) && !process.argv.includes("--upgrade-all") && !utils.isDryRun(network)) { const targetClass = await target.class.call({ from: targetSpecs.from }) const legacyClass = await legacy.class.call({ from: targetSpecs.from }) if (legacyClass !== targetClass || legacyVersion !== targetVersion) { - upgradeProxy = ["y", "yes"].includes((await utils.prompt( - ` > Upgrade artifact from ${legacyClass}:${legacyVersion} to ` + - `\x1b[1;39m${targetClass}:${targetVersion}\x1b[0m? (y/N) ` - ))) + console.info( + `\n > Upgrade artifact to ` + + `\x1b[1;39m${targetClass} v${targetVersion}\x1b[0m? (y/N) ` + ) + upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) } else { const legacyCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(legacy.address)) const targetCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(target.address)) if (legacyCodeHash !== targetCodeHash) { - upgradeProxy = ["y", "yes"].includes((await utils.prompt( - " > Upgrade artifact to \x1b[1;39mlatest compilation of " + - `v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) `) - )) + console.info( + "\m > Upgrade artifact to \x1b[1;39mlatest compilation of ", + `v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) ` + ) + upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) } } } else { @@ -162,6 +160,8 @@ module.exports = async function (_, network, [, from, reporter, curator]) { if (upgradeProxy) { utils.traceHeader(`Upgrading '${base}'...`) await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) + implArtifact.address = targetAddr + } else { utils.traceHeader(`Upgradable '${base}'`) } @@ -178,7 +178,11 @@ module.exports = async function (_, network, [, from, reporter, curator]) { implArtifact.address, "\x1b[0m" ) } + } else { + if (targetCode.length < 3) { + targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts) + } utils.traceHeader(`Immutable '${base}'`) // if (targetCode.length > 3) { // // if not deployed during this migration, and artifact required constructor args... @@ -212,13 +216,12 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } else { console.info(" ", `> contract address: \x1b[9${color}m ${targetAddr}\x1b[0m`) } - } - addresses[network][domain][base] = baseArtifact.address - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + + addresses = await saveAddresses(addresses, network, domain, base, baseArtifact.address)} } const core = await implArtifact.at(baseArtifact.address) try { - console.info(" ", "> contract curator: \x1b[33m", await core.owner.call({ from }), "\x1b[0m") + console.info(" ", "> contract curator: \x1b[35m", await core.owner.call({ from }), "\x1b[0m") } catch {} console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") if (targetSpecs.isUpgradable) { @@ -273,15 +276,31 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { return proxyAddr } -async function deployTarget (target, targetSpecs, networkArtifacts) { +async function deployTarget (network, target, targetSpecs, networkArtifacts) { + const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") const deployer = await WitnetDeployer.deployed() const targetInitCode = encodeTargetInitCode(target, targetSpecs, networkArtifacts) + const targetConstructorArgs = encodeTargetConstructorArgs(targetSpecs).slice(2) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) - utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) + utils.traceHeader(`Deploying '${target}'...`) + if (targetSpecs?.constructorArgs?.types.length > 0) { + console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") + utils.traceData(" > constructor values: ", targetConstructorArgs, 64, "\x1b[90m") + } + try { + utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) + } catch (ex) { + console.info(`Error: cannot deploy artifact ${target} on counter-factual address ${targetAddr}:`) + process.exit(1) + } if ((await web3.eth.getCode(targetAddr)).length <= 3) { - console.info(`Error: Contract ${target} was not deployed on the expected address: ${targetAddr}`) + console.info(`Error: deployment of '${target}' into ${targetAddr} failed.`) process.exit(1) + } else { + if (!constructorArgs[network]) constructorArgs[network] = {} + constructorArgs[network][target] = targetConstructorArgs + await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) } return targetAddr } @@ -344,6 +363,14 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } +async function saveAddresses(addresses, network, domain, base, addr) { + if (!addresses[network]) addresses[network] = {} + if (!addresses[network][domain]) addresses[network][domain] = {} + addresses[network][domain][base] = addr + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + return addresses +} + async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { diff --git a/settings/artifacts.js b/settings/artifacts.js index 633148bc..eaac101d 100644 --- a/settings/artifacts.js +++ b/settings/artifacts.js @@ -8,7 +8,7 @@ module.exports = { core: { WitOracle: "WitOracleTrustableDefault", WitOracleRadonRegistry: "WitOracleRadonRegistryUpgradableDefault", - WitOracleRequestFactory: "WitOracleRequestFactorUpgradableDefault", + WitOracleRequestFactory: "WitOracleRequestFactoryUpgradableDefault", }, libs: { WitOracleDataLib: "WitOracleDataLib", diff --git a/settings/specs.js b/settings/specs.js index c5c114bc..f7961b8b 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -46,13 +46,13 @@ module.exports = { baseLibs: [ "WitPriceFeedsLib", ], + from: "0xF121b71715E71DDeD592F1125a06D4ED06F0694D", vanity: 1865150170, // 0x1111AbA2164AcdC6D291b08DfB374280035E1111 }, WitRandomness: { vanity: 1060132513, // 0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB }, }, - reef: { WitOracle: { immutables: { diff --git a/src/utils.js b/src/utils.js index b0319535..ef092733 100644 --- a/src/utils.js +++ b/src/utils.js @@ -68,7 +68,7 @@ function getNetworkArtifactAddress (network, domain, addresses, artifact) { return addresses[network][domain][artifact] } } - return addresses?.default?.core[artifact] ?? "" + return addresses?.default[domain][artifact] ?? "" } function getNetworkCoreArtifactAddress (network, addresses, artifact) { From c60a1aad82a316a0f13fafe0a698c7ce4d934e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 10:34:55 +0200 Subject: [PATCH 26/62] fix(wpf): missing legacy method --- contracts/apps/WitPriceFeedsUpgradable.sol | 4 + contracts/interfaces/IWitFeedsLegacy.sol | 1 + migrations/scripts/1_base.js | 1 + migrations/scripts/3_framework.js | 109 +++++++++------------ 4 files changed, 52 insertions(+), 63 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 739f943c..e2b7d165 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -213,6 +213,10 @@ contract WitPriceFeedsUpgradable { return __defaultRadonSLA; } + + function estimateUpdateBaseFee(uint256 _evmGasPrice) virtual override public view returns (uint256) { + return estimateUpdateRequestFee(_evmGasPrice); + } function estimateUpdateRequestFee(uint256 _evmGasPrice) virtual override diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index 242595ef..1260305f 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -7,5 +7,6 @@ interface IWitFeedsLegacy { uint8 witNumWitnesses; uint64 witUnitaryReward; } + function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); function requestUpdate(bytes4, RadonSLA calldata) external payable returns (uint256 usedFunds); } diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index 6a662fd9..50ef63d4 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -37,6 +37,7 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { WitnetDeployer.address = addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer utils.traceHeader("Deployed 'WitnetDeployer'") console.info(" ", "> contract address: \x1b[95m", WitnetDeployer.address, "\x1b[0m") + console.info(" ", "> master address: \x1b[35m", master, "\x1b[0m") console.info() } diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index c19cf8dd..8048fbb1 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -80,23 +80,11 @@ module.exports = async function (_, network, [, from, reporter, curator]) { if (targetSpecs.isUpgradable) { + let proxyImplAddr; if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { // a proxy address with actual code is found in the addresses file... try { - const proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) - if (targetCode.length < 3) { - const proxyImpl = await WitnetUpgradableBase.at(proxyImplAddr) - const proxyGithubTag = (await proxyImpl.version.call({ from: targetSpecs.from })).slice(-7) - // if new implementation is not yet deployed, - // but github tag equals to that of the proxy's current implementation: - if (proxyGithubTag === version.slice(-7) && !utils.isDryRun(network)) { - console.info(" > \x1b[41mPlease, commit your latest changes before upgrading on a public chain.\x1b[0m") - process.exit(1) - - } else { - targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts) - } - } + proxyImplAddr = await getProxyImplementation(targetSpecs.from, targetBaseAddr) if ( proxyImplAddr === targetAddr || utils.isNullAddress(proxyImplAddr) || selection.includes(base) || process.argv.includes("--upgrade-all") @@ -113,8 +101,10 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } } else { + // no proxy address in file or no code in it... targetBaseAddr = await deployCoreBase(targetSpecs, targetAddr) implArtifact.address = await deployTarget(network, target, targetSpecs, networkArtifacts) + proxyImplAddr = implArtifact.address // settle new proxy address in file addresses = await settleArtifactAddress(addresses, network, domain, base, targetBaseAddr) } @@ -126,47 +116,46 @@ module.exports = async function (_, network, [, from, reporter, curator]) { implArtifact.link(libArtifact) }; - // determines whether a new implementation is available, and ask the user to upgrade the proxy if so: - let upgradeProxy = targetAddr !== await getProxyImplementation(targetSpecs.from, targetBaseAddr) - if (upgradeProxy) { - const target = await implArtifact.at(targetAddr) - const targetVersion = await target.version.call({ from: targetSpecs.from }) - const legacy = await implArtifact.at(targetBaseAddr) - const legacyVersion = await legacy.version.call({ from: targetSpecs.from }) - if (!selection.includes(base) && !process.argv.includes("--upgrade-all") && !utils.isDryRun(network)) { - const targetClass = await target.class.call({ from: targetSpecs.from }) - const legacyClass = await legacy.class.call({ from: targetSpecs.from }) - if (legacyClass !== targetClass || legacyVersion !== targetVersion) { - console.info( - `\n > Upgrade artifact to ` - + `\x1b[1;39m${targetClass} v${targetVersion}\x1b[0m? (y/N) ` - ) - upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) - } else { - const legacyCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(legacy.address)) - const targetCodeHash = web3.utils.soliditySha3(await web3.eth.getCode(target.address)) - if (legacyCodeHash !== targetCodeHash) { - console.info( - "\m > Upgrade artifact to \x1b[1;39mlatest compilation of ", - `v${targetVersion.slice(0, 6)}\x1b[0m? (y/N) ` - ) - upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) - } - } + // determine whether a new implementation is available and prepared for upgrade, + // and whether an upgrade should be perform... + const legacy = await implArtifact.at(proxyImplAddr) + const legacyClass = await legacy.class.call({ from: targetSpecs.from }) + const legacyVersion = await legacy.version.call({ from: targetSpecs.from }) + + let upgradeProxy = targetAddr !== proxyImplAddr; + if (upgradeProxy && !selection.includes(base)) { + if (legacyClass == impl && legacyVersion.slice(0, 5) === version.slice(0, 5) && !utils.isDryRun(network)) { + upgradeProxy = false; + // targetAddr = proxyImplAddr; } else { - upgradeProxy = selection.includes(base) || process.argv.includes("--upgrade-all") + upgradeProxy = process.argv.includes("--upgrade-all") + // console.info( + // `\n > Upgrade artifact to ` + `\x1b[1;39m${impl} v${version}\x1b[0m? (y/N) ` + // ) + // upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) } } if (upgradeProxy) { + if (targetCode.length < 3) { + targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts, legacyVersion) + } utils.traceHeader(`Upgrading '${base}'...`) await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) implArtifact.address = targetAddr - } else { utils.traceHeader(`Upgradable '${base}'`) + if (selection.includes(base)) { + console.info(` > \x1b[90mSorry, nothing to upgrade.\x1b[0m`) + } + if (legacyVersion && legacyVersion.slice(0, 5) === version.slice(0, 5)) { + if (legacyVersion.slice(-7) !== version.slice(-7)) { + console.info(` > \x1b[90mPlease, bump up package version before upgrading.\x1b[0m`) + } + } else if (legacyVersion && legacyVersion.slice(-7) === version.slice(-7)) { + console.info(` > \x1b[90mPlease, commit your changes before upgrading.\x1b[0m`) + } } - - if (implArtifact.address !== targetAddr) { + if (implArtifact.address !== targetAddr && legacyVersion.slice(0, 5) === version.slice(0, 5)) { console.info(" ", `> contract address: \x1b[9${color}m${baseArtifact.address} \x1b[0m`) console.info(" ", ` \x1b[9${color}m -->\x1b[3${color}m`, @@ -184,13 +173,6 @@ module.exports = async function (_, network, [, from, reporter, curator]) { targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts) } utils.traceHeader(`Immutable '${base}'`) - // if (targetCode.length > 3) { - // // if not deployed during this migration, and artifact required constructor args... - // if (targetSpecs?.constructorArgs?.types.length > 0) { - // console.info(" ", "> constructor types: \x1b[90m", targetSpecs.constructorArgs.types, "\x1b[0m") - // utils.traceData(" > constructor values: ", constructorArgs[network][impl], 64, "\x1b[90m") - // } - // } if ( selection.includes(impl) || utils.isNullAddress(targetBaseAddr) || (await web3.eth.getCode(targetBaseAddr)).length < 3 @@ -216,24 +198,22 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } else { console.info(" ", `> contract address: \x1b[9${color}m ${targetAddr}\x1b[0m`) } - - addresses = await saveAddresses(addresses, network, domain, base, baseArtifact.address)} + } + addresses = await saveAddresses(addresses, network, domain, base, baseArtifact.address) } const core = await implArtifact.at(baseArtifact.address) try { console.info(" ", "> contract curator: \x1b[35m", await core.owner.call({ from }), "\x1b[0m") } catch {} console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") - if (targetSpecs.isUpgradable) { - const coreVersion = await core.version.call({ from }) - const nextCore = await implArtifact.at(targetAddr) - const nextCoreVersion = await nextCore.version.call({ from }) - if (implArtifact.address !== targetAddr && coreVersion !== nextCoreVersion) { - console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m!==", `\x1b[33m${nextCoreVersion}\x1b[0m`) + try { + const deployedVersion = await core.version.call({ from }) + if (deployedVersion.slice(0, 5) !== version.slice(0, 5)) { + console.info(" ", "> contract version: \x1b[1;39m", deployedVersion, "\x1b[0m!==", `\x1b[93m${version}\x1b[0m`) } else { - console.info(" ", "> contract version: \x1b[1;39m", coreVersion, "\x1b[0m") + console.info(" ", "> contract version: \x1b[1;39m", deployedVersion, "\x1b[0m") } - } + } catch {} console.info(" ", "> contract specs: ", await core.specs.call({ from }), "\x1b[0m") console.info() } @@ -276,7 +256,7 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { return proxyAddr } -async function deployTarget (network, target, targetSpecs, networkArtifacts) { +async function deployTarget (network, target, targetSpecs, networkArtifacts, legacyVersion) { const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") const deployer = await WitnetDeployer.deployed() const targetInitCode = encodeTargetInitCode(target, targetSpecs, networkArtifacts) @@ -284,6 +264,9 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts) { const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) utils.traceHeader(`Deploying '${target}'...`) + if (legacyVersion && legacyVersion.slice(-7) === version.slice(-7)) { + console.info( ` > \x1b[41mWARNING:\x1b[0m \x1b[31mLatest changes were not committed into Github!\x1b[0m`) + } if (targetSpecs?.constructorArgs?.types.length > 0) { console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") utils.traceData(" > constructor values: ", targetConstructorArgs, 64, "\x1b[90m") From 6441ad6754b4ac3f68dede078ef9e0b65b9d69cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 16:31:25 +0200 Subject: [PATCH 27/62] feat: add compilation-codehash to version of WSB artifacts --- migrations/scripts/3_framework.js | 64 ++++++++++++++++++------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 8048fbb1..a452cbc3 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -5,7 +5,7 @@ const utils = require("../../src/utils") const version = `${ require("../../package").version }-${ - require("child_process").execSync("git rev-parse HEAD").toString().trim().substring(0, 7) + require("child_process").execSync("git log -1 --format=%h ../../contracts").toString().trim().substring(0, 7) }` const selection = utils.getWitnetArtifactsFromArgs() @@ -41,7 +41,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { }) // Loop on framework domains ... - const palette = [6, 4] + const palette = [6, 4,] for (const domain in framework) { const color = palette[Object.keys(framework).indexOf(domain)] @@ -77,6 +77,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { const targetSpecs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) let targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) const targetCode = await web3.eth.getCode(targetAddr) + const targetVersion = getArtifactVersion(impl, targetSpecs.baseLibs, networkArtifacts) if (targetSpecs.isUpgradable) { @@ -119,20 +120,20 @@ module.exports = async function (_, network, [, from, reporter, curator]) { // determine whether a new implementation is available and prepared for upgrade, // and whether an upgrade should be perform... const legacy = await implArtifact.at(proxyImplAddr) - const legacyClass = await legacy.class.call({ from: targetSpecs.from }) const legacyVersion = await legacy.version.call({ from: targetSpecs.from }) + const targetVersion = getArtifactVersion(impl) - let upgradeProxy = targetAddr !== proxyImplAddr; - if (upgradeProxy && !selection.includes(base)) { - if (legacyClass == impl && legacyVersion.slice(0, 5) === version.slice(0, 5) && !utils.isDryRun(network)) { + let skipUpgrade = false, upgradeProxy = ( + targetAddr !== proxyImplAddr + && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) + ); + if (upgradeProxy && !utils.isDryRun(impl)) { + if (versionLastCommitOf(targetVersion) === versionLastCommitOf(legacyVersion)) { upgradeProxy = false; - // targetAddr = proxyImplAddr; - } else { - upgradeProxy = process.argv.includes("--upgrade-all") - // console.info( - // `\n > Upgrade artifact to ` + `\x1b[1;39m${impl} v${version}\x1b[0m? (y/N) ` - // ) - // upgradeProxy = ["y", "yes"].includes(await utils.prompt("")) + skipUpgrade = true; + } else if (!selection.includes(base) && !process.argv.includes("--upgrade-all")) { + upgradeProxy = false; + skipUpgrade = true; } } if (upgradeProxy) { @@ -142,20 +143,21 @@ module.exports = async function (_, network, [, from, reporter, curator]) { utils.traceHeader(`Upgrading '${base}'...`) await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) implArtifact.address = targetAddr + } else { utils.traceHeader(`Upgradable '${base}'`) - if (selection.includes(base)) { + if (versionLastCommitOf(targetVersion) === versionLastCommitOf(legacyVersion)) { + console.info(` > \x1b[${skipUpgrade ? "31" : "90"}mPlease, commit your changes before upgrading.\x1b[0m`) + } else if (selection.includes(base) || process.argv.includes("--upgrade-all")) { console.info(` > \x1b[90mSorry, nothing to upgrade.\x1b[0m`) } - if (legacyVersion && legacyVersion.slice(0, 5) === version.slice(0, 5)) { - if (legacyVersion.slice(-7) !== version.slice(-7)) { - console.info(` > \x1b[90mPlease, bump up package version before upgrading.\x1b[0m`) - } - } else if (legacyVersion && legacyVersion.slice(-7) === version.slice(-7)) { - console.info(` > \x1b[90mPlease, commit your changes before upgrading.\x1b[0m`) - } } - if (implArtifact.address !== targetAddr && legacyVersion.slice(0, 5) === version.slice(0, 5)) { + + if ( + targetAddr !== implArtifact.address + && versionTagOf(targetVersion) === versionTagOf(legacyVersion) + && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) + ) { console.info(" ", `> contract address: \x1b[9${color}m${baseArtifact.address} \x1b[0m`) console.info(" ", ` \x1b[9${color}m -->\x1b[3${color}m`, @@ -208,10 +210,10 @@ module.exports = async function (_, network, [, from, reporter, curator]) { console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") try { const deployedVersion = await core.version.call({ from }) - if (deployedVersion.slice(0, 5) !== version.slice(0, 5)) { - console.info(" ", "> contract version: \x1b[1;39m", deployedVersion, "\x1b[0m!==", `\x1b[93m${version}\x1b[0m`) + if (versionCodehashOf(deployedVersion) !== versionCodehashOf(getArtifactVersion(impl))) { + console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)} !== \x1b[93m${version}\x1b[0m`) } else { - console.info(" ", "> contract version: \x1b[1;39m", deployedVersion, "\x1b[0m") + console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)}`) } } catch {} console.info(" ", "> contract specs: ", await core.specs.call({ from }), "\x1b[0m") @@ -419,7 +421,7 @@ async function unfoldTargetSpecs (domain, target, targetBase, from, network, net if (specs.isUpgradable) { // Add version tag to intrinsical constructor args if target artifact is expected to be upgradable specs.intrinsics.types.push("bytes32") - specs.intrinsics.values.push(utils.fromAscii(version)) + specs.intrinsics.values.push(utils.fromAscii(getArtifactVersion(target, specs.baseLibs, networkArtifacts))) if (target.indexOf("Trustable") < 0) { // Add _upgradable constructor args on non-trustable (ergo trustless) but yet upgradable targets specs.intrinsics.types.push("bool") @@ -440,3 +442,13 @@ async function unfoldTargetSpecs (domain, target, targetBase, from, network, net } return specs } + +function getArtifactVersion(target, targetBaseLibs, networkArtifacts) { + const bytecode = linkBaseLibs(artifacts.require(target).bytecode, targetBaseLibs, networkArtifacts) + return `${version}-${web3.utils.soliditySha3(bytecode).slice(2, 9)}` +} + +function versionTagOf(version) { return version.slice(0, 5) } +function versionLastCommitOf(version) { return version.length >= 13 ? version.slice(6, 13) : "" } +function versionCodehashOf(version) { return version.length >= 20 ? version.slice(-7) : "" } + From 8bf3ac7b612ed171e57d35ff4e39480200532154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 18:45:23 +0200 Subject: [PATCH 28/62] chore: move IWitOracleLegacy impl from WitOracleBase to WitOracleTrustableBase --- contracts/core/base/WitOracleBase.sol | 101 +----------------- .../core/base/WitOracleBaseTrustable.sol | 99 ++++++++++++++++- .../core/trustable/WitOracleTrustableOvm2.sol | 2 +- .../core/trustable/WitOracleTrustableReef.sol | 2 +- 4 files changed, 102 insertions(+), 102 deletions(-) diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 88e7a732..04e9cefc 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -4,7 +4,6 @@ pragma solidity >=0.8.0 <0.9.0; import "../../WitOracle.sol"; import "../../data/WitOracleDataLib.sol"; -import "../../interfaces/IWitOracleLegacy.sol"; import "../../interfaces/IWitOracleConsumer.sol"; import "../../libs/WitOracleResultErrorsLib.sol"; import "../../patterns/Payable.sol"; @@ -17,8 +16,7 @@ import "../../patterns/Payable.sol"; abstract contract WitOracleBase is Payable, - WitOracle, - IWitOracleLegacy + WitOracle { using Witnet for Witnet.RadonSLA; using WitOracleDataLib for WitOracleDataLib.Storage; @@ -349,7 +347,7 @@ abstract contract WitOracleBase public payable checkReward( _getMsgValue(), - estimateBaseFee(_getGasPrice(), _queryRAD) + estimateBaseFee(_getGasPrice()) ) checkSLA(_querySLA) returns (uint256 _queryId) @@ -523,101 +521,6 @@ abstract contract WitOracleBase } - /// =============================================================================================================== - /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- - - /// @notice Estimate the minimum reward required for posting a data request. - /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. - /// @param _gasPrice Expected gas price to pay upon posting the data request. - /// @param _resultMaxSize Maximum expected size of returned data (in bytes). - function estimateBaseFee(uint256 _gasPrice, uint16 _resultMaxSize) - public view - virtual override - returns (uint256) - { - return _gasPrice * ( - __reportResultGasBase - + __sstoreFromZeroGas * ( - 4 + (_resultMaxSize == 0 ? 0 : _resultMaxSize - 1) / 32 - ) - ); - } - - /// @notice Estimate the minimum reward required for posting a data request. - /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. - /// @param gasPrice Expected gas price to pay upon posting the data request. - /// @param radHash The hash of some Witnet Data Request previously posted in the WitOracleRadonRegistry registry. - function estimateBaseFee(uint256 gasPrice, bytes32 radHash) - public view - virtual override - returns (uint256) - { - // Check this rad hash is actually verified: - registry.lookupRadonRequestResultDataType(radHash); - - // Base fee is actually invariant to max result size: - return estimateBaseFee(gasPrice); - } - - function postRequest( - bytes32 _queryRadHash, - IWitOracleLegacy.RadonSLA calldata _querySLA - ) - virtual override - external payable - returns (uint256) - { - return postQuery( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }) - ); - } - - function postRequestWithCallback( - bytes32 _queryRadHash, - IWitOracleLegacy.RadonSLA calldata _querySLA, - uint24 _queryCallbackGas - ) - virtual override - external payable - returns (uint256) - { - return postQueryWithCallback( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas - ); - } - - function postRequestWithCallback( - bytes calldata _queryRadBytecode, - IWitOracleLegacy.RadonSLA calldata _querySLA, - uint24 _queryCallbackGas - ) - virtual override - external payable - returns (uint256) - { - return postQueryWithCallback( - _queryRadBytecode, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas - ); - } - - // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index cb17954b..33c308e0 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -5,6 +5,7 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitOracleBase.sol"; import "../WitnetUpgradableBase.sol"; import "../../interfaces/IWitOracleAdminACLs.sol"; +import "../../interfaces/IWitOracleLegacy.sol"; import "../../interfaces/IWitOracleReporter.sol"; /// @title Witnet Request Board "trustable" implementation contract. @@ -17,7 +18,8 @@ abstract contract WitOracleBaseTrustable WitOracleBase, WitnetUpgradableBase, IWitOracleAdminACLs, - IWitOracleReporter + IWitOracleLegacy, + IWitOracleReporter { using Witnet for Witnet.RadonSLA; @@ -140,6 +142,101 @@ abstract contract WitOracleBaseTrustable } + /// =============================================================================================================== + /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- + + /// @notice Estimate the minimum reward required for posting a data request. + /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. + /// @param _gasPrice Expected gas price to pay upon posting the data request. + /// @param _resultMaxSize Maximum expected size of returned data (in bytes). + function estimateBaseFee(uint256 _gasPrice, uint16 _resultMaxSize) + public view + virtual override + returns (uint256) + { + return _gasPrice * ( + __reportResultGasBase + + __sstoreFromZeroGas * ( + 4 + (_resultMaxSize == 0 ? 0 : _resultMaxSize - 1) / 32 + ) + ); + } + + /// @notice Estimate the minimum reward required for posting a data request. + /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. + /// @param gasPrice Expected gas price to pay upon posting the data request. + /// @param radHash The hash of some Witnet Data Request previously posted in the WitOracleRadonRegistry registry. + function estimateBaseFee(uint256 gasPrice, bytes32 radHash) + public view + virtual override + returns (uint256) + { + // Check this rad hash is actually verified: + registry.lookupRadonRequestResultDataType(radHash); + + // Base fee is actually invariant to max result size: + return estimateBaseFee(gasPrice); + } + + function postRequest( + bytes32 _queryRadHash, + IWitOracleLegacy.RadonSLA calldata _querySLA + ) + virtual override + external payable + returns (uint256) + { + return postQuery( + _queryRadHash, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }) + ); + } + + function postRequestWithCallback( + bytes32 _queryRadHash, + IWitOracleLegacy.RadonSLA calldata _querySLA, + uint24 _queryCallbackGas + ) + virtual override + external payable + returns (uint256) + { + return postQueryWithCallback( + _queryRadHash, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }), + _queryCallbackGas + ); + } + + function postRequestWithCallback( + bytes calldata _queryRadBytecode, + IWitOracleLegacy.RadonSLA calldata _querySLA, + uint24 _queryCallbackGas + ) + virtual override + external payable + returns (uint256) + { + return postQueryWithCallback( + _queryRadBytecode, + Witnet.RadonSLA({ + witNumWitnesses: _querySLA.witNumWitnesses, + witUnitaryReward: _querySLA.witUnitaryReward, + maxTallyResultSize: 32 + }), + _queryCallbackGas + ); + } + + // ================================================================================================================ // --- Implements IWitOracleReporter ------------------------------------------------------------------------------ diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index d52e930a..1995b4fb 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -72,7 +72,7 @@ contract WitOracleTrustableOvm2 virtual override returns (uint256) { - return _getCurrentL1Fee(_resultMaxSize) + WitOracleBase.estimateBaseFee(_gasPrice, _resultMaxSize); + return _getCurrentL1Fee(_resultMaxSize) + WitOracleBaseTrustable.estimateBaseFee(_gasPrice, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. diff --git a/contracts/core/trustable/WitOracleTrustableReef.sol b/contracts/core/trustable/WitOracleTrustableReef.sol index d0b2aa43..2a86c841 100644 --- a/contracts/core/trustable/WitOracleTrustableReef.sol +++ b/contracts/core/trustable/WitOracleTrustableReef.sol @@ -54,7 +54,7 @@ contract WitOracleTrustableReef virtual override returns (uint256) { - return WitOracleBase.estimateBaseFee(1, _resultMaxSize); + return WitOracleBaseTrustable.estimateBaseFee(1, _resultMaxSize); } /// @notice Estimate the minimum reward required for posting a data request with a callback. From d83463129820835133c16417fb39a8fae207b877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 18:45:43 +0200 Subject: [PATCH 29/62] feat: IWitFeedsLegacy.witnet() --- contracts/apps/WitPriceFeedsUpgradable.sol | 4 ++++ contracts/interfaces/IWitFeedsLegacy.sol | 1 + 2 files changed, 5 insertions(+) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index e2b7d165..ccfab383 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -340,6 +340,10 @@ contract WitPriceFeedsUpgradable ); } + function witnet() virtual override external view returns (address) { + return address(witOracle); + } + // ================================================================================================================ // --- Implements 'IWitFeedsAdmin' ----------------------------------------------------------------------------- diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index 1260305f..88957dc2 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -9,4 +9,5 @@ interface IWitFeedsLegacy { } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); function requestUpdate(bytes4, RadonSLA calldata) external payable returns (uint256 usedFunds); + function witnet() external view returns (address); } From 89e9ff261cc05d1f6c3775c7c39768f6b8383a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 19:11:57 +0200 Subject: [PATCH 30/62] feat: IWitFeedsLegacy.lookupWitnetBytecode(bytes4) --- contracts/apps/WitPriceFeedsUpgradable.sol | 9 ++++++++- contracts/interfaces/IWitFeedsLegacy.sol | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index ccfab383..bce46d16 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -278,7 +278,7 @@ contract WitPriceFeedsUpgradable } function lookupWitOracleRequestBytecode(bytes4 feedId) - override external view + override public view returns (bytes memory) { Record storage __record = __records_(feedId); @@ -288,6 +288,13 @@ contract WitPriceFeedsUpgradable ); return _registry().bytecodeOf(__record.radHash); } + + function lookupWitnetBytecode(bytes4 feedId) + override external view + returns (bytes memory) + { + return lookupWitOracleRequestBytecode(feedId); + } function lookupWitOracleRequestRadHash(bytes4 feedId) override public view diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index 88957dc2..b2dd9286 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -8,6 +8,7 @@ interface IWitFeedsLegacy { uint64 witUnitaryReward; } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); + function lookupWitnetBytecode(bytes4) external view returns (bytes memory); function requestUpdate(bytes4, RadonSLA calldata) external payable returns (uint256 usedFunds); function witnet() external view returns (address); } From 4280fbd284b08ca13a6a913e64f3b72beca478fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 22 Oct 2024 19:30:35 +0200 Subject: [PATCH 31/62] fix(pfs): default SLA if upgrading from legacy branch --- contracts/apps/WitPriceFeedsUpgradable.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index bce46d16..fc388e71 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -118,6 +118,9 @@ contract WitPriceFeedsUpgradable ); __baseFeeOverheadPercentage = _baseFeeOverheadPercentage; __defaultRadonSLA = _defaultRadonSLA; + } else if (__defaultRadonSLA.maxTallyResultSize < 16) { + // possibly, an upgrade from a previous branch took place: + __defaultRadonSLA.maxTallyResultSize = 16; } } } From 357c753c19d5d5550af454754f5986d0917b6575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 10:22:58 +0200 Subject: [PATCH 32/62] feat(wrb): event IWitOracleLegacy.WitnetQuery --- .../core/base/WitOracleBaseTrustable.sol | 28 +++++++++++++++++++ contracts/interfaces/IWitOracleLegacy.sol | 2 ++ 2 files changed, 30 insertions(+) diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 33c308e0..5ef3c6f7 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -196,6 +196,34 @@ abstract contract WitOracleBaseTrustable ); } + function __postQuery( + address _requester, + uint24 _evmCallbackGasLimit, + uint72 _evmReward, + bytes32 _radHash, + Witnet.RadonSLA memory _sla + ) + virtual override + internal + returns (uint256 _queryId) + { + _queryId = super.__postQuery( + _requester, + _evmCallbackGasLimit, + _evmReward, + _radHash, + _sla + ); + emit IWitOracleLegacy.WitnetQuery( + _queryId, + msg.value, + IWitOracleLegacy.RadonSLA({ + witNumWitnesses: _sla.witNumWitnesses, + witUnitaryReward: _sla.witUnitaryReward + }) + ); + } + function postRequestWithCallback( bytes32 _queryRadHash, IWitOracleLegacy.RadonSLA calldata _querySLA, diff --git a/contracts/interfaces/IWitOracleLegacy.sol b/contracts/interfaces/IWitOracleLegacy.sol index b461f8ba..06b93965 100644 --- a/contracts/interfaces/IWitOracleLegacy.sol +++ b/contracts/interfaces/IWitOracleLegacy.sol @@ -3,6 +3,8 @@ pragma solidity >=0.7.0 <0.9.0; interface IWitOracleLegacy { + event WitnetQuery(uint256 id, uint256 evmReward, RadonSLA witnetSLA); + /// @notice Estimate the minimum reward required for posting a data request. /// @dev Underestimates if the size of returned data is greater than `resultMaxSize`. /// @param gasPrice Expected gas price to pay upon posting the data request. From 253d4ec092a92b46b72b03b84fef615b2596e989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 10:23:40 +0200 Subject: [PATCH 33/62] feat(pfs): IWitFeedsLegacy.latestUpdateResponseStatus(bytes4) --- contracts/apps/WitPriceFeedsUpgradable.sol | 7 +++++++ contracts/interfaces/IWitFeedsLegacy.sol | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index fc388e71..c5b34f9e 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -280,6 +280,13 @@ contract WitPriceFeedsUpgradable return _checkQueryResponseStatus(latestUpdateQueryId(feedId)); } + function latestUpdateResponseStatus(bytes4 feedId) + override public view + returns (Witnet.QueryResponseStatus) + { + return latestUpdateQueryResponseStatus(feedId); + } + function lookupWitOracleRequestBytecode(bytes4 feedId) override public view returns (bytes memory) diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index b2dd9286..08c81215 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -2,13 +2,17 @@ pragma solidity >=0.8.0 <0.9.0; +import "../libs/Witnet.sol"; + interface IWitFeedsLegacy { struct RadonSLA { uint8 witNumWitnesses; uint64 witUnitaryReward; } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); + function latestUpdateResponseStatus(bytes4 feedId) external view returns (Witnet.QueryResponseStatus); function lookupWitnetBytecode(bytes4) external view returns (bytes memory); + function requestUpdate(bytes4, RadonSLA calldata) external payable returns (uint256 usedFunds); function witnet() external view returns (address); } From 7b9c7e45da5eed53428a64f36abd755507f62e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 10:24:31 +0200 Subject: [PATCH 34/62] fix(libs): WitOracleDataLib.getQueryStatus(uint) --- contracts/core/base/WitOracleBase.sol | 12 +++++------- contracts/data/WitOracleDataLib.sol | 8 ++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 04e9cefc..c439bf46 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -537,13 +537,11 @@ abstract contract WitOracleBase _queryId = ++ __storage().nonce; Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); _require(__request.requester == address(0), "already posted"); - { - __request.requester = _requester; - __request.gasCallback = _evmCallbackGasLimit; - __request.evmReward = _evmReward; - __request.radonRadHash = _radHash; - __request.radonSLA = _sla; - } + __request.requester = _requester; + __request.gasCallback = _evmCallbackGasLimit; + __request.evmReward = _evmReward; + __request.radonRadHash = _radHash; + __request.radonSLA = _sla; } /// Returns storage pointer to contents of 'WitOracleDataLib.Storage' struct. diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 0b522351..da49794e 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -251,15 +251,11 @@ library WitOracleDataLib { function getQueryStatus(uint256 queryId) public view returns (Witnet.QueryStatus) { Witnet.Query storage __query = seekQuery(queryId); - if (__query.response.resultTimestamp != 0) { return Witnet.QueryStatus.Finalized; - } else if (__query.block == 0) { - return Witnet.QueryStatus.Unknown; - - } else if (block.number >= __query.block + 64) { - return Witnet.QueryStatus.Expired; + } else if (__query.request.requester != address(0)) { + return Witnet.QueryStatus.Posted; } else { return Witnet.QueryStatus.Posted; From 5c927694b8262d21f5f46b0da4df780602ac5e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 11:31:44 +0200 Subject: [PATCH 35/62] feat(pfs): IWitFeedsLegacy.latestUpdateResponse(bytes4) --- contracts/apps/WitPriceFeedsUpgradable.sol | 7 +++++++ contracts/interfaces/IWitFeedsLegacy.sol | 1 + 2 files changed, 8 insertions(+) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index c5b34f9e..8bde1de1 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -265,6 +265,13 @@ contract WitPriceFeedsUpgradable { return witOracle.getQueryResponse(latestUpdateQueryId(feedId)); } + + function latestUpdateResponse(bytes4 feedId) + override external view + returns (Witnet.QueryResponse memory) + { + return witOracle.getQueryResponse(latestUpdateQueryId(feedId)); + } function latestUpdateResultError(bytes4 feedId) override external view diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index 08c81215..97df5216 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -10,6 +10,7 @@ interface IWitFeedsLegacy { uint64 witUnitaryReward; } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); + function latestUpdateResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory); function latestUpdateResponseStatus(bytes4 feedId) external view returns (Witnet.QueryResponseStatus); function lookupWitnetBytecode(bytes4) external view returns (bytes memory); From d904924eb6e1397497af5b0f90516cb2025a30e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 20:28:49 +0200 Subject: [PATCH 36/62] fix/feat: polish migration scripts --- migrations/addresses.json | 18 +-- migrations/constructorArgs.json | 12 +- migrations/scripts/1_base.js | 6 +- migrations/scripts/2_libs.js | 6 +- migrations/scripts/3_framework.js | 254 +++++++++++++++++++++--------- scripts/vanity2gen.js | 52 +++--- settings/solidity.js | 2 +- settings/specs.js | 5 +- src/utils.js | 31 +++- 9 files changed, 265 insertions(+), 121 deletions(-) diff --git a/migrations/addresses.json b/migrations/addresses.json index af4e7838..9023133d 100644 --- a/migrations/addresses.json +++ b/migrations/addresses.json @@ -2,7 +2,7 @@ "default": { "apps": { "WitPriceFeeds": "0x1111AbA2164AcdC6D291b08DfB374280035E1111", - "WitRandomness": "0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB" + "WitRandomnessV2": "0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB" }, "core": { "WitOracle": "0x77703aE126B971c9946d562F41Dd47071dA00777", @@ -10,17 +10,17 @@ "WitOracleRequestFactory": "0x000DB36997AF1F02209A6F995883B9B699900000" }, "libs": { - "WitOracleDataLib": "0x561A6c8F9C9D6e7EbAEcd4963A8f27Ae13568676", - "WitOracleRadonEncodingLib": "0x268631E002eE8c23F4C124AfBb6fE5DBbaa6d58c", - "WitOracleResultErrorsLib": "0xa57B9dd8420631248c3DFB535f4FC9f7E2f02B4B", - "WitPriceFeedsLib": "0x579b4aD5E67E5B491a33A033A02A70769D7AF837" + "WitOracleDataLib": "0xBb0eAbB3f5936DfA8d3d9A59457B73bBce811829", + "WitOracleRadonEncodingLib": "0x47730caFE285C32BF369fC76791D0165f810dB5d", + "WitOracleResultErrorsLib": "0x50489bD0ad5ab17641A472d007746F07D80D90A4", + "WitPriceFeedsLib": "0xA2d9384Cfd3529D1287Bc06e58897EBb8dfF2E94" }, "WitnetDeployer": "0x03232aBE800D1638B30432FeEF300581De323a4E" }, "conflux:core": { "apps": { "WitPriceFeeds": "0x8ba3C59e1029cd90010e8C731461ddFC5f49091b", - "WitRandomness": "0x897832C89ec306A74f9eC29abfFcaDBfCb11A13B" + "WitRandomnessV2": "0x897832C89ec306A74f9eC29abfFcaDBfCb11A13B" }, "core": { "WitOracle": "0x8346D6ba3b7a04923492007cC3A2eE7135Db7463", @@ -49,7 +49,7 @@ "meter:mainnet": { "apps": { "WitPriceFeeds": "0x27EF7A3e155F96e68A9988EAdBF8bd3eFdba1438", - "WitRandomness": "0x4d239f070e475E454148093781211c9eE34f476C" + "WitRandomnessV2": "0x4d239f070e475E454148093781211c9eE34f476C" }, "core": { "WitOracle": "0x1f28E4d955eccE989c00b3871446AB22B3Fa9Cc8", @@ -67,7 +67,7 @@ "WitnetDeployer": "0xE9D654A97eC431C4f1faba550d0a26399f6fEc80", "apps": { "WitPriceFeeds": "0xD9f5Af15288294678B0863A20F4B83eeeEAa775C", - "WitRandomness": "0x2dE368AFC80b13E4a42990004ebC74ce125486F9" + "WitRandomnessV2": "0x2dE368AFC80b13E4a42990004ebC74ce125486F9" }, "core": { "WitOracle": "0x51e12A16d52DE519f7b13bFeDa42Fb61214d32a0", @@ -92,7 +92,7 @@ "reef": { "apps": { "WitPriceFeeds": "0xA9991dCd62a863f0F0aabF95a6a252d132b5c8D4", - "WitRandomness": "0x84CD0bde18f78101064A2c8b8BaE5e1fCe1BCc0d" + "WitRandomnessV2": "0x84CD0bde18f78101064A2c8b8BaE5e1fCe1BCc0d" }, "core": { "WitOracle": "0x604b98893335CEf7Dc40061731F40aC5C6239907", diff --git a/migrations/constructorArgs.json b/migrations/constructorArgs.json index ee9acbcd..5d914536 100644 --- a/migrations/constructorArgs.json +++ b/migrations/constructorArgs.json @@ -3,10 +3,10 @@ "WitOracleTrustableDefault": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitOracleTrustableOvm2": "000000000000000000000000000db36997af1f02209a6f995883b9b699900000000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31322d61653734633030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitPriceFeedsUpgradable": "00000000000000000000000077703ae126b971c9946d562f41dd47071da007770000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", - "WitnetRandomnessV2": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000f121b71715e71dded592f1125a06d4ed06f0694d", "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleRadonRegistryUpgradableNoSha256": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", - "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" + "WitOracleRequestFactoryDefault": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000000b61fe075f545fd37767f403916582759000000000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", + "WitRandomnessV2": "00000000000000000000000077703ae126b971c9946d562f41dd47071da00777000000000000000000000000f121b71715e71dded592f1125a06d4ed06f0694d" }, "arbitrum:one": { "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", @@ -57,13 +57,13 @@ "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "0000000000000000000000008dadc231c8c810cbbe2d555338bda94da648f96400000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitPriceFeedsUpgradable": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", - "WitnetRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" + "WitRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "conflux:core:testnet": { "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db746300000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleTrustableDefault": "0000000000000000000000008dadc231c8c810cbbe2d555338bda94da648f96400000000000000000000000085d3e5577f947bca1a12c00940087129a5f8b2eb0000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitPriceFeedsUpgradable": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", - "WitnetRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" + "WitRandomnessV2": "0000000000000000000000008346d6ba3b7a04923492007cc3a2ee7135db74630000000000000000000000001169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "conflux:espace:mainnet": { "WitOracleRadonRegistryUpgradableDefault": "0000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", @@ -136,13 +136,13 @@ "WitOracleRequestFactoryUpgradableConfluxCore": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000ba84d2ffa26c8fc7ef2c5bd4839b4b2e4d56d3300000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000c5074dde3fea0347d3b2e8c38e58e6a34feef8ef000000000000000000000000ba84d2ffa26c8fc7ef2c5bd4839b4b2e4d56d3300000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitPriceFeedsUpgradable": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc80000000000000000000000000000000000000000000000000000000000000001322e302e31342d64313036336562000000000000000000000000000000000000", - "WitnetRandomnessV2": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7" + "WitRandomnessV2": "0000000000000000000000001f28e4d955ecce989c00b3871446ab22b3fa9cc8000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7" }, "meter:testnet": { "WitOracleRequestFactoryDefault": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a000000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", "WitOracleTrustableDefault": "000000000000000000000000d0b4512f4c9291de4104a1ad7be0c51956044bbc00000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3aa000000000000000000000000000000000000000000000000000000000000fef90000000000000000000000000000000000000000000000000000000000010faa0000000000000000000000000000000000000000000000000000000000004e20", "WitPriceFeedsUpgradable": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a00000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000", - "WitnetRandomnessV2": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a0000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7", + "WitRandomnessV2": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a0000000000000000000000000e169bf81ecf738d02fd8d3824dfe02153b334ef7", "WitOracleRequestFactoryUpgradableConfluxCore": "00000000000000000000000051e12a16d52de519f7b13bfeda42fb61214d32a000000000000000000000000087e25ad751306b21f9345494f163122e057b7b530000000000000000000000000000000000000000000000000000000000000001322e302e31342d34386336646436000000000000000000000000000000000000" }, "moonbeam:moonbase": { diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index 50ef63d4..214345d8 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -23,9 +23,9 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { const WitnetDeployer = artifacts.require(impl) const metadata = JSON.parse(WitnetDeployer.metadata) console.info(" ", "> compiler: ", metadata.compiler.version) - console.info(" ", "> compilation target:", metadata.settings.compilationTarget) - console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) + console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) + console.info(" ", "> code source path: ", metadata.settings.compilationTarget) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetDeployer.toJSON().deployedBytecode)) await truffleDeployer.deploy(WitnetDeployer, { from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), @@ -52,7 +52,7 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { const WitnetProxy = artifacts.require("WitnetProxy") const metadata = JSON.parse(WitnetProxy.metadata) console.info(" ", "> compiler: ", metadata.compiler.version) - console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) + console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetProxy.toJSON().deployedBytecode)) } diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index e37971de..65ef85aa 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -31,7 +31,11 @@ module.exports = async function (_, network, [, from]) { (libTargetAddr !== libNetworkAddr && process.argv.includes("--upgrade-all")) ) { if (libTargetCode.length < 3) { - utils.traceHeader(`Deploying '${impl}'...`) + if (utils.isNullAddress(libNetworkAddr)) { + utils.traceHeader(`Deploying '${impl}'...`) + } else { + utils.traceHeader(`Upgrading '${impl}'...`) + } utils.traceTx(await deployer.deploy(libInitCode, "0x0", { from })) if ((await web3.eth.getCode(libTargetAddr)).length < 3) { console.info(`Error: Library was not deployed on expected address: ${libTargetAddr}`) diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index a452cbc3..0c8f1968 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -1,4 +1,5 @@ const ethUtils = require("ethereumjs-util") +const fs = require("fs") const merge = require("lodash.merge") const settings = require("../../settings") const utils = require("../../src/utils") @@ -12,7 +13,6 @@ const selection = utils.getWitnetArtifactsFromArgs() const WitnetDeployer = artifacts.require("WitnetDeployer") const WitnetProxy = artifacts.require("WitnetProxy") -const WitnetUpgradableBase = artifacts.require("WitnetUpgradableBase") module.exports = async function (_, network, [, from, reporter, curator]) { @@ -29,6 +29,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { // Settle WitOracle as first dependency on all Wit/oracle appliances framework.apps.forEach(appliance => { + if (!networkSpecs[appliance]) networkSpecs[appliance] = {} networkSpecs[appliance].baseDeps = merge([], networkSpecs[appliance]?.baseDeps, ["WitOracle"]) }) @@ -55,18 +56,24 @@ module.exports = async function (_, network, [, from, reporter, curator]) { console.info(`Mismatching inheriting artifact names on settings/artifacts.js: ${base} ` está especificado let targetBaseAddr = utils.getNetworkArtifactAddress(network, domain, addresses, base) if ( - domain !== "core" && - !selection.includes(base) && !selection.includes(impl) && !process.argv.includes(`--${domain}`) && - (utils.isNullAddress(targetBaseAddr) || (await web3.eth.getCode(targetBaseAddr)).length < 3) + domain !== "core" && + !selection.includes(base) && !selection.includes(base) && utils.isUpgradableArtifact(impl) && + (utils.isNullAddress(targetBaseAddr) || (await web3.eth.getCode(targetBaseAddr)).length < 3) && + !process.argv.includes(`--${domain}`) ) { // skip dapps that haven't yet been deployed, not have they been selected from command line continue } else { if (first) { - console.info(`\n \x1b[1;39;4${color}m`, domain.toUpperCase(), "ARTIFACTS", " ".repeat(106 - domain.length), "\x1b[0m") + console.info(`\n \x1b[1;39;4${color}m`, domain.toUpperCase(), "ARTIFACTS", " ".repeat(101 - domain.length), "\x1b[0m") first = false } } @@ -74,14 +81,13 @@ module.exports = async function (_, network, [, from, reporter, curator]) { const baseArtifact = artifacts.require(base) const implArtifact = artifacts.require(impl) - const targetSpecs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) - let targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) - const targetCode = await web3.eth.getCode(targetAddr) - const targetVersion = getArtifactVersion(impl, targetSpecs.baseLibs, networkArtifacts) + if (utils.isUpgradableArtifact(impl)) { + + const targetSpecs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) + const targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) + const targetCode = await web3.eth.getCode(targetAddr) + const targetVersion = getArtifactVersion(impl, targetSpecs.baseLibs, networkArtifacts) - if (targetSpecs.isUpgradable) { - - let proxyImplAddr; if (!utils.isNullAddress(targetBaseAddr) && (await web3.eth.getCode(targetBaseAddr)).length > 3) { // a proxy address with actual code is found in the addresses file... try { @@ -121,24 +127,22 @@ module.exports = async function (_, network, [, from, reporter, curator]) { // and whether an upgrade should be perform... const legacy = await implArtifact.at(proxyImplAddr) const legacyVersion = await legacy.version.call({ from: targetSpecs.from }) - const targetVersion = getArtifactVersion(impl) let skipUpgrade = false, upgradeProxy = ( targetAddr !== proxyImplAddr && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) ); if (upgradeProxy && !utils.isDryRun(impl)) { - if (versionLastCommitOf(targetVersion) === versionLastCommitOf(legacyVersion)) { - upgradeProxy = false; - skipUpgrade = true; - } else if (!selection.includes(base) && !process.argv.includes("--upgrade-all")) { - upgradeProxy = false; + if (!selection.includes(base) && !process.argv.includes("--upgrade-all")) { + if (versionLastCommitOf(targetVersion) === versionLastCommitOf(legacyVersion)) { skipUpgrade = true; + } + upgradeProxy = false; } } if (upgradeProxy) { if (targetCode.length < 3) { - targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts, legacyVersion) + await deployTarget(network, impl, targetSpecs, networkArtifacts, legacyVersion) } utils.traceHeader(`Upgrading '${base}'...`) await upgradeCoreBase(baseArtifact.address, targetSpecs, targetAddr) @@ -146,13 +150,23 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } else { utils.traceHeader(`Upgradable '${base}'`) - if (versionLastCommitOf(targetVersion) === versionLastCommitOf(legacyVersion)) { - console.info(` > \x1b[${skipUpgrade ? "31" : "90"}mPlease, commit your changes before upgrading.\x1b[0m`) - } else if (selection.includes(base) || process.argv.includes("--upgrade-all")) { - console.info(` > \x1b[90mSorry, nothing to upgrade.\x1b[0m`) + if (skipUpgrade) { + console.info(` > \x1b[91mPlease, commit your changes before upgrading!\x1b[0m`) + + } else if ( + selection.includes(base) + && versionCodehashOf(targetVersion) === versionCodehashOf(legacyVersion) + ) { + console.info(` > \x1b[91mSorry, nothing to upgrade.\x1b[0m`) + + } else if ( + versionTagOf(targetVersion) === versionTagOf(legacyVersion) + && versionLastCommitOf(targetVersion) !== versionLastCommitOf(legacyVersion) + && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) + ) { + console.info(` > \x1b[90mPlease, consider bumping up the package version.\x1b[0m`) } } - if ( targetAddr !== implArtifact.address && versionTagOf(targetVersion) === versionTagOf(legacyVersion) @@ -169,58 +183,95 @@ module.exports = async function (_, network, [, from, reporter, curator]) { implArtifact.address, "\x1b[0m" ) } + await traceDeployedContractInfo(await implArtifact.at(baseArtifact.address), from, targetVersion) } else { - if (targetCode.length < 3) { - targetAddr = await deployTarget(network, impl, targetSpecs, networkArtifacts) - } - utils.traceHeader(`Immutable '${base}'`) - if ( - selection.includes(impl) || utils.isNullAddress(targetBaseAddr) || - (await web3.eth.getCode(targetBaseAddr)).length < 3 - ) { - baseArtifact.address = targetAddr - implArtifact.address = targetAddr - if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { - console.info(" ", - `> contract address: \x1b[3${color}m ${targetBaseAddr} \x1b[0m==>`, - `\x1b[9${color}m${targetAddr}\x1b[0m` + + // create an array of implementations, including the one set up for current base, + // but also all others in this network addresses file that share the same base + // and have actual deployed code: + const targets = [ + ...utils.getNetworkBaseImplArtifactAddresses(network, domain, addresses, base) + ] + for (const ix in targets) { + const target = targets[ix] + + let targetAddr; + if (target.impl === impl) { + target.specs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) + targetAddr = await determineTargetAddr(impl, target.specs, networkArtifacts) + } + if ( + selection.includes(target.impl) && + (target.impl === impl || utils.isNullAddress(target.addr) || (await web3.eth.getCode(target.addr)).length < 3) + ) { + if (target.impl !== impl) { + if (!fs.existsSync(`../frosts/${domain}/${target.impl}.json`)) { + traceHeader(`Legacy '${target.impl}'`) + console.info(" ", `> \x1b[91mMissing migrations/frosts/${domain}/${target.impl}.json\x1b[0m`) + continue; + } else { + fs.writeFileSync( + `build/contracts/${target.impl}.json`, + fs.readFileSync(`migrations/frosts/${target.impl}.json`), + { encoding: "utf8", flag: "w" } + ) + targetAddr = target.addr + target.addr = await defrostTarget(network, target.impl, target.specs, target.addr) + } + } else { + target.addr = await deployTarget(network, impl, target.specs, networkArtifacts) + } + // settle immutable implementation address in addresses file + addresses = await settleArtifactAddress(addresses, network, domain, impl, target.addr) + } else if ((utils.isNullAddress(target.addr) || (await web3.eth.getCode(target.addr)).length < 3)) { + // skip targets for which no address or code is found + continue; + } + utils.traceHeader(`${impl === target.impl ? `Immutable '${base}'` : `Legacy '${target.impl}'`}`) + if (target.impl !== impl || target.addr === targetAddr) { + console.info(" ", + `> contract address: \x1b[9${color}m`, target.addr, "\x1b[0m" ) } else { - console.info(" ", `> contract address: \x1b[9${color}m`, targetAddr, "\x1b[0m") - } - } else { - baseArtifact.address = targetBaseAddr - implArtifact.address = targetBaseAddr - if (!utils.isNullAddress(targetBaseAddr) && targetBaseAddr !== targetAddr) { console.info(" ", - `> contract address: \x1b[9${color}m ${targetBaseAddr}\x1b[0m !==`, + `> contract address: \x1b[9${color}m ${target.addr}\x1b[0m !==`, `\x1b[41m${targetAddr}\x1b[0m` ) - } else { - console.info(" ", `> contract address: \x1b[9${color}m ${targetAddr}\x1b[0m`) } - } - addresses = await saveAddresses(addresses, network, domain, base, baseArtifact.address) - } - const core = await implArtifact.at(baseArtifact.address) - try { - console.info(" ", "> contract curator: \x1b[35m", await core.owner.call({ from }), "\x1b[0m") - } catch {} - console.info(" ", "> contract class: \x1b[1;39m", await core.class.call({ from }), "\x1b[0m") - try { - const deployedVersion = await core.version.call({ from }) - if (versionCodehashOf(deployedVersion) !== versionCodehashOf(getArtifactVersion(impl))) { - console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)} !== \x1b[93m${version}\x1b[0m`) - } else { - console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)}`) - } - } catch {} - console.info(" ", "> contract specs: ", await core.specs.call({ from }), "\x1b[0m") - console.info() + if (target.impl === impl) { + baseArtifact.address = target.addr + implArtifact.address = target.addr + } + await traceDeployedContractInfo(await baseArtifact.at(target.addr), from) + } // for targets + } // !targetSpecs.isUpgradable + } // for bases + } // for domains +} + +async function traceDeployedContractInfo(contract, from, targetVersion) { + try { + console.info(" ", "> contract oracle: \x1b[96m", await contract.witOracle.call({ from }), "\x1b[0m") + } catch {} + try { + console.info(" ", "> contract curator: \x1b[35m", await contract.owner.call({ from }), "\x1b[0m") + } catch {} + console.info(" ", "> contract class: \x1b[1;39m", await contract.class.call({ from }), "\x1b[0m") + try { + const deployedVersion = await contract.version.call({ from }) + // if (versionTagOf(deployedVersion) !== versionTagOf(getArtifactVersion(impl))) { + // if (deployedVersion !== targetVersion) { + if (targetVersion && versionCodehashOf(deployedVersion) !== versionCodehashOf(targetVersion)) { + console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)} !== \x1b[93m${targetVersion}\x1b[0m`) + } else { + console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)}`) } - } + } catch {} + console.info(" ", "> contract specs: ", await contract.specs.call({ from }), "\x1b[0m") + console.info() } + async function deployCoreBase (targetSpecs, targetAddr) { const deployer = await WitnetDeployer.deployed() const proxyInitArgs = targetSpecs.mutables @@ -232,7 +283,7 @@ async function deployCoreBase (targetSpecs, targetAddr) { utils.traceHeader("Deploying new 'WitnetProxy'...") const initdata = proxyInitArgs ? web3.eth.abi.encodeParameters(proxyInitArgs.types, proxyInitArgs.values) : "0x" if (initdata.length > 2) { - console.info(" ", "> initdata types: \x1b[90m", proxyInitArgs.types, "\x1b[0m") + console.info(" ", "> initdata types: \x1b[90m", JSON.stringify(proxyInitArgs.types), "\x1b[0m") utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") } utils.traceTx(await deployer.proxify(proxySalt, targetAddr, initdata, { from: targetSpecs.from })) @@ -250,7 +301,7 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { : "0x" ) if (initdata.length > 2) { - console.info(" ", "> initdata types: \x1b[90m", targetSpecs.mutables.types, "\x1b[0m") + console.info(" ", "> initdata types: \x1b[90m", JSON.stringify(targetSpecs.mutables.types), "\x1b[0m") utils.traceData(" > initdata values: ", initdata.slice(2), 64, "\x1b[90m") } const proxy = await WitnetProxy.at(proxyAddr) @@ -258,6 +309,45 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { return proxyAddr } +async function defrostTarget (network, target, targetSpecs, targetAddr) { + const deployer = WitnetDeployer.deployed() + const artifact = artifacts.require(target) + const defrostCode = artifact.bytecode + if (defrostCode.indexOf("__") > -1) { + console.info(`Cannot defrost '${target}: external libs not yet supported.`) + process.exit(1) + } + const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") + const defrostConstructorArgs = constructorArgs[network][target] || constructorArgs.default[target] || "" + const defrostInitCode = targetCode + defrostConstructorArgs + const defrostSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") + const defrostAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) + if (defrostAddr !== targetAddr) { + console.info(`Cannot defrost '${target}: irreproducible address: ${defrostAddr} != ${targetAddr}`) + process.exit(1) + } else { + utils.traceHeader(`Defrosted ${target.impl}`) + const metadata = JSON.parse(target.artifact.metadata) + console.info(" ", "> compiler: ", metadata.compiler.version) + console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) + console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) + console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(target.artifact.toJSON().deployedBytecode)) + } + try { + utils.traceHeader(`Deploying '${target}'...`) + if (defrostConstructorArgs.length > 0) { + console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") + utils.traceData(" > constructor values: ", defrostConstructorArgs, 64, "\x1b[90m") + } + utils.traceTx(await deployer.deploy(defrostInitCode, defrostSalt, { from: targetSpecs.from })) + } catch (ex) { + console.info(`Cannot defrost '${target}': deployment failed:`) + console.log(ex) + process.exit(1) + } + return defrostAddr +} + async function deployTarget (network, target, targetSpecs, networkArtifacts, legacyVersion) { const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") const deployer = await WitnetDeployer.deployed() @@ -266,9 +356,16 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts, leg const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) utils.traceHeader(`Deploying '${target}'...`) - if (legacyVersion && legacyVersion.slice(-7) === version.slice(-7)) { + if (targetSpecs.isUpgradable && versionLastCommitOf(legacyVersion) && legacyVersion.slice(-7) === version.slice(-7)) { console.info( ` > \x1b[41mWARNING:\x1b[0m \x1b[31mLatest changes were not committed into Github!\x1b[0m`) } + if (targetSpecs?.baseLibs && Array.isArray(targetSpecs.baseLibs)) { + for (const index in targetSpecs.baseLibs) { + const libBase = targetSpecs.baseLibs[index] + const libImpl = networkArtifacts.libs[libBase] + console.info(" ", `> external library: \x1b[92m${libImpl}\x1b[0m @ \x1b[32m${artifacts.require(libImpl).address}\x1b[0m`) + } + } if (targetSpecs?.constructorArgs?.types.length > 0) { console.info(" ", "> constructor types: \x1b[90m", JSON.stringify(targetSpecs.constructorArgs.types), "\x1b[0m") utils.traceData(" > constructor values: ", targetConstructorArgs, 64, "\x1b[90m") @@ -276,7 +373,8 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts, leg try { utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) } catch (ex) { - console.info(`Error: cannot deploy artifact ${target} on counter-factual address ${targetAddr}:`) + console.info(`Error: cannot deploy artifact ${target} on expected address ${targetAddr}:`) + console.log(ex) process.exit(1) } if ((await web3.eth.getCode(targetAddr)).length <= 3) { @@ -348,13 +446,13 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } -async function saveAddresses(addresses, network, domain, base, addr) { - if (!addresses[network]) addresses[network] = {} - if (!addresses[network][domain]) addresses[network][domain] = {} - addresses[network][domain][base] = addr - await utils.overwriteJsonFile("./migrations/addresses.json", addresses) - return addresses -} +// async function saveAddresses(addresses, network, domain, base, addr) { +// if (!addresses[network]) addresses[network] = {} +// if (!addresses[network][domain]) addresses[network][domain] = {} +// addresses[network][domain][base] = addr +// await utils.overwriteJsonFile("./migrations/addresses.json", addresses) +// return addresses +// } async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] diff --git a/scripts/vanity2gen.js b/scripts/vanity2gen.js index e535b72a..020e2ef1 100644 --- a/scripts/vanity2gen.js +++ b/scripts/vanity2gen.js @@ -6,7 +6,7 @@ const addresses = require("../migrations/addresses") const constructorArgs = require("../migrations/constructorArgs.json") module.exports = async function () { - let artifact + let artifactName let count = 0 let from let hits = 10 @@ -19,7 +19,7 @@ module.exports = async function () { if (argv === "--offset") { offset = parseInt(args[index + 1]) } else if (argv === "--artifact") { - artifact = artifacts.require(args[index + 1]) + artifactName = args[index + 1] } else if (argv === "--prefix") { prefix = args[index + 1].toLowerCase() if (!web3.utils.isHexStrict(prefix)) { @@ -45,27 +45,31 @@ module.exports = async function () { } return argv }) - try { - from = from || addresses[network]?.WitnetDeployer || addresses.default.WitnetDeployer - if (hexArgs === "" && artifact !== "") { - hexArgs = constructorArgs[network][artifact] + if (hexArgs === "" && artifactName !== "") { + hexArgs = constructorArgs[network][artifactName] + if (!hexArgs) { + console.error("No --hexArgs was set!") + exit() + } + } + from = from || addresses[network]?.WitnetDeployer || addresses.default?.WitnetDeployer + if (!from) { + console.error("No --from was set!") + exit() + } + if (hexArgs === "" && artifactName !== "") { + console.log(network, constructorArgs[network], constructorArgs[network][artifactName]) + hexArgs = constructorArgs[network][artifactName] + if (!hexArgs) { + console.error("No --hexArgs was set!") + exit() } - } catch { - console.error(`WitnetDeployer must have been previously deployed on network '${network}'.\n`) - console.info("Usage:\n") - console.info(" --artifact => Truffle artifact name (mandatory)") - console.info(" --hexArgs => Hexified constructor arguments") - console.info(" --hits => Number of vanity hits to look for (default: 10)") - console.info(" --network => Network name") - console.info(" --offset => Salt starting value minus 1 (default: 0)") - console.info(" --prefix => Prefix hex string to look for (default: 0x00)") - console.info(" --suffix => suffix hex string to look for (default: 0x00)") - process.exit(1) } - if (!artifact) { + if (!artifactName) { console.error("No --artifact was set!") process.exit(1) } + const artifact = artifacts.require(artifactName) const initCode = artifact.toJSON().bytecode + hexArgs console.log("Init code: ", initCode) console.log("Artifact: ", artifact?.contractName) @@ -88,3 +92,15 @@ module.exports = async function () { offset++ } } + +function exit() { + console.info("Usage:\n") + console.info(" --artifact => Truffle artifact name (mandatory)") + console.info(" --hexArgs => Hexified constructor arguments") + console.info(" --hits => Number of vanity hits to look for (default: 10)") + console.info(" --network => Network name") + console.info(" --offset => Salt starting value minus 1 (default: 0)") + console.info(" --prefix => Prefix hex string to look for (default: 0x00)") + console.info(" --suffix => suffix hex string to look for (default: 0x00)") + process.exit(1) +} diff --git a/settings/solidity.js b/settings/solidity.js index d36c0692..aa764479 100644 --- a/settings/solidity.js +++ b/settings/solidity.js @@ -1,6 +1,6 @@ module.exports = { default: { - version: "0.8.27", + version: "0.8.25", settings: { optimizer: { enabled: true, diff --git a/settings/specs.js b/settings/specs.js index f7961b8b..3d32a8b1 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -49,9 +49,12 @@ module.exports = { from: "0xF121b71715E71DDeD592F1125a06D4ED06F0694D", vanity: 1865150170, // 0x1111AbA2164AcdC6D291b08DfB374280035E1111 }, - WitRandomness: { + WitRandomnessV2: { vanity: 1060132513, // 0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB }, + WitRandomnessV21: { + vanity: 127210, // 0xFfd88EFa76a7ee79BAE373798A10AD617dD5eCFf + } }, reef: { WitOracle: { diff --git a/src/utils.js b/src/utils.js index ef092733..ad375c56 100644 --- a/src/utils.js +++ b/src/utils.js @@ -9,6 +9,7 @@ module.exports = { getNetworkAppsArtifactAddress, getNetworkArtifactAddress, getNetworkBaseArtifactAddress, + getNetworkBaseImplArtifactAddresses, getNetworkCoreArtifactAddress, getNetworkLibsArtifactAddress, getNetworkTagsFromString, @@ -71,6 +72,28 @@ function getNetworkArtifactAddress (network, domain, addresses, artifact) { return addresses?.default[domain][artifact] ?? "" } +function getNetworkBaseImplArtifactAddresses (network, domain, addresses, base, exception) { + const entries = [] + const tags = [ "default", ...getNetworkTagsFromString(network)] + for (const index in tags) { + const network = tags[index] + if (addresses[network] && addresses[network][domain]) { + Object.keys(addresses[network][domain]).forEach(impl => { + if ( + (!exception || impl !== exception) && + impl !== base && + impl.indexOf(base) == 0 && + addresses[network][domain][impl] && + !entries.map(entry => entry?.impl).includes(impl) + ) { + entries.push({ impl, addr: addresses[network][domain][impl] }) + } + }) + } + } + return entries +} + function getNetworkCoreArtifactAddress (network, addresses, artifact) { const tags = getNetworkTagsFromString(network) for (const index in tags) { @@ -227,9 +250,9 @@ function traceData (header, data, width, color) { } function traceHeader (header) { - console.log("") - console.log(" ", header) - console.log(" ", `${"-".repeat(header.length)}`) + console.info("") + console.info(" ", header) + console.info(" ", `${"-".repeat(header.length)}`) } function traceTx (tx) { @@ -250,7 +273,7 @@ function traceTx (tx) { } function traceVerify (network, verifyArgs) { - console.log( + console.info( execSync( `npx truffle run verify --network ${network} ${verifyArgs} ${process.argv.slice(3)}`, { stdout: "inherit" } From 0de4f7112f710d11be86288a1576be609e0e1ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 20:32:57 +0200 Subject: [PATCH 37/62] chore: remove source path from frosted artifacts --- migrations/frosts/WitnetDeployer.json | 1 - migrations/frosts/WitnetDeployerConfluxCore.json | 1 - migrations/frosts/WitnetDeployerMeter.json | 1 - migrations/frosts/WitnetProxy.json | 1 - migrations/scripts/1_base.js | 2 +- migrations/scripts/3_framework.js | 9 +-------- scripts/prepare.js | 4 ++++ 7 files changed, 6 insertions(+), 13 deletions(-) diff --git a/migrations/frosts/WitnetDeployer.json b/migrations/frosts/WitnetDeployer.json index ac9d4b83..65bc7885 100644 --- a/migrations/frosts/WitnetDeployer.json +++ b/migrations/frosts/WitnetDeployer.json @@ -5981,7 +5981,6 @@ "sourceMap": "356:2917:18:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "356:2917:18:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:159;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;2119:159:18;;;;;;;900:448;;;;;;:::i;:::-;;:::i;2286:982::-;;;;;;:::i;:::-;;:::i;1694:417::-;;;;;;:::i;:::-;;:::i;2119:159::-;2210:7;2242:28;2264:5;2242:21;:28::i;:::-;2235:35;2119:159;-1:-1:-1;;2119:159:18:o;900:448::-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;2286:982;2422:11;2451:18;2472:30;2491:10;2472:18;:30::i;:::-;2451:51;;2517:10;-1:-1:-1;;;;;2517:22:18;;2543:1;2517:27;2513:748;;2600:58;2615:10;2627:30;;;;;;;;:::i;:::-;-1:-1:-1;;2627:30:18;;;;;;;;;;;;;;2600:14;:58::i;:::-;;2746:10;-1:-1:-1;;;;;2726:42:18;;2787:20;2978:10;3076:9;2876:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2726:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3161:10:18;-1:-1:-1;3134:39:18;;2513:748;3206:43;;-1:-1:-1;;;3206:43:18;;4095:2:103;3206:43:18;;;4077:21:103;4134:2;4114:18;;;4107:30;4173:34;4153:18;;;4146:62;-1:-1:-1;;;4224:18:103;;;4217:31;4265:19;;3206:43:18;3893:397:103;2286:982:18;;;;;;:::o;1694:417::-;2036:20;;;;;;;1898:177;;;-1:-1:-1;;;;;;1898:177:18;;;4506:39:103;1980:4:18;4582:2:103;4578:15;-1:-1:-1;;4574:53:103;4561:11;;;4554:74;4644:12;;;4637:28;;;;4681:12;;;;4674:28;;;;1898:177:18;;;;;;;;;;4718:12:103;;;;1898:177:18;;;1870:220;;;;;;1694:417::o;5013:1163:75:-;2439:24;;;;;;;;;;;-1:-1:-1;;;2439:24:75;;;;;5227:216;;-1:-1:-1;;;;;;5227:216:75;;;5027:26:103;5320:4:75;5090:2:103;5086:15;;;-1:-1:-1;;5082:53:103;;;5069:11;;;5062:74;5152:12;;;5145:28;;;;2429:35:75;5189:12:103;;;;5182:28;;;;5227:216:75;;;;;;;;;;5226:12:103;;;5227:216:75;;5191:275;;;;;;-1:-1:-1;;;5643:457:75;;;5580:28:103;5641:15;;5637:53;;;5624:11;;;5617:74;-1:-1:-1;;;5707:12:103;;;5700:33;5643:457:75;;;;;;;;;5749:12:103;;;;5643:457:75;;;5607:516;;;;;;5013:1163::o;2865:167::-;2961:7;2993:31;3000:5;3007:13;3022:1;3626:17;3710:20;3724:5;3710:13;:20::i;:::-;3698:32;-1:-1:-1;;;;;;3745:21:75;;;:26;3741:72;;3773:40;;-1:-1:-1;;;3773:40:75;;5974:2:103;3773:40:75;;;5956:21:103;6013:2;5993:18;;;5986:30;6052:32;6032:18;;;6025:60;6102:18;;3773:40:75;5772:354:103;3741:72:75;3912:24;;;;;;;;;;;;;-1:-1:-1;;;3912:24:75;;;;;;3853:16;;3912:24;4254:5;;3853:16;4191:69;4179:81;-1:-1:-1;;;;;;4289:22:75;;4281:66;;;;-1:-1:-1;;;4281:66:75;;6333:2:103;4281:66:75;;;6315:21:103;6372:2;6352:18;;;6345:30;6411:33;6391:18;;;6384:61;6462:18;;4281:66:75;6131:355:103;4281:66:75;4409:13;4428:8;-1:-1:-1;;;;;4428:13:75;4449:6;4457:13;4428:43;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4408:63;;;4490:8;:38;;;;-1:-1:-1;;;;;;4502:21:75;;;:26;;4490:38;4482:81;;;;-1:-1:-1;;;4482:81:75;;6985:2:103;4482:81:75;;;6967:21:103;7024:2;7004:18;;;6997:30;7063:32;7043:18;;;7036:60;7113:18;;4482:81:75;6783:354:103;4482:81:75;3650:921;;;3515:1056;;;;;:::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:250::-;2945:1;2955:113;2969:6;2966:1;2963:13;2955:113;;;3045:11;;;3039:18;3026:11;;;3019:39;2991:2;2984:10;2955:113;;;-1:-1:-1;;3102:1:103;3084:16;;3077:27;2860:250::o;3115:491::-;3319:1;3315;3310:3;3306:11;3302:19;3294:6;3290:32;3279:9;3272:51;3359:2;3354;3343:9;3339:18;3332:30;3253:4;3391:6;3385:13;3434:6;3429:2;3418:9;3414:18;3407:34;3450:79;3522:6;3517:2;3506:9;3502:18;3497:2;3489:6;3485:15;3450:79;:::i;:::-;3590:2;3569:15;-1:-1:-1;;3565:29:103;3550:45;;;;3597:2;3546:54;;3115:491;-1:-1:-1;;;3115:491:103:o;3611:277::-;3678:6;3731:2;3719:9;3710:7;3706:23;3702:32;3699:52;;;3747:1;3744;3737:12;3699:52;3779:9;3773:16;3832:5;3825:13;3818:21;3811:5;3808:32;3798:60;;3854:1;3851;3844:12;6491:287;6620:3;6658:6;6652:13;6674:66;6733:6;6728:3;6721:4;6713:6;6709:17;6674:66;:::i;:::-;6756:16;;;;;6491:287;-1:-1:-1;;6491:287:103:o", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetProxy.sol\";\r\n\r\nimport \"../libs/Create3.sol\";\r\n\r\n/// @notice WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, \r\n/// @notice and CREATE3 (EIP-3171) factory for Witnet proxies.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployer {\r\n\r\n /// @notice Use given `_initCode` and `_salt` to deploy a contract into a deterministic address. \r\n /// @dev The address of deployed address will be determined by both the `_initCode` and the `_salt`, but not the address\r\n /// @dev nor the nonce of the caller (i.e. see EIP-1014). \r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return _deployed Just deployed contract address.\r\n function deploy(bytes memory _initCode, bytes32 _salt)\r\n virtual public\r\n returns (address _deployed)\r\n {\r\n _deployed = determineAddr(_initCode, _salt);\r\n if (_deployed.code.length == 0) {\r\n assembly {\r\n _deployed := create2(0, add(_initCode, 0x20), mload(_initCode), _salt)\r\n }\r\n require(_deployed != address(0), \"WitnetDeployer: deployment failed\");\r\n }\r\n }\r\n\r\n /// @notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return Deterministic contract address.\r\n function determineAddr(bytes memory _initCode, bytes32 _salt)\r\n virtual public view\r\n returns (address)\r\n {\r\n return address(\r\n uint160(uint(keccak256(\r\n abi.encodePacked(\r\n bytes1(0xff),\r\n address(this),\r\n _salt,\r\n keccak256(_initCode)\r\n )\r\n )))\r\n );\r\n }\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual public view\r\n returns (address)\r\n {\r\n return Create3.determineAddr(_salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n Create3.deploy(_proxySalt, type(WitnetProxy).creationCode);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployer: already proxified\");\r\n }\r\n }\r\n\r\n}", - "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployer.sol", "ast": { "absolutePath": "project:/contracts/core/WitnetDeployer.sol", "exportedSymbols": { diff --git a/migrations/frosts/WitnetDeployerConfluxCore.json b/migrations/frosts/WitnetDeployerConfluxCore.json index ebea5527..8b97d268 100644 --- a/migrations/frosts/WitnetDeployerConfluxCore.json +++ b/migrations/frosts/WitnetDeployerConfluxCore.json @@ -4488,7 +4488,6 @@ "sourceMap": "368:2175:19:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "368:2175:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1335:201;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;1335:201:19;;;;;;;900:448:18;;;;;;:::i;:::-;;:::i;1544:994:19:-;;;;;;:::i;:::-;;:::i;768:559::-;;;;;;:::i;:::-;;:::i;1335:201::-;1444:7;1476:52;1490:30;;;;;;;;:::i;:::-;-1:-1:-1;;1490:30:19;;;;;;;;;;;;;;1522:5;1476:13;:52::i;:::-;1469:59;1335:201;-1:-1:-1;;1335:201:19:o;900:448:18:-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;1544:994:19;1689:11;1718:18;1739:30;1758:10;1739:18;:30::i;:::-;1718:51;;1784:10;-1:-1:-1;;;;;1784:22:19;;1810:1;1784:27;1780:751;;1867:50;1874:30;;;;;;;;:::i;:::-;-1:-1:-1;;1874:30:19;;;;;;;;;;;;;;1906:10;1867:6;:50::i;:::-;;2005:10;-1:-1:-1;;;;;1985:42:19;;2046:20;2237:10;2335:9;2135:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1985:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2420:10:19;-1:-1:-1;2393:39:19;;1780:751;2465:54;;-1:-1:-1;;;2465:54:19;;3992:2:103;2465:54:19;;;3974:21:103;4031:2;4011:18;;;4004:30;4070:34;4050:18;;;4043:62;-1:-1:-1;;;4121:18:103;;;4114:42;4173:19;;2465:54:19;3790:408:103;1544:994:19;;;;;;:::o;768:559::-;1129:20;;;;;;;991:177;;;-1:-1:-1;;;;;;991:177:19;;;4414:39:103;1073:4:19;4490:2:103;4486:15;-1:-1:-1;;4482:53:103;4469:11;;;4462:74;4552:12;;;4545:28;;;;4589:12;;;;4582:28;;;;991:177:19;;;;;;;;;;4626:12:103;;;;991:177:19;;;963:220;;;;;-1:-1:-1;;;;;950:289:19;-1:-1:-1;;;949:359:19;;768:559::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:643::-;3064:1;3060;3055:3;3051:11;3047:19;3039:6;3035:32;3024:9;3017:51;2998:4;3087:2;3125;3120;3109:9;3105:18;3098:30;3157:6;3151:13;3200:6;3195:2;3184:9;3180:18;3173:34;3225:1;3235:140;3249:6;3246:1;3243:13;3235:140;;;3344:14;;;3340:23;;3334:30;3310:17;;;3329:2;3306:26;3299:66;3264:10;;3235:140;;;3239:3;3424:1;3419:2;3410:6;3399:9;3395:22;3391:31;3384:42;3494:2;3487;3483:7;3478:2;3470:6;3466:15;3462:29;3451:9;3447:45;3443:54;3435:62;;;;2860:643;;;;;:::o;3508:277::-;3575:6;3628:2;3616:9;3607:7;3603:23;3599:32;3596:52;;;3644:1;3641;3634:12;3596:52;3676:9;3670:16;3729:5;3722:13;3715:21;3708:5;3705:32;3695:60;;3751:1;3748;3741:12", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetDeployer.sol\";\r\n\r\n/// @notice WitnetDeployerConfluxCore contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \r\n/// @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Conflux Core Ecosystem.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployerConfluxCore is WitnetDeployer {\r\n\r\n /// @notice Determine counter-factual address of the contract that would be deployed by the given `_initCode` and a `_salt`.\r\n /// @param _initCode Creation code, including construction logic and input parameters.\r\n /// @param _salt Arbitrary value to modify resulting address.\r\n /// @return Deterministic contract address.\r\n function determineAddr(bytes memory _initCode, bytes32 _salt)\r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return address(\r\n (uint160(uint(keccak256(\r\n abi.encodePacked(\r\n bytes1(0xff),\r\n address(this),\r\n _salt,\r\n keccak256(_initCode)\r\n )\r\n ))) & uint160(0x0fffFFFFFfFfffFfFfFFffFffFffFFfffFfFFFFf)\r\n ) | uint160(0x8000000000000000000000000000000000000000)\r\n );\r\n }\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return determineAddr(type(WitnetProxy).creationCode, _salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual override external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n deploy(type(WitnetProxy).creationCode, _proxySalt);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployerConfluxCore: already proxified\");\r\n }\r\n }\r\n\r\n}", - "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployerConfluxCore.sol", "ast": { "absolutePath": "project:/contracts/core/WitnetDeployerConfluxCore.sol", "exportedSymbols": { diff --git a/migrations/frosts/WitnetDeployerMeter.json b/migrations/frosts/WitnetDeployerMeter.json index 7cbc4a7b..41f2e2bd 100644 --- a/migrations/frosts/WitnetDeployerMeter.json +++ b/migrations/frosts/WitnetDeployerMeter.json @@ -4488,7 +4488,6 @@ "sourceMap": "355:1267:20:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "355:1267:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:201;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:103;;;345:51;;333:2;318:18;411:201:20;;;;;;;900:448:18;;;;;;:::i;:::-;;:::i;620:997:20:-;;;;;;:::i;:::-;;:::i;1694:417:18:-;;;;;;:::i;:::-;;:::i;411:201:20:-;520:7;552:52;566:30;;;;;;;;:::i;:::-;-1:-1:-1;;566:30:20;;;;;;;;;;;;;;598:5;552:13;:52::i;:::-;545:59;411:201;-1:-1:-1;;411:201:20:o;900:448:18:-;997:17;1044:31;1058:9;1069:5;1044:13;:31::i;:::-;1032:43;;1090:9;-1:-1:-1;;;;;1090:21:18;;1115:1;1090:26;1086:255;;1225:5;1213:9;1207:16;1200:4;1189:9;1185:20;1182:1;1174:57;1161:70;-1:-1:-1;;;;;;1268:23:18;;1260:69;;;;-1:-1:-1;;;1260:69:18;;2660:2:103;1260:69:18;;;2642:21:103;2699:2;2679:18;;;2672:30;2738:34;2718:18;;;2711:62;-1:-1:-1;;;2789:18:103;;;2782:31;2830:19;;1260:69:18;;;;;;;;620:997:20;774:11;803:18;824:30;843:10;824:18;:30::i;:::-;803:51;;869:10;-1:-1:-1;;;;;869:22:20;;895:1;869:27;865:745;;952:50;959:30;;;;;;;;:::i;:::-;-1:-1:-1;;959:30:20;;;;;;;;;;;;;;991:10;952:6;:50::i;:::-;;1090:10;-1:-1:-1;;;;;1070:42:20;;1131:20;1322:10;1420:9;1220:228;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1070:393;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;1505:10:20;-1:-1:-1;1478:39:20;;865:745;1550:48;;-1:-1:-1;;;1550:48:20;;3992:2:103;1550:48:20;;;3974:21:103;4031:2;4011:18;;;4004:30;4070:34;4050:18;;;4043:62;-1:-1:-1;;;4121:18:103;;;4114:36;4167:19;;1550:48:20;3790:402:103;620:997:20;;;;;;:::o;1694:417:18:-;2036:20;;;;;;;1898:177;;;-1:-1:-1;;;;;;1898:177:18;;;4408:39:103;1980:4:18;4484:2:103;4480:15;-1:-1:-1;;4476:53:103;4463:11;;;4456:74;4546:12;;;4539:28;;;;4583:12;;;;4576:28;;;;1898:177:18;;;;;;;;;;4620:12:103;;;;1898:177:18;;;1870:220;;;;;;1694:417::o;-1:-1:-1:-;;;;;;;;:::o;14:180:103:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:103;;14:180;-1:-1:-1;14:180:103:o;407:127::-;468:10;463:3;459:20;456:1;449:31;499:4;496:1;489:15;523:4;520:1;513:15;539:718;581:5;634:3;627:4;619:6;615:17;611:27;601:55;;652:1;649;642:12;601:55;688:6;675:20;714:18;751:2;747;744:10;741:36;;;757:18;;:::i;:::-;832:2;826:9;800:2;886:13;;-1:-1:-1;;882:22:103;;;906:2;878:31;874:40;862:53;;;930:18;;;950:22;;;927:46;924:72;;;976:18;;:::i;:::-;1016:10;1012:2;1005:22;1051:2;1043:6;1036:18;1097:3;1090:4;1085:2;1077:6;1073:15;1069:26;1066:35;1063:55;;;1114:1;1111;1104:12;1063:55;1178:2;1171:4;1163:6;1159:17;1152:4;1144:6;1140:17;1127:54;1225:1;1218:4;1213:2;1205:6;1201:15;1197:26;1190:37;1245:6;1236:15;;;;;;539:718;;;;:::o;1262:388::-;1339:6;1347;1400:2;1388:9;1379:7;1375:23;1371:32;1368:52;;;1416:1;1413;1406:12;1368:52;1456:9;1443:23;1489:18;1481:6;1478:30;1475:50;;;1521:1;1518;1511:12;1475:50;1544:49;1585:7;1576:6;1565:9;1561:22;1544:49;:::i;:::-;1534:59;1640:2;1625:18;;;;1612:32;;-1:-1:-1;;;;1262:388:103:o;1655:562::-;1741:6;1749;1757;1810:2;1798:9;1789:7;1785:23;1781:32;1778:52;;;1826:1;1823;1816:12;1778:52;1849:23;;;-1:-1:-1;1922:2:103;1907:18;;1894:32;-1:-1:-1;;;;;1955:31:103;;1945:42;;1935:70;;2001:1;1998;1991:12;1935:70;2024:5;-1:-1:-1;2080:2:103;2065:18;;2052:32;2107:18;2096:30;;2093:50;;;2139:1;2136;2129:12;2093:50;2162:49;2203:7;2194:6;2183:9;2179:22;2162:49;:::i;:::-;2152:59;;;1655:562;;;;;:::o;2860:643::-;3064:1;3060;3055:3;3051:11;3047:19;3039:6;3035:32;3024:9;3017:51;2998:4;3087:2;3125;3120;3109:9;3105:18;3098:30;3157:6;3151:13;3200:6;3195:2;3184:9;3180:18;3173:34;3225:1;3235:140;3249:6;3246:1;3243:13;3235:140;;;3344:14;;;3340:23;;3334:30;3310:17;;;3329:2;3306:26;3299:66;3264:10;;3235:140;;;3239:3;3424:1;3419:2;3410:6;3399:9;3395:22;3391:31;3384:42;3494:2;3487;3483:7;3478:2;3470:6;3466:15;3462:29;3451:9;3447:45;3443:54;3435:62;;;;2860:643;;;;;:::o;3508:277::-;3575:6;3628:2;3616:9;3607:7;3603:23;3599:32;3596:52;;;3644:1;3641;3634:12;3596:52;3676:9;3670:16;3729:5;3722:13;3715:21;3708:5;3705:32;3695:60;;3751:1;3748;3741:12", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"./WitnetDeployer.sol\";\r\n\r\n/// @notice WitnetDeployerMeter contract used both as CREATE2 factory (EIP-1014) for Witnet artifacts, \r\n/// @notice and CREATE3 factory (EIP-3171) for Witnet proxies, on the Meter Ecosystem.\r\n/// @author Guillermo Díaz \r\n\r\ncontract WitnetDeployerMeter is WitnetDeployer {\r\n\r\n function determineProxyAddr(bytes32 _salt) \r\n virtual override\r\n public view\r\n returns (address)\r\n {\r\n return determineAddr(type(WitnetProxy).creationCode, _salt);\r\n }\r\n\r\n function proxify(bytes32 _proxySalt, address _firstImplementation, bytes memory _initData)\r\n virtual override\r\n external \r\n returns (WitnetProxy)\r\n {\r\n address _proxyAddr = determineProxyAddr(_proxySalt);\r\n if (_proxyAddr.code.length == 0) {\r\n // deploy the WitnetProxy\r\n deploy(type(WitnetProxy).creationCode, _proxySalt);\r\n // settle first implementation address,\r\n WitnetProxy(payable(_proxyAddr)).upgradeTo(\r\n _firstImplementation, \r\n // and initialize it, providing\r\n abi.encode(\r\n // the owner (i.e. the caller of this function)\r\n msg.sender,\r\n // and some (optional) initialization data\r\n _initData\r\n )\r\n );\r\n return WitnetProxy(payable(_proxyAddr));\r\n } else {\r\n revert(\"WitnetDeployerMeter: already proxified\");\r\n }\r\n }\r\n\r\n}", - "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetDeployerMeter.sol", "ast": { "absolutePath": "project:/contracts/core/WitnetDeployerMeter.sol", "exportedSymbols": { diff --git a/migrations/frosts/WitnetProxy.json b/migrations/frosts/WitnetProxy.json index 05cd7c47..694c8bc0 100644 --- a/migrations/frosts/WitnetProxy.json +++ b/migrations/frosts/WitnetProxy.json @@ -6042,7 +6042,6 @@ "sourceMap": "264:5139:21:-:0;;;520:17;;;;;;;;;;264:5139;;;;;;", "deployedSourceMap": "264:5139:21:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;746:23;772:16;:14;:16::i;:::-;746:42;;1136:4;1130:11;1176:14;1173:1;1168:3;1155:36;1280:1;1277;1261:14;1256:3;1239:15;1232:5;1219:63;1308:16;1361:4;1358:1;1353:3;1338:28;1387:6;1411:119;;;;1673:4;1668:3;1661:17;1411:119;1505:4;1500:3;1493:17;1781:110;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;178:32:103;;;160:51;;148:2;133:18;1781:110:21;;;;;;;;2185:2793;;;;;;;;;;-1:-1:-1;2185:2793:21;;;;;:::i;:::-;;:::i;:::-;;;1840:14:103;;1833:22;1815:41;;1803:2;1788:18;2185:2793:21;1675:187:103;1781:110:21;5314:66;1855:28;-1:-1:-1;;;;;1855:28:21;;1781:110::o;2185:2793::-;2281:4;-1:-1:-1;;;;;2358:32:21;;2350:77;;;;-1:-1:-1;;;2350:77:21;;2069:2:103;2350:77:21;;;2051:21:103;;;2088:18;;;2081:30;2147:34;2127:18;;;2120:62;2199:18;;2350:77:21;;;;;;;;;2440:26;2469:16;:14;:16::i;:::-;2440:45;-1:-1:-1;;;;;;2500:32:21;;;2496:1298;;2652:18;-1:-1:-1;;;;;2630:40:21;:18;-1:-1:-1;;;;;2630:40:21;;2622:84;;;;-1:-1:-1;;;2622:84:21;;2430:2:103;2622:84:21;;;2412:21:103;2469:2;2449:18;;;2442:30;2508:33;2488:18;;;2481:61;2559:18;;2622:84:21;2228:355:103;2622:84:21;2822:18;-1:-1:-1;;;;;2810:44:21;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2810:46:21;;;;;;;;-1:-1:-1;;2810:46:21;;;;;;;;;;;;:::i;:::-;;;2806:262;;3000:52;;-1:-1:-1;;;3000:52:21;;3072:2:103;3000:52:21;;;3054:21:103;3111:2;3091:18;;;3084:30;3150:34;3130:18;;;3123:62;-1:-1:-1;;;3201:18:103;;;3194:40;3251:19;;3000:52:21;2870:406:103;2806:262:21;2913:13;2905:53;;;;-1:-1:-1;;;2905:53:21;;3483:2:103;2905:53:21;;;3465:21:103;3522:2;3502:18;;;3495:30;3561:29;3541:18;;;3534:57;3608:18;;2905:53:21;3281:351:103;2905:53:21;-1:-1:-1;3272:125:21;;3368:10;3272:125;;;160:51:103;3181:15:21;;;;-1:-1:-1;;;;;3222:31:21;;;133:18:103;;3272:125:21;;;-1:-1:-1;;3272:125:21;;;;;;;;;;;;;;-1:-1:-1;;;;;3272:125:21;-1:-1:-1;;;3272:125:21;;;3222:190;;;3272:125;3222:190;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3180:232;;;;3435:10;3427:62;;;;-1:-1:-1;;;3427:62:21;;;;;;;:::i;:::-;3523:7;3512:27;;;;;;;;;;;;:::i;:::-;3504:67;;;;-1:-1:-1;;;3504:67:21;;4794:2:103;3504:67:21;;;4776:21:103;4833:2;4813:18;;;4806:30;4872:29;4852:18;;;4845:57;4919:18;;3504:67:21;4592:351:103;3504:67:21;3675:18;-1:-1:-1;;;;;3663:45:21;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3624:18;-1:-1:-1;;;;;3612:45:21;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:98;3586:196;;;;-1:-1:-1;;;3586:196:21;;5339:2:103;3586:196:21;;;5321:21:103;5378:2;5358:18;;;5351:30;5417:34;5397:18;;;5390:62;-1:-1:-1;;;5468:18:103;;;5461:34;5512:19;;3586:196:21;5137:400:103;3586:196:21;2534:1260;;2496:1298;3879:20;3901:24;3929:18;-1:-1:-1;;;;;3929:31:21;4055:9;3975:104;;;;;;;;:::i;:::-;;;;-1:-1:-1;;3975:104:21;;;;;;;;;;;;;;-1:-1:-1;;;;;3975:104:21;-1:-1:-1;;;3975:104:21;;;3929:161;;;3975:104;3929:161;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3878:212;;;;4106:15;4101:344;;4163:2;4142:11;:18;:23;4138:296;;;4186:44;;-1:-1:-1;;;4186:44:21;;6241:2:103;4186:44:21;;;6223:21:103;6280:2;6260:18;;;6253:30;6319:34;6299:18;;;6292:62;-1:-1:-1;;;6370:18:103;;;6363:32;6412:19;;4186:44:21;6039:398:103;4138:296:21;4335:4;4322:11;4318:22;4303:37;;4395:11;4384:33;;;;;;;;;;;;:::i;:::-;4377:41;;-1:-1:-1;;;4377:41:21;;;;;;;;:::i;4138:296::-;5314:66;4539:49;;-1:-1:-1;;;;;;4539:49:21;-1:-1:-1;;;;;4539:49:21;;;;;;;;4610:28;;;;-1:-1:-1;;4610:28:21;4767:18;-1:-1:-1;;;;;4755:44:21;;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4755:46:21;;;;;;;;-1:-1:-1;;4755:46:21;;;;;;;;;;;;:::i;:::-;;;4751:220;;4909:50;;-1:-1:-1;;;4909:50:21;;;;;;;:::i;4751:220::-;4853:13;-1:-1:-1;4846:20:21;;-1:-1:-1;;;4846:20:21;2185:2793;;;;;:::o;222:127:103:-;283:10;278:3;274:20;271:1;264:31;314:4;311:1;304:15;338:4;335:1;328:15;354:275;425:2;419:9;490:2;471:13;;-1:-1:-1;;467:27:103;455:40;;525:18;510:34;;546:22;;;507:62;504:88;;;572:18;;:::i;:::-;608:2;601:22;354:275;;-1:-1:-1;354:275:103:o;634:186::-;682:4;715:18;707:6;704:30;701:56;;;737:18;;:::i;:::-;-1:-1:-1;803:2:103;782:15;-1:-1:-1;;778:29:103;809:4;774:40;;634:186::o;825:845::-;902:6;910;963:2;951:9;942:7;938:23;934:32;931:52;;;979:1;976;969:12;931:52;1005:23;;-1:-1:-1;;;;;1057:31:103;;1047:42;;1037:70;;1103:1;1100;1093:12;1037:70;1126:5;-1:-1:-1;1182:2:103;1167:18;;1154:32;1209:18;1198:30;;1195:50;;;1241:1;1238;1231:12;1195:50;1264:22;;1317:4;1309:13;;1305:27;-1:-1:-1;1295:55:103;;1346:1;1343;1336:12;1295:55;1382:2;1369:16;1407:48;1423:31;1451:2;1423:31;:::i;:::-;1407:48;:::i;:::-;1478:2;1471:5;1464:17;1518:7;1513:2;1508;1504;1500:11;1496:20;1493:33;1490:53;;;1539:1;1536;1529:12;1490:53;1594:2;1589;1585;1581:11;1576:2;1569:5;1565:14;1552:45;1638:1;1633:2;1628;1621:5;1617:14;1613:23;1606:34;1659:5;1649:15;;;;;825:845;;;;;:::o;2588:277::-;2655:6;2708:2;2696:9;2687:7;2683:23;2679:32;2676:52;;;2724:1;2721;2714:12;2676:52;2756:9;2750:16;2809:5;2802:13;2795:21;2788:5;2785:32;2775:60;;2831:1;2828;2821:12;2775:60;2854:5;2588:277;-1:-1:-1;;;2588:277:103:o;3637:250::-;3722:1;3732:113;3746:6;3743:1;3740:13;3732:113;;;3822:11;;;3816:18;3803:11;;;3796:39;3768:2;3761:10;3732:113;;;-1:-1:-1;;3879:1:103;3861:16;;3854:27;3637:250::o;3892:287::-;4021:3;4059:6;4053:13;4075:66;4134:6;4129:3;4122:4;4114:6;4110:17;4075:66;:::i;:::-;4157:16;;;;;3892:287;-1:-1:-1;;3892:287:103:o;4184:403::-;4386:2;4368:21;;;4425:2;4405:18;;;4398:30;4464:34;4459:2;4444:18;;4437:62;-1:-1:-1;;;4530:2:103;4515:18;;4508:37;4577:3;4562:19;;4184:403::o;4948:184::-;5018:6;5071:2;5059:9;5050:7;5046:23;5042:32;5039:52;;;5087:1;5084;5077:12;5039:52;-1:-1:-1;5110:16:103;;4948:184;-1:-1:-1;4948:184:103:o;5542:270::-;5583:3;5621:5;5615:12;5648:6;5643:3;5636:19;5664:76;5733:6;5726:4;5721:3;5717:14;5710:4;5703:5;5699:16;5664:76;:::i;:::-;5794:2;5773:15;-1:-1:-1;;5769:29:103;5760:39;;;;5801:4;5756:50;;5542:270;-1:-1:-1;;5542:270:103:o;5817:217::-;5964:2;5953:9;5946:21;5927:4;5984:44;6024:2;6013:9;6009:18;6001:6;5984:44;:::i;6442:648::-;6522:6;6575:2;6563:9;6554:7;6550:23;6546:32;6543:52;;;6591:1;6588;6581:12;6543:52;6624:9;6618:16;6657:18;6649:6;6646:30;6643:50;;;6689:1;6686;6679:12;6643:50;6712:22;;6765:4;6757:13;;6753:27;-1:-1:-1;6743:55:103;;6794:1;6791;6784:12;6743:55;6823:2;6817:9;6848:48;6864:31;6892:2;6864:31;:::i;6848:48::-;6919:2;6912:5;6905:17;6959:7;6954:2;6949;6945;6941:11;6937:20;6934:33;6931:53;;;6980:1;6977;6970:12;6931:53;6993:67;7057:2;7052;7045:5;7041:14;7036:2;7032;7028:11;6993:67;:::i;:::-;7079:5;6442:648;-1:-1:-1;;;;;6442:648:103:o", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.7.0 <0.9.0;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"../patterns/Upgradeable.sol\";\r\n\r\n/// @title WitnetProxy: upgradable delegate-proxy contract. \r\n/// @author Guillermo Díaz \r\ncontract WitnetProxy {\r\n\r\n /// Event emitted every time the implementation gets updated.\r\n event Upgraded(address indexed implementation); \r\n\r\n /// Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470).\r\n constructor () {}\r\n\r\n receive() virtual external payable {}\r\n\r\n /// Payable fallback accepts delegating calls to payable functions. \r\n fallback() external payable { /* solhint-disable no-complex-fallback */\r\n address _implementation = implementation();\r\n assembly { /* solhint-disable avoid-low-level-calls */\r\n // Gas optimized delegate call to 'implementation' contract.\r\n // Note: `msg.data`, `msg.sender` and `msg.value` will be passed over \r\n // to actual implementation of `msg.sig` within `implementation` contract.\r\n let ptr := mload(0x40)\r\n calldatacopy(ptr, 0, calldatasize())\r\n let result := delegatecall(gas(), _implementation, ptr, calldatasize(), 0, 0)\r\n let size := returndatasize()\r\n returndatacopy(ptr, 0, size)\r\n switch result\r\n case 0 { \r\n // pass back revert message:\r\n revert(ptr, size) \r\n }\r\n default {\r\n // pass back same data as returned by 'implementation' contract:\r\n return(ptr, size) \r\n }\r\n }\r\n }\r\n\r\n /// Returns proxy's current implementation address.\r\n function implementation() public view returns (address) {\r\n return __proxySlot().implementation;\r\n }\r\n\r\n /// Upgrades the `implementation` address.\r\n /// @param _newImplementation New implementation address.\r\n /// @param _initData Raw data with which new implementation will be initialized.\r\n /// @return Returns whether new implementation would be further upgradable, or not.\r\n function upgradeTo(address _newImplementation, bytes memory _initData)\r\n public returns (bool)\r\n {\r\n // New implementation cannot be null:\r\n require(_newImplementation != address(0), \"WitnetProxy: null implementation\");\r\n\r\n address _oldImplementation = implementation();\r\n if (_oldImplementation != address(0)) {\r\n // New implementation address must differ from current one:\r\n require(_newImplementation != _oldImplementation, \"WitnetProxy: nothing to upgrade\");\r\n\r\n // Assert whether current implementation is intrinsically upgradable:\r\n try Upgradeable(_oldImplementation).isUpgradable() returns (bool _isUpgradable) {\r\n require(_isUpgradable, \"WitnetProxy: not upgradable\");\r\n } catch {\r\n revert(\"WitnetProxy: unable to check upgradability\");\r\n }\r\n\r\n // Assert whether current implementation allows `msg.sender` to upgrade the proxy:\r\n (bool _wasCalled, bytes memory _result) = _oldImplementation.delegatecall(\r\n abi.encodeWithSignature(\r\n \"isUpgradableFrom(address)\",\r\n msg.sender\r\n )\r\n );\r\n require(_wasCalled, \"WitnetProxy: uncompliant implementation\");\r\n require(abi.decode(_result, (bool)), \"WitnetProxy: not authorized\");\r\n require(\r\n Upgradeable(_oldImplementation).proxiableUUID() == Upgradeable(_newImplementation).proxiableUUID(),\r\n \"WitnetProxy: proxiableUUIDs mismatch\"\r\n );\r\n }\r\n\r\n // Initialize new implementation within proxy-context storage:\r\n (bool _wasInitialized, bytes memory _returnData) = _newImplementation.delegatecall(\r\n abi.encodeWithSignature(\r\n \"initialize(bytes)\",\r\n _initData\r\n )\r\n );\r\n if (!_wasInitialized) {\r\n if (_returnData.length < 68) {\r\n revert(\"WitnetProxy: initialization failed\");\r\n } else {\r\n assembly {\r\n _returnData := add(_returnData, 0x04)\r\n }\r\n revert(abi.decode(_returnData, (string)));\r\n }\r\n }\r\n\r\n // If all checks and initialization pass, update implementation address:\r\n __proxySlot().implementation = _newImplementation;\r\n \r\n emit Upgraded(_newImplementation);\r\n\r\n // Asserts new implementation complies w/ minimal implementation of Upgradeable interface:\r\n try Upgradeable(_newImplementation).isUpgradable() returns (bool _isUpgradable) {\r\n return _isUpgradable;\r\n }\r\n catch {\r\n revert (\"WitnetProxy: uncompliant implementation\");\r\n }\r\n }\r\n\r\n /// @dev Complying with EIP-1967, retrieves storage struct containing proxy's current implementation address.\r\n function __proxySlot() private pure returns (Proxiable.ProxiableSlot storage _slot) {\r\n assembly {\r\n // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\r\n _slot.slot := 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\r\n }\r\n }\r\n\r\n}\r\n", - "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\core\\WitnetProxy.sol", "ast": { "absolutePath": "project:/contracts/core/WitnetProxy.sol", "exportedSymbols": { diff --git a/migrations/scripts/1_base.js b/migrations/scripts/1_base.js index 214345d8..c24ca417 100644 --- a/migrations/scripts/1_base.js +++ b/migrations/scripts/1_base.js @@ -25,7 +25,7 @@ module.exports = async function (truffleDeployer, network, [,,, master]) { console.info(" ", "> compiler: ", metadata.compiler.version) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) - console.info(" ", "> code source path: ", metadata.settings.compilationTarget) + console.info(" ", "> source code path: ", metadata.settings.compilationTarget) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(WitnetDeployer.toJSON().deployedBytecode)) await truffleDeployer.deploy(WitnetDeployer, { from: settings.getSpecs(network)?.WitnetDeployer?.from || web3.utils.toChecksumAddress(master), diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 0c8f1968..8676ee47 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -331,6 +331,7 @@ async function defrostTarget (network, target, targetSpecs, targetAddr) { console.info(" ", "> compiler: ", metadata.compiler.version) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) + console.info(" ", "> source code path: ", metadata.settings.compilationTarget) console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(target.artifact.toJSON().deployedBytecode)) } try { @@ -446,14 +447,6 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } -// async function saveAddresses(addresses, network, domain, base, addr) { -// if (!addresses[network]) addresses[network] = {} -// if (!addresses[network][domain]) addresses[network][domain] = {} -// addresses[network][domain][base] = addr -// await utils.overwriteJsonFile("./migrations/addresses.json", addresses) -// return addresses -// } - async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { diff --git a/scripts/prepare.js b/scripts/prepare.js index d82ff282..ca330381 100644 --- a/scripts/prepare.js +++ b/scripts/prepare.js @@ -13,3 +13,7 @@ if (fs.existsSync("./artifacts")) { if (fs.existsSync("./build/contracts")) { exec("sed -i -- \"/\bsourcePath\b/d\" build/contracts/*.json") } + +if (fs.existsSync("./migrations/frosts")) { + exec(`sed -i -- /\bsourcePath\b/d migrations/frosts/*.json`) +} From 063493b739dc720690c224d2fc83f530a734db32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 23 Oct 2024 20:34:53 +0200 Subject: [PATCH 38/62] chore: package script ops:drp:wrb --- migrations/ops/drp/wrb/1_ops_drp_wrb.js | 32 +++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 migrations/ops/drp/wrb/1_ops_drp_wrb.js diff --git a/migrations/ops/drp/wrb/1_ops_drp_wrb.js b/migrations/ops/drp/wrb/1_ops_drp_wrb.js new file mode 100644 index 00000000..6d64958c --- /dev/null +++ b/migrations/ops/drp/wrb/1_ops_drp_wrb.js @@ -0,0 +1,32 @@ +const utils = require("../../../../src/utils") + +const IWitnetOracleReporter = artifacts.require("IWitOracleReporter") +const WitOracle = artifacts.require("WitOracle") + +module.exports = async function (_deployer, network, [,, from]) { + const wrb = await WitOracle.deployed() + const reporter = await IWitnetOracleReporter.at(wrb.address) + if (!process.argv.includes("--queryIds")) { + console.info("Usage: yarn ops:drp:pfs : --queryIds ") + process.exit(0) + } + const queryIds = process.argv[process.argv.indexOf("--queryIds") + 1].split(","); + console.info("> Network: ", network) + console.info("> WitOracle: ", wrb.address) + console.info("> Reporter: ", from) + for (const index in queryIds) { + const queryId = queryIds[index] + console.info(" ", "-".repeat(86)) + console.info(" ", "> Query id: ", queryId) + const queryStatus = await wrb.getQueryStatusTag(queryId) + console.info(" ", "> Query status: ", queryStatus) + if (queryStatus === "Posted") { + utils.traceTx(await reporter.methods['reportResult(uint256,bytes32,bytes)']( + queryId, + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0xd8278118ef", // RadonErrors::BridgeGaveUp + { from } + )); + } + } +} diff --git a/package.json b/package.json index 9deba75c..0d1701a2 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "fmt": "pnpm run fmt:js && pnpm run fmt:sol", "migrate": "npx truffle migrate --network", "networks": "node ./scripts/networks.js 2>&1", - "ops:rng:sla": "npx truffle migrate --migrations_directory ./migrations/ops/rng/sla --network", + "ops:drp:wrb": "npx truffle migrate --migrations_directory ./migrations/ops/drp/wrb --compile-none --network", "prepare": "npx truffle compile --all && npx hardhat compile --force && node ./scripts/prepare.js", "test": "npx truffle test", "verify:apps": "node ./scripts/verify-apps.js 2>&1", From 86868b4d9db43ad491627968a0a3fc8b0cfe7cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Thu, 24 Oct 2024 07:38:17 +0200 Subject: [PATCH 39/62] chore: frost WitnetRandomnessV2 -> WitRandomnessV2 --- migrations/frosts/apps/WitRandomnessV2.json | 38739 ++++++++++++++++++ migrations/scripts/2_libs.js | 14 +- migrations/scripts/3_framework.js | 102 +- scripts/prepare.js | 4 + 4 files changed, 38807 insertions(+), 52 deletions(-) create mode 100644 migrations/frosts/apps/WitRandomnessV2.json diff --git a/migrations/frosts/apps/WitRandomnessV2.json b/migrations/frosts/apps/WitRandomnessV2.json new file mode 100644 index 00000000..b205d6ee --- /dev/null +++ b/migrations/frosts/apps/WitRandomnessV2.json @@ -0,0 +1,38739 @@ +{ + "contractName": "WitRandomnessV2", + "abi": [ + { + "inputs": [ + { + "internalType": "contract WitnetOracle", + "name": "_witnet", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EmptyBuffer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "range", + "type": "uint256" + } + ], + "name": "IndexOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "InvalidLengthEncoding", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "read", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "UnexpectedMajorType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "unexpected", + "type": "uint256" + } + ], + "name": "UnsupportedMajorType", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmTxGasPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmRandomizeFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "witnetQueryId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "committeeSize", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "witnessingFeeNanoWit", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct WitnetV2.RadonSLA", + "name": "witnetQuerySLA", + "type": "tuple" + } + ], + "name": "Randomizing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmReward", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "committeeSize", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "witnessingFeeNanoWit", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct WitnetV2.RadonSLA", + "name": "witnetSLA", + "type": "tuple" + } + ], + "name": "WitnetQuery", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmGasPrice", + "type": "uint256" + } + ], + "name": "WitnetQueryResponse", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmGasPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmCallbackGas", + "type": "uint256" + } + ], + "name": "WitnetQueryResponseDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "resultCborBytes", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmGasPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmCallbackActualGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "evmCallbackRevertReason", + "type": "string" + } + ], + "name": "WitnetQueryResponseDeliveryFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evmReward", + "type": "uint256" + } + ], + "name": "WitnetQueryRewardUpgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "witnetRadHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "class", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "specs", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "witnet", + "outputs": [ + { + "internalType": "contract WitnetOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_evmGasPrice", + "type": "uint256" + } + ], + "name": "estimateRandomizeFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "fetchRandomnessAfter", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "fetchRandomnessAfterProof", + "outputs": [ + { + "internalType": "bytes32", + "name": "_witnetResultRandomness", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "_witnetResultTimestamp", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_witnetResultTallyHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_witnetResultFinalityBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastRandomizeBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "getRandomizeData", + "outputs": [ + { + "internalType": "uint256", + "name": "_witnetQueryId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_prevRandomizeBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_nextRandomizeBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "getRandomizeNextBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "getRandomizePrevBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "getRandomizeStatus", + "outputs": [ + { + "internalType": "enum WitnetV2.ResponseStatus", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "isRandomized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_range", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "random", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "randomize", + "outputs": [ + { + "internalType": "uint256", + "name": "_evmRandomizeFee", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "witnetQuerySLA", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "committeeSize", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "witnessingFeeNanoWit", + "type": "uint64" + } + ], + "internalType": "struct WitnetV2.RadonSLA", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "baseFeeOverheadPercentage", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_baseFeeOverheadPercentage", + "type": "uint16" + } + ], + "name": "settleBaseFeeOverheadPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "committeeSize", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "witnessingFeeNanoWit", + "type": "uint64" + } + ], + "internalType": "struct WitnetV2.RadonSLA", + "name": "_witnetQuerySLA", + "type": "tuple" + } + ], + "name": "settleWitnetQuerySLA", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract WitnetOracle\",\"name\":\"_witnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyBuffer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"range\",\"type\":\"uint256\"}],\"name\":\"IndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidLengthEncoding\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"read\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"UnexpectedMajorType\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"unexpected\",\"type\":\"uint256\"}],\"name\":\"UnsupportedMajorType\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmTxGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmRandomizeFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"witnetQueryId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetQuerySLA\",\"type\":\"tuple\"}],\"name\":\"Randomizing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"witnetSLA\",\"type\":\"tuple\"}],\"name\":\"WitnetQuery\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackGas\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryResponseDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmCallbackActualGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"evmCallbackRevertReason\",\"type\":\"string\"}],\"name\":\"WitnetQueryResponseDeliveryFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"evmReward\",\"type\":\"uint256\"}],\"name\":\"WitnetQueryRewardUpgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseFeeOverheadPercentage\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"class\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"estimateRandomizeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"fetchRandomnessAfter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"fetchRandomnessAfterProof\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_witnetResultRandomness\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_witnetResultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_witnetResultTallyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_witnetResultFinalityBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastRandomizeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_witnetQueryId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_prevRandomizeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nextRandomizeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeNextBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizePrevBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"getRandomizeStatus\",\"outputs\":[{\"internalType\":\"enum WitnetV2.ResponseStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"isRandomized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_range\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"random\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_evmRandomizeFee\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_baseFeeOverheadPercentage\",\"type\":\"uint16\"}],\"name\":\"settleBaseFeeOverheadPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"_witnetQuerySLA\",\"type\":\"tuple\"}],\"name\":\"settleWitnetQuerySLA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"specs\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnet\",\"outputs\":[{\"internalType\":\"contract WitnetOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnetQuerySLA\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"committeeSize\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessingFeeNanoWit\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetV2.RadonSLA\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnetRadHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"The Witnet Foundation.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"fetchRandomnessAfter(uint256)\":{\"details\":\"Reverts if:i. no `randomize()` was requested on neither the given block, nor afterwards.ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.\",\"params\":{\"_blockNumber\":\"Block number from which the search will start\"}},\"fetchRandomnessAfterProof(uint256)\":{\"details\":\"Reverts if:i. no `randomize()` was requested on neither the given block, nor afterwards.ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.\",\"params\":{\"_blockNumber\":\"Block number from which the search will start.\"},\"returns\":{\"_witnetResultFinalityBlock\":\"EVM block number from which the provided randomness can be considered to be final.\",\"_witnetResultRandomness\":\"Random value provided by the Witnet blockchain and used for solving randomness after given block.\",\"_witnetResultTallyHash\":\"Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\",\"_witnetResultTimestamp\":\"Timestamp at which the randomness value was generated by the Witnet blockchain.\"}},\"getRandomizeData(uint256)\":{\"details\":\"Returns zero values if no randomize request was actually posted on the given block.\",\"returns\":{\"_nextRandomizeBlock\":\"Block number in which a randomize request got posted just after this one, 0 if none.\",\"_prevRandomizeBlock\":\"Block number in which a randomize request got posted just before this one. 0 if none.\",\"_witnetQueryId\":\"Identifier of the underlying Witnet query created on the given block number. \"}},\"getRandomizeNextBlock(uint256)\":{\"params\":{\"_blockNumber\":\"Block number from which the search will start.\"},\"returns\":{\"_0\":\"Number of the first block found after the given one, or `0` otherwise.\"}},\"getRandomizePrevBlock(uint256)\":{\"params\":{\"_blockNumber\":\"Block number from which the search will start. Cannot be zero.\"},\"returns\":{\"_0\":\"First block found before the given one, or `0` otherwise.\"}},\"getRandomizeStatus(uint256)\":{\"details\":\"Possible values:- 0 -> Void: no randomize request was actually posted on or after the given block number.- 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.- 2 -> Ready: a successfull randomize value was reported and ready to be read.- 3 -> Error: all randomize requests after the given block were solved with errors.- 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. \"},\"random(uint32,uint256,uint256)\":{\"details\":\"Fails under same conditions as `getRandomnessAfter(uint256)` does.\",\"params\":{\"_blockNumber\":\"Block number from which the search for the first randomize request solved aftewards will start.\",\"_nonce\":\"Nonce value enabling multiple random numbers from the same randomness value.\",\"_range\":\"Range within which the uniformly-distributed random number will be generated.\"}},\"randomize()\":{\"details\":\"Only one randomness request per block will be actually posted to the Witnet Oracle. \",\"returns\":{\"_evmRandomizeFee\":\"Funds actually paid as randomize fee.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"}},\"stateVariables\":{\"witnetRadHash\":{\"details\":\"Can be used to track all randomness requests solved so far on the Witnet Oracle blockchain.\"}},\"title\":\"WitnetRandomnessV2: Unmalleable and provably-fair randomness generation based on the Witnet Oracle v2.*.\",\"version\":1},\"userdoc\":{\"events\":{\"WitnetQuery(uint256,uint256,(uint8,uint64))\":{\"notice\":\"Emitted every time a new query containing some verified data request is posted to the WRB.\"},\"WitnetQueryResponse(uint256,uint256)\":{\"notice\":\"Emitted when a query with no callback gets reported into the WRB.\"},\"WitnetQueryResponseDelivered(uint256,uint256,uint256)\":{\"notice\":\"Emitted when a query with a callback gets successfully reported into the WRB.\"},\"WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)\":{\"notice\":\"Emitted when a query with a callback cannot get reported into the WRB.\"},\"WitnetQueryRewardUpgraded(uint256,uint256)\":{\"notice\":\"Emitted when the reward of some not-yet reported query is upgraded.\"}},\"kind\":\"user\",\"methods\":{\"acceptOwnership()\":{\"notice\":\"=============================================================================================================== --- 'IWitnetRandomnessAdmin' implementation -------------------------------------------------------------------\"},\"estimateRandomizeFee(uint256)\":{\"notice\":\"Returns amount of wei required to be paid as a fee when requesting randomization with a transaction gas price as the one given.\"},\"fetchRandomnessAfter(uint256)\":{\"notice\":\"Retrieves the result of keccak256-hashing the given block number with the randomness value generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved after such block number.\"},\"fetchRandomnessAfterProof(uint256)\":{\"notice\":\"Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that tookplace in the Witnet Oracle blockchain in response to the first non-errored randomize requestsolved after the given block number.\"},\"getLastRandomizeBlock()\":{\"notice\":\"Returns last block number on which a randomize was requested.\"},\"getRandomizeData(uint256)\":{\"notice\":\"Retrieves metadata related to the randomize request that got posted to the Witnet Oracle contract on the given block number.\"},\"getRandomizeNextBlock(uint256)\":{\"notice\":\"Returns the number of the next block in which a randomize request was posted after the given one. \"},\"getRandomizePrevBlock(uint256)\":{\"notice\":\"Returns the number of the previous block in which a randomize request was posted before the given one.\"},\"getRandomizeStatus(uint256)\":{\"notice\":\"Returns status of the first non-errored randomize request posted on or after the given block number.\"},\"isRandomized(uint256)\":{\"notice\":\"Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first non-errored randomize request posted on or after the given block number.\"},\"random(uint32,uint256,uint256)\":{\"notice\":\"Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \"},\"randomize()\":{\"notice\":\"Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \"},\"witnetQuerySLA()\":{\"notice\":\"Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill when solving randomness requests:- number of witnessing nodes contributing to randomness generation- reward in $nanoWIT received by every contributing node in the Witnet blockchain\"},\"witnetRadHash()\":{\"notice\":\"Unique identifier of the RNG data request used on the Witnet Oracle blockchain for solving randomness.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/apps/WitnetRandomnessV2.sol\":\"WitnetRandomnessV2\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"project:/contracts/WitnetOracle.sol\":{\"keccak256\":\"0x84ef8d2ebcba273e4bc23a5ee414a1213df55d1b4e496197a146031fea3a4874\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c4a6e31964ed08c4c9dfe5279b4ffe9eeba6e759f15901e080e174e98e96a7f5\",\"dweb:/ipfs/QmTghzVFf2EHnfnHejgFGRBjanXYcstK9ftVaYmHWJfk8w\"]},\"project:/contracts/WitnetRandomness.sol\":{\"keccak256\":\"0xa18727bf1e426ea2cd9c51e29f20090d2e305bd4548225b612deac8a175eb290\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://358755b23533fd4e59c26de21a5996a494867ff9324f5a8969674cc50f0de371\",\"dweb:/ipfs/QmSbLdscuJTortmR4LoCriKbGTSepUgMuxptN9xCsFuFJ1\"]},\"project:/contracts/WitnetRequestBytecodes.sol\":{\"keccak256\":\"0x2a79d919dd79c0e3f857e6bee08368ad0b463188aced4a52de29270ed0f5f3d2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://290d6013ee9f75fedbbb7726527a637ea2ae7a5da0ad118ecc43b298846f0bb0\",\"dweb:/ipfs/QmU8AZtPyctrrvxdmH297p595ZMS6DgcD6djSFKNxAqYMs\"]},\"project:/contracts/WitnetRequestFactory.sol\":{\"keccak256\":\"0x3c66f27d7c1db0e662c37d98005c4cbd871ceb75e97079d7bf673fb75d59c858\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://52adb318b870d0825718125e94fdbdd0e968ced09926420e2543b0ca4c6eb579\",\"dweb:/ipfs/QmYack87Q2UTfQb8KLLEPFBrMJgN2o6PaPqPNSc95McPVH\"]},\"project:/contracts/apps/UsingWitnet.sol\":{\"keccak256\":\"0x3fe6f2f1162bd1c128fb6aad2db81eaa1fdf04b5d15a5eeadf3e44bc81e2d4ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://927de4c99298ede8a240305bfd8e9daa5c79a32ed68cef19ece9b7f5bb37860b\",\"dweb:/ipfs/QmeZEbXpCTHegD6H7cVDipyXLYHUE4e3C66XojzYk8CpE4\"]},\"project:/contracts/apps/WitnetRandomnessV2.sol\":{\"keccak256\":\"0x37d7fd285315e04e985c4292b48f7fc76d7f32b3394385c99428d8ac80ede389\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c2ed10cbe60c7b3c68e5d6f01b02d10d8724863194c77fb293f74cd673cc0e64\",\"dweb:/ipfs/QmfTeQaZm6Fcn9pEfKjxdcrQWg9infgKiaXxwfzYRapb8N\"]},\"project:/contracts/interfaces/IWitnetOracle.sol\":{\"keccak256\":\"0x5dbb04fce5e05675325232a735c46617378982b48dac2138aca0c6cc95e6e4d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7447a70455478239500e16aebe5dce6676dc86307d22f662761d8e9f7c5d1276\",\"dweb:/ipfs/QmVkvA4Mt6G1JXxE8ebxKGAjT1WvNbp5QMKg9sUKdrJjhv\"]},\"project:/contracts/interfaces/IWitnetOracleEvents.sol\":{\"keccak256\":\"0x0442f474f253dc1f6bd6a4f153c3adb2abe5f6f0f24c76d1baf666185e61e659\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://535e8efcfc5693669d9bd2b6f62e6fc65aca19b7de355a27152e4362b410540d\",\"dweb:/ipfs/QmVZRXgku1cZewhoucebaiBKAyUjF2dmEzYrzGvjPzbwN9\"]},\"project:/contracts/interfaces/IWitnetRandomness.sol\":{\"keccak256\":\"0xe1dece4459bee43e03cbc83e3feb455de406e633c778ac70e3da5d0c65402d68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8d79acbdbddc0882e6067d4722184423102b78fa1ca9fd94e4d0b9c6dd9f4485\",\"dweb:/ipfs/QmVs5it4bV2cqZPfdCejmHh3SybxciuQoKE8pswUWqPc1R\"]},\"project:/contracts/interfaces/IWitnetRandomnessAdmin.sol\":{\"keccak256\":\"0x496cd3d89fb8bb44dc627da202372fab60a5422b12d00fe97582a8fa1e6fd856\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://99f15e8dc494e45e3a9540f3c8ca1d996faed9ae1de3d931d5e7acd87ca15adc\",\"dweb:/ipfs/QmYEQx7KtDRiUzUDfLRm1WnguF6LkiYtLVq6nkRg9CraS4\"]},\"project:/contracts/interfaces/IWitnetRandomnessEvents.sol\":{\"keccak256\":\"0x3d5510777da725c0772a04bc40a967c07713139bc50bb732462baccc1acfb0eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://481f334e116fa761e2d9fdc668cf9278c8d192f0b0511066637dab6011fac908\",\"dweb:/ipfs/QmS1Vh6Xab5oBmTxLempvGvpAsVfEQthbrg1aWXe2SqRRa\"]},\"project:/contracts/interfaces/IWitnetRequestBytecodes.sol\":{\"keccak256\":\"0x8da168bee9a78442216965976b1f29087f760f37dcb09337283242599ed1cbca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e120623262ee0559913bdae56c0a7921147dfe08ada7ea81061b14e2fc38c5e1\",\"dweb:/ipfs/Qmbxe8XRrH6ZjJHiR6YYzcZV1jnSWwo9iBYz5r6GJ6To5G\"]},\"project:/contracts/interfaces/IWitnetRequestFactory.sol\":{\"keccak256\":\"0x3b19ec4a976745ba2646e7e1886d647ef30ad678460a712c93bbfb4405b57f1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa759ae15b7d4da622a81d50933474910959ac490d8b63ea2e7ed8608859a9c9\",\"dweb:/ipfs/QmRckCu7eBBP5fn9ff6djs7VbdhFc7sxYb2yqDr4go66jV\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x65a87375dd79d63a83fb454b7199b6c999bd59c50b3b59d521c5c4d45a7d3cc3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca865b681d810c2fc5c3672ea6343c3bdf6fd71764ab824d25994744dc85866b\",\"dweb:/ipfs/QmPGcP3xGTNZfsQ9GSKdujNLRVs8dWDdubyUko1rbQqJNv\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0xa14570492eb5a313ddbacae0185c850ec99c67211eb33989a5e21d31bf06a150\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e83c11edb49cab6a767c0b685825bc22ece0d3d2897e0d54fe1923df5cc76ba5\",\"dweb:/ipfs/QmdLDgCc3tnKbgRrXwfNzsg6uUDirNmjvBB8V3iMmnD69a\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xb346547ff731163beea2c657c52675cdf7936691d566a76a045577cf9c34ade0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d4b5b6424a033584b41f1204d635db98fda9ca9bd2a614c9d82539a3e4e6529\",\"dweb:/ipfs/QmW6Qy3wWpzHSECYaCPaf9LWGfPqWDKVoP2kPSNNQu7LMQ\"]},\"project:/contracts/libs/WitnetV2.sol\":{\"keccak256\":\"0xaaa2db284a820d5261db341709711f722adfda7f23c52a7e93b4a56d15019ad1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d261dc15f4515d3bca278c9a946aa02f82d1a9f4749051e7d97900f2bb59d72b\",\"dweb:/ipfs/QmVbCCZ9z2c6DLF9t526GZpba7PyJAMQixvcCJC5wGmrba\"]},\"project:/contracts/patterns/Ownable.sol\":{\"keccak256\":\"0x494bda32f9a218d9c33ea82112129c0933ab52f57eabfbf0d14a8742a3370800\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c4cf04ebb052fed9d15cf93ff4523955ee311aa4425ee85f0e80b4489c94e76\",\"dweb:/ipfs/QmfMf4WD7woTaQSTbJxxoan2aXSeY7ovY5NoipSBw5rMPK\"]},\"project:/contracts/patterns/Ownable2Step.sol\":{\"keccak256\":\"0x7033d8133957a291cf9b8be30bfc4b95e6414a20995911d1b5df8ea149580604\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e20a079adc224113306392d27e0cf202c6c4a7678c4705fd3bbbca99c1e9b816\",\"dweb:/ipfs/QmWrFv2SbSokhrWhwL94sW5x1HyT7rX5f4Scowe4bWHHqu\"]}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b5060405161306838038061306883398101604081905261002f916106de565b81816001600160a01b03811661006057604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b610069816105b3565b5063baeca88b60e01b6001600160e01b031916816001600160a01b031663adb7c3f76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100de9190610718565b6001600160e01b031916146101435760405162461bcd60e51b815260206004820152602560248201527f5573696e675769746e65743a20756e636f6d706c69616e74205769746e65744f6044820152647261636c6560d81b6064820152608401610057565b6001600160a01b0390811660805260408051808201909152600a8152630bebc20060209091015260028054640bebc2000a6001600160481b03199091161790556003805461ffff19166021179055610257908316158061021e575063baeca88b60e01b6001600160e01b031916836001600160a01b031663adb7c3f76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102129190610718565b6001600160e01b031916145b60408051808201909152601881527f756e636f6d706c69616e74205769746e65744f7261636c65000000000000000060208201526105cf565b60006102616105e1565b6001600160a01b0316637b1039996040518163ffffffff1660e01b8152600401602060405180830381865afa15801561029e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c29190610749565b60408051600180825281830190925291925060009190602080830190803683375050604080516000808252602082019092529293506001600160a01b03851692639eb3ab1f925060029161032c565b6103196106a2565b8152602001906001900390816103115790505b506040518363ffffffff1660e01b815260040161034a9291906107e2565b6020604051808303816000875af1158015610369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038d91906108c5565b816000815181106103a0576103a06108de565b60200260200101818152505060606000836001600160a01b0316637f412e2360405180604001604052806002600b8111156103dd576103dd61077c565b8152602001858152506040518263ffffffff1660e01b815260040161040291906108f4565b6020604051808303816000875af1158015610421573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044591906108c5565b90506000846001600160a01b0316637f412e236040518060400160405280600b808111156104755761047561077c565b8152602001868152506040518263ffffffff1660e01b815260040161049a91906108f4565b6020604051808303816000875af11580156104b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dd91906108c5565b9050846001600160a01b031663a4a7cecd858484602089516001600160401b0381111561050c5761050c610766565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b506040518663ffffffff1660e01b815260040161056095949392919061099b565b6020604051808303816000875af115801561057f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a391906108c5565b60a05250610ae095505050505050565b600180546001600160a01b03191690556105cc816105f1565b50565b816105dd576105dd81610641565b5050565b60006105ec60805190565b905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805180820190915260128152712bb4ba3732ba2930b73237b6b732b9b9ab1960711b60208201528160405160200161067c929190610a90565b60408051601f198184030181529082905262461bcd60e51b825261005791600401610acd565b60405180604001604052806002905b60608152602001906001900390816106b15790505090565b6001600160a01b03811681146105cc57600080fd5b600080604083850312156106f157600080fd5b82516106fc816106c9565b602084015190925061070d816106c9565b809150509250929050565b60006020828403121561072a57600080fd5b81516001600160e01b03198116811461074257600080fd5b9392505050565b60006020828403121561075b57600080fd5b8151610742816106c9565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60005b838110156107ad578181015183820152602001610795565b50506000910152565b600081518084526107ce816020860160208601610792565b601f01601f19169290920160200192915050565b6000600584106107f4576107f461077c565b838252602060a08184015260008060a0850152604060c06040860152600060c086015260e0850160e0606087015280875180835261010092508288019150828160051b890101925085890160005b8281101561089b5789850360ff19018452815185878101895b60028110156108865788820383526108748285516107b6565b938c0193928c0192915060010161085b565b50965050509287019290870190600101610842565b50505050858103608087015260018152600160ff1b60208201526040810198975050505050505050565b6000602082840312156108d757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006020808352606083018451600c81106109115761091161077c565b828501528482015160408086018190528151928390526080600584901b8701810193928501929087019060005b8181101561098d57888603607f1901835284518051600a81106109635761096361077c565b875287015187870185905261097a858801826107b6565b965050938601939186019160010161093e565b509398975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b828110156109d4578151845292840192908401906001016109b8565b505050878285015286604085015261ffff86166060850152838103608085015280855180835283830191506005848260051b85010185890160005b84811015610a7d57601f198784038101875282518051808652908a01908a86019080881b87018c0160005b82811015610a665785898303018452610a548286516107b6565b948e0194938e01939150600101610a3a565b50998c019996505050928901925050600101610a0f565b50909d9c50505050505050505050505050565b60008351610aa2818460208801610792565b6101d160f51b9083019081528351610ac1816002840160208801610792565b01600201949350505050565b60208152600061074260208301846107b6565b60805160a05161252b610b3d600039600081816102d20152610a84015260008181610288015281816107dc0152818161088301528181610a5401528181610c7701528181610e2e015281816112550152611309015261252b6000f3fe60806040526004361061014f5760003560e01c80639bc86fec116100b6578063c0248bf11161006f578063c0248bf11461051f578063d2bc459b1461053f578063de0958ac1461055f578063e30c39781461057f578063eb92b29b14610594578063f2fde38b146105b75761018c565b80639bc86fec14610411578063a3252f6814610441578063a60ee2681461047c578063adb7c3f71461049c578063b8d38c96146104be578063bff852fa146104de5761018c565b806376fa9d201161010857806376fa9d201461031f57806379ba50971461034c57806382b1c174146103615780638da5cb5b146103815780638f2616841461039f5780639353badd146103b45761018c565b806317f45487146101f757806324cbbfc11461024457806346d1d21a14610279578063613e9978146102c0578063699b328a14610302578063715018a61461030a5761018c565b3661018c5761018a604051806040016040528060158152602001741b9bc81d1c985b9cd9995c9cc81858d8d95c1d1959605a1b8152506105d7565b005b61018a61019d60003560f81c610641565b6101ae60ff60003560f01c16610641565b6101bf60ff60003560e81c16610641565b6101d060ff60003560e01c16610641565b6040516020016101e39493929190611e0c565b6040516020818303038152906040526105d7565b34801561020357600080fd5b50610217610212366004611e8b565b610733565b604080519485526001600160401b0390931660208501529183015260608201526080015b60405180910390f35b34801561025057600080fd5b5061026461025f366004611eb6565b6109e6565b60405163ffffffff909116815260200161023b565b34801561028557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161023b565b3480156102cc57600080fd5b506102f47f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161023b565b6102f4610a3b565b34801561031657600080fd5b5061018a610bec565b34801561032b57600080fd5b5061033f61033a366004611e8b565b610c00565b60405161023b9190611f01565b34801561035857600080fd5b5061018a610d53565b34801561036d57600080fd5b506102f461037c366004611e8b565b610d5b565b34801561038d57600080fd5b506000546001600160a01b03166102a8565b3480156103ab57600080fd5b506102f4610d96565b3480156103c057600080fd5b5060408051808201825260008082526020918201528151808301835260025460ff81168083526001600160401b0361010090920482169284019283528451908152915116918101919091520161023b565b34801561041d57600080fd5b5061043161042c366004611e8b565b610da6565b604051901515815260200161023b565b34801561044d57600080fd5b5061046161045c366004611e8b565b610dcb565b6040805193845260208401929092529082015260600161023b565b34801561048857600080fd5b506102f4610497366004611e8b565b610e03565b3480156104a857600080fd5b5060405163124f910d60e01b815260200161023b565b3480156104ca57600080fd5b5061018a6104d9366004611f29565b610ec9565b3480156104ea57600080fd5b5060408051808201825260128152712bb4ba3732ba2930b73237b6b732b9b9ab1960711b6020820152905161023b9190611f4d565b34801561052b57600080fd5b506102f461053a366004611e8b565b610ee9565b34801561054b57600080fd5b5061018a61055a366004611f80565b610f37565b34801561056b57600080fd5b506102f461057a366004611e8b565b610f86565b34801561058b57600080fd5b506102a8610fdf565b3480156105a057600080fd5b5060035460405161ffff909116815260200161023b565b3480156105c357600080fd5b5061018a6105d2366004611fa7565b610ff3565b6040805180820190915260128152712bb4ba3732ba2930b73237b6b732b9b9ab1960711b602082015281604051602001610612929190611fc4565b60408051601f198184030181529082905262461bcd60e51b825261063891600401611f4d565b60405180910390fd5b604080516002808252818301909252606091600091906020820181803683370190505090506000610673601085612043565b61067e906030612065565b9050600061068d60108661207e565b610698906030612065565b905060398260ff1611156106b4576106b1600783612065565b91505b60398160ff1611156106ce576106cb600782612065565b90505b8160f81b836000815181106106e5576106e56120a0565b60200101906001600160f81b031916908160001a9053508060f81b83600181518110610713576107136120a0565b60200101906001600160f81b031916908160001a90535091949350505050565b600080600080610741611007565b6000868152600191909101602052604081205490036107665761076385610f86565b94505b6000610770611007565b600101600087815260200190815260200160002090506000816000015490506107c381600014156040518060400160405280600e81526020016d1b9bdd081c985b991bdb5a5e995960921b81525061102b565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa15801561082b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084f91906120b6565b9050600281600581111561086557610865611eeb565b0361093d57604051637b0c90d960e11b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f61921b290602401600060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108fa9190810190612191565b9050806040015163ffffffff1696508060600151955080602001516001600160401b03169450610935610930826080015161103d565b61105b565b9750506109db565b600381600581111561095157610951611eeb565b036109a957600283015460408051808201909152601081526f6661756c74792072616e646f6d697a6560801b602082015261098f908215159061102b565b61099881610733565b9750975097509750505050506109df565b6109db6040518060400160405280601181526020017070656e64696e672072616e646f6d697a6560781b8152506105d7565b5050505b9193509193565b6000610a2c8484336109f786610d5b565b604080516001600160a01b03909316602084015282015260600160405160208183030381529060405280519060200120611090565b90505b9392505050565b905090565b600043610a46611007565b541015610ba95734905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633dc2b7a2837f000000000000000000000000000000000000000000000000000000000000000060026040518463ffffffff1660e01b8152600401610ac2929190612240565b60206040518083038185885af1158015610ae0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b05919061226a565b90506000610b11611007565b436000908152600191909101602052604081208381559150610b31611007565b5460018301819055905043610b44611007565b6000838152600191909101602052604090206002015543610b63611007565b556040517f8cb766b09215126141c41df86fd488fe4745f22f3c995c3ad9aaf4c07195b94690610b9d9043903a9088908890600290612283565b60405180910390a15050505b34811015610be957336108fc610bbf83346122c3565b6040518115909202916000818181858888f19350505050158015610be7573d6000803e3d6000fd5b505b90565b610bf46110ef565b610bfe600061111c565b565b6000610c0a611007565b600083815260019190910160205260408120549003610c2f57610c2c82610f86565b91505b6000610c39611007565b600084815260019190910160205260408120549150819003610c5e5750600092915050565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea91906120b6565b90506003816005811115610d0057610d00611eeb565b03610a2f576000610d0f611007565b6000868152600191909101602052604090206002015490508015610d3f57610d3681610c00565b95945050505050565b506003949350505050565b505b5050919050565b610bfe611135565b600081610d67836111b0565b604080516020810193909352820152606001604051602081830303815290604052805190602001209050919050565b6000610da0611007565b54919050565b60006002610db383610c00565b6005811115610dc457610dc4611eeb565b1492915050565b600080600080610dd9611007565b60009586526001908101602052604090952080549581015460029091015495969095945092505050565b604051630f7b104360e31b815260048101829052602260248201526000906064906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637bd8821890604401602060405180830381865afa158015610e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e99919061226a565b600354610eab9061ffff1660646122d6565b61ffff16610eb991906122f1565b610ec39190612308565b92915050565b610ed16110ef565b6003805461ffff191661ffff92909216919091179055565b6000808211610efa57610efa61231c565b6000610f04611007565b549050808311610ec357610f3283610f1a611007565b60008481526001918201602052604090200154611414565b610a2f565b610f3f6110ef565b610f74610f4b82611447565b6040518060400160405280600b81526020016a696e76616c696420534c4160a81b81525061102b565b806002610f818282612341565b505050565b6000610f90611007565b600083815260019190910160205260408120549003610fc057610fbb82610fb5611007565b546114d4565b610ec3565b610fc8611007565b600092835260010160205250604090206002015490565b6000610a366001546001600160a01b031690565b610ffb6110ef565b61100481611523565b50565b7f643778935c57df947f6944f6a5242a3e91445f6337f4b2ec670c8642153b614f90565b8161103957611039816105d7565b5050565b611045611d80565b600061105083611555565b9050610a2f8161157a565b600081806000015161107f5760405162461bcd60e51b815260040161063890612393565b610a2f61108b846115ae565b6115df565b6000806001600160e01b0383856040516020016110b7929190918252602082015260400190565b60408051601f19818403018152919052805160209091012016905060e06110e463ffffffff8716836122f1565b901c95945050505050565b6000546001600160a01b03163314610bfe5760405163118cdaa760e01b8152336004820152602401610638565b600180546001600160a01b0319169055611004816115ec565b338061113f610fdf565b6001600160a01b0316146111a75760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610638565b6110048161111c565b60006111ba611007565b6000838152600191909101602052604081205490036111df576111dc82610f86565b91505b60006111e9611007565b6001016000848152602001908152602001600020905060008160000154905061123c81600014156040518060400160405280600e81526020016d1b9bdd081c985b991bdb5a5e995960921b81525061102b565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa1580156112a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c891906120b6565b905060028160058111156112de576112de611eeb565b0361137d576040516311a7b16760e31b815260048101839052610d3690610930906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3d8b3890602401600060405180830381865afa158015611350573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261137891908101906123e5565b61103d565b600381600581111561139157611391611eeb565b036113e257600283015460408051808201909152601081526f6661756c74792072616e646f6d697a6560801b60208201526113cf908215159061102b565b6113d8816111b0565b9695505050505050565b610d4a6040518060400160405280601181526020017070656e64696e672072616e646f6d697a6560781b8152506105d7565b600081831161144157610f3283611429611007565b60008581526001918201602052604090200154611414565b50919050565b60008061145a6040840160208501612421565b6001600160401b031611801561147f5750600061147a602084018461243e565b60ff16115b801561149b5750607f611495602084018461243e565b60ff1611155b8015610ec357506404a817c8006114b86040840160208501612421565b6114c390606461245b565b6001600160401b0316101592915050565b60008183101561150257610f32836114ea611007565b600085815260019182016020526040902001546114d4565b61150a611007565b6000928352600101602052506040902060020154919050565b61152b6110ef565b6001600160a01b0381166111a757604051631e4fbdf760e01b815260006004820152602401610638565b61155d611da1565b6040805180820190915282815260006020820152610a2f8161163c565b611582611d80565b5060a0810151604080518082019091526001600160401b03909116602714158152602081019190915290565b60608180600001516115d25760405162461bcd60e51b815260040161063890612393565b610a2f836020015161175c565b6000610ec38260206118a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611644611da1565b8151518290600003611669576040516309036d4760e21b815260040160405180910390fd5b600060ff816001600160401b038160015b80156116ec576116898961191d565b9550816116958161247e565b6007600589901c169650601f8816955092505060051985016116e45760208901516116c08a8661197f565b9350808a602001516116d291906122c3565b6116dc9084612497565b92505061167a565b50600061167a565b600760ff861611156117165760405163bd2ac87960e01b815260ff86166004820152602401610638565b506040805160c08101825298895260ff95861660208a015293851693880193909352921660608601526001600160401b0390811660808601521660a08401525090919050565b60608160028060ff16826040015160ff161461179c57604080830151905161800560e51b815260ff91821660048201529082166024820152604401610638565b6117ae8460000151856060015161197f565b6001600160401b03166080850181905263fffffffe19016118845760006117dd85600001518660400151611a47565b905063ffffffff8082161015610d4a5784516118029063ffffffff80841690611af416565b60405160200161181291906124aa565b604051602081830303815290604052935061183585600001518660400151611a47565b905063ffffffff8082161015610d4a578451849061185c9063ffffffff80851690611af416565b60405160200161186d9291906124c6565b604051602081830303815290604052935050610d4c565b6080840151845161189e9163ffffffff90811690611af416565b9250610d4c565b600060208260ff1611156118bb576118bb61231c565b60008260ff168451116118cf5783516118d4565b8260ff165b905060005b8181101561191557806008028582815181106118f7576118f76120a0565b01602001516001600160f81b031916901c92909217916001016118d9565b505092915050565b6000816020015182600001515180821115611955576040516363a056dd60e01b81526004810183905260248101829052604401610638565b83516020850180518083016001015195509081906119728261247e565b8152505050505050919050565b600060188260ff161015611997575060ff8116610ec3565b8160ff166018036119b5576119ab8361191d565b60ff169050610ec3565b8160ff166019036119d4576119c983611bb4565b61ffff169050610ec3565b8160ff16601a036119f5576119e883611c20565b63ffffffff169050610ec3565b8160ff16601b03611a1057611a0983611c7f565b9050610ec3565b8160ff16601f03611a2957506001600160401b03610ec3565b604051636d785b1360e01b815260ff83166004820152602401610638565b600080611a538461191d565b90508060ff1660ff03611a70576001600160401b03915050610ec3565b611a7d8482601f1661197f565b91506001600160401b0380831610611ab357604051636d785b1360e01b81526001600160401b0383166004820152602401610638565b60ff83166007600583901c1614611aed5760405161800560e51b81526007600583901c16600482015260ff84166024820152604401610638565b5092915050565b6060818360200151611b069190612497565b83515180821115611b34576040516363a056dd60e01b81526004810183905260248101829052604401610638565b836001600160401b03811115611b4c57611b4c612001565b6040519080825280601f01601f191660200182016040528015611b76576020820181803683370190505b5092508315611915578451602080870151908183018101908601611b9b81838a611cde565b611ba789896001611d24565b5050505050505092915050565b600081602001516002611bc79190612497565b82515180821115611bf5576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600281840181015196509091611c138284612497565b9052509395945050505050565b600081602001516004611c339190612497565b82515180821115611c61576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600481840181015196509091611c138284612497565b600081602001516008611c929190612497565b82515180821115611cc0576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600881840181015196509091611c138284612497565b5b60208110611cfe578151835260209283019290910190601f1901611cdf565b8015610f81578151835160208390036101000a6000190180199092169116178352505050565b60008284600001515180821115611d58576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8315611d70576020860151611d6d9086612497565b94505b5050505060209190910181905290565b6040518060400160405280600015158152602001611d9c611da1565b905290565b604080516101008101909152606060c08201908152600060e08301528190815260006020820181905260408201819052606082018190526080820181905260a09091015290565b60005b83811015611e03578181015183820152602001611deb565b50506000910152565b720dcdee840d2dae0d8cadacadce8cac8744060f606b1b815260008551611e3a816013850160208a01611de8565b855190830190611e51816013840160208a01611de8565b8551910190611e67816013840160208901611de8565b8451910190611e7d816013840160208801611de8565b016013019695505050505050565b600060208284031215611e9d57600080fd5b5035919050565b63ffffffff8116811461100457600080fd5b600080600060608486031215611ecb57600080fd5b8335611ed681611ea4565b95602085013595506040909401359392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160068310611f2357634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611f3b57600080fd5b813561ffff81168114610a2f57600080fd5b6020815260008251806020840152611f6c816040850160208701611de8565b601f01601f19169190910160400192915050565b60006040828403121561144157600080fd5b6001600160a01b038116811461100457600080fd5b600060208284031215611fb957600080fd5b8135610a2f81611f92565b60008351611fd6818460208801611de8565b6101d160f51b9083019081528351611ff5816002840160208801611de8565b01600201949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff83168061205657612056612017565b8060ff84160491505092915050565b60ff8181168382160190811115610ec357610ec361202d565b600060ff83168061209157612091612017565b8060ff84160691505092915050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156120c857600080fd5b815160068110610a2f57600080fd5b60405160a081016001600160401b03811182821017156120f9576120f9612001565b60405290565b6001600160401b038116811461100457600080fd5b600082601f83011261212557600080fd5b81516001600160401b038082111561213f5761213f612001565b604051601f8301601f19908116603f0116810190828211818310171561216757612167612001565b8160405283815286602085880101111561218057600080fd5b6113d8846020830160208901611de8565b6000602082840312156121a357600080fd5b81516001600160401b03808211156121ba57600080fd5b9083019060a082860312156121ce57600080fd5b6121d66120d7565b82516121e181611f92565b815260208301516121f1816120ff565b6020820152604083015161220481611ea4565b60408201526060838101519082015260808301518281111561222557600080fd5b61223187828601612114565b60808301525095945050505050565b82815260608101610a2f60208301845460ff8116825260081c6001600160401b0316602090910152565b60006020828403121561227c57600080fd5b5051919050565b600060c0820190508682528560208301528460408301528360608301526113d860808301845460ff8116825260081c6001600160401b0316602090910152565b81810381811115610ec357610ec361202d565b61ffff818116838216019080821115611aed57611aed61202d565b8082028115828204841417610ec357610ec361202d565b60008261231757612317612017565b500490565b634e487b7160e01b600052600160045260246000fd5b60ff8116811461100457600080fd5b813561234c81612332565b60ff8116905081548160ff198216178355602084013561236b816120ff565b68ffffffffffffffff008160081b168368ffffffffffffffffff198416171784555050505050565b60208082526032908201527f5769746e65743a20747269656420746f206465636f64652076616c756520667260408201527137b69032b93937b932b2103932b9bab63a1760711b606082015260800190565b6000602082840312156123f757600080fd5b81516001600160401b0381111561240d57600080fd5b61241984828501612114565b949350505050565b60006020828403121561243357600080fd5b8135610a2f816120ff565b60006020828403121561245057600080fd5b8135610a2f81612332565b6001600160401b038181168382160280821691908281146119155761191561202d565b6000600182016124905761249061202d565b5060010190565b80820180821115610ec357610ec361202d565b600082516124bc818460208701611de8565b9190910192915050565b600083516124d8818460208801611de8565b8351908301906124ec818360208801611de8565b0194935050505056fea2646970667358221220a7d132818b11585f7a3bfec2ecaa814d67803886db4209237c7caf9aaacd671564736f6c63430008190033", + "deployedBytecode": "0x60806040526004361061014f5760003560e01c80639bc86fec116100b6578063c0248bf11161006f578063c0248bf11461051f578063d2bc459b1461053f578063de0958ac1461055f578063e30c39781461057f578063eb92b29b14610594578063f2fde38b146105b75761018c565b80639bc86fec14610411578063a3252f6814610441578063a60ee2681461047c578063adb7c3f71461049c578063b8d38c96146104be578063bff852fa146104de5761018c565b806376fa9d201161010857806376fa9d201461031f57806379ba50971461034c57806382b1c174146103615780638da5cb5b146103815780638f2616841461039f5780639353badd146103b45761018c565b806317f45487146101f757806324cbbfc11461024457806346d1d21a14610279578063613e9978146102c0578063699b328a14610302578063715018a61461030a5761018c565b3661018c5761018a604051806040016040528060158152602001741b9bc81d1c985b9cd9995c9cc81858d8d95c1d1959605a1b8152506105d7565b005b61018a61019d60003560f81c610641565b6101ae60ff60003560f01c16610641565b6101bf60ff60003560e81c16610641565b6101d060ff60003560e01c16610641565b6040516020016101e39493929190611e0c565b6040516020818303038152906040526105d7565b34801561020357600080fd5b50610217610212366004611e8b565b610733565b604080519485526001600160401b0390931660208501529183015260608201526080015b60405180910390f35b34801561025057600080fd5b5061026461025f366004611eb6565b6109e6565b60405163ffffffff909116815260200161023b565b34801561028557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161023b565b3480156102cc57600080fd5b506102f47f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161023b565b6102f4610a3b565b34801561031657600080fd5b5061018a610bec565b34801561032b57600080fd5b5061033f61033a366004611e8b565b610c00565b60405161023b9190611f01565b34801561035857600080fd5b5061018a610d53565b34801561036d57600080fd5b506102f461037c366004611e8b565b610d5b565b34801561038d57600080fd5b506000546001600160a01b03166102a8565b3480156103ab57600080fd5b506102f4610d96565b3480156103c057600080fd5b5060408051808201825260008082526020918201528151808301835260025460ff81168083526001600160401b0361010090920482169284019283528451908152915116918101919091520161023b565b34801561041d57600080fd5b5061043161042c366004611e8b565b610da6565b604051901515815260200161023b565b34801561044d57600080fd5b5061046161045c366004611e8b565b610dcb565b6040805193845260208401929092529082015260600161023b565b34801561048857600080fd5b506102f4610497366004611e8b565b610e03565b3480156104a857600080fd5b5060405163124f910d60e01b815260200161023b565b3480156104ca57600080fd5b5061018a6104d9366004611f29565b610ec9565b3480156104ea57600080fd5b5060408051808201825260128152712bb4ba3732ba2930b73237b6b732b9b9ab1960711b6020820152905161023b9190611f4d565b34801561052b57600080fd5b506102f461053a366004611e8b565b610ee9565b34801561054b57600080fd5b5061018a61055a366004611f80565b610f37565b34801561056b57600080fd5b506102f461057a366004611e8b565b610f86565b34801561058b57600080fd5b506102a8610fdf565b3480156105a057600080fd5b5060035460405161ffff909116815260200161023b565b3480156105c357600080fd5b5061018a6105d2366004611fa7565b610ff3565b6040805180820190915260128152712bb4ba3732ba2930b73237b6b732b9b9ab1960711b602082015281604051602001610612929190611fc4565b60408051601f198184030181529082905262461bcd60e51b825261063891600401611f4d565b60405180910390fd5b604080516002808252818301909252606091600091906020820181803683370190505090506000610673601085612043565b61067e906030612065565b9050600061068d60108661207e565b610698906030612065565b905060398260ff1611156106b4576106b1600783612065565b91505b60398160ff1611156106ce576106cb600782612065565b90505b8160f81b836000815181106106e5576106e56120a0565b60200101906001600160f81b031916908160001a9053508060f81b83600181518110610713576107136120a0565b60200101906001600160f81b031916908160001a90535091949350505050565b600080600080610741611007565b6000868152600191909101602052604081205490036107665761076385610f86565b94505b6000610770611007565b600101600087815260200190815260200160002090506000816000015490506107c381600014156040518060400160405280600e81526020016d1b9bdd081c985b991bdb5a5e995960921b81525061102b565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa15801561082b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084f91906120b6565b9050600281600581111561086557610865611eeb565b0361093d57604051637b0c90d960e11b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f61921b290602401600060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108fa9190810190612191565b9050806040015163ffffffff1696508060600151955080602001516001600160401b03169450610935610930826080015161103d565b61105b565b9750506109db565b600381600581111561095157610951611eeb565b036109a957600283015460408051808201909152601081526f6661756c74792072616e646f6d697a6560801b602082015261098f908215159061102b565b61099881610733565b9750975097509750505050506109df565b6109db6040518060400160405280601181526020017070656e64696e672072616e646f6d697a6560781b8152506105d7565b5050505b9193509193565b6000610a2c8484336109f786610d5b565b604080516001600160a01b03909316602084015282015260600160405160208183030381529060405280519060200120611090565b90505b9392505050565b905090565b600043610a46611007565b541015610ba95734905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633dc2b7a2837f000000000000000000000000000000000000000000000000000000000000000060026040518463ffffffff1660e01b8152600401610ac2929190612240565b60206040518083038185885af1158015610ae0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b05919061226a565b90506000610b11611007565b436000908152600191909101602052604081208381559150610b31611007565b5460018301819055905043610b44611007565b6000838152600191909101602052604090206002015543610b63611007565b556040517f8cb766b09215126141c41df86fd488fe4745f22f3c995c3ad9aaf4c07195b94690610b9d9043903a9088908890600290612283565b60405180910390a15050505b34811015610be957336108fc610bbf83346122c3565b6040518115909202916000818181858888f19350505050158015610be7573d6000803e3d6000fd5b505b90565b610bf46110ef565b610bfe600061111c565b565b6000610c0a611007565b600083815260019190910160205260408120549003610c2f57610c2c82610f86565b91505b6000610c39611007565b600084815260019190910160205260408120549150819003610c5e5750600092915050565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea91906120b6565b90506003816005811115610d0057610d00611eeb565b03610a2f576000610d0f611007565b6000868152600191909101602052604090206002015490508015610d3f57610d3681610c00565b95945050505050565b506003949350505050565b505b5050919050565b610bfe611135565b600081610d67836111b0565b604080516020810193909352820152606001604051602081830303815290604052805190602001209050919050565b6000610da0611007565b54919050565b60006002610db383610c00565b6005811115610dc457610dc4611eeb565b1492915050565b600080600080610dd9611007565b60009586526001908101602052604090952080549581015460029091015495969095945092505050565b604051630f7b104360e31b815260048101829052602260248201526000906064906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637bd8821890604401602060405180830381865afa158015610e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e99919061226a565b600354610eab9061ffff1660646122d6565b61ffff16610eb991906122f1565b610ec39190612308565b92915050565b610ed16110ef565b6003805461ffff191661ffff92909216919091179055565b6000808211610efa57610efa61231c565b6000610f04611007565b549050808311610ec357610f3283610f1a611007565b60008481526001918201602052604090200154611414565b610a2f565b610f3f6110ef565b610f74610f4b82611447565b6040518060400160405280600b81526020016a696e76616c696420534c4160a81b81525061102b565b806002610f818282612341565b505050565b6000610f90611007565b600083815260019190910160205260408120549003610fc057610fbb82610fb5611007565b546114d4565b610ec3565b610fc8611007565b600092835260010160205250604090206002015490565b6000610a366001546001600160a01b031690565b610ffb6110ef565b61100481611523565b50565b7f643778935c57df947f6944f6a5242a3e91445f6337f4b2ec670c8642153b614f90565b8161103957611039816105d7565b5050565b611045611d80565b600061105083611555565b9050610a2f8161157a565b600081806000015161107f5760405162461bcd60e51b815260040161063890612393565b610a2f61108b846115ae565b6115df565b6000806001600160e01b0383856040516020016110b7929190918252602082015260400190565b60408051601f19818403018152919052805160209091012016905060e06110e463ffffffff8716836122f1565b901c95945050505050565b6000546001600160a01b03163314610bfe5760405163118cdaa760e01b8152336004820152602401610638565b600180546001600160a01b0319169055611004816115ec565b338061113f610fdf565b6001600160a01b0316146111a75760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610638565b6110048161111c565b60006111ba611007565b6000838152600191909101602052604081205490036111df576111dc82610f86565b91505b60006111e9611007565b6001016000848152602001908152602001600020905060008160000154905061123c81600014156040518060400160405280600e81526020016d1b9bdd081c985b991bdb5a5e995960921b81525061102b565b60405163234fe6e360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063234fe6e390602401602060405180830381865afa1580156112a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c891906120b6565b905060028160058111156112de576112de611eeb565b0361137d576040516311a7b16760e31b815260048101839052610d3690610930906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3d8b3890602401600060405180830381865afa158015611350573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261137891908101906123e5565b61103d565b600381600581111561139157611391611eeb565b036113e257600283015460408051808201909152601081526f6661756c74792072616e646f6d697a6560801b60208201526113cf908215159061102b565b6113d8816111b0565b9695505050505050565b610d4a6040518060400160405280601181526020017070656e64696e672072616e646f6d697a6560781b8152506105d7565b600081831161144157610f3283611429611007565b60008581526001918201602052604090200154611414565b50919050565b60008061145a6040840160208501612421565b6001600160401b031611801561147f5750600061147a602084018461243e565b60ff16115b801561149b5750607f611495602084018461243e565b60ff1611155b8015610ec357506404a817c8006114b86040840160208501612421565b6114c390606461245b565b6001600160401b0316101592915050565b60008183101561150257610f32836114ea611007565b600085815260019182016020526040902001546114d4565b61150a611007565b6000928352600101602052506040902060020154919050565b61152b6110ef565b6001600160a01b0381166111a757604051631e4fbdf760e01b815260006004820152602401610638565b61155d611da1565b6040805180820190915282815260006020820152610a2f8161163c565b611582611d80565b5060a0810151604080518082019091526001600160401b03909116602714158152602081019190915290565b60608180600001516115d25760405162461bcd60e51b815260040161063890612393565b610a2f836020015161175c565b6000610ec38260206118a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611644611da1565b8151518290600003611669576040516309036d4760e21b815260040160405180910390fd5b600060ff816001600160401b038160015b80156116ec576116898961191d565b9550816116958161247e565b6007600589901c169650601f8816955092505060051985016116e45760208901516116c08a8661197f565b9350808a602001516116d291906122c3565b6116dc9084612497565b92505061167a565b50600061167a565b600760ff861611156117165760405163bd2ac87960e01b815260ff86166004820152602401610638565b506040805160c08101825298895260ff95861660208a015293851693880193909352921660608601526001600160401b0390811660808601521660a08401525090919050565b60608160028060ff16826040015160ff161461179c57604080830151905161800560e51b815260ff91821660048201529082166024820152604401610638565b6117ae8460000151856060015161197f565b6001600160401b03166080850181905263fffffffe19016118845760006117dd85600001518660400151611a47565b905063ffffffff8082161015610d4a5784516118029063ffffffff80841690611af416565b60405160200161181291906124aa565b604051602081830303815290604052935061183585600001518660400151611a47565b905063ffffffff8082161015610d4a578451849061185c9063ffffffff80851690611af416565b60405160200161186d9291906124c6565b604051602081830303815290604052935050610d4c565b6080840151845161189e9163ffffffff90811690611af416565b9250610d4c565b600060208260ff1611156118bb576118bb61231c565b60008260ff168451116118cf5783516118d4565b8260ff165b905060005b8181101561191557806008028582815181106118f7576118f76120a0565b01602001516001600160f81b031916901c92909217916001016118d9565b505092915050565b6000816020015182600001515180821115611955576040516363a056dd60e01b81526004810183905260248101829052604401610638565b83516020850180518083016001015195509081906119728261247e565b8152505050505050919050565b600060188260ff161015611997575060ff8116610ec3565b8160ff166018036119b5576119ab8361191d565b60ff169050610ec3565b8160ff166019036119d4576119c983611bb4565b61ffff169050610ec3565b8160ff16601a036119f5576119e883611c20565b63ffffffff169050610ec3565b8160ff16601b03611a1057611a0983611c7f565b9050610ec3565b8160ff16601f03611a2957506001600160401b03610ec3565b604051636d785b1360e01b815260ff83166004820152602401610638565b600080611a538461191d565b90508060ff1660ff03611a70576001600160401b03915050610ec3565b611a7d8482601f1661197f565b91506001600160401b0380831610611ab357604051636d785b1360e01b81526001600160401b0383166004820152602401610638565b60ff83166007600583901c1614611aed5760405161800560e51b81526007600583901c16600482015260ff84166024820152604401610638565b5092915050565b6060818360200151611b069190612497565b83515180821115611b34576040516363a056dd60e01b81526004810183905260248101829052604401610638565b836001600160401b03811115611b4c57611b4c612001565b6040519080825280601f01601f191660200182016040528015611b76576020820181803683370190505b5092508315611915578451602080870151908183018101908601611b9b81838a611cde565b611ba789896001611d24565b5050505050505092915050565b600081602001516002611bc79190612497565b82515180821115611bf5576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600281840181015196509091611c138284612497565b9052509395945050505050565b600081602001516004611c339190612497565b82515180821115611c61576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600481840181015196509091611c138284612497565b600081602001516008611c929190612497565b82515180821115611cc0576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8351602085018051600881840181015196509091611c138284612497565b5b60208110611cfe578151835260209283019290910190601f1901611cdf565b8015610f81578151835160208390036101000a6000190180199092169116178352505050565b60008284600001515180821115611d58576040516363a056dd60e01b81526004810183905260248101829052604401610638565b8315611d70576020860151611d6d9086612497565b94505b5050505060209190910181905290565b6040518060400160405280600015158152602001611d9c611da1565b905290565b604080516101008101909152606060c08201908152600060e08301528190815260006020820181905260408201819052606082018190526080820181905260a09091015290565b60005b83811015611e03578181015183820152602001611deb565b50506000910152565b720dcdee840d2dae0d8cadacadce8cac8744060f606b1b815260008551611e3a816013850160208a01611de8565b855190830190611e51816013840160208a01611de8565b8551910190611e67816013840160208901611de8565b8451910190611e7d816013840160208801611de8565b016013019695505050505050565b600060208284031215611e9d57600080fd5b5035919050565b63ffffffff8116811461100457600080fd5b600080600060608486031215611ecb57600080fd5b8335611ed681611ea4565b95602085013595506040909401359392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160068310611f2357634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611f3b57600080fd5b813561ffff81168114610a2f57600080fd5b6020815260008251806020840152611f6c816040850160208701611de8565b601f01601f19169190910160400192915050565b60006040828403121561144157600080fd5b6001600160a01b038116811461100457600080fd5b600060208284031215611fb957600080fd5b8135610a2f81611f92565b60008351611fd6818460208801611de8565b6101d160f51b9083019081528351611ff5816002840160208801611de8565b01600201949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff83168061205657612056612017565b8060ff84160491505092915050565b60ff8181168382160190811115610ec357610ec361202d565b600060ff83168061209157612091612017565b8060ff84160691505092915050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156120c857600080fd5b815160068110610a2f57600080fd5b60405160a081016001600160401b03811182821017156120f9576120f9612001565b60405290565b6001600160401b038116811461100457600080fd5b600082601f83011261212557600080fd5b81516001600160401b038082111561213f5761213f612001565b604051601f8301601f19908116603f0116810190828211818310171561216757612167612001565b8160405283815286602085880101111561218057600080fd5b6113d8846020830160208901611de8565b6000602082840312156121a357600080fd5b81516001600160401b03808211156121ba57600080fd5b9083019060a082860312156121ce57600080fd5b6121d66120d7565b82516121e181611f92565b815260208301516121f1816120ff565b6020820152604083015161220481611ea4565b60408201526060838101519082015260808301518281111561222557600080fd5b61223187828601612114565b60808301525095945050505050565b82815260608101610a2f60208301845460ff8116825260081c6001600160401b0316602090910152565b60006020828403121561227c57600080fd5b5051919050565b600060c0820190508682528560208301528460408301528360608301526113d860808301845460ff8116825260081c6001600160401b0316602090910152565b81810381811115610ec357610ec361202d565b61ffff818116838216019080821115611aed57611aed61202d565b8082028115828204841417610ec357610ec361202d565b60008261231757612317612017565b500490565b634e487b7160e01b600052600160045260246000fd5b60ff8116811461100457600080fd5b813561234c81612332565b60ff8116905081548160ff198216178355602084013561236b816120ff565b68ffffffffffffffff008160081b168368ffffffffffffffffff198416171784555050505050565b60208082526032908201527f5769746e65743a20747269656420746f206465636f64652076616c756520667260408201527137b69032b93937b932b2103932b9bab63a1760711b606082015260800190565b6000602082840312156123f757600080fd5b81516001600160401b0381111561240d57600080fd5b61241984828501612114565b949350505050565b60006020828403121561243357600080fd5b8135610a2f816120ff565b60006020828403121561245057600080fd5b8135610a2f81612332565b6001600160401b038181168382160280821691908281146119155761191561202d565b6000600182016124905761249061202d565b5060010190565b80820180821115610ec357610ec361202d565b600082516124bc818460208701611de8565b9190910192915050565b600083516124d8818460208801611de8565b8351908301906124ec818360208801611de8565b0194935050505056fea2646970667358221220a7d132818b11585f7a3bfec2ecaa814d67803886db4209237c7caf9aaacd671564736f6c63430008190033", + "immutableReferences": { + "1016": [ + { + "length": 32, + "start": 648 + }, + { + "length": 32, + "start": 2012 + }, + { + "length": 32, + "start": 2179 + }, + { + "length": 32, + "start": 2644 + }, + { + "length": 32, + "start": 3191 + }, + { + "length": 32, + "start": 3630 + }, + { + "length": 32, + "start": 4693 + }, + { + "length": 32, + "start": 4873 + } + ], + "2037": [ + { + "length": 32, + "start": 722 + }, + { + "length": 32, + "start": 2692 + } + ] + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:9594:84", + "nodeType": "YulBlock", + "src": "0:9594:84", + "statements": [ + { + "nativeSrc": "6:3:84", + "nodeType": "YulBlock", + "src": "6:3:84", + "statements": [] + }, + { + "body": { + "nativeSrc": "73:86:84", + "nodeType": "YulBlock", + "src": "73:86:84", + "statements": [ + { + "body": { + "nativeSrc": "137:16:84", + "nodeType": "YulBlock", + "src": "137:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "146:1:84", + "nodeType": "YulLiteral", + "src": "146:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "149:1:84", + "nodeType": "YulLiteral", + "src": "149:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "139:6:84", + "nodeType": "YulIdentifier", + "src": "139:6:84" + }, + "nativeSrc": "139:12:84", + "nodeType": "YulFunctionCall", + "src": "139:12:84" + }, + "nativeSrc": "139:12:84", + "nodeType": "YulExpressionStatement", + "src": "139:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "96:5:84", + "nodeType": "YulIdentifier", + "src": "96:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "107:5:84", + "nodeType": "YulIdentifier", + "src": "107:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "122:3:84", + "nodeType": "YulLiteral", + "src": "122:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "127:1:84", + "nodeType": "YulLiteral", + "src": "127:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "118:3:84", + "nodeType": "YulIdentifier", + "src": "118:3:84" + }, + "nativeSrc": "118:11:84", + "nodeType": "YulFunctionCall", + "src": "118:11:84" + }, + { + "kind": "number", + "nativeSrc": "131:1:84", + "nodeType": "YulLiteral", + "src": "131:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "114:3:84", + "nodeType": "YulIdentifier", + "src": "114:3:84" + }, + "nativeSrc": "114:19:84", + "nodeType": "YulFunctionCall", + "src": "114:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "103:3:84", + "nodeType": "YulIdentifier", + "src": "103:3:84" + }, + "nativeSrc": "103:31:84", + "nodeType": "YulFunctionCall", + "src": "103:31:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "93:2:84", + "nodeType": "YulIdentifier", + "src": "93:2:84" + }, + "nativeSrc": "93:42:84", + "nodeType": "YulFunctionCall", + "src": "93:42:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "86:6:84", + "nodeType": "YulIdentifier", + "src": "86:6:84" + }, + "nativeSrc": "86:50:84", + "nodeType": "YulFunctionCall", + "src": "86:50:84" + }, + "nativeSrc": "83:70:84", + "nodeType": "YulIf", + "src": "83:70:84" + } + ] + }, + "name": "validator_revert_contract_WitnetOracle", + "nativeSrc": "14:145:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "62:5:84", + "nodeType": "YulTypedName", + "src": "62:5:84", + "type": "" + } + ], + "src": "14:145:84" + }, + { + "body": { + "nativeSrc": "282:315:84", + "nodeType": "YulBlock", + "src": "282:315:84", + "statements": [ + { + "body": { + "nativeSrc": "328:16:84", + "nodeType": "YulBlock", + "src": "328:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "337:1:84", + "nodeType": "YulLiteral", + "src": "337:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "340:1:84", + "nodeType": "YulLiteral", + "src": "340:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "330:6:84", + "nodeType": "YulIdentifier", + "src": "330:6:84" + }, + "nativeSrc": "330:12:84", + "nodeType": "YulFunctionCall", + "src": "330:12:84" + }, + "nativeSrc": "330:12:84", + "nodeType": "YulExpressionStatement", + "src": "330:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "303:7:84", + "nodeType": "YulIdentifier", + "src": "303:7:84" + }, + { + "name": "headStart", + "nativeSrc": "312:9:84", + "nodeType": "YulIdentifier", + "src": "312:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "299:3:84", + "nodeType": "YulIdentifier", + "src": "299:3:84" + }, + "nativeSrc": "299:23:84", + "nodeType": "YulFunctionCall", + "src": "299:23:84" + }, + { + "kind": "number", + "nativeSrc": "324:2:84", + "nodeType": "YulLiteral", + "src": "324:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "295:3:84", + "nodeType": "YulIdentifier", + "src": "295:3:84" + }, + "nativeSrc": "295:32:84", + "nodeType": "YulFunctionCall", + "src": "295:32:84" + }, + "nativeSrc": "292:52:84", + "nodeType": "YulIf", + "src": "292:52:84" + }, + { + "nativeSrc": "353:29:84", + "nodeType": "YulVariableDeclaration", + "src": "353:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "372:9:84", + "nodeType": "YulIdentifier", + "src": "372:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "366:5:84", + "nodeType": "YulIdentifier", + "src": "366:5:84" + }, + "nativeSrc": "366:16:84", + "nodeType": "YulFunctionCall", + "src": "366:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "357:5:84", + "nodeType": "YulTypedName", + "src": "357:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "430:5:84", + "nodeType": "YulIdentifier", + "src": "430:5:84" + } + ], + "functionName": { + "name": "validator_revert_contract_WitnetOracle", + "nativeSrc": "391:38:84", + "nodeType": "YulIdentifier", + "src": "391:38:84" + }, + "nativeSrc": "391:45:84", + "nodeType": "YulFunctionCall", + "src": "391:45:84" + }, + "nativeSrc": "391:45:84", + "nodeType": "YulExpressionStatement", + "src": "391:45:84" + }, + { + "nativeSrc": "445:15:84", + "nodeType": "YulAssignment", + "src": "445:15:84", + "value": { + "name": "value", + "nativeSrc": "455:5:84", + "nodeType": "YulIdentifier", + "src": "455:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "445:6:84", + "nodeType": "YulIdentifier", + "src": "445:6:84" + } + ] + }, + { + "nativeSrc": "469:40:84", + "nodeType": "YulVariableDeclaration", + "src": "469:40:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "494:9:84", + "nodeType": "YulIdentifier", + "src": "494:9:84" + }, + { + "kind": "number", + "nativeSrc": "505:2:84", + "nodeType": "YulLiteral", + "src": "505:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "490:3:84", + "nodeType": "YulIdentifier", + "src": "490:3:84" + }, + "nativeSrc": "490:18:84", + "nodeType": "YulFunctionCall", + "src": "490:18:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "484:5:84", + "nodeType": "YulIdentifier", + "src": "484:5:84" + }, + "nativeSrc": "484:25:84", + "nodeType": "YulFunctionCall", + "src": "484:25:84" + }, + "variables": [ + { + "name": "value_1", + "nativeSrc": "473:7:84", + "nodeType": "YulTypedName", + "src": "473:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_1", + "nativeSrc": "557:7:84", + "nodeType": "YulIdentifier", + "src": "557:7:84" + } + ], + "functionName": { + "name": "validator_revert_contract_WitnetOracle", + "nativeSrc": "518:38:84", + "nodeType": "YulIdentifier", + "src": "518:38:84" + }, + "nativeSrc": "518:47:84", + "nodeType": "YulFunctionCall", + "src": "518:47:84" + }, + "nativeSrc": "518:47:84", + "nodeType": "YulExpressionStatement", + "src": "518:47:84" + }, + { + "nativeSrc": "574:17:84", + "nodeType": "YulAssignment", + "src": "574:17:84", + "value": { + "name": "value_1", + "nativeSrc": "584:7:84", + "nodeType": "YulIdentifier", + "src": "584:7:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "574:6:84", + "nodeType": "YulIdentifier", + "src": "574:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_contract$_WitnetOracle_$749t_address_fromMemory", + "nativeSrc": "164:433:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "240:9:84", + "nodeType": "YulTypedName", + "src": "240:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "251:7:84", + "nodeType": "YulTypedName", + "src": "251:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "263:6:84", + "nodeType": "YulTypedName", + "src": "263:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "271:6:84", + "nodeType": "YulTypedName", + "src": "271:6:84", + "type": "" + } + ], + "src": "164:433:84" + }, + { + "body": { + "nativeSrc": "703:102:84", + "nodeType": "YulBlock", + "src": "703:102:84", + "statements": [ + { + "nativeSrc": "713:26:84", + "nodeType": "YulAssignment", + "src": "713:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "725:9:84", + "nodeType": "YulIdentifier", + "src": "725:9:84" + }, + { + "kind": "number", + "nativeSrc": "736:2:84", + "nodeType": "YulLiteral", + "src": "736:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "721:3:84", + "nodeType": "YulIdentifier", + "src": "721:3:84" + }, + "nativeSrc": "721:18:84", + "nodeType": "YulFunctionCall", + "src": "721:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "713:4:84", + "nodeType": "YulIdentifier", + "src": "713:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "755:9:84", + "nodeType": "YulIdentifier", + "src": "755:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "770:6:84", + "nodeType": "YulIdentifier", + "src": "770:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "786:3:84", + "nodeType": "YulLiteral", + "src": "786:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "791:1:84", + "nodeType": "YulLiteral", + "src": "791:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "782:3:84", + "nodeType": "YulIdentifier", + "src": "782:3:84" + }, + "nativeSrc": "782:11:84", + "nodeType": "YulFunctionCall", + "src": "782:11:84" + }, + { + "kind": "number", + "nativeSrc": "795:1:84", + "nodeType": "YulLiteral", + "src": "795:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "778:3:84", + "nodeType": "YulIdentifier", + "src": "778:3:84" + }, + "nativeSrc": "778:19:84", + "nodeType": "YulFunctionCall", + "src": "778:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "766:3:84", + "nodeType": "YulIdentifier", + "src": "766:3:84" + }, + "nativeSrc": "766:32:84", + "nodeType": "YulFunctionCall", + "src": "766:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "748:6:84", + "nodeType": "YulIdentifier", + "src": "748:6:84" + }, + "nativeSrc": "748:51:84", + "nodeType": "YulFunctionCall", + "src": "748:51:84" + }, + "nativeSrc": "748:51:84", + "nodeType": "YulExpressionStatement", + "src": "748:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "602:203:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "672:9:84", + "nodeType": "YulTypedName", + "src": "672:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "683:6:84", + "nodeType": "YulTypedName", + "src": "683:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "694:4:84", + "nodeType": "YulTypedName", + "src": "694:4:84", + "type": "" + } + ], + "src": "602:203:84" + }, + { + "body": { + "nativeSrc": "890:210:84", + "nodeType": "YulBlock", + "src": "890:210:84", + "statements": [ + { + "body": { + "nativeSrc": "936:16:84", + "nodeType": "YulBlock", + "src": "936:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "945:1:84", + "nodeType": "YulLiteral", + "src": "945:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "948:1:84", + "nodeType": "YulLiteral", + "src": "948:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "938:6:84", + "nodeType": "YulIdentifier", + "src": "938:6:84" + }, + "nativeSrc": "938:12:84", + "nodeType": "YulFunctionCall", + "src": "938:12:84" + }, + "nativeSrc": "938:12:84", + "nodeType": "YulExpressionStatement", + "src": "938:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "911:7:84", + "nodeType": "YulIdentifier", + "src": "911:7:84" + }, + { + "name": "headStart", + "nativeSrc": "920:9:84", + "nodeType": "YulIdentifier", + "src": "920:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "907:3:84", + "nodeType": "YulIdentifier", + "src": "907:3:84" + }, + "nativeSrc": "907:23:84", + "nodeType": "YulFunctionCall", + "src": "907:23:84" + }, + { + "kind": "number", + "nativeSrc": "932:2:84", + "nodeType": "YulLiteral", + "src": "932:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "903:3:84", + "nodeType": "YulIdentifier", + "src": "903:3:84" + }, + "nativeSrc": "903:32:84", + "nodeType": "YulFunctionCall", + "src": "903:32:84" + }, + "nativeSrc": "900:52:84", + "nodeType": "YulIf", + "src": "900:52:84" + }, + { + "nativeSrc": "961:29:84", + "nodeType": "YulVariableDeclaration", + "src": "961:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "980:9:84", + "nodeType": "YulIdentifier", + "src": "980:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "974:5:84", + "nodeType": "YulIdentifier", + "src": "974:5:84" + }, + "nativeSrc": "974:16:84", + "nodeType": "YulFunctionCall", + "src": "974:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "965:5:84", + "nodeType": "YulTypedName", + "src": "965:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1054:16:84", + "nodeType": "YulBlock", + "src": "1054:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1063:1:84", + "nodeType": "YulLiteral", + "src": "1063:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1066:1:84", + "nodeType": "YulLiteral", + "src": "1066:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1056:6:84", + "nodeType": "YulIdentifier", + "src": "1056:6:84" + }, + "nativeSrc": "1056:12:84", + "nodeType": "YulFunctionCall", + "src": "1056:12:84" + }, + "nativeSrc": "1056:12:84", + "nodeType": "YulExpressionStatement", + "src": "1056:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1012:5:84", + "nodeType": "YulIdentifier", + "src": "1012:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1023:5:84", + "nodeType": "YulIdentifier", + "src": "1023:5:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1034:3:84", + "nodeType": "YulLiteral", + "src": "1034:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "1039:10:84", + "nodeType": "YulLiteral", + "src": "1039:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1030:3:84", + "nodeType": "YulIdentifier", + "src": "1030:3:84" + }, + "nativeSrc": "1030:20:84", + "nodeType": "YulFunctionCall", + "src": "1030:20:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1019:3:84", + "nodeType": "YulIdentifier", + "src": "1019:3:84" + }, + "nativeSrc": "1019:32:84", + "nodeType": "YulFunctionCall", + "src": "1019:32:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1009:2:84", + "nodeType": "YulIdentifier", + "src": "1009:2:84" + }, + "nativeSrc": "1009:43:84", + "nodeType": "YulFunctionCall", + "src": "1009:43:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1002:6:84", + "nodeType": "YulIdentifier", + "src": "1002:6:84" + }, + "nativeSrc": "1002:51:84", + "nodeType": "YulFunctionCall", + "src": "1002:51:84" + }, + "nativeSrc": "999:71:84", + "nodeType": "YulIf", + "src": "999:71:84" + }, + { + "nativeSrc": "1079:15:84", + "nodeType": "YulAssignment", + "src": "1079:15:84", + "value": { + "name": "value", + "nativeSrc": "1089:5:84", + "nodeType": "YulIdentifier", + "src": "1089:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1079:6:84", + "nodeType": "YulIdentifier", + "src": "1079:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes4_fromMemory", + "nativeSrc": "810:290:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "856:9:84", + "nodeType": "YulTypedName", + "src": "856:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "867:7:84", + "nodeType": "YulTypedName", + "src": "867:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "879:6:84", + "nodeType": "YulTypedName", + "src": "879:6:84", + "type": "" + } + ], + "src": "810:290:84" + }, + { + "body": { + "nativeSrc": "1279:227:84", + "nodeType": "YulBlock", + "src": "1279:227:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1296:9:84", + "nodeType": "YulIdentifier", + "src": "1296:9:84" + }, + { + "kind": "number", + "nativeSrc": "1307:2:84", + "nodeType": "YulLiteral", + "src": "1307:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1289:6:84", + "nodeType": "YulIdentifier", + "src": "1289:6:84" + }, + "nativeSrc": "1289:21:84", + "nodeType": "YulFunctionCall", + "src": "1289:21:84" + }, + "nativeSrc": "1289:21:84", + "nodeType": "YulExpressionStatement", + "src": "1289:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1330:9:84", + "nodeType": "YulIdentifier", + "src": "1330:9:84" + }, + { + "kind": "number", + "nativeSrc": "1341:2:84", + "nodeType": "YulLiteral", + "src": "1341:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1326:3:84", + "nodeType": "YulIdentifier", + "src": "1326:3:84" + }, + "nativeSrc": "1326:18:84", + "nodeType": "YulFunctionCall", + "src": "1326:18:84" + }, + { + "kind": "number", + "nativeSrc": "1346:2:84", + "nodeType": "YulLiteral", + "src": "1346:2:84", + "type": "", + "value": "37" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1319:6:84", + "nodeType": "YulIdentifier", + "src": "1319:6:84" + }, + "nativeSrc": "1319:30:84", + "nodeType": "YulFunctionCall", + "src": "1319:30:84" + }, + "nativeSrc": "1319:30:84", + "nodeType": "YulExpressionStatement", + "src": "1319:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1369:9:84", + "nodeType": "YulIdentifier", + "src": "1369:9:84" + }, + { + "kind": "number", + "nativeSrc": "1380:2:84", + "nodeType": "YulLiteral", + "src": "1380:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1365:3:84", + "nodeType": "YulIdentifier", + "src": "1365:3:84" + }, + "nativeSrc": "1365:18:84", + "nodeType": "YulFunctionCall", + "src": "1365:18:84" + }, + { + "hexValue": "5573696e675769746e65743a20756e636f6d706c69616e74205769746e65744f", + "kind": "string", + "nativeSrc": "1385:34:84", + "nodeType": "YulLiteral", + "src": "1385:34:84", + "type": "", + "value": "UsingWitnet: uncompliant WitnetO" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1358:6:84", + "nodeType": "YulIdentifier", + "src": "1358:6:84" + }, + "nativeSrc": "1358:62:84", + "nodeType": "YulFunctionCall", + "src": "1358:62:84" + }, + "nativeSrc": "1358:62:84", + "nodeType": "YulExpressionStatement", + "src": "1358:62:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1440:9:84", + "nodeType": "YulIdentifier", + "src": "1440:9:84" + }, + { + "kind": "number", + "nativeSrc": "1451:2:84", + "nodeType": "YulLiteral", + "src": "1451:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1436:3:84", + "nodeType": "YulIdentifier", + "src": "1436:3:84" + }, + "nativeSrc": "1436:18:84", + "nodeType": "YulFunctionCall", + "src": "1436:18:84" + }, + { + "hexValue": "7261636c65", + "kind": "string", + "nativeSrc": "1456:7:84", + "nodeType": "YulLiteral", + "src": "1456:7:84", + "type": "", + "value": "racle" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1429:6:84", + "nodeType": "YulIdentifier", + "src": "1429:6:84" + }, + "nativeSrc": "1429:35:84", + "nodeType": "YulFunctionCall", + "src": "1429:35:84" + }, + "nativeSrc": "1429:35:84", + "nodeType": "YulExpressionStatement", + "src": "1429:35:84" + }, + { + "nativeSrc": "1473:27:84", + "nodeType": "YulAssignment", + "src": "1473:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1485:9:84", + "nodeType": "YulIdentifier", + "src": "1485:9:84" + }, + { + "kind": "number", + "nativeSrc": "1496:3:84", + "nodeType": "YulLiteral", + "src": "1496:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1481:3:84", + "nodeType": "YulIdentifier", + "src": "1481:3:84" + }, + "nativeSrc": "1481:19:84", + "nodeType": "YulFunctionCall", + "src": "1481:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "1473:4:84", + "nodeType": "YulIdentifier", + "src": "1473:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_57d830abe71d02a02e5da4295b2a41f780665da6ca2ca2ca1e1e440e807c06d7__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "1105:401:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1256:9:84", + "nodeType": "YulTypedName", + "src": "1256:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1270:4:84", + "nodeType": "YulTypedName", + "src": "1270:4:84", + "type": "" + } + ], + "src": "1105:401:84" + }, + { + "body": { + "nativeSrc": "1622:184:84", + "nodeType": "YulBlock", + "src": "1622:184:84", + "statements": [ + { + "body": { + "nativeSrc": "1668:16:84", + "nodeType": "YulBlock", + "src": "1668:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1677:1:84", + "nodeType": "YulLiteral", + "src": "1677:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1680:1:84", + "nodeType": "YulLiteral", + "src": "1680:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1670:6:84", + "nodeType": "YulIdentifier", + "src": "1670:6:84" + }, + "nativeSrc": "1670:12:84", + "nodeType": "YulFunctionCall", + "src": "1670:12:84" + }, + "nativeSrc": "1670:12:84", + "nodeType": "YulExpressionStatement", + "src": "1670:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1643:7:84", + "nodeType": "YulIdentifier", + "src": "1643:7:84" + }, + { + "name": "headStart", + "nativeSrc": "1652:9:84", + "nodeType": "YulIdentifier", + "src": "1652:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1639:3:84", + "nodeType": "YulIdentifier", + "src": "1639:3:84" + }, + "nativeSrc": "1639:23:84", + "nodeType": "YulFunctionCall", + "src": "1639:23:84" + }, + { + "kind": "number", + "nativeSrc": "1664:2:84", + "nodeType": "YulLiteral", + "src": "1664:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1635:3:84", + "nodeType": "YulIdentifier", + "src": "1635:3:84" + }, + "nativeSrc": "1635:32:84", + "nodeType": "YulFunctionCall", + "src": "1635:32:84" + }, + "nativeSrc": "1632:52:84", + "nodeType": "YulIf", + "src": "1632:52:84" + }, + { + "nativeSrc": "1693:29:84", + "nodeType": "YulVariableDeclaration", + "src": "1693:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1712:9:84", + "nodeType": "YulIdentifier", + "src": "1712:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1706:5:84", + "nodeType": "YulIdentifier", + "src": "1706:5:84" + }, + "nativeSrc": "1706:16:84", + "nodeType": "YulFunctionCall", + "src": "1706:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "1697:5:84", + "nodeType": "YulTypedName", + "src": "1697:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "1770:5:84", + "nodeType": "YulIdentifier", + "src": "1770:5:84" + } + ], + "functionName": { + "name": "validator_revert_contract_WitnetOracle", + "nativeSrc": "1731:38:84", + "nodeType": "YulIdentifier", + "src": "1731:38:84" + }, + "nativeSrc": "1731:45:84", + "nodeType": "YulFunctionCall", + "src": "1731:45:84" + }, + "nativeSrc": "1731:45:84", + "nodeType": "YulExpressionStatement", + "src": "1731:45:84" + }, + { + "nativeSrc": "1785:15:84", + "nodeType": "YulAssignment", + "src": "1785:15:84", + "value": { + "name": "value", + "nativeSrc": "1795:5:84", + "nodeType": "YulIdentifier", + "src": "1795:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1785:6:84", + "nodeType": "YulIdentifier", + "src": "1785:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_contract$_WitnetRequestBytecodes_$849_fromMemory", + "nativeSrc": "1511:295:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1588:9:84", + "nodeType": "YulTypedName", + "src": "1588:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1599:7:84", + "nodeType": "YulTypedName", + "src": "1599:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1611:6:84", + "nodeType": "YulTypedName", + "src": "1611:6:84", + "type": "" + } + ], + "src": "1511:295:84" + }, + { + "body": { + "nativeSrc": "1843:95:84", + "nodeType": "YulBlock", + "src": "1843:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1860:1:84", + "nodeType": "YulLiteral", + "src": "1860:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1867:3:84", + "nodeType": "YulLiteral", + "src": "1867:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "1872:10:84", + "nodeType": "YulLiteral", + "src": "1872:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1863:3:84", + "nodeType": "YulIdentifier", + "src": "1863:3:84" + }, + "nativeSrc": "1863:20:84", + "nodeType": "YulFunctionCall", + "src": "1863:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1853:6:84", + "nodeType": "YulIdentifier", + "src": "1853:6:84" + }, + "nativeSrc": "1853:31:84", + "nodeType": "YulFunctionCall", + "src": "1853:31:84" + }, + "nativeSrc": "1853:31:84", + "nodeType": "YulExpressionStatement", + "src": "1853:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1900:1:84", + "nodeType": "YulLiteral", + "src": "1900:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "1903:4:84", + "nodeType": "YulLiteral", + "src": "1903:4:84", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1893:6:84", + "nodeType": "YulIdentifier", + "src": "1893:6:84" + }, + "nativeSrc": "1893:15:84", + "nodeType": "YulFunctionCall", + "src": "1893:15:84" + }, + "nativeSrc": "1893:15:84", + "nodeType": "YulExpressionStatement", + "src": "1893:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1924:1:84", + "nodeType": "YulLiteral", + "src": "1924:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1927:4:84", + "nodeType": "YulLiteral", + "src": "1927:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1917:6:84", + "nodeType": "YulIdentifier", + "src": "1917:6:84" + }, + "nativeSrc": "1917:15:84", + "nodeType": "YulFunctionCall", + "src": "1917:15:84" + }, + "nativeSrc": "1917:15:84", + "nodeType": "YulExpressionStatement", + "src": "1917:15:84" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "1811:127:84", + "nodeType": "YulFunctionDefinition", + "src": "1811:127:84" + }, + { + "body": { + "nativeSrc": "1975:95:84", + "nodeType": "YulBlock", + "src": "1975:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1992:1:84", + "nodeType": "YulLiteral", + "src": "1992:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1999:3:84", + "nodeType": "YulLiteral", + "src": "1999:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "2004:10:84", + "nodeType": "YulLiteral", + "src": "2004:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1995:3:84", + "nodeType": "YulIdentifier", + "src": "1995:3:84" + }, + "nativeSrc": "1995:20:84", + "nodeType": "YulFunctionCall", + "src": "1995:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1985:6:84", + "nodeType": "YulIdentifier", + "src": "1985:6:84" + }, + "nativeSrc": "1985:31:84", + "nodeType": "YulFunctionCall", + "src": "1985:31:84" + }, + "nativeSrc": "1985:31:84", + "nodeType": "YulExpressionStatement", + "src": "1985:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2032:1:84", + "nodeType": "YulLiteral", + "src": "2032:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "2035:4:84", + "nodeType": "YulLiteral", + "src": "2035:4:84", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2025:6:84", + "nodeType": "YulIdentifier", + "src": "2025:6:84" + }, + "nativeSrc": "2025:15:84", + "nodeType": "YulFunctionCall", + "src": "2025:15:84" + }, + "nativeSrc": "2025:15:84", + "nodeType": "YulExpressionStatement", + "src": "2025:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2056:1:84", + "nodeType": "YulLiteral", + "src": "2056:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2059:4:84", + "nodeType": "YulLiteral", + "src": "2059:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2049:6:84", + "nodeType": "YulIdentifier", + "src": "2049:6:84" + }, + "nativeSrc": "2049:15:84", + "nodeType": "YulFunctionCall", + "src": "2049:15:84" + }, + "nativeSrc": "2049:15:84", + "nodeType": "YulExpressionStatement", + "src": "2049:15:84" + } + ] + }, + "name": "panic_error_0x21", + "nativeSrc": "1943:127:84", + "nodeType": "YulFunctionDefinition", + "src": "1943:127:84" + }, + { + "body": { + "nativeSrc": "2141:184:84", + "nodeType": "YulBlock", + "src": "2141:184:84", + "statements": [ + { + "nativeSrc": "2151:10:84", + "nodeType": "YulVariableDeclaration", + "src": "2151:10:84", + "value": { + "kind": "number", + "nativeSrc": "2160:1:84", + "nodeType": "YulLiteral", + "src": "2160:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "2155:1:84", + "nodeType": "YulTypedName", + "src": "2155:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2220:63:84", + "nodeType": "YulBlock", + "src": "2220:63:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "2245:3:84", + "nodeType": "YulIdentifier", + "src": "2245:3:84" + }, + { + "name": "i", + "nativeSrc": "2250:1:84", + "nodeType": "YulIdentifier", + "src": "2250:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2241:3:84", + "nodeType": "YulIdentifier", + "src": "2241:3:84" + }, + "nativeSrc": "2241:11:84", + "nodeType": "YulFunctionCall", + "src": "2241:11:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "2264:3:84", + "nodeType": "YulIdentifier", + "src": "2264:3:84" + }, + { + "name": "i", + "nativeSrc": "2269:1:84", + "nodeType": "YulIdentifier", + "src": "2269:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2260:3:84", + "nodeType": "YulIdentifier", + "src": "2260:3:84" + }, + "nativeSrc": "2260:11:84", + "nodeType": "YulFunctionCall", + "src": "2260:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2254:5:84", + "nodeType": "YulIdentifier", + "src": "2254:5:84" + }, + "nativeSrc": "2254:18:84", + "nodeType": "YulFunctionCall", + "src": "2254:18:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2234:6:84", + "nodeType": "YulIdentifier", + "src": "2234:6:84" + }, + "nativeSrc": "2234:39:84", + "nodeType": "YulFunctionCall", + "src": "2234:39:84" + }, + "nativeSrc": "2234:39:84", + "nodeType": "YulExpressionStatement", + "src": "2234:39:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2181:1:84", + "nodeType": "YulIdentifier", + "src": "2181:1:84" + }, + { + "name": "length", + "nativeSrc": "2184:6:84", + "nodeType": "YulIdentifier", + "src": "2184:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2178:2:84", + "nodeType": "YulIdentifier", + "src": "2178:2:84" + }, + "nativeSrc": "2178:13:84", + "nodeType": "YulFunctionCall", + "src": "2178:13:84" + }, + "nativeSrc": "2170:113:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "2192:19:84", + "nodeType": "YulBlock", + "src": "2192:19:84", + "statements": [ + { + "nativeSrc": "2194:15:84", + "nodeType": "YulAssignment", + "src": "2194:15:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2203:1:84", + "nodeType": "YulIdentifier", + "src": "2203:1:84" + }, + { + "kind": "number", + "nativeSrc": "2206:2:84", + "nodeType": "YulLiteral", + "src": "2206:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2199:3:84", + "nodeType": "YulIdentifier", + "src": "2199:3:84" + }, + "nativeSrc": "2199:10:84", + "nodeType": "YulFunctionCall", + "src": "2199:10:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "2194:1:84", + "nodeType": "YulIdentifier", + "src": "2194:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "2174:3:84", + "nodeType": "YulBlock", + "src": "2174:3:84", + "statements": [] + }, + "src": "2170:113:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "2303:3:84", + "nodeType": "YulIdentifier", + "src": "2303:3:84" + }, + { + "name": "length", + "nativeSrc": "2308:6:84", + "nodeType": "YulIdentifier", + "src": "2308:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2299:3:84", + "nodeType": "YulIdentifier", + "src": "2299:3:84" + }, + "nativeSrc": "2299:16:84", + "nodeType": "YulFunctionCall", + "src": "2299:16:84" + }, + { + "kind": "number", + "nativeSrc": "2317:1:84", + "nodeType": "YulLiteral", + "src": "2317:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2292:6:84", + "nodeType": "YulIdentifier", + "src": "2292:6:84" + }, + "nativeSrc": "2292:27:84", + "nodeType": "YulFunctionCall", + "src": "2292:27:84" + }, + "nativeSrc": "2292:27:84", + "nodeType": "YulExpressionStatement", + "src": "2292:27:84" + } + ] + }, + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "2075:250:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nativeSrc": "2119:3:84", + "nodeType": "YulTypedName", + "src": "2119:3:84", + "type": "" + }, + { + "name": "dst", + "nativeSrc": "2124:3:84", + "nodeType": "YulTypedName", + "src": "2124:3:84", + "type": "" + }, + { + "name": "length", + "nativeSrc": "2129:6:84", + "nodeType": "YulTypedName", + "src": "2129:6:84", + "type": "" + } + ], + "src": "2075:250:84" + }, + { + "body": { + "nativeSrc": "2380:221:84", + "nodeType": "YulBlock", + "src": "2380:221:84", + "statements": [ + { + "nativeSrc": "2390:26:84", + "nodeType": "YulVariableDeclaration", + "src": "2390:26:84", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "2410:5:84", + "nodeType": "YulIdentifier", + "src": "2410:5:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2404:5:84", + "nodeType": "YulIdentifier", + "src": "2404:5:84" + }, + "nativeSrc": "2404:12:84", + "nodeType": "YulFunctionCall", + "src": "2404:12:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "2394:6:84", + "nodeType": "YulTypedName", + "src": "2394:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2432:3:84", + "nodeType": "YulIdentifier", + "src": "2432:3:84" + }, + { + "name": "length", + "nativeSrc": "2437:6:84", + "nodeType": "YulIdentifier", + "src": "2437:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2425:6:84", + "nodeType": "YulIdentifier", + "src": "2425:6:84" + }, + "nativeSrc": "2425:19:84", + "nodeType": "YulFunctionCall", + "src": "2425:19:84" + }, + "nativeSrc": "2425:19:84", + "nodeType": "YulExpressionStatement", + "src": "2425:19:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2492:5:84", + "nodeType": "YulIdentifier", + "src": "2492:5:84" + }, + { + "kind": "number", + "nativeSrc": "2499:4:84", + "nodeType": "YulLiteral", + "src": "2499:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2488:3:84", + "nodeType": "YulIdentifier", + "src": "2488:3:84" + }, + "nativeSrc": "2488:16:84", + "nodeType": "YulFunctionCall", + "src": "2488:16:84" + }, + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2510:3:84", + "nodeType": "YulIdentifier", + "src": "2510:3:84" + }, + { + "kind": "number", + "nativeSrc": "2515:4:84", + "nodeType": "YulLiteral", + "src": "2515:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2506:3:84", + "nodeType": "YulIdentifier", + "src": "2506:3:84" + }, + "nativeSrc": "2506:14:84", + "nodeType": "YulFunctionCall", + "src": "2506:14:84" + }, + { + "name": "length", + "nativeSrc": "2522:6:84", + "nodeType": "YulIdentifier", + "src": "2522:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "2453:34:84", + "nodeType": "YulIdentifier", + "src": "2453:34:84" + }, + "nativeSrc": "2453:76:84", + "nodeType": "YulFunctionCall", + "src": "2453:76:84" + }, + "nativeSrc": "2453:76:84", + "nodeType": "YulExpressionStatement", + "src": "2453:76:84" + }, + { + "nativeSrc": "2538:57:84", + "nodeType": "YulAssignment", + "src": "2538:57:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2553:3:84", + "nodeType": "YulIdentifier", + "src": "2553:3:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "2566:6:84", + "nodeType": "YulIdentifier", + "src": "2566:6:84" + }, + { + "kind": "number", + "nativeSrc": "2574:2:84", + "nodeType": "YulLiteral", + "src": "2574:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2562:3:84", + "nodeType": "YulIdentifier", + "src": "2562:3:84" + }, + "nativeSrc": "2562:15:84", + "nodeType": "YulFunctionCall", + "src": "2562:15:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2583:2:84", + "nodeType": "YulLiteral", + "src": "2583:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2579:3:84", + "nodeType": "YulIdentifier", + "src": "2579:3:84" + }, + "nativeSrc": "2579:7:84", + "nodeType": "YulFunctionCall", + "src": "2579:7:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2558:3:84", + "nodeType": "YulIdentifier", + "src": "2558:3:84" + }, + "nativeSrc": "2558:29:84", + "nodeType": "YulFunctionCall", + "src": "2558:29:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2549:3:84", + "nodeType": "YulIdentifier", + "src": "2549:3:84" + }, + "nativeSrc": "2549:39:84", + "nodeType": "YulFunctionCall", + "src": "2549:39:84" + }, + { + "kind": "number", + "nativeSrc": "2590:4:84", + "nodeType": "YulLiteral", + "src": "2590:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2545:3:84", + "nodeType": "YulIdentifier", + "src": "2545:3:84" + }, + "nativeSrc": "2545:50:84", + "nodeType": "YulFunctionCall", + "src": "2545:50:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "2538:3:84", + "nodeType": "YulIdentifier", + "src": "2538:3:84" + } + ] + } + ] + }, + "name": "abi_encode_string", + "nativeSrc": "2330:271:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "2357:5:84", + "nodeType": "YulTypedName", + "src": "2357:5:84", + "type": "" + }, + { + "name": "pos", + "nativeSrc": "2364:3:84", + "nodeType": "YulTypedName", + "src": "2364:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "2372:3:84", + "nodeType": "YulTypedName", + "src": "2372:3:84", + "type": "" + } + ], + "src": "2330:271:84" + }, + { + "body": { + "nativeSrc": "2661:102:84", + "nodeType": "YulBlock", + "src": "2661:102:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2678:3:84", + "nodeType": "YulIdentifier", + "src": "2678:3:84" + }, + { + "kind": "number", + "nativeSrc": "2683:1:84", + "nodeType": "YulLiteral", + "src": "2683:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2671:6:84", + "nodeType": "YulIdentifier", + "src": "2671:6:84" + }, + "nativeSrc": "2671:14:84", + "nodeType": "YulFunctionCall", + "src": "2671:14:84" + }, + "nativeSrc": "2671:14:84", + "nodeType": "YulExpressionStatement", + "src": "2671:14:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2705:3:84", + "nodeType": "YulIdentifier", + "src": "2705:3:84" + }, + { + "kind": "number", + "nativeSrc": "2710:4:84", + "nodeType": "YulLiteral", + "src": "2710:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2701:3:84", + "nodeType": "YulIdentifier", + "src": "2701:3:84" + }, + "nativeSrc": "2701:14:84", + "nodeType": "YulFunctionCall", + "src": "2701:14:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2721:3:84", + "nodeType": "YulLiteral", + "src": "2721:3:84", + "type": "", + "value": "255" + }, + { + "kind": "number", + "nativeSrc": "2726:1:84", + "nodeType": "YulLiteral", + "src": "2726:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2717:3:84", + "nodeType": "YulIdentifier", + "src": "2717:3:84" + }, + "nativeSrc": "2717:11:84", + "nodeType": "YulFunctionCall", + "src": "2717:11:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2694:6:84", + "nodeType": "YulIdentifier", + "src": "2694:6:84" + }, + "nativeSrc": "2694:35:84", + "nodeType": "YulFunctionCall", + "src": "2694:35:84" + }, + "nativeSrc": "2694:35:84", + "nodeType": "YulExpressionStatement", + "src": "2694:35:84" + }, + { + "nativeSrc": "2738:19:84", + "nodeType": "YulAssignment", + "src": "2738:19:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2749:3:84", + "nodeType": "YulIdentifier", + "src": "2749:3:84" + }, + { + "kind": "number", + "nativeSrc": "2754:2:84", + "nodeType": "YulLiteral", + "src": "2754:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2745:3:84", + "nodeType": "YulIdentifier", + "src": "2745:3:84" + }, + "nativeSrc": "2745:12:84", + "nodeType": "YulFunctionCall", + "src": "2745:12:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "2738:3:84", + "nodeType": "YulIdentifier", + "src": "2738:3:84" + } + ] + } + ] + }, + "name": "abi_encode_stringliteral_56e8", + "nativeSrc": "2606:157:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "2645:3:84", + "nodeType": "YulTypedName", + "src": "2645:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "2653:3:84", + "nodeType": "YulTypedName", + "src": "2653:3:84", + "type": "" + } + ], + "src": "2606:157:84" + }, + { + "body": { + "nativeSrc": "3342:1513:84", + "nodeType": "YulBlock", + "src": "3342:1513:84", + "statements": [ + { + "body": { + "nativeSrc": "3377:22:84", + "nodeType": "YulBlock", + "src": "3377:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x21", + "nativeSrc": "3379:16:84", + "nodeType": "YulIdentifier", + "src": "3379:16:84" + }, + "nativeSrc": "3379:18:84", + "nodeType": "YulFunctionCall", + "src": "3379:18:84" + }, + "nativeSrc": "3379:18:84", + "nodeType": "YulExpressionStatement", + "src": "3379:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3365:6:84", + "nodeType": "YulIdentifier", + "src": "3365:6:84" + }, + { + "kind": "number", + "nativeSrc": "3373:1:84", + "nodeType": "YulLiteral", + "src": "3373:1:84", + "type": "", + "value": "5" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3362:2:84", + "nodeType": "YulIdentifier", + "src": "3362:2:84" + }, + "nativeSrc": "3362:13:84", + "nodeType": "YulFunctionCall", + "src": "3362:13:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3355:6:84", + "nodeType": "YulIdentifier", + "src": "3355:6:84" + }, + "nativeSrc": "3355:21:84", + "nodeType": "YulFunctionCall", + "src": "3355:21:84" + }, + "nativeSrc": "3352:47:84", + "nodeType": "YulIf", + "src": "3352:47:84" + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3415:9:84", + "nodeType": "YulIdentifier", + "src": "3415:9:84" + }, + { + "name": "value0", + "nativeSrc": "3426:6:84", + "nodeType": "YulIdentifier", + "src": "3426:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3408:6:84", + "nodeType": "YulIdentifier", + "src": "3408:6:84" + }, + "nativeSrc": "3408:25:84", + "nodeType": "YulFunctionCall", + "src": "3408:25:84" + }, + "nativeSrc": "3408:25:84", + "nodeType": "YulExpressionStatement", + "src": "3408:25:84" + }, + { + "nativeSrc": "3442:12:84", + "nodeType": "YulVariableDeclaration", + "src": "3442:12:84", + "value": { + "kind": "number", + "nativeSrc": "3452:2:84", + "nodeType": "YulLiteral", + "src": "3452:2:84", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "3446:2:84", + "nodeType": "YulTypedName", + "src": "3446:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3474:9:84", + "nodeType": "YulIdentifier", + "src": "3474:9:84" + }, + { + "name": "_1", + "nativeSrc": "3485:2:84", + "nodeType": "YulIdentifier", + "src": "3485:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3470:3:84", + "nodeType": "YulIdentifier", + "src": "3470:3:84" + }, + "nativeSrc": "3470:18:84", + "nodeType": "YulFunctionCall", + "src": "3470:18:84" + }, + { + "kind": "number", + "nativeSrc": "3490:3:84", + "nodeType": "YulLiteral", + "src": "3490:3:84", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3463:6:84", + "nodeType": "YulIdentifier", + "src": "3463:6:84" + }, + "nativeSrc": "3463:31:84", + "nodeType": "YulFunctionCall", + "src": "3463:31:84" + }, + "nativeSrc": "3463:31:84", + "nodeType": "YulExpressionStatement", + "src": "3463:31:84" + }, + { + "nativeSrc": "3503:11:84", + "nodeType": "YulVariableDeclaration", + "src": "3503:11:84", + "value": { + "kind": "number", + "nativeSrc": "3513:1:84", + "nodeType": "YulLiteral", + "src": "3513:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "3507:2:84", + "nodeType": "YulTypedName", + "src": "3507:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3534:9:84", + "nodeType": "YulIdentifier", + "src": "3534:9:84" + }, + { + "kind": "number", + "nativeSrc": "3545:3:84", + "nodeType": "YulLiteral", + "src": "3545:3:84", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3530:3:84", + "nodeType": "YulIdentifier", + "src": "3530:3:84" + }, + "nativeSrc": "3530:19:84", + "nodeType": "YulFunctionCall", + "src": "3530:19:84" + }, + { + "kind": "number", + "nativeSrc": "3551:1:84", + "nodeType": "YulLiteral", + "src": "3551:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3523:6:84", + "nodeType": "YulIdentifier", + "src": "3523:6:84" + }, + "nativeSrc": "3523:30:84", + "nodeType": "YulFunctionCall", + "src": "3523:30:84" + }, + "nativeSrc": "3523:30:84", + "nodeType": "YulExpressionStatement", + "src": "3523:30:84" + }, + { + "nativeSrc": "3562:12:84", + "nodeType": "YulVariableDeclaration", + "src": "3562:12:84", + "value": { + "kind": "number", + "nativeSrc": "3572:2:84", + "nodeType": "YulLiteral", + "src": "3572:2:84", + "type": "", + "value": "64" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "3566:2:84", + "nodeType": "YulTypedName", + "src": "3566:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3594:9:84", + "nodeType": "YulIdentifier", + "src": "3594:9:84" + }, + { + "kind": "number", + "nativeSrc": "3605:2:84", + "nodeType": "YulLiteral", + "src": "3605:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3590:3:84", + "nodeType": "YulIdentifier", + "src": "3590:3:84" + }, + "nativeSrc": "3590:18:84", + "nodeType": "YulFunctionCall", + "src": "3590:18:84" + }, + { + "kind": "number", + "nativeSrc": "3610:3:84", + "nodeType": "YulLiteral", + "src": "3610:3:84", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3583:6:84", + "nodeType": "YulIdentifier", + "src": "3583:6:84" + }, + "nativeSrc": "3583:31:84", + "nodeType": "YulFunctionCall", + "src": "3583:31:84" + }, + "nativeSrc": "3583:31:84", + "nodeType": "YulExpressionStatement", + "src": "3583:31:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3634:9:84", + "nodeType": "YulIdentifier", + "src": "3634:9:84" + }, + { + "kind": "number", + "nativeSrc": "3645:3:84", + "nodeType": "YulLiteral", + "src": "3645:3:84", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3630:3:84", + "nodeType": "YulIdentifier", + "src": "3630:3:84" + }, + "nativeSrc": "3630:19:84", + "nodeType": "YulFunctionCall", + "src": "3630:19:84" + }, + { + "kind": "number", + "nativeSrc": "3651:1:84", + "nodeType": "YulLiteral", + "src": "3651:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3623:6:84", + "nodeType": "YulIdentifier", + "src": "3623:6:84" + }, + "nativeSrc": "3623:30:84", + "nodeType": "YulFunctionCall", + "src": "3623:30:84" + }, + "nativeSrc": "3623:30:84", + "nodeType": "YulExpressionStatement", + "src": "3623:30:84" + }, + { + "nativeSrc": "3662:38:84", + "nodeType": "YulVariableDeclaration", + "src": "3662:38:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3685:9:84", + "nodeType": "YulIdentifier", + "src": "3685:9:84" + }, + { + "kind": "number", + "nativeSrc": "3696:3:84", + "nodeType": "YulLiteral", + "src": "3696:3:84", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3681:3:84", + "nodeType": "YulIdentifier", + "src": "3681:3:84" + }, + "nativeSrc": "3681:19:84", + "nodeType": "YulFunctionCall", + "src": "3681:19:84" + }, + "variables": [ + { + "name": "updated_pos", + "nativeSrc": "3666:11:84", + "nodeType": "YulTypedName", + "src": "3666:11:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3720:9:84", + "nodeType": "YulIdentifier", + "src": "3720:9:84" + }, + { + "kind": "number", + "nativeSrc": "3731:2:84", + "nodeType": "YulLiteral", + "src": "3731:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3716:3:84", + "nodeType": "YulIdentifier", + "src": "3716:3:84" + }, + "nativeSrc": "3716:18:84", + "nodeType": "YulFunctionCall", + "src": "3716:18:84" + }, + { + "kind": "number", + "nativeSrc": "3736:3:84", + "nodeType": "YulLiteral", + "src": "3736:3:84", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3709:6:84", + "nodeType": "YulIdentifier", + "src": "3709:6:84" + }, + "nativeSrc": "3709:31:84", + "nodeType": "YulFunctionCall", + "src": "3709:31:84" + }, + "nativeSrc": "3709:31:84", + "nodeType": "YulExpressionStatement", + "src": "3709:31:84" + }, + { + "nativeSrc": "3749:22:84", + "nodeType": "YulVariableDeclaration", + "src": "3749:22:84", + "value": { + "name": "updated_pos", + "nativeSrc": "3760:11:84", + "nodeType": "YulIdentifier", + "src": "3760:11:84" + }, + "variables": [ + { + "name": "pos", + "nativeSrc": "3753:3:84", + "nodeType": "YulTypedName", + "src": "3753:3:84", + "type": "" + } + ] + }, + { + "nativeSrc": "3780:27:84", + "nodeType": "YulVariableDeclaration", + "src": "3780:27:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3800:6:84", + "nodeType": "YulIdentifier", + "src": "3800:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3794:5:84", + "nodeType": "YulIdentifier", + "src": "3794:5:84" + }, + "nativeSrc": "3794:13:84", + "nodeType": "YulFunctionCall", + "src": "3794:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "3784:6:84", + "nodeType": "YulTypedName", + "src": "3784:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "updated_pos", + "nativeSrc": "3823:11:84", + "nodeType": "YulIdentifier", + "src": "3823:11:84" + }, + { + "name": "length", + "nativeSrc": "3836:6:84", + "nodeType": "YulIdentifier", + "src": "3836:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3816:6:84", + "nodeType": "YulIdentifier", + "src": "3816:6:84" + }, + "nativeSrc": "3816:27:84", + "nodeType": "YulFunctionCall", + "src": "3816:27:84" + }, + "nativeSrc": "3816:27:84", + "nodeType": "YulExpressionStatement", + "src": "3816:27:84" + }, + { + "nativeSrc": "3852:13:84", + "nodeType": "YulVariableDeclaration", + "src": "3852:13:84", + "value": { + "kind": "number", + "nativeSrc": "3862:3:84", + "nodeType": "YulLiteral", + "src": "3862:3:84", + "type": "", + "value": "256" + }, + "variables": [ + { + "name": "_4", + "nativeSrc": "3856:2:84", + "nodeType": "YulTypedName", + "src": "3856:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "3874:25:84", + "nodeType": "YulAssignment", + "src": "3874:25:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3885:9:84", + "nodeType": "YulIdentifier", + "src": "3885:9:84" + }, + { + "name": "_4", + "nativeSrc": "3896:2:84", + "nodeType": "YulIdentifier", + "src": "3896:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3881:3:84", + "nodeType": "YulIdentifier", + "src": "3881:3:84" + }, + "nativeSrc": "3881:18:84", + "nodeType": "YulFunctionCall", + "src": "3881:18:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "3874:3:84", + "nodeType": "YulIdentifier", + "src": "3874:3:84" + } + ] + }, + { + "nativeSrc": "3908:53:84", + "nodeType": "YulVariableDeclaration", + "src": "3908:53:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3930:9:84", + "nodeType": "YulIdentifier", + "src": "3930:9:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3945:1:84", + "nodeType": "YulLiteral", + "src": "3945:1:84", + "type": "", + "value": "5" + }, + { + "name": "length", + "nativeSrc": "3948:6:84", + "nodeType": "YulIdentifier", + "src": "3948:6:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3941:3:84", + "nodeType": "YulIdentifier", + "src": "3941:3:84" + }, + "nativeSrc": "3941:14:84", + "nodeType": "YulFunctionCall", + "src": "3941:14:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3926:3:84", + "nodeType": "YulIdentifier", + "src": "3926:3:84" + }, + "nativeSrc": "3926:30:84", + "nodeType": "YulFunctionCall", + "src": "3926:30:84" + }, + { + "name": "_4", + "nativeSrc": "3958:2:84", + "nodeType": "YulIdentifier", + "src": "3958:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3922:3:84", + "nodeType": "YulIdentifier", + "src": "3922:3:84" + }, + "nativeSrc": "3922:39:84", + "nodeType": "YulFunctionCall", + "src": "3922:39:84" + }, + "variables": [ + { + "name": "tail_1", + "nativeSrc": "3912:6:84", + "nodeType": "YulTypedName", + "src": "3912:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "3970:29:84", + "nodeType": "YulVariableDeclaration", + "src": "3970:29:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "3988:6:84", + "nodeType": "YulIdentifier", + "src": "3988:6:84" + }, + { + "name": "_1", + "nativeSrc": "3996:2:84", + "nodeType": "YulIdentifier", + "src": "3996:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3984:3:84", + "nodeType": "YulIdentifier", + "src": "3984:3:84" + }, + "nativeSrc": "3984:15:84", + "nodeType": "YulFunctionCall", + "src": "3984:15:84" + }, + "variables": [ + { + "name": "srcPtr", + "nativeSrc": "3974:6:84", + "nodeType": "YulTypedName", + "src": "3974:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4008:10:84", + "nodeType": "YulVariableDeclaration", + "src": "4008:10:84", + "value": { + "kind": "number", + "nativeSrc": "4017:1:84", + "nodeType": "YulLiteral", + "src": "4017:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "4012:1:84", + "nodeType": "YulTypedName", + "src": "4012:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "4076:659:84", + "nodeType": "YulBlock", + "src": "4076:659:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4097:3:84", + "nodeType": "YulIdentifier", + "src": "4097:3:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "4110:6:84", + "nodeType": "YulIdentifier", + "src": "4110:6:84" + }, + { + "name": "headStart", + "nativeSrc": "4118:9:84", + "nodeType": "YulIdentifier", + "src": "4118:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4106:3:84", + "nodeType": "YulIdentifier", + "src": "4106:3:84" + }, + "nativeSrc": "4106:22:84", + "nodeType": "YulFunctionCall", + "src": "4106:22:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4134:3:84", + "nodeType": "YulLiteral", + "src": "4134:3:84", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4130:3:84", + "nodeType": "YulIdentifier", + "src": "4130:3:84" + }, + "nativeSrc": "4130:8:84", + "nodeType": "YulFunctionCall", + "src": "4130:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4102:3:84", + "nodeType": "YulIdentifier", + "src": "4102:3:84" + }, + "nativeSrc": "4102:37:84", + "nodeType": "YulFunctionCall", + "src": "4102:37:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4090:6:84", + "nodeType": "YulIdentifier", + "src": "4090:6:84" + }, + "nativeSrc": "4090:50:84", + "nodeType": "YulFunctionCall", + "src": "4090:50:84" + }, + "nativeSrc": "4090:50:84", + "nodeType": "YulExpressionStatement", + "src": "4090:50:84" + }, + { + "nativeSrc": "4153:23:84", + "nodeType": "YulVariableDeclaration", + "src": "4153:23:84", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "4169:6:84", + "nodeType": "YulIdentifier", + "src": "4169:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4163:5:84", + "nodeType": "YulIdentifier", + "src": "4163:5:84" + }, + "nativeSrc": "4163:13:84", + "nodeType": "YulFunctionCall", + "src": "4163:13:84" + }, + "variables": [ + { + "name": "_5", + "nativeSrc": "4157:2:84", + "nodeType": "YulTypedName", + "src": "4157:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4189:19:84", + "nodeType": "YulVariableDeclaration", + "src": "4189:19:84", + "value": { + "name": "tail_1", + "nativeSrc": "4202:6:84", + "nodeType": "YulIdentifier", + "src": "4202:6:84" + }, + "variables": [ + { + "name": "pos_1", + "nativeSrc": "4193:5:84", + "nodeType": "YulTypedName", + "src": "4193:5:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4221:15:84", + "nodeType": "YulAssignment", + "src": "4221:15:84", + "value": { + "name": "tail_1", + "nativeSrc": "4230:6:84", + "nodeType": "YulIdentifier", + "src": "4230:6:84" + }, + "variableNames": [ + { + "name": "pos_1", + "nativeSrc": "4221:5:84", + "nodeType": "YulIdentifier", + "src": "4221:5:84" + } + ] + }, + { + "nativeSrc": "4249:29:84", + "nodeType": "YulVariableDeclaration", + "src": "4249:29:84", + "value": { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "4267:6:84", + "nodeType": "YulIdentifier", + "src": "4267:6:84" + }, + { + "name": "_3", + "nativeSrc": "4275:2:84", + "nodeType": "YulIdentifier", + "src": "4275:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4263:3:84", + "nodeType": "YulIdentifier", + "src": "4263:3:84" + }, + "nativeSrc": "4263:15:84", + "nodeType": "YulFunctionCall", + "src": "4263:15:84" + }, + "variables": [ + { + "name": "tail_2", + "nativeSrc": "4253:6:84", + "nodeType": "YulTypedName", + "src": "4253:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4291:18:84", + "nodeType": "YulVariableDeclaration", + "src": "4291:18:84", + "value": { + "name": "_5", + "nativeSrc": "4307:2:84", + "nodeType": "YulIdentifier", + "src": "4307:2:84" + }, + "variables": [ + { + "name": "srcPtr_1", + "nativeSrc": "4295:8:84", + "nodeType": "YulTypedName", + "src": "4295:8:84", + "type": "" + } + ] + }, + { + "nativeSrc": "4322:13:84", + "nodeType": "YulVariableDeclaration", + "src": "4322:13:84", + "value": { + "name": "_2", + "nativeSrc": "4333:2:84", + "nodeType": "YulIdentifier", + "src": "4333:2:84" + }, + "variables": [ + { + "name": "i_1", + "nativeSrc": "4326:3:84", + "nodeType": "YulTypedName", + "src": "4326:3:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "4405:221:84", + "nodeType": "YulBlock", + "src": "4405:221:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos_1", + "nativeSrc": "4430:5:84", + "nodeType": "YulIdentifier", + "src": "4430:5:84" + }, + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "4441:6:84", + "nodeType": "YulIdentifier", + "src": "4441:6:84" + }, + { + "name": "tail_1", + "nativeSrc": "4449:6:84", + "nodeType": "YulIdentifier", + "src": "4449:6:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4437:3:84", + "nodeType": "YulIdentifier", + "src": "4437:3:84" + }, + "nativeSrc": "4437:19:84", + "nodeType": "YulFunctionCall", + "src": "4437:19:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4423:6:84", + "nodeType": "YulIdentifier", + "src": "4423:6:84" + }, + "nativeSrc": "4423:34:84", + "nodeType": "YulFunctionCall", + "src": "4423:34:84" + }, + "nativeSrc": "4423:34:84", + "nodeType": "YulExpressionStatement", + "src": "4423:34:84" + }, + { + "nativeSrc": "4474:52:84", + "nodeType": "YulAssignment", + "src": "4474:52:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "srcPtr_1", + "nativeSrc": "4508:8:84", + "nodeType": "YulIdentifier", + "src": "4508:8:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4502:5:84", + "nodeType": "YulIdentifier", + "src": "4502:5:84" + }, + "nativeSrc": "4502:15:84", + "nodeType": "YulFunctionCall", + "src": "4502:15:84" + }, + { + "name": "tail_2", + "nativeSrc": "4519:6:84", + "nodeType": "YulIdentifier", + "src": "4519:6:84" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "4484:17:84", + "nodeType": "YulIdentifier", + "src": "4484:17:84" + }, + "nativeSrc": "4484:42:84", + "nodeType": "YulFunctionCall", + "src": "4484:42:84" + }, + "variableNames": [ + { + "name": "tail_2", + "nativeSrc": "4474:6:84", + "nodeType": "YulIdentifier", + "src": "4474:6:84" + } + ] + }, + { + "nativeSrc": "4543:29:84", + "nodeType": "YulAssignment", + "src": "4543:29:84", + "value": { + "arguments": [ + { + "name": "srcPtr_1", + "nativeSrc": "4559:8:84", + "nodeType": "YulIdentifier", + "src": "4559:8:84" + }, + { + "name": "_1", + "nativeSrc": "4569:2:84", + "nodeType": "YulIdentifier", + "src": "4569:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4555:3:84", + "nodeType": "YulIdentifier", + "src": "4555:3:84" + }, + "nativeSrc": "4555:17:84", + "nodeType": "YulFunctionCall", + "src": "4555:17:84" + }, + "variableNames": [ + { + "name": "srcPtr_1", + "nativeSrc": "4543:8:84", + "nodeType": "YulIdentifier", + "src": "4543:8:84" + } + ] + }, + { + "nativeSrc": "4589:23:84", + "nodeType": "YulAssignment", + "src": "4589:23:84", + "value": { + "arguments": [ + { + "name": "pos_1", + "nativeSrc": "4602:5:84", + "nodeType": "YulIdentifier", + "src": "4602:5:84" + }, + { + "name": "_1", + "nativeSrc": "4609:2:84", + "nodeType": "YulIdentifier", + "src": "4609:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4598:3:84", + "nodeType": "YulIdentifier", + "src": "4598:3:84" + }, + "nativeSrc": "4598:14:84", + "nodeType": "YulFunctionCall", + "src": "4598:14:84" + }, + "variableNames": [ + { + "name": "pos_1", + "nativeSrc": "4589:5:84", + "nodeType": "YulIdentifier", + "src": "4589:5:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i_1", + "nativeSrc": "4359:3:84", + "nodeType": "YulIdentifier", + "src": "4359:3:84" + }, + { + "kind": "number", + "nativeSrc": "4364:4:84", + "nodeType": "YulLiteral", + "src": "4364:4:84", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "4356:2:84", + "nodeType": "YulIdentifier", + "src": "4356:2:84" + }, + "nativeSrc": "4356:13:84", + "nodeType": "YulFunctionCall", + "src": "4356:13:84" + }, + "nativeSrc": "4348:278:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "4370:22:84", + "nodeType": "YulBlock", + "src": "4370:22:84", + "statements": [ + { + "nativeSrc": "4372:18:84", + "nodeType": "YulAssignment", + "src": "4372:18:84", + "value": { + "arguments": [ + { + "name": "i_1", + "nativeSrc": "4383:3:84", + "nodeType": "YulIdentifier", + "src": "4383:3:84" + }, + { + "kind": "number", + "nativeSrc": "4388:1:84", + "nodeType": "YulLiteral", + "src": "4388:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4379:3:84", + "nodeType": "YulIdentifier", + "src": "4379:3:84" + }, + "nativeSrc": "4379:11:84", + "nodeType": "YulFunctionCall", + "src": "4379:11:84" + }, + "variableNames": [ + { + "name": "i_1", + "nativeSrc": "4372:3:84", + "nodeType": "YulIdentifier", + "src": "4372:3:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "4352:3:84", + "nodeType": "YulBlock", + "src": "4352:3:84", + "statements": [] + }, + "src": "4348:278:84" + }, + { + "nativeSrc": "4639:16:84", + "nodeType": "YulAssignment", + "src": "4639:16:84", + "value": { + "name": "tail_2", + "nativeSrc": "4649:6:84", + "nodeType": "YulIdentifier", + "src": "4649:6:84" + }, + "variableNames": [ + { + "name": "tail_1", + "nativeSrc": "4639:6:84", + "nodeType": "YulIdentifier", + "src": "4639:6:84" + } + ] + }, + { + "nativeSrc": "4668:25:84", + "nodeType": "YulAssignment", + "src": "4668:25:84", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "4682:6:84", + "nodeType": "YulIdentifier", + "src": "4682:6:84" + }, + { + "name": "_1", + "nativeSrc": "4690:2:84", + "nodeType": "YulIdentifier", + "src": "4690:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4678:3:84", + "nodeType": "YulIdentifier", + "src": "4678:3:84" + }, + "nativeSrc": "4678:15:84", + "nodeType": "YulFunctionCall", + "src": "4678:15:84" + }, + "variableNames": [ + { + "name": "srcPtr", + "nativeSrc": "4668:6:84", + "nodeType": "YulIdentifier", + "src": "4668:6:84" + } + ] + }, + { + "nativeSrc": "4706:19:84", + "nodeType": "YulAssignment", + "src": "4706:19:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "4717:3:84", + "nodeType": "YulIdentifier", + "src": "4717:3:84" + }, + { + "name": "_1", + "nativeSrc": "4722:2:84", + "nodeType": "YulIdentifier", + "src": "4722:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4713:3:84", + "nodeType": "YulIdentifier", + "src": "4713:3:84" + }, + "nativeSrc": "4713:12:84", + "nodeType": "YulFunctionCall", + "src": "4713:12:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "4706:3:84", + "nodeType": "YulIdentifier", + "src": "4706:3:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "4038:1:84", + "nodeType": "YulIdentifier", + "src": "4038:1:84" + }, + { + "name": "length", + "nativeSrc": "4041:6:84", + "nodeType": "YulIdentifier", + "src": "4041:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "4035:2:84", + "nodeType": "YulIdentifier", + "src": "4035:2:84" + }, + "nativeSrc": "4035:13:84", + "nodeType": "YulFunctionCall", + "src": "4035:13:84" + }, + "nativeSrc": "4027:708:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "4049:18:84", + "nodeType": "YulBlock", + "src": "4049:18:84", + "statements": [ + { + "nativeSrc": "4051:14:84", + "nodeType": "YulAssignment", + "src": "4051:14:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "4060:1:84", + "nodeType": "YulIdentifier", + "src": "4060:1:84" + }, + { + "kind": "number", + "nativeSrc": "4063:1:84", + "nodeType": "YulLiteral", + "src": "4063:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4056:3:84", + "nodeType": "YulIdentifier", + "src": "4056:3:84" + }, + "nativeSrc": "4056:9:84", + "nodeType": "YulFunctionCall", + "src": "4056:9:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "4051:1:84", + "nodeType": "YulIdentifier", + "src": "4051:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "4031:3:84", + "nodeType": "YulBlock", + "src": "4031:3:84", + "statements": [] + }, + "src": "4027:708:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4755:9:84", + "nodeType": "YulIdentifier", + "src": "4755:9:84" + }, + { + "kind": "number", + "nativeSrc": "4766:3:84", + "nodeType": "YulLiteral", + "src": "4766:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4751:3:84", + "nodeType": "YulIdentifier", + "src": "4751:3:84" + }, + "nativeSrc": "4751:19:84", + "nodeType": "YulFunctionCall", + "src": "4751:19:84" + }, + { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "4776:6:84", + "nodeType": "YulIdentifier", + "src": "4776:6:84" + }, + { + "name": "headStart", + "nativeSrc": "4784:9:84", + "nodeType": "YulIdentifier", + "src": "4784:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4772:3:84", + "nodeType": "YulIdentifier", + "src": "4772:3:84" + }, + "nativeSrc": "4772:22:84", + "nodeType": "YulFunctionCall", + "src": "4772:22:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4744:6:84", + "nodeType": "YulIdentifier", + "src": "4744:6:84" + }, + "nativeSrc": "4744:51:84", + "nodeType": "YulFunctionCall", + "src": "4744:51:84" + }, + "nativeSrc": "4744:51:84", + "nodeType": "YulExpressionStatement", + "src": "4744:51:84" + }, + { + "nativeSrc": "4804:45:84", + "nodeType": "YulAssignment", + "src": "4804:45:84", + "value": { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "4842:6:84", + "nodeType": "YulIdentifier", + "src": "4842:6:84" + } + ], + "functionName": { + "name": "abi_encode_stringliteral_56e8", + "nativeSrc": "4812:29:84", + "nodeType": "YulIdentifier", + "src": "4812:29:84" + }, + "nativeSrc": "4812:37:84", + "nodeType": "YulFunctionCall", + "src": "4812:37:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4804:4:84", + "nodeType": "YulIdentifier", + "src": "4804:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_enum$_RadonDataRequestMethods_$16410_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_t_stringliteral_56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421__to_t_uint8_t_string_memory_ptr_t_string_memory_ptr_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_t_bytes_memory_ptr__fromStack_reversed", + "nativeSrc": "2768:2087:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3303:9:84", + "nodeType": "YulTypedName", + "src": "3303:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "3314:6:84", + "nodeType": "YulTypedName", + "src": "3314:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3322:6:84", + "nodeType": "YulTypedName", + "src": "3322:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3333:4:84", + "nodeType": "YulTypedName", + "src": "3333:4:84", + "type": "" + } + ], + "src": "2768:2087:84" + }, + { + "body": { + "nativeSrc": "4941:103:84", + "nodeType": "YulBlock", + "src": "4941:103:84", + "statements": [ + { + "body": { + "nativeSrc": "4987:16:84", + "nodeType": "YulBlock", + "src": "4987:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4996:1:84", + "nodeType": "YulLiteral", + "src": "4996:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4999:1:84", + "nodeType": "YulLiteral", + "src": "4999:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4989:6:84", + "nodeType": "YulIdentifier", + "src": "4989:6:84" + }, + "nativeSrc": "4989:12:84", + "nodeType": "YulFunctionCall", + "src": "4989:12:84" + }, + "nativeSrc": "4989:12:84", + "nodeType": "YulExpressionStatement", + "src": "4989:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "4962:7:84", + "nodeType": "YulIdentifier", + "src": "4962:7:84" + }, + { + "name": "headStart", + "nativeSrc": "4971:9:84", + "nodeType": "YulIdentifier", + "src": "4971:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4958:3:84", + "nodeType": "YulIdentifier", + "src": "4958:3:84" + }, + "nativeSrc": "4958:23:84", + "nodeType": "YulFunctionCall", + "src": "4958:23:84" + }, + { + "kind": "number", + "nativeSrc": "4983:2:84", + "nodeType": "YulLiteral", + "src": "4983:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "4954:3:84", + "nodeType": "YulIdentifier", + "src": "4954:3:84" + }, + "nativeSrc": "4954:32:84", + "nodeType": "YulFunctionCall", + "src": "4954:32:84" + }, + "nativeSrc": "4951:52:84", + "nodeType": "YulIf", + "src": "4951:52:84" + }, + { + "nativeSrc": "5012:26:84", + "nodeType": "YulAssignment", + "src": "5012:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5028:9:84", + "nodeType": "YulIdentifier", + "src": "5028:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5022:5:84", + "nodeType": "YulIdentifier", + "src": "5022:5:84" + }, + "nativeSrc": "5022:16:84", + "nodeType": "YulFunctionCall", + "src": "5022:16:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5012:6:84", + "nodeType": "YulIdentifier", + "src": "5012:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32_fromMemory", + "nativeSrc": "4860:184:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4907:9:84", + "nodeType": "YulTypedName", + "src": "4907:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "4918:7:84", + "nodeType": "YulTypedName", + "src": "4918:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "4930:6:84", + "nodeType": "YulTypedName", + "src": "4930:6:84", + "type": "" + } + ], + "src": "4860:184:84" + }, + { + "body": { + "nativeSrc": "5081:95:84", + "nodeType": "YulBlock", + "src": "5081:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5098:1:84", + "nodeType": "YulLiteral", + "src": "5098:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5105:3:84", + "nodeType": "YulLiteral", + "src": "5105:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "5110:10:84", + "nodeType": "YulLiteral", + "src": "5110:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5101:3:84", + "nodeType": "YulIdentifier", + "src": "5101:3:84" + }, + "nativeSrc": "5101:20:84", + "nodeType": "YulFunctionCall", + "src": "5101:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5091:6:84", + "nodeType": "YulIdentifier", + "src": "5091:6:84" + }, + "nativeSrc": "5091:31:84", + "nodeType": "YulFunctionCall", + "src": "5091:31:84" + }, + "nativeSrc": "5091:31:84", + "nodeType": "YulExpressionStatement", + "src": "5091:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5138:1:84", + "nodeType": "YulLiteral", + "src": "5138:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "5141:4:84", + "nodeType": "YulLiteral", + "src": "5141:4:84", + "type": "", + "value": "0x32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5131:6:84", + "nodeType": "YulIdentifier", + "src": "5131:6:84" + }, + "nativeSrc": "5131:15:84", + "nodeType": "YulFunctionCall", + "src": "5131:15:84" + }, + "nativeSrc": "5131:15:84", + "nodeType": "YulExpressionStatement", + "src": "5131:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5162:1:84", + "nodeType": "YulLiteral", + "src": "5162:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5165:4:84", + "nodeType": "YulLiteral", + "src": "5165:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5155:6:84", + "nodeType": "YulIdentifier", + "src": "5155:6:84" + }, + "nativeSrc": "5155:15:84", + "nodeType": "YulFunctionCall", + "src": "5155:15:84" + }, + "nativeSrc": "5155:15:84", + "nodeType": "YulExpressionStatement", + "src": "5155:15:84" + } + ] + }, + "name": "panic_error_0x32", + "nativeSrc": "5049:127:84", + "nodeType": "YulFunctionDefinition", + "src": "5049:127:84" + }, + { + "body": { + "nativeSrc": "5344:1147:84", + "nodeType": "YulBlock", + "src": "5344:1147:84", + "statements": [ + { + "nativeSrc": "5354:12:84", + "nodeType": "YulVariableDeclaration", + "src": "5354:12:84", + "value": { + "kind": "number", + "nativeSrc": "5364:2:84", + "nodeType": "YulLiteral", + "src": "5364:2:84", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "5358:2:84", + "nodeType": "YulTypedName", + "src": "5358:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5382:9:84", + "nodeType": "YulIdentifier", + "src": "5382:9:84" + }, + { + "name": "_1", + "nativeSrc": "5393:2:84", + "nodeType": "YulIdentifier", + "src": "5393:2:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5375:6:84", + "nodeType": "YulIdentifier", + "src": "5375:6:84" + }, + "nativeSrc": "5375:21:84", + "nodeType": "YulFunctionCall", + "src": "5375:21:84" + }, + "nativeSrc": "5375:21:84", + "nodeType": "YulExpressionStatement", + "src": "5375:21:84" + }, + { + "nativeSrc": "5405:32:84", + "nodeType": "YulVariableDeclaration", + "src": "5405:32:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5423:9:84", + "nodeType": "YulIdentifier", + "src": "5423:9:84" + }, + { + "kind": "number", + "nativeSrc": "5434:2:84", + "nodeType": "YulLiteral", + "src": "5434:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5419:3:84", + "nodeType": "YulIdentifier", + "src": "5419:3:84" + }, + "nativeSrc": "5419:18:84", + "nodeType": "YulFunctionCall", + "src": "5419:18:84" + }, + "variables": [ + { + "name": "tail_1", + "nativeSrc": "5409:6:84", + "nodeType": "YulTypedName", + "src": "5409:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "5446:23:84", + "nodeType": "YulVariableDeclaration", + "src": "5446:23:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5462:6:84", + "nodeType": "YulIdentifier", + "src": "5462:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5456:5:84", + "nodeType": "YulIdentifier", + "src": "5456:5:84" + }, + "nativeSrc": "5456:13:84", + "nodeType": "YulFunctionCall", + "src": "5456:13:84" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "5450:2:84", + "nodeType": "YulTypedName", + "src": "5450:2:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "5500:22:84", + "nodeType": "YulBlock", + "src": "5500:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x21", + "nativeSrc": "5502:16:84", + "nodeType": "YulIdentifier", + "src": "5502:16:84" + }, + "nativeSrc": "5502:18:84", + "nodeType": "YulFunctionCall", + "src": "5502:18:84" + }, + "nativeSrc": "5502:18:84", + "nodeType": "YulExpressionStatement", + "src": "5502:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "5491:2:84", + "nodeType": "YulIdentifier", + "src": "5491:2:84" + }, + { + "kind": "number", + "nativeSrc": "5495:2:84", + "nodeType": "YulLiteral", + "src": "5495:2:84", + "type": "", + "value": "12" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "5488:2:84", + "nodeType": "YulIdentifier", + "src": "5488:2:84" + }, + "nativeSrc": "5488:10:84", + "nodeType": "YulFunctionCall", + "src": "5488:10:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "5481:6:84", + "nodeType": "YulIdentifier", + "src": "5481:6:84" + }, + "nativeSrc": "5481:18:84", + "nodeType": "YulFunctionCall", + "src": "5481:18:84" + }, + "nativeSrc": "5478:44:84", + "nodeType": "YulIf", + "src": "5478:44:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5542:9:84", + "nodeType": "YulIdentifier", + "src": "5542:9:84" + }, + { + "name": "_1", + "nativeSrc": "5553:2:84", + "nodeType": "YulIdentifier", + "src": "5553:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5538:3:84", + "nodeType": "YulIdentifier", + "src": "5538:3:84" + }, + "nativeSrc": "5538:18:84", + "nodeType": "YulFunctionCall", + "src": "5538:18:84" + }, + { + "name": "_2", + "nativeSrc": "5558:2:84", + "nodeType": "YulIdentifier", + "src": "5558:2:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5531:6:84", + "nodeType": "YulIdentifier", + "src": "5531:6:84" + }, + "nativeSrc": "5531:30:84", + "nodeType": "YulFunctionCall", + "src": "5531:30:84" + }, + "nativeSrc": "5531:30:84", + "nodeType": "YulExpressionStatement", + "src": "5531:30:84" + }, + { + "nativeSrc": "5570:42:84", + "nodeType": "YulVariableDeclaration", + "src": "5570:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5600:6:84", + "nodeType": "YulIdentifier", + "src": "5600:6:84" + }, + { + "name": "_1", + "nativeSrc": "5608:2:84", + "nodeType": "YulIdentifier", + "src": "5608:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5596:3:84", + "nodeType": "YulIdentifier", + "src": "5596:3:84" + }, + "nativeSrc": "5596:15:84", + "nodeType": "YulFunctionCall", + "src": "5596:15:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5590:5:84", + "nodeType": "YulIdentifier", + "src": "5590:5:84" + }, + "nativeSrc": "5590:22:84", + "nodeType": "YulFunctionCall", + "src": "5590:22:84" + }, + "variables": [ + { + "name": "memberValue0", + "nativeSrc": "5574:12:84", + "nodeType": "YulTypedName", + "src": "5574:12:84", + "type": "" + } + ] + }, + { + "nativeSrc": "5621:14:84", + "nodeType": "YulVariableDeclaration", + "src": "5621:14:84", + "value": { + "kind": "number", + "nativeSrc": "5631:4:84", + "nodeType": "YulLiteral", + "src": "5631:4:84", + "type": "", + "value": "0x40" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "5625:2:84", + "nodeType": "YulTypedName", + "src": "5625:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5655:9:84", + "nodeType": "YulIdentifier", + "src": "5655:9:84" + }, + { + "kind": "number", + "nativeSrc": "5666:4:84", + "nodeType": "YulLiteral", + "src": "5666:4:84", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5651:3:84", + "nodeType": "YulIdentifier", + "src": "5651:3:84" + }, + "nativeSrc": "5651:20:84", + "nodeType": "YulFunctionCall", + "src": "5651:20:84" + }, + { + "kind": "number", + "nativeSrc": "5673:4:84", + "nodeType": "YulLiteral", + "src": "5673:4:84", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5644:6:84", + "nodeType": "YulIdentifier", + "src": "5644:6:84" + }, + "nativeSrc": "5644:34:84", + "nodeType": "YulFunctionCall", + "src": "5644:34:84" + }, + "nativeSrc": "5644:34:84", + "nodeType": "YulExpressionStatement", + "src": "5644:34:84" + }, + { + "nativeSrc": "5687:17:84", + "nodeType": "YulVariableDeclaration", + "src": "5687:17:84", + "value": { + "name": "tail_1", + "nativeSrc": "5698:6:84", + "nodeType": "YulIdentifier", + "src": "5698:6:84" + }, + "variables": [ + { + "name": "pos", + "nativeSrc": "5691:3:84", + "nodeType": "YulTypedName", + "src": "5691:3:84", + "type": "" + } + ] + }, + { + "nativeSrc": "5713:33:84", + "nodeType": "YulVariableDeclaration", + "src": "5713:33:84", + "value": { + "arguments": [ + { + "name": "memberValue0", + "nativeSrc": "5733:12:84", + "nodeType": "YulIdentifier", + "src": "5733:12:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5727:5:84", + "nodeType": "YulIdentifier", + "src": "5727:5:84" + }, + "nativeSrc": "5727:19:84", + "nodeType": "YulFunctionCall", + "src": "5727:19:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "5717:6:84", + "nodeType": "YulTypedName", + "src": "5717:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "5762:6:84", + "nodeType": "YulIdentifier", + "src": "5762:6:84" + }, + { + "name": "length", + "nativeSrc": "5770:6:84", + "nodeType": "YulIdentifier", + "src": "5770:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5755:6:84", + "nodeType": "YulIdentifier", + "src": "5755:6:84" + }, + "nativeSrc": "5755:22:84", + "nodeType": "YulFunctionCall", + "src": "5755:22:84" + }, + "nativeSrc": "5755:22:84", + "nodeType": "YulExpressionStatement", + "src": "5755:22:84" + }, + { + "nativeSrc": "5786:26:84", + "nodeType": "YulAssignment", + "src": "5786:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5797:9:84", + "nodeType": "YulIdentifier", + "src": "5797:9:84" + }, + { + "kind": "number", + "nativeSrc": "5808:3:84", + "nodeType": "YulLiteral", + "src": "5808:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5793:3:84", + "nodeType": "YulIdentifier", + "src": "5793:3:84" + }, + "nativeSrc": "5793:19:84", + "nodeType": "YulFunctionCall", + "src": "5793:19:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "5786:3:84", + "nodeType": "YulIdentifier", + "src": "5786:3:84" + } + ] + }, + { + "nativeSrc": "5821:54:84", + "nodeType": "YulVariableDeclaration", + "src": "5821:54:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5843:9:84", + "nodeType": "YulIdentifier", + "src": "5843:9:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5858:1:84", + "nodeType": "YulLiteral", + "src": "5858:1:84", + "type": "", + "value": "5" + }, + { + "name": "length", + "nativeSrc": "5861:6:84", + "nodeType": "YulIdentifier", + "src": "5861:6:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "5854:3:84", + "nodeType": "YulIdentifier", + "src": "5854:3:84" + }, + "nativeSrc": "5854:14:84", + "nodeType": "YulFunctionCall", + "src": "5854:14:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5839:3:84", + "nodeType": "YulIdentifier", + "src": "5839:3:84" + }, + "nativeSrc": "5839:30:84", + "nodeType": "YulFunctionCall", + "src": "5839:30:84" + }, + { + "kind": "number", + "nativeSrc": "5871:3:84", + "nodeType": "YulLiteral", + "src": "5871:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5835:3:84", + "nodeType": "YulIdentifier", + "src": "5835:3:84" + }, + "nativeSrc": "5835:40:84", + "nodeType": "YulFunctionCall", + "src": "5835:40:84" + }, + "variables": [ + { + "name": "tail_2", + "nativeSrc": "5825:6:84", + "nodeType": "YulTypedName", + "src": "5825:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "5884:35:84", + "nodeType": "YulVariableDeclaration", + "src": "5884:35:84", + "value": { + "arguments": [ + { + "name": "memberValue0", + "nativeSrc": "5902:12:84", + "nodeType": "YulIdentifier", + "src": "5902:12:84" + }, + { + "name": "_1", + "nativeSrc": "5916:2:84", + "nodeType": "YulIdentifier", + "src": "5916:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5898:3:84", + "nodeType": "YulIdentifier", + "src": "5898:3:84" + }, + "nativeSrc": "5898:21:84", + "nodeType": "YulFunctionCall", + "src": "5898:21:84" + }, + "variables": [ + { + "name": "srcPtr", + "nativeSrc": "5888:6:84", + "nodeType": "YulTypedName", + "src": "5888:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "5928:10:84", + "nodeType": "YulVariableDeclaration", + "src": "5928:10:84", + "value": { + "kind": "number", + "nativeSrc": "5937:1:84", + "nodeType": "YulLiteral", + "src": "5937:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "5932:1:84", + "nodeType": "YulTypedName", + "src": "5932:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "5996:466:84", + "nodeType": "YulBlock", + "src": "5996:466:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "6017:3:84", + "nodeType": "YulIdentifier", + "src": "6017:3:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "6030:6:84", + "nodeType": "YulIdentifier", + "src": "6030:6:84" + }, + { + "name": "headStart", + "nativeSrc": "6038:9:84", + "nodeType": "YulIdentifier", + "src": "6038:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6026:3:84", + "nodeType": "YulIdentifier", + "src": "6026:3:84" + }, + "nativeSrc": "6026:22:84", + "nodeType": "YulFunctionCall", + "src": "6026:22:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6054:3:84", + "nodeType": "YulLiteral", + "src": "6054:3:84", + "type": "", + "value": "127" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "6050:3:84", + "nodeType": "YulIdentifier", + "src": "6050:3:84" + }, + "nativeSrc": "6050:8:84", + "nodeType": "YulFunctionCall", + "src": "6050:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6022:3:84", + "nodeType": "YulIdentifier", + "src": "6022:3:84" + }, + "nativeSrc": "6022:37:84", + "nodeType": "YulFunctionCall", + "src": "6022:37:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6010:6:84", + "nodeType": "YulIdentifier", + "src": "6010:6:84" + }, + "nativeSrc": "6010:50:84", + "nodeType": "YulFunctionCall", + "src": "6010:50:84" + }, + "nativeSrc": "6010:50:84", + "nodeType": "YulExpressionStatement", + "src": "6010:50:84" + }, + { + "nativeSrc": "6073:23:84", + "nodeType": "YulVariableDeclaration", + "src": "6073:23:84", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "6089:6:84", + "nodeType": "YulIdentifier", + "src": "6089:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6083:5:84", + "nodeType": "YulIdentifier", + "src": "6083:5:84" + }, + "nativeSrc": "6083:13:84", + "nodeType": "YulFunctionCall", + "src": "6083:13:84" + }, + "variables": [ + { + "name": "_4", + "nativeSrc": "6077:2:84", + "nodeType": "YulTypedName", + "src": "6077:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "6109:19:84", + "nodeType": "YulVariableDeclaration", + "src": "6109:19:84", + "value": { + "arguments": [ + { + "name": "_4", + "nativeSrc": "6125:2:84", + "nodeType": "YulIdentifier", + "src": "6125:2:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6119:5:84", + "nodeType": "YulIdentifier", + "src": "6119:5:84" + }, + "nativeSrc": "6119:9:84", + "nodeType": "YulFunctionCall", + "src": "6119:9:84" + }, + "variables": [ + { + "name": "_5", + "nativeSrc": "6113:2:84", + "nodeType": "YulTypedName", + "src": "6113:2:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6163:22:84", + "nodeType": "YulBlock", + "src": "6163:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x21", + "nativeSrc": "6165:16:84", + "nodeType": "YulIdentifier", + "src": "6165:16:84" + }, + "nativeSrc": "6165:18:84", + "nodeType": "YulFunctionCall", + "src": "6165:18:84" + }, + "nativeSrc": "6165:18:84", + "nodeType": "YulExpressionStatement", + "src": "6165:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "_5", + "nativeSrc": "6154:2:84", + "nodeType": "YulIdentifier", + "src": "6154:2:84" + }, + { + "kind": "number", + "nativeSrc": "6158:2:84", + "nodeType": "YulLiteral", + "src": "6158:2:84", + "type": "", + "value": "10" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "6151:2:84", + "nodeType": "YulIdentifier", + "src": "6151:2:84" + }, + "nativeSrc": "6151:10:84", + "nodeType": "YulFunctionCall", + "src": "6151:10:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "6144:6:84", + "nodeType": "YulIdentifier", + "src": "6144:6:84" + }, + "nativeSrc": "6144:18:84", + "nodeType": "YulFunctionCall", + "src": "6144:18:84" + }, + "nativeSrc": "6141:44:84", + "nodeType": "YulIf", + "src": "6141:44:84" + }, + { + "expression": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "6205:6:84", + "nodeType": "YulIdentifier", + "src": "6205:6:84" + }, + { + "name": "_5", + "nativeSrc": "6213:2:84", + "nodeType": "YulIdentifier", + "src": "6213:2:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6198:6:84", + "nodeType": "YulIdentifier", + "src": "6198:6:84" + }, + "nativeSrc": "6198:18:84", + "nodeType": "YulFunctionCall", + "src": "6198:18:84" + }, + "nativeSrc": "6198:18:84", + "nodeType": "YulExpressionStatement", + "src": "6198:18:84" + }, + { + "nativeSrc": "6229:40:84", + "nodeType": "YulVariableDeclaration", + "src": "6229:40:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_4", + "nativeSrc": "6261:2:84", + "nodeType": "YulIdentifier", + "src": "6261:2:84" + }, + { + "name": "_1", + "nativeSrc": "6265:2:84", + "nodeType": "YulIdentifier", + "src": "6265:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6257:3:84", + "nodeType": "YulIdentifier", + "src": "6257:3:84" + }, + "nativeSrc": "6257:11:84", + "nodeType": "YulFunctionCall", + "src": "6257:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6251:5:84", + "nodeType": "YulIdentifier", + "src": "6251:5:84" + }, + "nativeSrc": "6251:18:84", + "nodeType": "YulFunctionCall", + "src": "6251:18:84" + }, + "variables": [ + { + "name": "memberValue0_1", + "nativeSrc": "6233:14:84", + "nodeType": "YulTypedName", + "src": "6233:14:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "6293:6:84", + "nodeType": "YulIdentifier", + "src": "6293:6:84" + }, + { + "name": "_1", + "nativeSrc": "6301:2:84", + "nodeType": "YulIdentifier", + "src": "6301:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6289:3:84", + "nodeType": "YulIdentifier", + "src": "6289:3:84" + }, + "nativeSrc": "6289:15:84", + "nodeType": "YulFunctionCall", + "src": "6289:15:84" + }, + { + "name": "_3", + "nativeSrc": "6306:2:84", + "nodeType": "YulIdentifier", + "src": "6306:2:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6282:6:84", + "nodeType": "YulIdentifier", + "src": "6282:6:84" + }, + "nativeSrc": "6282:27:84", + "nodeType": "YulFunctionCall", + "src": "6282:27:84" + }, + "nativeSrc": "6282:27:84", + "nodeType": "YulExpressionStatement", + "src": "6282:27:84" + }, + { + "nativeSrc": "6322:60:84", + "nodeType": "YulAssignment", + "src": "6322:60:84", + "value": { + "arguments": [ + { + "name": "memberValue0_1", + "nativeSrc": "6350:14:84", + "nodeType": "YulIdentifier", + "src": "6350:14:84" + }, + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "6370:6:84", + "nodeType": "YulIdentifier", + "src": "6370:6:84" + }, + { + "name": "_3", + "nativeSrc": "6378:2:84", + "nodeType": "YulIdentifier", + "src": "6378:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6366:3:84", + "nodeType": "YulIdentifier", + "src": "6366:3:84" + }, + "nativeSrc": "6366:15:84", + "nodeType": "YulFunctionCall", + "src": "6366:15:84" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "6332:17:84", + "nodeType": "YulIdentifier", + "src": "6332:17:84" + }, + "nativeSrc": "6332:50:84", + "nodeType": "YulFunctionCall", + "src": "6332:50:84" + }, + "variableNames": [ + { + "name": "tail_2", + "nativeSrc": "6322:6:84", + "nodeType": "YulIdentifier", + "src": "6322:6:84" + } + ] + }, + { + "nativeSrc": "6395:25:84", + "nodeType": "YulAssignment", + "src": "6395:25:84", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "6409:6:84", + "nodeType": "YulIdentifier", + "src": "6409:6:84" + }, + { + "name": "_1", + "nativeSrc": "6417:2:84", + "nodeType": "YulIdentifier", + "src": "6417:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6405:3:84", + "nodeType": "YulIdentifier", + "src": "6405:3:84" + }, + "nativeSrc": "6405:15:84", + "nodeType": "YulFunctionCall", + "src": "6405:15:84" + }, + "variableNames": [ + { + "name": "srcPtr", + "nativeSrc": "6395:6:84", + "nodeType": "YulIdentifier", + "src": "6395:6:84" + } + ] + }, + { + "nativeSrc": "6433:19:84", + "nodeType": "YulAssignment", + "src": "6433:19:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "6444:3:84", + "nodeType": "YulIdentifier", + "src": "6444:3:84" + }, + { + "name": "_1", + "nativeSrc": "6449:2:84", + "nodeType": "YulIdentifier", + "src": "6449:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6440:3:84", + "nodeType": "YulIdentifier", + "src": "6440:3:84" + }, + "nativeSrc": "6440:12:84", + "nodeType": "YulFunctionCall", + "src": "6440:12:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "6433:3:84", + "nodeType": "YulIdentifier", + "src": "6433:3:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "5958:1:84", + "nodeType": "YulIdentifier", + "src": "5958:1:84" + }, + { + "name": "length", + "nativeSrc": "5961:6:84", + "nodeType": "YulIdentifier", + "src": "5961:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "5955:2:84", + "nodeType": "YulIdentifier", + "src": "5955:2:84" + }, + "nativeSrc": "5955:13:84", + "nodeType": "YulFunctionCall", + "src": "5955:13:84" + }, + "nativeSrc": "5947:515:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "5969:18:84", + "nodeType": "YulBlock", + "src": "5969:18:84", + "statements": [ + { + "nativeSrc": "5971:14:84", + "nodeType": "YulAssignment", + "src": "5971:14:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "5980:1:84", + "nodeType": "YulIdentifier", + "src": "5980:1:84" + }, + { + "kind": "number", + "nativeSrc": "5983:1:84", + "nodeType": "YulLiteral", + "src": "5983:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5976:3:84", + "nodeType": "YulIdentifier", + "src": "5976:3:84" + }, + "nativeSrc": "5976:9:84", + "nodeType": "YulFunctionCall", + "src": "5976:9:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "5971:1:84", + "nodeType": "YulIdentifier", + "src": "5971:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "5951:3:84", + "nodeType": "YulBlock", + "src": "5951:3:84", + "statements": [] + }, + "src": "5947:515:84" + }, + { + "nativeSrc": "6471:14:84", + "nodeType": "YulAssignment", + "src": "6471:14:84", + "value": { + "name": "tail_2", + "nativeSrc": "6479:6:84", + "nodeType": "YulIdentifier", + "src": "6479:6:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6471:4:84", + "nodeType": "YulIdentifier", + "src": "6471:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_struct$_RadonReducer_$16460_memory_ptr__to_t_struct$_RadonReducer_$16460_memory_ptr__fromStack_reversed", + "nativeSrc": "5181:1310:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5313:9:84", + "nodeType": "YulTypedName", + "src": "5313:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5324:6:84", + "nodeType": "YulTypedName", + "src": "5324:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5335:4:84", + "nodeType": "YulTypedName", + "src": "5335:4:84", + "type": "" + } + ], + "src": "5181:1310:84" + }, + { + "body": { + "nativeSrc": "6887:1834:84", + "nodeType": "YulBlock", + "src": "6887:1834:84", + "statements": [ + { + "nativeSrc": "6897:33:84", + "nodeType": "YulVariableDeclaration", + "src": "6897:33:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6915:9:84", + "nodeType": "YulIdentifier", + "src": "6915:9:84" + }, + { + "kind": "number", + "nativeSrc": "6926:3:84", + "nodeType": "YulLiteral", + "src": "6926:3:84", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6911:3:84", + "nodeType": "YulIdentifier", + "src": "6911:3:84" + }, + "nativeSrc": "6911:19:84", + "nodeType": "YulFunctionCall", + "src": "6911:19:84" + }, + "variables": [ + { + "name": "tail_1", + "nativeSrc": "6901:6:84", + "nodeType": "YulTypedName", + "src": "6901:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6946:9:84", + "nodeType": "YulIdentifier", + "src": "6946:9:84" + }, + { + "kind": "number", + "nativeSrc": "6957:3:84", + "nodeType": "YulLiteral", + "src": "6957:3:84", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6939:6:84", + "nodeType": "YulIdentifier", + "src": "6939:6:84" + }, + "nativeSrc": "6939:22:84", + "nodeType": "YulFunctionCall", + "src": "6939:22:84" + }, + "nativeSrc": "6939:22:84", + "nodeType": "YulExpressionStatement", + "src": "6939:22:84" + }, + { + "nativeSrc": "6970:17:84", + "nodeType": "YulVariableDeclaration", + "src": "6970:17:84", + "value": { + "name": "tail_1", + "nativeSrc": "6981:6:84", + "nodeType": "YulIdentifier", + "src": "6981:6:84" + }, + "variables": [ + { + "name": "pos", + "nativeSrc": "6974:3:84", + "nodeType": "YulTypedName", + "src": "6974:3:84", + "type": "" + } + ] + }, + { + "nativeSrc": "6996:27:84", + "nodeType": "YulVariableDeclaration", + "src": "6996:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "7016:6:84", + "nodeType": "YulIdentifier", + "src": "7016:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7010:5:84", + "nodeType": "YulIdentifier", + "src": "7010:5:84" + }, + "nativeSrc": "7010:13:84", + "nodeType": "YulFunctionCall", + "src": "7010:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "7000:6:84", + "nodeType": "YulTypedName", + "src": "7000:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "7039:6:84", + "nodeType": "YulIdentifier", + "src": "7039:6:84" + }, + { + "name": "length", + "nativeSrc": "7047:6:84", + "nodeType": "YulIdentifier", + "src": "7047:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7032:6:84", + "nodeType": "YulIdentifier", + "src": "7032:6:84" + }, + "nativeSrc": "7032:22:84", + "nodeType": "YulFunctionCall", + "src": "7032:22:84" + }, + "nativeSrc": "7032:22:84", + "nodeType": "YulExpressionStatement", + "src": "7032:22:84" + }, + { + "nativeSrc": "7063:26:84", + "nodeType": "YulAssignment", + "src": "7063:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7074:9:84", + "nodeType": "YulIdentifier", + "src": "7074:9:84" + }, + { + "kind": "number", + "nativeSrc": "7085:3:84", + "nodeType": "YulLiteral", + "src": "7085:3:84", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7070:3:84", + "nodeType": "YulIdentifier", + "src": "7070:3:84" + }, + "nativeSrc": "7070:19:84", + "nodeType": "YulFunctionCall", + "src": "7070:19:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "7063:3:84", + "nodeType": "YulIdentifier", + "src": "7063:3:84" + } + ] + }, + { + "nativeSrc": "7098:14:84", + "nodeType": "YulVariableDeclaration", + "src": "7098:14:84", + "value": { + "kind": "number", + "nativeSrc": "7108:4:84", + "nodeType": "YulLiteral", + "src": "7108:4:84", + "type": "", + "value": "0x20" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "7102:2:84", + "nodeType": "YulTypedName", + "src": "7102:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7121:29:84", + "nodeType": "YulVariableDeclaration", + "src": "7121:29:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "7139:6:84", + "nodeType": "YulIdentifier", + "src": "7139:6:84" + }, + { + "name": "_1", + "nativeSrc": "7147:2:84", + "nodeType": "YulIdentifier", + "src": "7147:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7135:3:84", + "nodeType": "YulIdentifier", + "src": "7135:3:84" + }, + "nativeSrc": "7135:15:84", + "nodeType": "YulFunctionCall", + "src": "7135:15:84" + }, + "variables": [ + { + "name": "srcPtr", + "nativeSrc": "7125:6:84", + "nodeType": "YulTypedName", + "src": "7125:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7159:10:84", + "nodeType": "YulVariableDeclaration", + "src": "7159:10:84", + "value": { + "kind": "number", + "nativeSrc": "7168:1:84", + "nodeType": "YulLiteral", + "src": "7168:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "7163:1:84", + "nodeType": "YulTypedName", + "src": "7163:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7227:120:84", + "nodeType": "YulBlock", + "src": "7227:120:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7248:3:84", + "nodeType": "YulIdentifier", + "src": "7248:3:84" + }, + { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "7259:6:84", + "nodeType": "YulIdentifier", + "src": "7259:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7253:5:84", + "nodeType": "YulIdentifier", + "src": "7253:5:84" + }, + "nativeSrc": "7253:13:84", + "nodeType": "YulFunctionCall", + "src": "7253:13:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7241:6:84", + "nodeType": "YulIdentifier", + "src": "7241:6:84" + }, + "nativeSrc": "7241:26:84", + "nodeType": "YulFunctionCall", + "src": "7241:26:84" + }, + "nativeSrc": "7241:26:84", + "nodeType": "YulExpressionStatement", + "src": "7241:26:84" + }, + { + "nativeSrc": "7280:19:84", + "nodeType": "YulAssignment", + "src": "7280:19:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7291:3:84", + "nodeType": "YulIdentifier", + "src": "7291:3:84" + }, + { + "name": "_1", + "nativeSrc": "7296:2:84", + "nodeType": "YulIdentifier", + "src": "7296:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7287:3:84", + "nodeType": "YulIdentifier", + "src": "7287:3:84" + }, + "nativeSrc": "7287:12:84", + "nodeType": "YulFunctionCall", + "src": "7287:12:84" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "7280:3:84", + "nodeType": "YulIdentifier", + "src": "7280:3:84" + } + ] + }, + { + "nativeSrc": "7312:25:84", + "nodeType": "YulAssignment", + "src": "7312:25:84", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "7326:6:84", + "nodeType": "YulIdentifier", + "src": "7326:6:84" + }, + { + "name": "_1", + "nativeSrc": "7334:2:84", + "nodeType": "YulIdentifier", + "src": "7334:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7322:3:84", + "nodeType": "YulIdentifier", + "src": "7322:3:84" + }, + "nativeSrc": "7322:15:84", + "nodeType": "YulFunctionCall", + "src": "7322:15:84" + }, + "variableNames": [ + { + "name": "srcPtr", + "nativeSrc": "7312:6:84", + "nodeType": "YulIdentifier", + "src": "7312:6:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "7189:1:84", + "nodeType": "YulIdentifier", + "src": "7189:1:84" + }, + { + "name": "length", + "nativeSrc": "7192:6:84", + "nodeType": "YulIdentifier", + "src": "7192:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "7186:2:84", + "nodeType": "YulIdentifier", + "src": "7186:2:84" + }, + "nativeSrc": "7186:13:84", + "nodeType": "YulFunctionCall", + "src": "7186:13:84" + }, + "nativeSrc": "7178:169:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "7200:18:84", + "nodeType": "YulBlock", + "src": "7200:18:84", + "statements": [ + { + "nativeSrc": "7202:14:84", + "nodeType": "YulAssignment", + "src": "7202:14:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "7211:1:84", + "nodeType": "YulIdentifier", + "src": "7211:1:84" + }, + { + "kind": "number", + "nativeSrc": "7214:1:84", + "nodeType": "YulLiteral", + "src": "7214:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7207:3:84", + "nodeType": "YulIdentifier", + "src": "7207:3:84" + }, + "nativeSrc": "7207:9:84", + "nodeType": "YulFunctionCall", + "src": "7207:9:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "7202:1:84", + "nodeType": "YulIdentifier", + "src": "7202:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "7182:3:84", + "nodeType": "YulBlock", + "src": "7182:3:84", + "statements": [] + }, + "src": "7178:169:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7367:9:84", + "nodeType": "YulIdentifier", + "src": "7367:9:84" + }, + { + "name": "_1", + "nativeSrc": "7378:2:84", + "nodeType": "YulIdentifier", + "src": "7378:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7363:3:84", + "nodeType": "YulIdentifier", + "src": "7363:3:84" + }, + "nativeSrc": "7363:18:84", + "nodeType": "YulFunctionCall", + "src": "7363:18:84" + }, + { + "name": "value1", + "nativeSrc": "7383:6:84", + "nodeType": "YulIdentifier", + "src": "7383:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7356:6:84", + "nodeType": "YulIdentifier", + "src": "7356:6:84" + }, + "nativeSrc": "7356:34:84", + "nodeType": "YulFunctionCall", + "src": "7356:34:84" + }, + "nativeSrc": "7356:34:84", + "nodeType": "YulExpressionStatement", + "src": "7356:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7410:9:84", + "nodeType": "YulIdentifier", + "src": "7410:9:84" + }, + { + "kind": "number", + "nativeSrc": "7421:2:84", + "nodeType": "YulLiteral", + "src": "7421:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7406:3:84", + "nodeType": "YulIdentifier", + "src": "7406:3:84" + }, + "nativeSrc": "7406:18:84", + "nodeType": "YulFunctionCall", + "src": "7406:18:84" + }, + { + "name": "value2", + "nativeSrc": "7426:6:84", + "nodeType": "YulIdentifier", + "src": "7426:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7399:6:84", + "nodeType": "YulIdentifier", + "src": "7399:6:84" + }, + "nativeSrc": "7399:34:84", + "nodeType": "YulFunctionCall", + "src": "7399:34:84" + }, + "nativeSrc": "7399:34:84", + "nodeType": "YulExpressionStatement", + "src": "7399:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7453:9:84", + "nodeType": "YulIdentifier", + "src": "7453:9:84" + }, + { + "kind": "number", + "nativeSrc": "7464:2:84", + "nodeType": "YulLiteral", + "src": "7464:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7449:3:84", + "nodeType": "YulIdentifier", + "src": "7449:3:84" + }, + "nativeSrc": "7449:18:84", + "nodeType": "YulFunctionCall", + "src": "7449:18:84" + }, + { + "arguments": [ + { + "name": "value3", + "nativeSrc": "7473:6:84", + "nodeType": "YulIdentifier", + "src": "7473:6:84" + }, + { + "kind": "number", + "nativeSrc": "7481:6:84", + "nodeType": "YulLiteral", + "src": "7481:6:84", + "type": "", + "value": "0xffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7469:3:84", + "nodeType": "YulIdentifier", + "src": "7469:3:84" + }, + "nativeSrc": "7469:19:84", + "nodeType": "YulFunctionCall", + "src": "7469:19:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7442:6:84", + "nodeType": "YulIdentifier", + "src": "7442:6:84" + }, + "nativeSrc": "7442:47:84", + "nodeType": "YulFunctionCall", + "src": "7442:47:84" + }, + "nativeSrc": "7442:47:84", + "nodeType": "YulExpressionStatement", + "src": "7442:47:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7509:9:84", + "nodeType": "YulIdentifier", + "src": "7509:9:84" + }, + { + "kind": "number", + "nativeSrc": "7520:3:84", + "nodeType": "YulLiteral", + "src": "7520:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7505:3:84", + "nodeType": "YulIdentifier", + "src": "7505:3:84" + }, + "nativeSrc": "7505:19:84", + "nodeType": "YulFunctionCall", + "src": "7505:19:84" + }, + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7530:3:84", + "nodeType": "YulIdentifier", + "src": "7530:3:84" + }, + { + "name": "headStart", + "nativeSrc": "7535:9:84", + "nodeType": "YulIdentifier", + "src": "7535:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7526:3:84", + "nodeType": "YulIdentifier", + "src": "7526:3:84" + }, + "nativeSrc": "7526:19:84", + "nodeType": "YulFunctionCall", + "src": "7526:19:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7498:6:84", + "nodeType": "YulIdentifier", + "src": "7498:6:84" + }, + "nativeSrc": "7498:48:84", + "nodeType": "YulFunctionCall", + "src": "7498:48:84" + }, + "nativeSrc": "7498:48:84", + "nodeType": "YulExpressionStatement", + "src": "7498:48:84" + }, + { + "nativeSrc": "7555:16:84", + "nodeType": "YulVariableDeclaration", + "src": "7555:16:84", + "value": { + "name": "pos", + "nativeSrc": "7568:3:84", + "nodeType": "YulIdentifier", + "src": "7568:3:84" + }, + "variables": [ + { + "name": "pos_1", + "nativeSrc": "7559:5:84", + "nodeType": "YulTypedName", + "src": "7559:5:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7580:29:84", + "nodeType": "YulVariableDeclaration", + "src": "7580:29:84", + "value": { + "arguments": [ + { + "name": "value4", + "nativeSrc": "7602:6:84", + "nodeType": "YulIdentifier", + "src": "7602:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7596:5:84", + "nodeType": "YulIdentifier", + "src": "7596:5:84" + }, + "nativeSrc": "7596:13:84", + "nodeType": "YulFunctionCall", + "src": "7596:13:84" + }, + "variables": [ + { + "name": "length_1", + "nativeSrc": "7584:8:84", + "nodeType": "YulTypedName", + "src": "7584:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7625:3:84", + "nodeType": "YulIdentifier", + "src": "7625:3:84" + }, + { + "name": "length_1", + "nativeSrc": "7630:8:84", + "nodeType": "YulIdentifier", + "src": "7630:8:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7618:6:84", + "nodeType": "YulIdentifier", + "src": "7618:6:84" + }, + "nativeSrc": "7618:21:84", + "nodeType": "YulFunctionCall", + "src": "7618:21:84" + }, + "nativeSrc": "7618:21:84", + "nodeType": "YulExpressionStatement", + "src": "7618:21:84" + }, + { + "nativeSrc": "7648:21:84", + "nodeType": "YulAssignment", + "src": "7648:21:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7661:3:84", + "nodeType": "YulIdentifier", + "src": "7661:3:84" + }, + { + "name": "_1", + "nativeSrc": "7666:2:84", + "nodeType": "YulIdentifier", + "src": "7666:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7657:3:84", + "nodeType": "YulIdentifier", + "src": "7657:3:84" + }, + "nativeSrc": "7657:12:84", + "nodeType": "YulFunctionCall", + "src": "7657:12:84" + }, + "variableNames": [ + { + "name": "pos_1", + "nativeSrc": "7648:5:84", + "nodeType": "YulIdentifier", + "src": "7648:5:84" + } + ] + }, + { + "nativeSrc": "7678:11:84", + "nodeType": "YulVariableDeclaration", + "src": "7678:11:84", + "value": { + "kind": "number", + "nativeSrc": "7688:1:84", + "nodeType": "YulLiteral", + "src": "7688:1:84", + "type": "", + "value": "5" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "7682:2:84", + "nodeType": "YulTypedName", + "src": "7682:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7698:49:84", + "nodeType": "YulVariableDeclaration", + "src": "7698:49:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "7720:3:84", + "nodeType": "YulIdentifier", + "src": "7720:3:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7729:1:84", + "nodeType": "YulLiteral", + "src": "7729:1:84", + "type": "", + "value": "5" + }, + { + "name": "length_1", + "nativeSrc": "7732:8:84", + "nodeType": "YulIdentifier", + "src": "7732:8:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7725:3:84", + "nodeType": "YulIdentifier", + "src": "7725:3:84" + }, + "nativeSrc": "7725:16:84", + "nodeType": "YulFunctionCall", + "src": "7725:16:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7716:3:84", + "nodeType": "YulIdentifier", + "src": "7716:3:84" + }, + "nativeSrc": "7716:26:84", + "nodeType": "YulFunctionCall", + "src": "7716:26:84" + }, + { + "name": "_1", + "nativeSrc": "7744:2:84", + "nodeType": "YulIdentifier", + "src": "7744:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7712:3:84", + "nodeType": "YulIdentifier", + "src": "7712:3:84" + }, + "nativeSrc": "7712:35:84", + "nodeType": "YulFunctionCall", + "src": "7712:35:84" + }, + "variables": [ + { + "name": "tail_2", + "nativeSrc": "7702:6:84", + "nodeType": "YulTypedName", + "src": "7702:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7756:31:84", + "nodeType": "YulVariableDeclaration", + "src": "7756:31:84", + "value": { + "arguments": [ + { + "name": "value4", + "nativeSrc": "7776:6:84", + "nodeType": "YulIdentifier", + "src": "7776:6:84" + }, + { + "name": "_1", + "nativeSrc": "7784:2:84", + "nodeType": "YulIdentifier", + "src": "7784:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7772:3:84", + "nodeType": "YulIdentifier", + "src": "7772:3:84" + }, + "nativeSrc": "7772:15:84", + "nodeType": "YulFunctionCall", + "src": "7772:15:84" + }, + "variables": [ + { + "name": "srcPtr_1", + "nativeSrc": "7760:8:84", + "nodeType": "YulTypedName", + "src": "7760:8:84", + "type": "" + } + ] + }, + { + "nativeSrc": "7796:12:84", + "nodeType": "YulVariableDeclaration", + "src": "7796:12:84", + "value": { + "kind": "number", + "nativeSrc": "7807:1:84", + "nodeType": "YulLiteral", + "src": "7807:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i_1", + "nativeSrc": "7800:3:84", + "nodeType": "YulTypedName", + "src": "7800:3:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7874:818:84", + "nodeType": "YulBlock", + "src": "7874:818:84", + "statements": [ + { + "nativeSrc": "7888:17:84", + "nodeType": "YulVariableDeclaration", + "src": "7888:17:84", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7902:2:84", + "nodeType": "YulLiteral", + "src": "7902:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "7898:3:84", + "nodeType": "YulIdentifier", + "src": "7898:3:84" + }, + "nativeSrc": "7898:7:84", + "nodeType": "YulFunctionCall", + "src": "7898:7:84" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "7892:2:84", + "nodeType": "YulTypedName", + "src": "7892:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos_1", + "nativeSrc": "7925:5:84", + "nodeType": "YulIdentifier", + "src": "7925:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "7940:6:84", + "nodeType": "YulIdentifier", + "src": "7940:6:84" + }, + { + "name": "pos", + "nativeSrc": "7948:3:84", + "nodeType": "YulIdentifier", + "src": "7948:3:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7936:3:84", + "nodeType": "YulIdentifier", + "src": "7936:3:84" + }, + "nativeSrc": "7936:16:84", + "nodeType": "YulFunctionCall", + "src": "7936:16:84" + }, + { + "name": "_3", + "nativeSrc": "7954:2:84", + "nodeType": "YulIdentifier", + "src": "7954:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7932:3:84", + "nodeType": "YulIdentifier", + "src": "7932:3:84" + }, + "nativeSrc": "7932:25:84", + "nodeType": "YulFunctionCall", + "src": "7932:25:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7918:6:84", + "nodeType": "YulIdentifier", + "src": "7918:6:84" + }, + "nativeSrc": "7918:40:84", + "nodeType": "YulFunctionCall", + "src": "7918:40:84" + }, + "nativeSrc": "7918:40:84", + "nodeType": "YulExpressionStatement", + "src": "7918:40:84" + }, + { + "nativeSrc": "7971:25:84", + "nodeType": "YulVariableDeclaration", + "src": "7971:25:84", + "value": { + "arguments": [ + { + "name": "srcPtr_1", + "nativeSrc": "7987:8:84", + "nodeType": "YulIdentifier", + "src": "7987:8:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7981:5:84", + "nodeType": "YulIdentifier", + "src": "7981:5:84" + }, + "nativeSrc": "7981:15:84", + "nodeType": "YulFunctionCall", + "src": "7981:15:84" + }, + "variables": [ + { + "name": "_4", + "nativeSrc": "7975:2:84", + "nodeType": "YulTypedName", + "src": "7975:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "8009:19:84", + "nodeType": "YulVariableDeclaration", + "src": "8009:19:84", + "value": { + "name": "tail_2", + "nativeSrc": "8022:6:84", + "nodeType": "YulIdentifier", + "src": "8022:6:84" + }, + "variables": [ + { + "name": "pos_2", + "nativeSrc": "8013:5:84", + "nodeType": "YulTypedName", + "src": "8013:5:84", + "type": "" + } + ] + }, + { + "nativeSrc": "8041:25:84", + "nodeType": "YulVariableDeclaration", + "src": "8041:25:84", + "value": { + "arguments": [ + { + "name": "_4", + "nativeSrc": "8063:2:84", + "nodeType": "YulIdentifier", + "src": "8063:2:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8057:5:84", + "nodeType": "YulIdentifier", + "src": "8057:5:84" + }, + "nativeSrc": "8057:9:84", + "nodeType": "YulFunctionCall", + "src": "8057:9:84" + }, + "variables": [ + { + "name": "length_2", + "nativeSrc": "8045:8:84", + "nodeType": "YulTypedName", + "src": "8045:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "8086:6:84", + "nodeType": "YulIdentifier", + "src": "8086:6:84" + }, + { + "name": "length_2", + "nativeSrc": "8094:8:84", + "nodeType": "YulIdentifier", + "src": "8094:8:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8079:6:84", + "nodeType": "YulIdentifier", + "src": "8079:6:84" + }, + "nativeSrc": "8079:24:84", + "nodeType": "YulFunctionCall", + "src": "8079:24:84" + }, + "nativeSrc": "8079:24:84", + "nodeType": "YulExpressionStatement", + "src": "8079:24:84" + }, + { + "nativeSrc": "8116:24:84", + "nodeType": "YulAssignment", + "src": "8116:24:84", + "value": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "8129:6:84", + "nodeType": "YulIdentifier", + "src": "8129:6:84" + }, + { + "name": "_1", + "nativeSrc": "8137:2:84", + "nodeType": "YulIdentifier", + "src": "8137:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8125:3:84", + "nodeType": "YulIdentifier", + "src": "8125:3:84" + }, + "nativeSrc": "8125:15:84", + "nodeType": "YulFunctionCall", + "src": "8125:15:84" + }, + "variableNames": [ + { + "name": "pos_2", + "nativeSrc": "8116:5:84", + "nodeType": "YulIdentifier", + "src": "8116:5:84" + } + ] + }, + { + "nativeSrc": "8153:53:84", + "nodeType": "YulVariableDeclaration", + "src": "8153:53:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "8175:6:84", + "nodeType": "YulIdentifier", + "src": "8175:6:84" + }, + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "8187:2:84", + "nodeType": "YulIdentifier", + "src": "8187:2:84" + }, + { + "name": "length_2", + "nativeSrc": "8191:8:84", + "nodeType": "YulIdentifier", + "src": "8191:8:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8183:3:84", + "nodeType": "YulIdentifier", + "src": "8183:3:84" + }, + "nativeSrc": "8183:17:84", + "nodeType": "YulFunctionCall", + "src": "8183:17:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8171:3:84", + "nodeType": "YulIdentifier", + "src": "8171:3:84" + }, + "nativeSrc": "8171:30:84", + "nodeType": "YulFunctionCall", + "src": "8171:30:84" + }, + { + "name": "_1", + "nativeSrc": "8203:2:84", + "nodeType": "YulIdentifier", + "src": "8203:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8167:3:84", + "nodeType": "YulIdentifier", + "src": "8167:3:84" + }, + "nativeSrc": "8167:39:84", + "nodeType": "YulFunctionCall", + "src": "8167:39:84" + }, + "variables": [ + { + "name": "tail_3", + "nativeSrc": "8157:6:84", + "nodeType": "YulTypedName", + "src": "8157:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "8219:27:84", + "nodeType": "YulVariableDeclaration", + "src": "8219:27:84", + "value": { + "arguments": [ + { + "name": "_4", + "nativeSrc": "8239:2:84", + "nodeType": "YulIdentifier", + "src": "8239:2:84" + }, + { + "name": "_1", + "nativeSrc": "8243:2:84", + "nodeType": "YulIdentifier", + "src": "8243:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8235:3:84", + "nodeType": "YulIdentifier", + "src": "8235:3:84" + }, + "nativeSrc": "8235:11:84", + "nodeType": "YulFunctionCall", + "src": "8235:11:84" + }, + "variables": [ + { + "name": "srcPtr_2", + "nativeSrc": "8223:8:84", + "nodeType": "YulTypedName", + "src": "8223:8:84", + "type": "" + } + ] + }, + { + "nativeSrc": "8259:12:84", + "nodeType": "YulVariableDeclaration", + "src": "8259:12:84", + "value": { + "kind": "number", + "nativeSrc": "8270:1:84", + "nodeType": "YulLiteral", + "src": "8270:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i_2", + "nativeSrc": "8263:3:84", + "nodeType": "YulTypedName", + "src": "8263:3:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "8345:230:84", + "nodeType": "YulBlock", + "src": "8345:230:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos_2", + "nativeSrc": "8370:5:84", + "nodeType": "YulIdentifier", + "src": "8370:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "tail_3", + "nativeSrc": "8385:6:84", + "nodeType": "YulIdentifier", + "src": "8385:6:84" + }, + { + "name": "tail_2", + "nativeSrc": "8393:6:84", + "nodeType": "YulIdentifier", + "src": "8393:6:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8381:3:84", + "nodeType": "YulIdentifier", + "src": "8381:3:84" + }, + "nativeSrc": "8381:19:84", + "nodeType": "YulFunctionCall", + "src": "8381:19:84" + }, + { + "name": "_3", + "nativeSrc": "8402:2:84", + "nodeType": "YulIdentifier", + "src": "8402:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8377:3:84", + "nodeType": "YulIdentifier", + "src": "8377:3:84" + }, + "nativeSrc": "8377:28:84", + "nodeType": "YulFunctionCall", + "src": "8377:28:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8363:6:84", + "nodeType": "YulIdentifier", + "src": "8363:6:84" + }, + "nativeSrc": "8363:43:84", + "nodeType": "YulFunctionCall", + "src": "8363:43:84" + }, + "nativeSrc": "8363:43:84", + "nodeType": "YulExpressionStatement", + "src": "8363:43:84" + }, + { + "nativeSrc": "8423:52:84", + "nodeType": "YulAssignment", + "src": "8423:52:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "srcPtr_2", + "nativeSrc": "8457:8:84", + "nodeType": "YulIdentifier", + "src": "8457:8:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8451:5:84", + "nodeType": "YulIdentifier", + "src": "8451:5:84" + }, + "nativeSrc": "8451:15:84", + "nodeType": "YulFunctionCall", + "src": "8451:15:84" + }, + { + "name": "tail_3", + "nativeSrc": "8468:6:84", + "nodeType": "YulIdentifier", + "src": "8468:6:84" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "8433:17:84", + "nodeType": "YulIdentifier", + "src": "8433:17:84" + }, + "nativeSrc": "8433:42:84", + "nodeType": "YulFunctionCall", + "src": "8433:42:84" + }, + "variableNames": [ + { + "name": "tail_3", + "nativeSrc": "8423:6:84", + "nodeType": "YulIdentifier", + "src": "8423:6:84" + } + ] + }, + { + "nativeSrc": "8492:29:84", + "nodeType": "YulAssignment", + "src": "8492:29:84", + "value": { + "arguments": [ + { + "name": "srcPtr_2", + "nativeSrc": "8508:8:84", + "nodeType": "YulIdentifier", + "src": "8508:8:84" + }, + { + "name": "_1", + "nativeSrc": "8518:2:84", + "nodeType": "YulIdentifier", + "src": "8518:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8504:3:84", + "nodeType": "YulIdentifier", + "src": "8504:3:84" + }, + "nativeSrc": "8504:17:84", + "nodeType": "YulFunctionCall", + "src": "8504:17:84" + }, + "variableNames": [ + { + "name": "srcPtr_2", + "nativeSrc": "8492:8:84", + "nodeType": "YulIdentifier", + "src": "8492:8:84" + } + ] + }, + { + "nativeSrc": "8538:23:84", + "nodeType": "YulAssignment", + "src": "8538:23:84", + "value": { + "arguments": [ + { + "name": "pos_2", + "nativeSrc": "8551:5:84", + "nodeType": "YulIdentifier", + "src": "8551:5:84" + }, + { + "name": "_1", + "nativeSrc": "8558:2:84", + "nodeType": "YulIdentifier", + "src": "8558:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8547:3:84", + "nodeType": "YulIdentifier", + "src": "8547:3:84" + }, + "nativeSrc": "8547:14:84", + "nodeType": "YulFunctionCall", + "src": "8547:14:84" + }, + "variableNames": [ + { + "name": "pos_2", + "nativeSrc": "8538:5:84", + "nodeType": "YulIdentifier", + "src": "8538:5:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i_2", + "nativeSrc": "8295:3:84", + "nodeType": "YulIdentifier", + "src": "8295:3:84" + }, + { + "name": "length_2", + "nativeSrc": "8300:8:84", + "nodeType": "YulIdentifier", + "src": "8300:8:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "8292:2:84", + "nodeType": "YulIdentifier", + "src": "8292:2:84" + }, + "nativeSrc": "8292:17:84", + "nodeType": "YulFunctionCall", + "src": "8292:17:84" + }, + "nativeSrc": "8284:291:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "8310:22:84", + "nodeType": "YulBlock", + "src": "8310:22:84", + "statements": [ + { + "nativeSrc": "8312:18:84", + "nodeType": "YulAssignment", + "src": "8312:18:84", + "value": { + "arguments": [ + { + "name": "i_2", + "nativeSrc": "8323:3:84", + "nodeType": "YulIdentifier", + "src": "8323:3:84" + }, + { + "kind": "number", + "nativeSrc": "8328:1:84", + "nodeType": "YulLiteral", + "src": "8328:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8319:3:84", + "nodeType": "YulIdentifier", + "src": "8319:3:84" + }, + "nativeSrc": "8319:11:84", + "nodeType": "YulFunctionCall", + "src": "8319:11:84" + }, + "variableNames": [ + { + "name": "i_2", + "nativeSrc": "8312:3:84", + "nodeType": "YulIdentifier", + "src": "8312:3:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "8288:3:84", + "nodeType": "YulBlock", + "src": "8288:3:84", + "statements": [] + }, + "src": "8284:291:84" + }, + { + "nativeSrc": "8588:16:84", + "nodeType": "YulAssignment", + "src": "8588:16:84", + "value": { + "name": "tail_3", + "nativeSrc": "8598:6:84", + "nodeType": "YulIdentifier", + "src": "8598:6:84" + }, + "variableNames": [ + { + "name": "tail_2", + "nativeSrc": "8588:6:84", + "nodeType": "YulIdentifier", + "src": "8588:6:84" + } + ] + }, + { + "nativeSrc": "8617:29:84", + "nodeType": "YulAssignment", + "src": "8617:29:84", + "value": { + "arguments": [ + { + "name": "srcPtr_1", + "nativeSrc": "8633:8:84", + "nodeType": "YulIdentifier", + "src": "8633:8:84" + }, + { + "name": "_1", + "nativeSrc": "8643:2:84", + "nodeType": "YulIdentifier", + "src": "8643:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8629:3:84", + "nodeType": "YulIdentifier", + "src": "8629:3:84" + }, + "nativeSrc": "8629:17:84", + "nodeType": "YulFunctionCall", + "src": "8629:17:84" + }, + "variableNames": [ + { + "name": "srcPtr_1", + "nativeSrc": "8617:8:84", + "nodeType": "YulIdentifier", + "src": "8617:8:84" + } + ] + }, + { + "nativeSrc": "8659:23:84", + "nodeType": "YulAssignment", + "src": "8659:23:84", + "value": { + "arguments": [ + { + "name": "pos_1", + "nativeSrc": "8672:5:84", + "nodeType": "YulIdentifier", + "src": "8672:5:84" + }, + { + "name": "_1", + "nativeSrc": "8679:2:84", + "nodeType": "YulIdentifier", + "src": "8679:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8668:3:84", + "nodeType": "YulIdentifier", + "src": "8668:3:84" + }, + "nativeSrc": "8668:14:84", + "nodeType": "YulFunctionCall", + "src": "8668:14:84" + }, + "variableNames": [ + { + "name": "pos_1", + "nativeSrc": "8659:5:84", + "nodeType": "YulIdentifier", + "src": "8659:5:84" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i_1", + "nativeSrc": "7828:3:84", + "nodeType": "YulIdentifier", + "src": "7828:3:84" + }, + { + "name": "length_1", + "nativeSrc": "7833:8:84", + "nodeType": "YulIdentifier", + "src": "7833:8:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "7825:2:84", + "nodeType": "YulIdentifier", + "src": "7825:2:84" + }, + "nativeSrc": "7825:17:84", + "nodeType": "YulFunctionCall", + "src": "7825:17:84" + }, + "nativeSrc": "7817:875:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "7843:22:84", + "nodeType": "YulBlock", + "src": "7843:22:84", + "statements": [ + { + "nativeSrc": "7845:18:84", + "nodeType": "YulAssignment", + "src": "7845:18:84", + "value": { + "arguments": [ + { + "name": "i_1", + "nativeSrc": "7856:3:84", + "nodeType": "YulIdentifier", + "src": "7856:3:84" + }, + { + "kind": "number", + "nativeSrc": "7861:1:84", + "nodeType": "YulLiteral", + "src": "7861:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7852:3:84", + "nodeType": "YulIdentifier", + "src": "7852:3:84" + }, + "nativeSrc": "7852:11:84", + "nodeType": "YulFunctionCall", + "src": "7852:11:84" + }, + "variableNames": [ + { + "name": "i_1", + "nativeSrc": "7845:3:84", + "nodeType": "YulIdentifier", + "src": "7845:3:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "7821:3:84", + "nodeType": "YulBlock", + "src": "7821:3:84", + "statements": [] + }, + "src": "7817:875:84" + }, + { + "nativeSrc": "8701:14:84", + "nodeType": "YulAssignment", + "src": "8701:14:84", + "value": { + "name": "tail_2", + "nativeSrc": "8709:6:84", + "nodeType": "YulIdentifier", + "src": "8709:6:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8701:4:84", + "nodeType": "YulIdentifier", + "src": "8701:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_array$_t_bytes32_$dyn_memory_ptr_t_bytes32_t_bytes32_t_rational_32_by_1_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr__to_t_array$_t_bytes32_$dyn_memory_ptr_t_bytes32_t_bytes32_t_uint16_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr__fromStack_reversed", + "nativeSrc": "6496:2225:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6824:9:84", + "nodeType": "YulTypedName", + "src": "6824:9:84", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "6835:6:84", + "nodeType": "YulTypedName", + "src": "6835:6:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "6843:6:84", + "nodeType": "YulTypedName", + "src": "6843:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "6851:6:84", + "nodeType": "YulTypedName", + "src": "6851:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "6859:6:84", + "nodeType": "YulTypedName", + "src": "6859:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6867:6:84", + "nodeType": "YulTypedName", + "src": "6867:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6878:4:84", + "nodeType": "YulTypedName", + "src": "6878:4:84", + "type": "" + } + ], + "src": "6496:2225:84" + }, + { + "body": { + "nativeSrc": "9014:353:84", + "nodeType": "YulBlock", + "src": "9014:353:84", + "statements": [ + { + "nativeSrc": "9024:27:84", + "nodeType": "YulVariableDeclaration", + "src": "9024:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9044:6:84", + "nodeType": "YulIdentifier", + "src": "9044:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9038:5:84", + "nodeType": "YulIdentifier", + "src": "9038:5:84" + }, + "nativeSrc": "9038:13:84", + "nodeType": "YulFunctionCall", + "src": "9038:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "9028:6:84", + "nodeType": "YulTypedName", + "src": "9028:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9099:6:84", + "nodeType": "YulIdentifier", + "src": "9099:6:84" + }, + { + "kind": "number", + "nativeSrc": "9107:4:84", + "nodeType": "YulLiteral", + "src": "9107:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9095:3:84", + "nodeType": "YulIdentifier", + "src": "9095:3:84" + }, + "nativeSrc": "9095:17:84", + "nodeType": "YulFunctionCall", + "src": "9095:17:84" + }, + { + "name": "pos", + "nativeSrc": "9114:3:84", + "nodeType": "YulIdentifier", + "src": "9114:3:84" + }, + { + "name": "length", + "nativeSrc": "9119:6:84", + "nodeType": "YulIdentifier", + "src": "9119:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "9060:34:84", + "nodeType": "YulIdentifier", + "src": "9060:34:84" + }, + "nativeSrc": "9060:66:84", + "nodeType": "YulFunctionCall", + "src": "9060:66:84" + }, + "nativeSrc": "9060:66:84", + "nodeType": "YulExpressionStatement", + "src": "9060:66:84" + }, + { + "nativeSrc": "9135:29:84", + "nodeType": "YulVariableDeclaration", + "src": "9135:29:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "9152:3:84", + "nodeType": "YulIdentifier", + "src": "9152:3:84" + }, + { + "name": "length", + "nativeSrc": "9157:6:84", + "nodeType": "YulIdentifier", + "src": "9157:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9148:3:84", + "nodeType": "YulIdentifier", + "src": "9148:3:84" + }, + "nativeSrc": "9148:16:84", + "nodeType": "YulFunctionCall", + "src": "9148:16:84" + }, + "variables": [ + { + "name": "end_1", + "nativeSrc": "9139:5:84", + "nodeType": "YulTypedName", + "src": "9139:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "9180:5:84", + "nodeType": "YulIdentifier", + "src": "9180:5:84" + }, + { + "hexValue": "3a20", + "kind": "string", + "nativeSrc": "9187:4:84", + "nodeType": "YulLiteral", + "src": "9187:4:84", + "type": "", + "value": ": " + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9173:6:84", + "nodeType": "YulIdentifier", + "src": "9173:6:84" + }, + "nativeSrc": "9173:19:84", + "nodeType": "YulFunctionCall", + "src": "9173:19:84" + }, + "nativeSrc": "9173:19:84", + "nodeType": "YulExpressionStatement", + "src": "9173:19:84" + }, + { + "nativeSrc": "9201:29:84", + "nodeType": "YulVariableDeclaration", + "src": "9201:29:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "9223:6:84", + "nodeType": "YulIdentifier", + "src": "9223:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9217:5:84", + "nodeType": "YulIdentifier", + "src": "9217:5:84" + }, + "nativeSrc": "9217:13:84", + "nodeType": "YulFunctionCall", + "src": "9217:13:84" + }, + "variables": [ + { + "name": "length_1", + "nativeSrc": "9205:8:84", + "nodeType": "YulTypedName", + "src": "9205:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "9278:6:84", + "nodeType": "YulIdentifier", + "src": "9278:6:84" + }, + { + "kind": "number", + "nativeSrc": "9286:4:84", + "nodeType": "YulLiteral", + "src": "9286:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9274:3:84", + "nodeType": "YulIdentifier", + "src": "9274:3:84" + }, + "nativeSrc": "9274:17:84", + "nodeType": "YulFunctionCall", + "src": "9274:17:84" + }, + { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "9297:5:84", + "nodeType": "YulIdentifier", + "src": "9297:5:84" + }, + { + "kind": "number", + "nativeSrc": "9304:1:84", + "nodeType": "YulLiteral", + "src": "9304:1:84", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9293:3:84", + "nodeType": "YulIdentifier", + "src": "9293:3:84" + }, + "nativeSrc": "9293:13:84", + "nodeType": "YulFunctionCall", + "src": "9293:13:84" + }, + { + "name": "length_1", + "nativeSrc": "9308:8:84", + "nodeType": "YulIdentifier", + "src": "9308:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "9239:34:84", + "nodeType": "YulIdentifier", + "src": "9239:34:84" + }, + "nativeSrc": "9239:78:84", + "nodeType": "YulFunctionCall", + "src": "9239:78:84" + }, + "nativeSrc": "9239:78:84", + "nodeType": "YulExpressionStatement", + "src": "9239:78:84" + }, + { + "nativeSrc": "9326:35:84", + "nodeType": "YulAssignment", + "src": "9326:35:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "9341:5:84", + "nodeType": "YulIdentifier", + "src": "9341:5:84" + }, + { + "name": "length_1", + "nativeSrc": "9348:8:84", + "nodeType": "YulIdentifier", + "src": "9348:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9337:3:84", + "nodeType": "YulIdentifier", + "src": "9337:3:84" + }, + "nativeSrc": "9337:20:84", + "nodeType": "YulFunctionCall", + "src": "9337:20:84" + }, + { + "kind": "number", + "nativeSrc": "9359:1:84", + "nodeType": "YulLiteral", + "src": "9359:1:84", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9333:3:84", + "nodeType": "YulIdentifier", + "src": "9333:3:84" + }, + "nativeSrc": "9333:28:84", + "nodeType": "YulFunctionCall", + "src": "9333:28:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "9326:3:84", + "nodeType": "YulIdentifier", + "src": "9326:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_string_memory_ptr_t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "8726:641:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "8982:3:84", + "nodeType": "YulTypedName", + "src": "8982:3:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8987:6:84", + "nodeType": "YulTypedName", + "src": "8987:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8995:6:84", + "nodeType": "YulTypedName", + "src": "8995:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "9006:3:84", + "nodeType": "YulTypedName", + "src": "9006:3:84", + "type": "" + } + ], + "src": "8726:641:84" + }, + { + "body": { + "nativeSrc": "9493:99:84", + "nodeType": "YulBlock", + "src": "9493:99:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9510:9:84", + "nodeType": "YulIdentifier", + "src": "9510:9:84" + }, + { + "kind": "number", + "nativeSrc": "9521:2:84", + "nodeType": "YulLiteral", + "src": "9521:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9503:6:84", + "nodeType": "YulIdentifier", + "src": "9503:6:84" + }, + "nativeSrc": "9503:21:84", + "nodeType": "YulFunctionCall", + "src": "9503:21:84" + }, + "nativeSrc": "9503:21:84", + "nodeType": "YulExpressionStatement", + "src": "9503:21:84" + }, + { + "nativeSrc": "9533:53:84", + "nodeType": "YulAssignment", + "src": "9533:53:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9559:6:84", + "nodeType": "YulIdentifier", + "src": "9559:6:84" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9571:9:84", + "nodeType": "YulIdentifier", + "src": "9571:9:84" + }, + { + "kind": "number", + "nativeSrc": "9582:2:84", + "nodeType": "YulLiteral", + "src": "9582:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9567:3:84", + "nodeType": "YulIdentifier", + "src": "9567:3:84" + }, + "nativeSrc": "9567:18:84", + "nodeType": "YulFunctionCall", + "src": "9567:18:84" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "9541:17:84", + "nodeType": "YulIdentifier", + "src": "9541:17:84" + }, + "nativeSrc": "9541:45:84", + "nodeType": "YulFunctionCall", + "src": "9541:45:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "9533:4:84", + "nodeType": "YulIdentifier", + "src": "9533:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "9372:220:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9462:9:84", + "nodeType": "YulTypedName", + "src": "9462:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "9473:6:84", + "nodeType": "YulTypedName", + "src": "9473:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "9484:4:84", + "nodeType": "YulTypedName", + "src": "9484:4:84", + "type": "" + } + ], + "src": "9372:220:84" + } + ] + }, + "contents": "{\n { }\n function validator_revert_contract_WitnetOracle(value)\n {\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_contract$_WitnetOracle_$749t_address_fromMemory(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let value := mload(headStart)\n validator_revert_contract_WitnetOracle(value)\n value0 := value\n let value_1 := mload(add(headStart, 32))\n validator_revert_contract_WitnetOracle(value_1)\n value1 := value_1\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_bytes4_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, and(value, shl(224, 0xffffffff)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_57d830abe71d02a02e5da4295b2a41f780665da6ca2ca2ca1e1e440e807c06d7__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 37)\n mstore(add(headStart, 64), \"UsingWitnet: uncompliant WitnetO\")\n mstore(add(headStart, 96), \"racle\")\n tail := add(headStart, 128)\n }\n function abi_decode_tuple_t_contract$_WitnetRequestBytecodes_$849_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n validator_revert_contract_WitnetOracle(value)\n value0 := value\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function panic_error_0x21()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function copy_memory_to_memory_with_cleanup(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n function abi_encode_string(value, pos) -> end\n {\n let length := mload(value)\n mstore(pos, length)\n copy_memory_to_memory_with_cleanup(add(value, 0x20), add(pos, 0x20), length)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_stringliteral_56e8(pos) -> end\n {\n mstore(pos, 1)\n mstore(add(pos, 0x20), shl(255, 1))\n end := add(pos, 64)\n }\n function abi_encode_tuple_t_enum$_RadonDataRequestMethods_$16410_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_t_stringliteral_56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421__to_t_uint8_t_string_memory_ptr_t_string_memory_ptr_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_t_bytes_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n if iszero(lt(value0, 5)) { panic_error_0x21() }\n mstore(headStart, value0)\n let _1 := 32\n mstore(add(headStart, _1), 160)\n let _2 := 0\n mstore(add(headStart, 160), 0)\n let _3 := 64\n mstore(add(headStart, 64), 192)\n mstore(add(headStart, 192), 0)\n let updated_pos := add(headStart, 224)\n mstore(add(headStart, 96), 224)\n let pos := updated_pos\n let length := mload(value1)\n mstore(updated_pos, length)\n let _4 := 256\n pos := add(headStart, _4)\n let tail_1 := add(add(headStart, shl(5, length)), _4)\n let srcPtr := add(value1, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, add(sub(tail_1, headStart), not(255)))\n let _5 := mload(srcPtr)\n let pos_1 := tail_1\n pos_1 := tail_1\n let tail_2 := add(tail_1, _3)\n let srcPtr_1 := _5\n let i_1 := _2\n for { } lt(i_1, 0x02) { i_1 := add(i_1, 1) }\n {\n mstore(pos_1, sub(tail_2, tail_1))\n tail_2 := abi_encode_string(mload(srcPtr_1), tail_2)\n srcPtr_1 := add(srcPtr_1, _1)\n pos_1 := add(pos_1, _1)\n }\n tail_1 := tail_2\n srcPtr := add(srcPtr, _1)\n pos := add(pos, _1)\n }\n mstore(add(headStart, 128), sub(tail_1, headStart))\n tail := abi_encode_stringliteral_56e8(tail_1)\n }\n function abi_decode_tuple_t_bytes32_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function panic_error_0x32()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_struct$_RadonReducer_$16460_memory_ptr__to_t_struct$_RadonReducer_$16460_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n mstore(headStart, _1)\n let tail_1 := add(headStart, 96)\n let _2 := mload(value0)\n if iszero(lt(_2, 12)) { panic_error_0x21() }\n mstore(add(headStart, _1), _2)\n let memberValue0 := mload(add(value0, _1))\n let _3 := 0x40\n mstore(add(headStart, 0x40), 0x40)\n let pos := tail_1\n let length := mload(memberValue0)\n mstore(tail_1, length)\n pos := add(headStart, 128)\n let tail_2 := add(add(headStart, shl(5, length)), 128)\n let srcPtr := add(memberValue0, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, add(sub(tail_2, headStart), not(127)))\n let _4 := mload(srcPtr)\n let _5 := mload(_4)\n if iszero(lt(_5, 10)) { panic_error_0x21() }\n mstore(tail_2, _5)\n let memberValue0_1 := mload(add(_4, _1))\n mstore(add(tail_2, _1), _3)\n tail_2 := abi_encode_string(memberValue0_1, add(tail_2, _3))\n srcPtr := add(srcPtr, _1)\n pos := add(pos, _1)\n }\n tail := tail_2\n }\n function abi_encode_tuple_t_array$_t_bytes32_$dyn_memory_ptr_t_bytes32_t_bytes32_t_rational_32_by_1_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr__to_t_array$_t_bytes32_$dyn_memory_ptr_t_bytes32_t_bytes32_t_uint16_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n let tail_1 := add(headStart, 160)\n mstore(headStart, 160)\n let pos := tail_1\n let length := mload(value0)\n mstore(tail_1, length)\n pos := add(headStart, 192)\n let _1 := 0x20\n let srcPtr := add(value0, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, mload(srcPtr))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n mstore(add(headStart, _1), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), and(value3, 0xffff))\n mstore(add(headStart, 128), sub(pos, headStart))\n let pos_1 := pos\n let length_1 := mload(value4)\n mstore(pos, length_1)\n pos_1 := add(pos, _1)\n let _2 := 5\n let tail_2 := add(add(pos, shl(5, length_1)), _1)\n let srcPtr_1 := add(value4, _1)\n let i_1 := 0\n for { } lt(i_1, length_1) { i_1 := add(i_1, 1) }\n {\n let _3 := not(31)\n mstore(pos_1, add(sub(tail_2, pos), _3))\n let _4 := mload(srcPtr_1)\n let pos_2 := tail_2\n let length_2 := mload(_4)\n mstore(tail_2, length_2)\n pos_2 := add(tail_2, _1)\n let tail_3 := add(add(tail_2, shl(_2, length_2)), _1)\n let srcPtr_2 := add(_4, _1)\n let i_2 := 0\n for { } lt(i_2, length_2) { i_2 := add(i_2, 1) }\n {\n mstore(pos_2, add(sub(tail_3, tail_2), _3))\n tail_3 := abi_encode_string(mload(srcPtr_2), tail_3)\n srcPtr_2 := add(srcPtr_2, _1)\n pos_2 := add(pos_2, _1)\n }\n tail_2 := tail_3\n srcPtr_1 := add(srcPtr_1, _1)\n pos_1 := add(pos_1, _1)\n }\n tail := tail_2\n }\n function abi_encode_tuple_packed_t_string_memory_ptr_t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n let end_1 := add(pos, length)\n mstore(end_1, \": \")\n let length_1 := mload(value1)\n copy_memory_to_memory_with_cleanup(add(value1, 0x20), add(end_1, 2), length_1)\n end := add(add(end_1, length_1), 2)\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n tail := abi_encode_string(value0, add(headStart, 32))\n }\n}", + "id": 84, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nativeSrc": "0:18195:84", + "nodeType": "YulBlock", + "src": "0:18195:84", + "statements": [ + { + "nativeSrc": "6:3:84", + "nodeType": "YulBlock", + "src": "6:3:84", + "statements": [] + }, + { + "body": { + "nativeSrc": "80:184:84", + "nodeType": "YulBlock", + "src": "80:184:84", + "statements": [ + { + "nativeSrc": "90:10:84", + "nodeType": "YulVariableDeclaration", + "src": "90:10:84", + "value": { + "kind": "number", + "nativeSrc": "99:1:84", + "nodeType": "YulLiteral", + "src": "99:1:84", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "94:1:84", + "nodeType": "YulTypedName", + "src": "94:1:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "159:63:84", + "nodeType": "YulBlock", + "src": "159:63:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "184:3:84", + "nodeType": "YulIdentifier", + "src": "184:3:84" + }, + { + "name": "i", + "nativeSrc": "189:1:84", + "nodeType": "YulIdentifier", + "src": "189:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "180:3:84", + "nodeType": "YulIdentifier", + "src": "180:3:84" + }, + "nativeSrc": "180:11:84", + "nodeType": "YulFunctionCall", + "src": "180:11:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "203:3:84", + "nodeType": "YulIdentifier", + "src": "203:3:84" + }, + { + "name": "i", + "nativeSrc": "208:1:84", + "nodeType": "YulIdentifier", + "src": "208:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "199:3:84", + "nodeType": "YulIdentifier", + "src": "199:3:84" + }, + "nativeSrc": "199:11:84", + "nodeType": "YulFunctionCall", + "src": "199:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "193:5:84", + "nodeType": "YulIdentifier", + "src": "193:5:84" + }, + "nativeSrc": "193:18:84", + "nodeType": "YulFunctionCall", + "src": "193:18:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "173:6:84", + "nodeType": "YulIdentifier", + "src": "173:6:84" + }, + "nativeSrc": "173:39:84", + "nodeType": "YulFunctionCall", + "src": "173:39:84" + }, + "nativeSrc": "173:39:84", + "nodeType": "YulExpressionStatement", + "src": "173:39:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "120:1:84", + "nodeType": "YulIdentifier", + "src": "120:1:84" + }, + { + "name": "length", + "nativeSrc": "123:6:84", + "nodeType": "YulIdentifier", + "src": "123:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "117:2:84", + "nodeType": "YulIdentifier", + "src": "117:2:84" + }, + "nativeSrc": "117:13:84", + "nodeType": "YulFunctionCall", + "src": "117:13:84" + }, + "nativeSrc": "109:113:84", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "131:19:84", + "nodeType": "YulBlock", + "src": "131:19:84", + "statements": [ + { + "nativeSrc": "133:15:84", + "nodeType": "YulAssignment", + "src": "133:15:84", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "142:1:84", + "nodeType": "YulIdentifier", + "src": "142:1:84" + }, + { + "kind": "number", + "nativeSrc": "145:2:84", + "nodeType": "YulLiteral", + "src": "145:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "138:3:84", + "nodeType": "YulIdentifier", + "src": "138:3:84" + }, + "nativeSrc": "138:10:84", + "nodeType": "YulFunctionCall", + "src": "138:10:84" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "133:1:84", + "nodeType": "YulIdentifier", + "src": "133:1:84" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "113:3:84", + "nodeType": "YulBlock", + "src": "113:3:84", + "statements": [] + }, + "src": "109:113:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nativeSrc": "242:3:84", + "nodeType": "YulIdentifier", + "src": "242:3:84" + }, + { + "name": "length", + "nativeSrc": "247:6:84", + "nodeType": "YulIdentifier", + "src": "247:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "238:3:84", + "nodeType": "YulIdentifier", + "src": "238:3:84" + }, + "nativeSrc": "238:16:84", + "nodeType": "YulFunctionCall", + "src": "238:16:84" + }, + { + "kind": "number", + "nativeSrc": "256:1:84", + "nodeType": "YulLiteral", + "src": "256:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "231:6:84", + "nodeType": "YulIdentifier", + "src": "231:6:84" + }, + "nativeSrc": "231:27:84", + "nodeType": "YulFunctionCall", + "src": "231:27:84" + }, + "nativeSrc": "231:27:84", + "nodeType": "YulExpressionStatement", + "src": "231:27:84" + } + ] + }, + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "14:250:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nativeSrc": "58:3:84", + "nodeType": "YulTypedName", + "src": "58:3:84", + "type": "" + }, + { + "name": "dst", + "nativeSrc": "63:3:84", + "nodeType": "YulTypedName", + "src": "63:3:84", + "type": "" + }, + { + "name": "length", + "nativeSrc": "68:6:84", + "nodeType": "YulTypedName", + "src": "68:6:84", + "type": "" + } + ], + "src": "14:250:84" + }, + { + "body": { + "nativeSrc": "653:688:84", + "nodeType": "YulBlock", + "src": "653:688:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "670:3:84", + "nodeType": "YulIdentifier", + "src": "670:3:84" + }, + { + "hexValue": "6e6f7420696d706c656d656e7465643a203078", + "kind": "string", + "nativeSrc": "675:21:84", + "nodeType": "YulLiteral", + "src": "675:21:84", + "type": "", + "value": "not implemented: 0x" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "663:6:84", + "nodeType": "YulIdentifier", + "src": "663:6:84" + }, + "nativeSrc": "663:34:84", + "nodeType": "YulFunctionCall", + "src": "663:34:84" + }, + "nativeSrc": "663:34:84", + "nodeType": "YulExpressionStatement", + "src": "663:34:84" + }, + { + "nativeSrc": "706:27:84", + "nodeType": "YulVariableDeclaration", + "src": "706:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "726:6:84", + "nodeType": "YulIdentifier", + "src": "726:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "720:5:84", + "nodeType": "YulIdentifier", + "src": "720:5:84" + }, + "nativeSrc": "720:13:84", + "nodeType": "YulFunctionCall", + "src": "720:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "710:6:84", + "nodeType": "YulTypedName", + "src": "710:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "781:6:84", + "nodeType": "YulIdentifier", + "src": "781:6:84" + }, + { + "kind": "number", + "nativeSrc": "789:4:84", + "nodeType": "YulLiteral", + "src": "789:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "777:3:84", + "nodeType": "YulIdentifier", + "src": "777:3:84" + }, + "nativeSrc": "777:17:84", + "nodeType": "YulFunctionCall", + "src": "777:17:84" + }, + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "800:3:84", + "nodeType": "YulIdentifier", + "src": "800:3:84" + }, + { + "kind": "number", + "nativeSrc": "805:2:84", + "nodeType": "YulLiteral", + "src": "805:2:84", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "796:3:84", + "nodeType": "YulIdentifier", + "src": "796:3:84" + }, + "nativeSrc": "796:12:84", + "nodeType": "YulFunctionCall", + "src": "796:12:84" + }, + { + "name": "length", + "nativeSrc": "810:6:84", + "nodeType": "YulIdentifier", + "src": "810:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "742:34:84", + "nodeType": "YulIdentifier", + "src": "742:34:84" + }, + "nativeSrc": "742:75:84", + "nodeType": "YulFunctionCall", + "src": "742:75:84" + }, + "nativeSrc": "742:75:84", + "nodeType": "YulExpressionStatement", + "src": "742:75:84" + }, + { + "nativeSrc": "826:26:84", + "nodeType": "YulVariableDeclaration", + "src": "826:26:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "840:3:84", + "nodeType": "YulIdentifier", + "src": "840:3:84" + }, + { + "name": "length", + "nativeSrc": "845:6:84", + "nodeType": "YulIdentifier", + "src": "845:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "836:3:84", + "nodeType": "YulIdentifier", + "src": "836:3:84" + }, + "nativeSrc": "836:16:84", + "nodeType": "YulFunctionCall", + "src": "836:16:84" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "830:2:84", + "nodeType": "YulTypedName", + "src": "830:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "861:29:84", + "nodeType": "YulVariableDeclaration", + "src": "861:29:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "883:6:84", + "nodeType": "YulIdentifier", + "src": "883:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "877:5:84", + "nodeType": "YulIdentifier", + "src": "877:5:84" + }, + "nativeSrc": "877:13:84", + "nodeType": "YulFunctionCall", + "src": "877:13:84" + }, + "variables": [ + { + "name": "length_1", + "nativeSrc": "865:8:84", + "nodeType": "YulTypedName", + "src": "865:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "938:6:84", + "nodeType": "YulIdentifier", + "src": "938:6:84" + }, + { + "kind": "number", + "nativeSrc": "946:4:84", + "nodeType": "YulLiteral", + "src": "946:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "934:3:84", + "nodeType": "YulIdentifier", + "src": "934:3:84" + }, + "nativeSrc": "934:17:84", + "nodeType": "YulFunctionCall", + "src": "934:17:84" + }, + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "957:2:84", + "nodeType": "YulIdentifier", + "src": "957:2:84" + }, + { + "kind": "number", + "nativeSrc": "961:2:84", + "nodeType": "YulLiteral", + "src": "961:2:84", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "953:3:84", + "nodeType": "YulIdentifier", + "src": "953:3:84" + }, + "nativeSrc": "953:11:84", + "nodeType": "YulFunctionCall", + "src": "953:11:84" + }, + { + "name": "length_1", + "nativeSrc": "966:8:84", + "nodeType": "YulIdentifier", + "src": "966:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "899:34:84", + "nodeType": "YulIdentifier", + "src": "899:34:84" + }, + "nativeSrc": "899:76:84", + "nodeType": "YulFunctionCall", + "src": "899:76:84" + }, + "nativeSrc": "899:76:84", + "nodeType": "YulExpressionStatement", + "src": "899:76:84" + }, + { + "nativeSrc": "984:27:84", + "nodeType": "YulVariableDeclaration", + "src": "984:27:84", + "value": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "998:2:84", + "nodeType": "YulIdentifier", + "src": "998:2:84" + }, + { + "name": "length_1", + "nativeSrc": "1002:8:84", + "nodeType": "YulIdentifier", + "src": "1002:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "994:3:84", + "nodeType": "YulIdentifier", + "src": "994:3:84" + }, + "nativeSrc": "994:17:84", + "nodeType": "YulFunctionCall", + "src": "994:17:84" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "988:2:84", + "nodeType": "YulTypedName", + "src": "988:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "1020:29:84", + "nodeType": "YulVariableDeclaration", + "src": "1020:29:84", + "value": { + "arguments": [ + { + "name": "value2", + "nativeSrc": "1042:6:84", + "nodeType": "YulIdentifier", + "src": "1042:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1036:5:84", + "nodeType": "YulIdentifier", + "src": "1036:5:84" + }, + "nativeSrc": "1036:13:84", + "nodeType": "YulFunctionCall", + "src": "1036:13:84" + }, + "variables": [ + { + "name": "length_2", + "nativeSrc": "1024:8:84", + "nodeType": "YulTypedName", + "src": "1024:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value2", + "nativeSrc": "1097:6:84", + "nodeType": "YulIdentifier", + "src": "1097:6:84" + }, + { + "kind": "number", + "nativeSrc": "1105:4:84", + "nodeType": "YulLiteral", + "src": "1105:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1093:3:84", + "nodeType": "YulIdentifier", + "src": "1093:3:84" + }, + "nativeSrc": "1093:17:84", + "nodeType": "YulFunctionCall", + "src": "1093:17:84" + }, + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "1116:2:84", + "nodeType": "YulIdentifier", + "src": "1116:2:84" + }, + { + "kind": "number", + "nativeSrc": "1120:2:84", + "nodeType": "YulLiteral", + "src": "1120:2:84", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1112:3:84", + "nodeType": "YulIdentifier", + "src": "1112:3:84" + }, + "nativeSrc": "1112:11:84", + "nodeType": "YulFunctionCall", + "src": "1112:11:84" + }, + { + "name": "length_2", + "nativeSrc": "1125:8:84", + "nodeType": "YulIdentifier", + "src": "1125:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "1058:34:84", + "nodeType": "YulIdentifier", + "src": "1058:34:84" + }, + "nativeSrc": "1058:76:84", + "nodeType": "YulFunctionCall", + "src": "1058:76:84" + }, + "nativeSrc": "1058:76:84", + "nodeType": "YulExpressionStatement", + "src": "1058:76:84" + }, + { + "nativeSrc": "1143:27:84", + "nodeType": "YulVariableDeclaration", + "src": "1143:27:84", + "value": { + "arguments": [ + { + "name": "_2", + "nativeSrc": "1157:2:84", + "nodeType": "YulIdentifier", + "src": "1157:2:84" + }, + { + "name": "length_2", + "nativeSrc": "1161:8:84", + "nodeType": "YulIdentifier", + "src": "1161:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1153:3:84", + "nodeType": "YulIdentifier", + "src": "1153:3:84" + }, + "nativeSrc": "1153:17:84", + "nodeType": "YulFunctionCall", + "src": "1153:17:84" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "1147:2:84", + "nodeType": "YulTypedName", + "src": "1147:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "1179:29:84", + "nodeType": "YulVariableDeclaration", + "src": "1179:29:84", + "value": { + "arguments": [ + { + "name": "value3", + "nativeSrc": "1201:6:84", + "nodeType": "YulIdentifier", + "src": "1201:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1195:5:84", + "nodeType": "YulIdentifier", + "src": "1195:5:84" + }, + "nativeSrc": "1195:13:84", + "nodeType": "YulFunctionCall", + "src": "1195:13:84" + }, + "variables": [ + { + "name": "length_3", + "nativeSrc": "1183:8:84", + "nodeType": "YulTypedName", + "src": "1183:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value3", + "nativeSrc": "1256:6:84", + "nodeType": "YulIdentifier", + "src": "1256:6:84" + }, + { + "kind": "number", + "nativeSrc": "1264:4:84", + "nodeType": "YulLiteral", + "src": "1264:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1252:3:84", + "nodeType": "YulIdentifier", + "src": "1252:3:84" + }, + "nativeSrc": "1252:17:84", + "nodeType": "YulFunctionCall", + "src": "1252:17:84" + }, + { + "arguments": [ + { + "name": "_3", + "nativeSrc": "1275:2:84", + "nodeType": "YulIdentifier", + "src": "1275:2:84" + }, + { + "kind": "number", + "nativeSrc": "1279:2:84", + "nodeType": "YulLiteral", + "src": "1279:2:84", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1271:3:84", + "nodeType": "YulIdentifier", + "src": "1271:3:84" + }, + "nativeSrc": "1271:11:84", + "nodeType": "YulFunctionCall", + "src": "1271:11:84" + }, + { + "name": "length_3", + "nativeSrc": "1284:8:84", + "nodeType": "YulIdentifier", + "src": "1284:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "1217:34:84", + "nodeType": "YulIdentifier", + "src": "1217:34:84" + }, + "nativeSrc": "1217:76:84", + "nodeType": "YulFunctionCall", + "src": "1217:76:84" + }, + "nativeSrc": "1217:76:84", + "nodeType": "YulExpressionStatement", + "src": "1217:76:84" + }, + { + "nativeSrc": "1302:33:84", + "nodeType": "YulAssignment", + "src": "1302:33:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_3", + "nativeSrc": "1317:2:84", + "nodeType": "YulIdentifier", + "src": "1317:2:84" + }, + { + "name": "length_3", + "nativeSrc": "1321:8:84", + "nodeType": "YulIdentifier", + "src": "1321:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1313:3:84", + "nodeType": "YulIdentifier", + "src": "1313:3:84" + }, + "nativeSrc": "1313:17:84", + "nodeType": "YulFunctionCall", + "src": "1313:17:84" + }, + { + "kind": "number", + "nativeSrc": "1332:2:84", + "nodeType": "YulLiteral", + "src": "1332:2:84", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1309:3:84", + "nodeType": "YulIdentifier", + "src": "1309:3:84" + }, + "nativeSrc": "1309:26:84", + "nodeType": "YulFunctionCall", + "src": "1309:26:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "1302:3:84", + "nodeType": "YulIdentifier", + "src": "1302:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_6aa2932fe75962e4eb862ba4982429ce713637712a759cb9d40b6d5260a002eb_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "269:1072:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "605:3:84", + "nodeType": "YulTypedName", + "src": "605:3:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "610:6:84", + "nodeType": "YulTypedName", + "src": "610:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "618:6:84", + "nodeType": "YulTypedName", + "src": "618:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "626:6:84", + "nodeType": "YulTypedName", + "src": "626:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "634:6:84", + "nodeType": "YulTypedName", + "src": "634:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "645:3:84", + "nodeType": "YulTypedName", + "src": "645:3:84", + "type": "" + } + ], + "src": "269:1072:84" + }, + { + "body": { + "nativeSrc": "1416:110:84", + "nodeType": "YulBlock", + "src": "1416:110:84", + "statements": [ + { + "body": { + "nativeSrc": "1462:16:84", + "nodeType": "YulBlock", + "src": "1462:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1471:1:84", + "nodeType": "YulLiteral", + "src": "1471:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1474:1:84", + "nodeType": "YulLiteral", + "src": "1474:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1464:6:84", + "nodeType": "YulIdentifier", + "src": "1464:6:84" + }, + "nativeSrc": "1464:12:84", + "nodeType": "YulFunctionCall", + "src": "1464:12:84" + }, + "nativeSrc": "1464:12:84", + "nodeType": "YulExpressionStatement", + "src": "1464:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "1437:7:84", + "nodeType": "YulIdentifier", + "src": "1437:7:84" + }, + { + "name": "headStart", + "nativeSrc": "1446:9:84", + "nodeType": "YulIdentifier", + "src": "1446:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1433:3:84", + "nodeType": "YulIdentifier", + "src": "1433:3:84" + }, + "nativeSrc": "1433:23:84", + "nodeType": "YulFunctionCall", + "src": "1433:23:84" + }, + { + "kind": "number", + "nativeSrc": "1458:2:84", + "nodeType": "YulLiteral", + "src": "1458:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "1429:3:84", + "nodeType": "YulIdentifier", + "src": "1429:3:84" + }, + "nativeSrc": "1429:32:84", + "nodeType": "YulFunctionCall", + "src": "1429:32:84" + }, + "nativeSrc": "1426:52:84", + "nodeType": "YulIf", + "src": "1426:52:84" + }, + { + "nativeSrc": "1487:33:84", + "nodeType": "YulAssignment", + "src": "1487:33:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1510:9:84", + "nodeType": "YulIdentifier", + "src": "1510:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "1497:12:84", + "nodeType": "YulIdentifier", + "src": "1497:12:84" + }, + "nativeSrc": "1497:23:84", + "nodeType": "YulFunctionCall", + "src": "1497:23:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "1487:6:84", + "nodeType": "YulIdentifier", + "src": "1487:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nativeSrc": "1346:180:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1382:9:84", + "nodeType": "YulTypedName", + "src": "1382:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "1393:7:84", + "nodeType": "YulTypedName", + "src": "1393:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "1405:6:84", + "nodeType": "YulTypedName", + "src": "1405:6:84", + "type": "" + } + ], + "src": "1346:180:84" + }, + { + "body": { + "nativeSrc": "1714:231:84", + "nodeType": "YulBlock", + "src": "1714:231:84", + "statements": [ + { + "nativeSrc": "1724:27:84", + "nodeType": "YulAssignment", + "src": "1724:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1736:9:84", + "nodeType": "YulIdentifier", + "src": "1736:9:84" + }, + { + "kind": "number", + "nativeSrc": "1747:3:84", + "nodeType": "YulLiteral", + "src": "1747:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1732:3:84", + "nodeType": "YulIdentifier", + "src": "1732:3:84" + }, + "nativeSrc": "1732:19:84", + "nodeType": "YulFunctionCall", + "src": "1732:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "1724:4:84", + "nodeType": "YulIdentifier", + "src": "1724:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1767:9:84", + "nodeType": "YulIdentifier", + "src": "1767:9:84" + }, + { + "name": "value0", + "nativeSrc": "1778:6:84", + "nodeType": "YulIdentifier", + "src": "1778:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1760:6:84", + "nodeType": "YulIdentifier", + "src": "1760:6:84" + }, + "nativeSrc": "1760:25:84", + "nodeType": "YulFunctionCall", + "src": "1760:25:84" + }, + "nativeSrc": "1760:25:84", + "nodeType": "YulExpressionStatement", + "src": "1760:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1805:9:84", + "nodeType": "YulIdentifier", + "src": "1805:9:84" + }, + { + "kind": "number", + "nativeSrc": "1816:2:84", + "nodeType": "YulLiteral", + "src": "1816:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1801:3:84", + "nodeType": "YulIdentifier", + "src": "1801:3:84" + }, + "nativeSrc": "1801:18:84", + "nodeType": "YulFunctionCall", + "src": "1801:18:84" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "1825:6:84", + "nodeType": "YulIdentifier", + "src": "1825:6:84" + }, + { + "kind": "number", + "nativeSrc": "1833:18:84", + "nodeType": "YulLiteral", + "src": "1833:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1821:3:84", + "nodeType": "YulIdentifier", + "src": "1821:3:84" + }, + "nativeSrc": "1821:31:84", + "nodeType": "YulFunctionCall", + "src": "1821:31:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1794:6:84", + "nodeType": "YulIdentifier", + "src": "1794:6:84" + }, + "nativeSrc": "1794:59:84", + "nodeType": "YulFunctionCall", + "src": "1794:59:84" + }, + "nativeSrc": "1794:59:84", + "nodeType": "YulExpressionStatement", + "src": "1794:59:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1873:9:84", + "nodeType": "YulIdentifier", + "src": "1873:9:84" + }, + { + "kind": "number", + "nativeSrc": "1884:2:84", + "nodeType": "YulLiteral", + "src": "1884:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1869:3:84", + "nodeType": "YulIdentifier", + "src": "1869:3:84" + }, + "nativeSrc": "1869:18:84", + "nodeType": "YulFunctionCall", + "src": "1869:18:84" + }, + { + "name": "value2", + "nativeSrc": "1889:6:84", + "nodeType": "YulIdentifier", + "src": "1889:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1862:6:84", + "nodeType": "YulIdentifier", + "src": "1862:6:84" + }, + "nativeSrc": "1862:34:84", + "nodeType": "YulFunctionCall", + "src": "1862:34:84" + }, + "nativeSrc": "1862:34:84", + "nodeType": "YulExpressionStatement", + "src": "1862:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1916:9:84", + "nodeType": "YulIdentifier", + "src": "1916:9:84" + }, + { + "kind": "number", + "nativeSrc": "1927:2:84", + "nodeType": "YulLiteral", + "src": "1927:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1912:3:84", + "nodeType": "YulIdentifier", + "src": "1912:3:84" + }, + "nativeSrc": "1912:18:84", + "nodeType": "YulFunctionCall", + "src": "1912:18:84" + }, + { + "name": "value3", + "nativeSrc": "1932:6:84", + "nodeType": "YulIdentifier", + "src": "1932:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1905:6:84", + "nodeType": "YulIdentifier", + "src": "1905:6:84" + }, + "nativeSrc": "1905:34:84", + "nodeType": "YulFunctionCall", + "src": "1905:34:84" + }, + "nativeSrc": "1905:34:84", + "nodeType": "YulExpressionStatement", + "src": "1905:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_uint64_t_bytes32_t_uint256__to_t_bytes32_t_uint64_t_bytes32_t_uint256__fromStack_reversed", + "nativeSrc": "1531:414:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1659:9:84", + "nodeType": "YulTypedName", + "src": "1659:9:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "1670:6:84", + "nodeType": "YulTypedName", + "src": "1670:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1678:6:84", + "nodeType": "YulTypedName", + "src": "1678:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1686:6:84", + "nodeType": "YulTypedName", + "src": "1686:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "1694:6:84", + "nodeType": "YulTypedName", + "src": "1694:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1705:4:84", + "nodeType": "YulTypedName", + "src": "1705:4:84", + "type": "" + } + ], + "src": "1531:414:84" + }, + { + "body": { + "nativeSrc": "1994:77:84", + "nodeType": "YulBlock", + "src": "1994:77:84", + "statements": [ + { + "body": { + "nativeSrc": "2049:16:84", + "nodeType": "YulBlock", + "src": "2049:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2058:1:84", + "nodeType": "YulLiteral", + "src": "2058:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2061:1:84", + "nodeType": "YulLiteral", + "src": "2061:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2051:6:84", + "nodeType": "YulIdentifier", + "src": "2051:6:84" + }, + "nativeSrc": "2051:12:84", + "nodeType": "YulFunctionCall", + "src": "2051:12:84" + }, + "nativeSrc": "2051:12:84", + "nodeType": "YulExpressionStatement", + "src": "2051:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2017:5:84", + "nodeType": "YulIdentifier", + "src": "2017:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2028:5:84", + "nodeType": "YulIdentifier", + "src": "2028:5:84" + }, + { + "kind": "number", + "nativeSrc": "2035:10:84", + "nodeType": "YulLiteral", + "src": "2035:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2024:3:84", + "nodeType": "YulIdentifier", + "src": "2024:3:84" + }, + "nativeSrc": "2024:22:84", + "nodeType": "YulFunctionCall", + "src": "2024:22:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2014:2:84", + "nodeType": "YulIdentifier", + "src": "2014:2:84" + }, + "nativeSrc": "2014:33:84", + "nodeType": "YulFunctionCall", + "src": "2014:33:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2007:6:84", + "nodeType": "YulIdentifier", + "src": "2007:6:84" + }, + "nativeSrc": "2007:41:84", + "nodeType": "YulFunctionCall", + "src": "2007:41:84" + }, + "nativeSrc": "2004:61:84", + "nodeType": "YulIf", + "src": "2004:61:84" + } + ] + }, + "name": "validator_revert_uint32", + "nativeSrc": "1950:121:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "1983:5:84", + "nodeType": "YulTypedName", + "src": "1983:5:84", + "type": "" + } + ], + "src": "1950:121:84" + }, + { + "body": { + "nativeSrc": "2179:278:84", + "nodeType": "YulBlock", + "src": "2179:278:84", + "statements": [ + { + "body": { + "nativeSrc": "2225:16:84", + "nodeType": "YulBlock", + "src": "2225:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2234:1:84", + "nodeType": "YulLiteral", + "src": "2234:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2237:1:84", + "nodeType": "YulLiteral", + "src": "2237:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2227:6:84", + "nodeType": "YulIdentifier", + "src": "2227:6:84" + }, + "nativeSrc": "2227:12:84", + "nodeType": "YulFunctionCall", + "src": "2227:12:84" + }, + "nativeSrc": "2227:12:84", + "nodeType": "YulExpressionStatement", + "src": "2227:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2200:7:84", + "nodeType": "YulIdentifier", + "src": "2200:7:84" + }, + { + "name": "headStart", + "nativeSrc": "2209:9:84", + "nodeType": "YulIdentifier", + "src": "2209:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2196:3:84", + "nodeType": "YulIdentifier", + "src": "2196:3:84" + }, + "nativeSrc": "2196:23:84", + "nodeType": "YulFunctionCall", + "src": "2196:23:84" + }, + { + "kind": "number", + "nativeSrc": "2221:2:84", + "nodeType": "YulLiteral", + "src": "2221:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2192:3:84", + "nodeType": "YulIdentifier", + "src": "2192:3:84" + }, + "nativeSrc": "2192:32:84", + "nodeType": "YulFunctionCall", + "src": "2192:32:84" + }, + "nativeSrc": "2189:52:84", + "nodeType": "YulIf", + "src": "2189:52:84" + }, + { + "nativeSrc": "2250:36:84", + "nodeType": "YulVariableDeclaration", + "src": "2250:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2276:9:84", + "nodeType": "YulIdentifier", + "src": "2276:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2263:12:84", + "nodeType": "YulIdentifier", + "src": "2263:12:84" + }, + "nativeSrc": "2263:23:84", + "nodeType": "YulFunctionCall", + "src": "2263:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2254:5:84", + "nodeType": "YulTypedName", + "src": "2254:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "2319:5:84", + "nodeType": "YulIdentifier", + "src": "2319:5:84" + } + ], + "functionName": { + "name": "validator_revert_uint32", + "nativeSrc": "2295:23:84", + "nodeType": "YulIdentifier", + "src": "2295:23:84" + }, + "nativeSrc": "2295:30:84", + "nodeType": "YulFunctionCall", + "src": "2295:30:84" + }, + "nativeSrc": "2295:30:84", + "nodeType": "YulExpressionStatement", + "src": "2295:30:84" + }, + { + "nativeSrc": "2334:15:84", + "nodeType": "YulAssignment", + "src": "2334:15:84", + "value": { + "name": "value", + "nativeSrc": "2344:5:84", + "nodeType": "YulIdentifier", + "src": "2344:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "2334:6:84", + "nodeType": "YulIdentifier", + "src": "2334:6:84" + } + ] + }, + { + "nativeSrc": "2358:42:84", + "nodeType": "YulAssignment", + "src": "2358:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2385:9:84", + "nodeType": "YulIdentifier", + "src": "2385:9:84" + }, + { + "kind": "number", + "nativeSrc": "2396:2:84", + "nodeType": "YulLiteral", + "src": "2396:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2381:3:84", + "nodeType": "YulIdentifier", + "src": "2381:3:84" + }, + "nativeSrc": "2381:18:84", + "nodeType": "YulFunctionCall", + "src": "2381:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2368:12:84", + "nodeType": "YulIdentifier", + "src": "2368:12:84" + }, + "nativeSrc": "2368:32:84", + "nodeType": "YulFunctionCall", + "src": "2368:32:84" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2358:6:84", + "nodeType": "YulIdentifier", + "src": "2358:6:84" + } + ] + }, + { + "nativeSrc": "2409:42:84", + "nodeType": "YulAssignment", + "src": "2409:42:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2436:9:84", + "nodeType": "YulIdentifier", + "src": "2436:9:84" + }, + { + "kind": "number", + "nativeSrc": "2447:2:84", + "nodeType": "YulLiteral", + "src": "2447:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2432:3:84", + "nodeType": "YulIdentifier", + "src": "2432:3:84" + }, + "nativeSrc": "2432:18:84", + "nodeType": "YulFunctionCall", + "src": "2432:18:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2419:12:84", + "nodeType": "YulIdentifier", + "src": "2419:12:84" + }, + "nativeSrc": "2419:32:84", + "nodeType": "YulFunctionCall", + "src": "2419:32:84" + }, + "variableNames": [ + { + "name": "value2", + "nativeSrc": "2409:6:84", + "nodeType": "YulIdentifier", + "src": "2409:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint32t_uint256t_uint256", + "nativeSrc": "2076:381:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2129:9:84", + "nodeType": "YulTypedName", + "src": "2129:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2140:7:84", + "nodeType": "YulTypedName", + "src": "2140:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2152:6:84", + "nodeType": "YulTypedName", + "src": "2152:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2160:6:84", + "nodeType": "YulTypedName", + "src": "2160:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "2168:6:84", + "nodeType": "YulTypedName", + "src": "2168:6:84", + "type": "" + } + ], + "src": "2076:381:84" + }, + { + "body": { + "nativeSrc": "2561:93:84", + "nodeType": "YulBlock", + "src": "2561:93:84", + "statements": [ + { + "nativeSrc": "2571:26:84", + "nodeType": "YulAssignment", + "src": "2571:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2583:9:84", + "nodeType": "YulIdentifier", + "src": "2583:9:84" + }, + { + "kind": "number", + "nativeSrc": "2594:2:84", + "nodeType": "YulLiteral", + "src": "2594:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2579:3:84", + "nodeType": "YulIdentifier", + "src": "2579:3:84" + }, + "nativeSrc": "2579:18:84", + "nodeType": "YulFunctionCall", + "src": "2579:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2571:4:84", + "nodeType": "YulIdentifier", + "src": "2571:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2613:9:84", + "nodeType": "YulIdentifier", + "src": "2613:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2628:6:84", + "nodeType": "YulIdentifier", + "src": "2628:6:84" + }, + { + "kind": "number", + "nativeSrc": "2636:10:84", + "nodeType": "YulLiteral", + "src": "2636:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2624:3:84", + "nodeType": "YulIdentifier", + "src": "2624:3:84" + }, + "nativeSrc": "2624:23:84", + "nodeType": "YulFunctionCall", + "src": "2624:23:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2606:6:84", + "nodeType": "YulIdentifier", + "src": "2606:6:84" + }, + "nativeSrc": "2606:42:84", + "nodeType": "YulFunctionCall", + "src": "2606:42:84" + }, + "nativeSrc": "2606:42:84", + "nodeType": "YulExpressionStatement", + "src": "2606:42:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint32__to_t_uint32__fromStack_reversed", + "nativeSrc": "2462:192:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2530:9:84", + "nodeType": "YulTypedName", + "src": "2530:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2541:6:84", + "nodeType": "YulTypedName", + "src": "2541:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2552:4:84", + "nodeType": "YulTypedName", + "src": "2552:4:84", + "type": "" + } + ], + "src": "2462:192:84" + }, + { + "body": { + "nativeSrc": "2780:102:84", + "nodeType": "YulBlock", + "src": "2780:102:84", + "statements": [ + { + "nativeSrc": "2790:26:84", + "nodeType": "YulAssignment", + "src": "2790:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2802:9:84", + "nodeType": "YulIdentifier", + "src": "2802:9:84" + }, + { + "kind": "number", + "nativeSrc": "2813:2:84", + "nodeType": "YulLiteral", + "src": "2813:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2798:3:84", + "nodeType": "YulIdentifier", + "src": "2798:3:84" + }, + "nativeSrc": "2798:18:84", + "nodeType": "YulFunctionCall", + "src": "2798:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2790:4:84", + "nodeType": "YulIdentifier", + "src": "2790:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2832:9:84", + "nodeType": "YulIdentifier", + "src": "2832:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2847:6:84", + "nodeType": "YulIdentifier", + "src": "2847:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2863:3:84", + "nodeType": "YulLiteral", + "src": "2863:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2868:1:84", + "nodeType": "YulLiteral", + "src": "2868:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2859:3:84", + "nodeType": "YulIdentifier", + "src": "2859:3:84" + }, + "nativeSrc": "2859:11:84", + "nodeType": "YulFunctionCall", + "src": "2859:11:84" + }, + { + "kind": "number", + "nativeSrc": "2872:1:84", + "nodeType": "YulLiteral", + "src": "2872:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2855:3:84", + "nodeType": "YulIdentifier", + "src": "2855:3:84" + }, + "nativeSrc": "2855:19:84", + "nodeType": "YulFunctionCall", + "src": "2855:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2843:3:84", + "nodeType": "YulIdentifier", + "src": "2843:3:84" + }, + "nativeSrc": "2843:32:84", + "nodeType": "YulFunctionCall", + "src": "2843:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2825:6:84", + "nodeType": "YulIdentifier", + "src": "2825:6:84" + }, + "nativeSrc": "2825:51:84", + "nodeType": "YulFunctionCall", + "src": "2825:51:84" + }, + "nativeSrc": "2825:51:84", + "nodeType": "YulExpressionStatement", + "src": "2825:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_contract$_WitnetOracle_$749__to_t_address__fromStack_reversed", + "nativeSrc": "2659:223:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2749:9:84", + "nodeType": "YulTypedName", + "src": "2749:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2760:6:84", + "nodeType": "YulTypedName", + "src": "2760:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2771:4:84", + "nodeType": "YulTypedName", + "src": "2771:4:84", + "type": "" + } + ], + "src": "2659:223:84" + }, + { + "body": { + "nativeSrc": "2988:76:84", + "nodeType": "YulBlock", + "src": "2988:76:84", + "statements": [ + { + "nativeSrc": "2998:26:84", + "nodeType": "YulAssignment", + "src": "2998:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3010:9:84", + "nodeType": "YulIdentifier", + "src": "3010:9:84" + }, + { + "kind": "number", + "nativeSrc": "3021:2:84", + "nodeType": "YulLiteral", + "src": "3021:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3006:3:84", + "nodeType": "YulIdentifier", + "src": "3006:3:84" + }, + "nativeSrc": "3006:18:84", + "nodeType": "YulFunctionCall", + "src": "3006:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2998:4:84", + "nodeType": "YulIdentifier", + "src": "2998:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3040:9:84", + "nodeType": "YulIdentifier", + "src": "3040:9:84" + }, + { + "name": "value0", + "nativeSrc": "3051:6:84", + "nodeType": "YulIdentifier", + "src": "3051:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3033:6:84", + "nodeType": "YulIdentifier", + "src": "3033:6:84" + }, + "nativeSrc": "3033:25:84", + "nodeType": "YulFunctionCall", + "src": "3033:25:84" + }, + "nativeSrc": "3033:25:84", + "nodeType": "YulExpressionStatement", + "src": "3033:25:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", + "nativeSrc": "2887:177:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2957:9:84", + "nodeType": "YulTypedName", + "src": "2957:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2968:6:84", + "nodeType": "YulTypedName", + "src": "2968:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2979:4:84", + "nodeType": "YulTypedName", + "src": "2979:4:84", + "type": "" + } + ], + "src": "2887:177:84" + }, + { + "body": { + "nativeSrc": "3170:76:84", + "nodeType": "YulBlock", + "src": "3170:76:84", + "statements": [ + { + "nativeSrc": "3180:26:84", + "nodeType": "YulAssignment", + "src": "3180:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3192:9:84", + "nodeType": "YulIdentifier", + "src": "3192:9:84" + }, + { + "kind": "number", + "nativeSrc": "3203:2:84", + "nodeType": "YulLiteral", + "src": "3203:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3188:3:84", + "nodeType": "YulIdentifier", + "src": "3188:3:84" + }, + "nativeSrc": "3188:18:84", + "nodeType": "YulFunctionCall", + "src": "3188:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3180:4:84", + "nodeType": "YulIdentifier", + "src": "3180:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3222:9:84", + "nodeType": "YulIdentifier", + "src": "3222:9:84" + }, + { + "name": "value0", + "nativeSrc": "3233:6:84", + "nodeType": "YulIdentifier", + "src": "3233:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3215:6:84", + "nodeType": "YulIdentifier", + "src": "3215:6:84" + }, + "nativeSrc": "3215:25:84", + "nodeType": "YulFunctionCall", + "src": "3215:25:84" + }, + "nativeSrc": "3215:25:84", + "nodeType": "YulExpressionStatement", + "src": "3215:25:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nativeSrc": "3069:177:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3139:9:84", + "nodeType": "YulTypedName", + "src": "3139:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3150:6:84", + "nodeType": "YulTypedName", + "src": "3150:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3161:4:84", + "nodeType": "YulTypedName", + "src": "3161:4:84", + "type": "" + } + ], + "src": "3069:177:84" + }, + { + "body": { + "nativeSrc": "3283:95:84", + "nodeType": "YulBlock", + "src": "3283:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3300:1:84", + "nodeType": "YulLiteral", + "src": "3300:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3307:3:84", + "nodeType": "YulLiteral", + "src": "3307:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "3312:10:84", + "nodeType": "YulLiteral", + "src": "3312:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3303:3:84", + "nodeType": "YulIdentifier", + "src": "3303:3:84" + }, + "nativeSrc": "3303:20:84", + "nodeType": "YulFunctionCall", + "src": "3303:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3293:6:84", + "nodeType": "YulIdentifier", + "src": "3293:6:84" + }, + "nativeSrc": "3293:31:84", + "nodeType": "YulFunctionCall", + "src": "3293:31:84" + }, + "nativeSrc": "3293:31:84", + "nodeType": "YulExpressionStatement", + "src": "3293:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3340:1:84", + "nodeType": "YulLiteral", + "src": "3340:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "3343:4:84", + "nodeType": "YulLiteral", + "src": "3343:4:84", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3333:6:84", + "nodeType": "YulIdentifier", + "src": "3333:6:84" + }, + "nativeSrc": "3333:15:84", + "nodeType": "YulFunctionCall", + "src": "3333:15:84" + }, + "nativeSrc": "3333:15:84", + "nodeType": "YulExpressionStatement", + "src": "3333:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3364:1:84", + "nodeType": "YulLiteral", + "src": "3364:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3367:4:84", + "nodeType": "YulLiteral", + "src": "3367:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3357:6:84", + "nodeType": "YulIdentifier", + "src": "3357:6:84" + }, + "nativeSrc": "3357:15:84", + "nodeType": "YulFunctionCall", + "src": "3357:15:84" + }, + "nativeSrc": "3357:15:84", + "nodeType": "YulExpressionStatement", + "src": "3357:15:84" + } + ] + }, + "name": "panic_error_0x21", + "nativeSrc": "3251:127:84", + "nodeType": "YulFunctionDefinition", + "src": "3251:127:84" + }, + { + "body": { + "nativeSrc": "3502:229:84", + "nodeType": "YulBlock", + "src": "3502:229:84", + "statements": [ + { + "nativeSrc": "3512:26:84", + "nodeType": "YulAssignment", + "src": "3512:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3524:9:84", + "nodeType": "YulIdentifier", + "src": "3524:9:84" + }, + { + "kind": "number", + "nativeSrc": "3535:2:84", + "nodeType": "YulLiteral", + "src": "3535:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3520:3:84", + "nodeType": "YulIdentifier", + "src": "3520:3:84" + }, + "nativeSrc": "3520:18:84", + "nodeType": "YulFunctionCall", + "src": "3520:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3512:4:84", + "nodeType": "YulIdentifier", + "src": "3512:4:84" + } + ] + }, + { + "body": { + "nativeSrc": "3580:111:84", + "nodeType": "YulBlock", + "src": "3580:111:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3601:1:84", + "nodeType": "YulLiteral", + "src": "3601:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3608:3:84", + "nodeType": "YulLiteral", + "src": "3608:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "3613:10:84", + "nodeType": "YulLiteral", + "src": "3613:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3604:3:84", + "nodeType": "YulIdentifier", + "src": "3604:3:84" + }, + "nativeSrc": "3604:20:84", + "nodeType": "YulFunctionCall", + "src": "3604:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3594:6:84", + "nodeType": "YulIdentifier", + "src": "3594:6:84" + }, + "nativeSrc": "3594:31:84", + "nodeType": "YulFunctionCall", + "src": "3594:31:84" + }, + "nativeSrc": "3594:31:84", + "nodeType": "YulExpressionStatement", + "src": "3594:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3645:1:84", + "nodeType": "YulLiteral", + "src": "3645:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "3648:4:84", + "nodeType": "YulLiteral", + "src": "3648:4:84", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3638:6:84", + "nodeType": "YulIdentifier", + "src": "3638:6:84" + }, + "nativeSrc": "3638:15:84", + "nodeType": "YulFunctionCall", + "src": "3638:15:84" + }, + "nativeSrc": "3638:15:84", + "nodeType": "YulExpressionStatement", + "src": "3638:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3673:1:84", + "nodeType": "YulLiteral", + "src": "3673:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3676:4:84", + "nodeType": "YulLiteral", + "src": "3676:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3666:6:84", + "nodeType": "YulIdentifier", + "src": "3666:6:84" + }, + "nativeSrc": "3666:15:84", + "nodeType": "YulFunctionCall", + "src": "3666:15:84" + }, + "nativeSrc": "3666:15:84", + "nodeType": "YulExpressionStatement", + "src": "3666:15:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3560:6:84", + "nodeType": "YulIdentifier", + "src": "3560:6:84" + }, + { + "kind": "number", + "nativeSrc": "3568:1:84", + "nodeType": "YulLiteral", + "src": "3568:1:84", + "type": "", + "value": "6" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "3557:2:84", + "nodeType": "YulIdentifier", + "src": "3557:2:84" + }, + "nativeSrc": "3557:13:84", + "nodeType": "YulFunctionCall", + "src": "3557:13:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "3550:6:84", + "nodeType": "YulIdentifier", + "src": "3550:6:84" + }, + "nativeSrc": "3550:21:84", + "nodeType": "YulFunctionCall", + "src": "3550:21:84" + }, + "nativeSrc": "3547:144:84", + "nodeType": "YulIf", + "src": "3547:144:84" + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3707:9:84", + "nodeType": "YulIdentifier", + "src": "3707:9:84" + }, + { + "name": "value0", + "nativeSrc": "3718:6:84", + "nodeType": "YulIdentifier", + "src": "3718:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3700:6:84", + "nodeType": "YulIdentifier", + "src": "3700:6:84" + }, + "nativeSrc": "3700:25:84", + "nodeType": "YulFunctionCall", + "src": "3700:25:84" + }, + "nativeSrc": "3700:25:84", + "nodeType": "YulExpressionStatement", + "src": "3700:25:84" + } + ] + }, + "name": "abi_encode_tuple_t_enum$_ResponseStatus_$23496__to_t_uint8__fromStack_reversed", + "nativeSrc": "3383:348:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3471:9:84", + "nodeType": "YulTypedName", + "src": "3471:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3482:6:84", + "nodeType": "YulTypedName", + "src": "3482:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3493:4:84", + "nodeType": "YulTypedName", + "src": "3493:4:84", + "type": "" + } + ], + "src": "3383:348:84" + }, + { + "body": { + "nativeSrc": "3837:102:84", + "nodeType": "YulBlock", + "src": "3837:102:84", + "statements": [ + { + "nativeSrc": "3847:26:84", + "nodeType": "YulAssignment", + "src": "3847:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3859:9:84", + "nodeType": "YulIdentifier", + "src": "3859:9:84" + }, + { + "kind": "number", + "nativeSrc": "3870:2:84", + "nodeType": "YulLiteral", + "src": "3870:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3855:3:84", + "nodeType": "YulIdentifier", + "src": "3855:3:84" + }, + "nativeSrc": "3855:18:84", + "nodeType": "YulFunctionCall", + "src": "3855:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3847:4:84", + "nodeType": "YulIdentifier", + "src": "3847:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3889:9:84", + "nodeType": "YulIdentifier", + "src": "3889:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "3904:6:84", + "nodeType": "YulIdentifier", + "src": "3904:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3920:3:84", + "nodeType": "YulLiteral", + "src": "3920:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3925:1:84", + "nodeType": "YulLiteral", + "src": "3925:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3916:3:84", + "nodeType": "YulIdentifier", + "src": "3916:3:84" + }, + "nativeSrc": "3916:11:84", + "nodeType": "YulFunctionCall", + "src": "3916:11:84" + }, + { + "kind": "number", + "nativeSrc": "3929:1:84", + "nodeType": "YulLiteral", + "src": "3929:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3912:3:84", + "nodeType": "YulIdentifier", + "src": "3912:3:84" + }, + "nativeSrc": "3912:19:84", + "nodeType": "YulFunctionCall", + "src": "3912:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3900:3:84", + "nodeType": "YulIdentifier", + "src": "3900:3:84" + }, + "nativeSrc": "3900:32:84", + "nodeType": "YulFunctionCall", + "src": "3900:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3882:6:84", + "nodeType": "YulIdentifier", + "src": "3882:6:84" + }, + "nativeSrc": "3882:51:84", + "nodeType": "YulFunctionCall", + "src": "3882:51:84" + }, + "nativeSrc": "3882:51:84", + "nodeType": "YulExpressionStatement", + "src": "3882:51:84" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "3736:203:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3806:9:84", + "nodeType": "YulTypedName", + "src": "3806:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3817:6:84", + "nodeType": "YulTypedName", + "src": "3817:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3828:4:84", + "nodeType": "YulTypedName", + "src": "3828:4:84", + "type": "" + } + ], + "src": "3736:203:84" + }, + { + "body": { + "nativeSrc": "4099:182:84", + "nodeType": "YulBlock", + "src": "4099:182:84", + "statements": [ + { + "nativeSrc": "4109:26:84", + "nodeType": "YulAssignment", + "src": "4109:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4121:9:84", + "nodeType": "YulIdentifier", + "src": "4121:9:84" + }, + { + "kind": "number", + "nativeSrc": "4132:2:84", + "nodeType": "YulLiteral", + "src": "4132:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4117:3:84", + "nodeType": "YulIdentifier", + "src": "4117:3:84" + }, + "nativeSrc": "4117:18:84", + "nodeType": "YulFunctionCall", + "src": "4117:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4109:4:84", + "nodeType": "YulIdentifier", + "src": "4109:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4151:9:84", + "nodeType": "YulIdentifier", + "src": "4151:9:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4172:6:84", + "nodeType": "YulIdentifier", + "src": "4172:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4166:5:84", + "nodeType": "YulIdentifier", + "src": "4166:5:84" + }, + "nativeSrc": "4166:13:84", + "nodeType": "YulFunctionCall", + "src": "4166:13:84" + }, + { + "kind": "number", + "nativeSrc": "4181:4:84", + "nodeType": "YulLiteral", + "src": "4181:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4162:3:84", + "nodeType": "YulIdentifier", + "src": "4162:3:84" + }, + "nativeSrc": "4162:24:84", + "nodeType": "YulFunctionCall", + "src": "4162:24:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4144:6:84", + "nodeType": "YulIdentifier", + "src": "4144:6:84" + }, + "nativeSrc": "4144:43:84", + "nodeType": "YulFunctionCall", + "src": "4144:43:84" + }, + "nativeSrc": "4144:43:84", + "nodeType": "YulExpressionStatement", + "src": "4144:43:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4207:9:84", + "nodeType": "YulIdentifier", + "src": "4207:9:84" + }, + { + "kind": "number", + "nativeSrc": "4218:4:84", + "nodeType": "YulLiteral", + "src": "4218:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4203:3:84", + "nodeType": "YulIdentifier", + "src": "4203:3:84" + }, + "nativeSrc": "4203:20:84", + "nodeType": "YulFunctionCall", + "src": "4203:20:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4239:6:84", + "nodeType": "YulIdentifier", + "src": "4239:6:84" + }, + { + "kind": "number", + "nativeSrc": "4247:4:84", + "nodeType": "YulLiteral", + "src": "4247:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4235:3:84", + "nodeType": "YulIdentifier", + "src": "4235:3:84" + }, + "nativeSrc": "4235:17:84", + "nodeType": "YulFunctionCall", + "src": "4235:17:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4229:5:84", + "nodeType": "YulIdentifier", + "src": "4229:5:84" + }, + "nativeSrc": "4229:24:84", + "nodeType": "YulFunctionCall", + "src": "4229:24:84" + }, + { + "kind": "number", + "nativeSrc": "4255:18:84", + "nodeType": "YulLiteral", + "src": "4255:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4225:3:84", + "nodeType": "YulIdentifier", + "src": "4225:3:84" + }, + "nativeSrc": "4225:49:84", + "nodeType": "YulFunctionCall", + "src": "4225:49:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4196:6:84", + "nodeType": "YulIdentifier", + "src": "4196:6:84" + }, + "nativeSrc": "4196:79:84", + "nodeType": "YulFunctionCall", + "src": "4196:79:84" + }, + "nativeSrc": "4196:79:84", + "nodeType": "YulExpressionStatement", + "src": "4196:79:84" + } + ] + }, + "name": "abi_encode_tuple_t_struct$_RadonSLA_$23503_memory_ptr__to_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed", + "nativeSrc": "3944:337:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4068:9:84", + "nodeType": "YulTypedName", + "src": "4068:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4079:6:84", + "nodeType": "YulTypedName", + "src": "4079:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4090:4:84", + "nodeType": "YulTypedName", + "src": "4090:4:84", + "type": "" + } + ], + "src": "3944:337:84" + }, + { + "body": { + "nativeSrc": "4381:92:84", + "nodeType": "YulBlock", + "src": "4381:92:84", + "statements": [ + { + "nativeSrc": "4391:26:84", + "nodeType": "YulAssignment", + "src": "4391:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4403:9:84", + "nodeType": "YulIdentifier", + "src": "4403:9:84" + }, + { + "kind": "number", + "nativeSrc": "4414:2:84", + "nodeType": "YulLiteral", + "src": "4414:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4399:3:84", + "nodeType": "YulIdentifier", + "src": "4399:3:84" + }, + "nativeSrc": "4399:18:84", + "nodeType": "YulFunctionCall", + "src": "4399:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4391:4:84", + "nodeType": "YulIdentifier", + "src": "4391:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4433:9:84", + "nodeType": "YulIdentifier", + "src": "4433:9:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4458:6:84", + "nodeType": "YulIdentifier", + "src": "4458:6:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "4451:6:84", + "nodeType": "YulIdentifier", + "src": "4451:6:84" + }, + "nativeSrc": "4451:14:84", + "nodeType": "YulFunctionCall", + "src": "4451:14:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "4444:6:84", + "nodeType": "YulIdentifier", + "src": "4444:6:84" + }, + "nativeSrc": "4444:22:84", + "nodeType": "YulFunctionCall", + "src": "4444:22:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4426:6:84", + "nodeType": "YulIdentifier", + "src": "4426:6:84" + }, + "nativeSrc": "4426:41:84", + "nodeType": "YulFunctionCall", + "src": "4426:41:84" + }, + "nativeSrc": "4426:41:84", + "nodeType": "YulExpressionStatement", + "src": "4426:41:84" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nativeSrc": "4286:187:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4350:9:84", + "nodeType": "YulTypedName", + "src": "4350:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4361:6:84", + "nodeType": "YulTypedName", + "src": "4361:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4372:4:84", + "nodeType": "YulTypedName", + "src": "4372:4:84", + "type": "" + } + ], + "src": "4286:187:84" + }, + { + "body": { + "nativeSrc": "4635:162:84", + "nodeType": "YulBlock", + "src": "4635:162:84", + "statements": [ + { + "nativeSrc": "4645:26:84", + "nodeType": "YulAssignment", + "src": "4645:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4657:9:84", + "nodeType": "YulIdentifier", + "src": "4657:9:84" + }, + { + "kind": "number", + "nativeSrc": "4668:2:84", + "nodeType": "YulLiteral", + "src": "4668:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4653:3:84", + "nodeType": "YulIdentifier", + "src": "4653:3:84" + }, + "nativeSrc": "4653:18:84", + "nodeType": "YulFunctionCall", + "src": "4653:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4645:4:84", + "nodeType": "YulIdentifier", + "src": "4645:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4687:9:84", + "nodeType": "YulIdentifier", + "src": "4687:9:84" + }, + { + "name": "value0", + "nativeSrc": "4698:6:84", + "nodeType": "YulIdentifier", + "src": "4698:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4680:6:84", + "nodeType": "YulIdentifier", + "src": "4680:6:84" + }, + "nativeSrc": "4680:25:84", + "nodeType": "YulFunctionCall", + "src": "4680:25:84" + }, + "nativeSrc": "4680:25:84", + "nodeType": "YulExpressionStatement", + "src": "4680:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4725:9:84", + "nodeType": "YulIdentifier", + "src": "4725:9:84" + }, + { + "kind": "number", + "nativeSrc": "4736:2:84", + "nodeType": "YulLiteral", + "src": "4736:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4721:3:84", + "nodeType": "YulIdentifier", + "src": "4721:3:84" + }, + "nativeSrc": "4721:18:84", + "nodeType": "YulFunctionCall", + "src": "4721:18:84" + }, + { + "name": "value1", + "nativeSrc": "4741:6:84", + "nodeType": "YulIdentifier", + "src": "4741:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4714:6:84", + "nodeType": "YulIdentifier", + "src": "4714:6:84" + }, + "nativeSrc": "4714:34:84", + "nodeType": "YulFunctionCall", + "src": "4714:34:84" + }, + "nativeSrc": "4714:34:84", + "nodeType": "YulExpressionStatement", + "src": "4714:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4768:9:84", + "nodeType": "YulIdentifier", + "src": "4768:9:84" + }, + { + "kind": "number", + "nativeSrc": "4779:2:84", + "nodeType": "YulLiteral", + "src": "4779:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4764:3:84", + "nodeType": "YulIdentifier", + "src": "4764:3:84" + }, + "nativeSrc": "4764:18:84", + "nodeType": "YulFunctionCall", + "src": "4764:18:84" + }, + { + "name": "value2", + "nativeSrc": "4784:6:84", + "nodeType": "YulIdentifier", + "src": "4784:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4757:6:84", + "nodeType": "YulIdentifier", + "src": "4757:6:84" + }, + "nativeSrc": "4757:34:84", + "nodeType": "YulFunctionCall", + "src": "4757:34:84" + }, + "nativeSrc": "4757:34:84", + "nodeType": "YulExpressionStatement", + "src": "4757:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256__fromStack_reversed", + "nativeSrc": "4478:319:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4588:9:84", + "nodeType": "YulTypedName", + "src": "4588:9:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "4599:6:84", + "nodeType": "YulTypedName", + "src": "4599:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "4607:6:84", + "nodeType": "YulTypedName", + "src": "4607:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4615:6:84", + "nodeType": "YulTypedName", + "src": "4615:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4626:4:84", + "nodeType": "YulTypedName", + "src": "4626:4:84", + "type": "" + } + ], + "src": "4478:319:84" + }, + { + "body": { + "nativeSrc": "4901:103:84", + "nodeType": "YulBlock", + "src": "4901:103:84", + "statements": [ + { + "nativeSrc": "4911:26:84", + "nodeType": "YulAssignment", + "src": "4911:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4923:9:84", + "nodeType": "YulIdentifier", + "src": "4923:9:84" + }, + { + "kind": "number", + "nativeSrc": "4934:2:84", + "nodeType": "YulLiteral", + "src": "4934:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4919:3:84", + "nodeType": "YulIdentifier", + "src": "4919:3:84" + }, + "nativeSrc": "4919:18:84", + "nodeType": "YulFunctionCall", + "src": "4919:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4911:4:84", + "nodeType": "YulIdentifier", + "src": "4911:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4953:9:84", + "nodeType": "YulIdentifier", + "src": "4953:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4968:6:84", + "nodeType": "YulIdentifier", + "src": "4968:6:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4980:3:84", + "nodeType": "YulLiteral", + "src": "4980:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "4985:10:84", + "nodeType": "YulLiteral", + "src": "4985:10:84", + "type": "", + "value": "0xffffffff" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4976:3:84", + "nodeType": "YulIdentifier", + "src": "4976:3:84" + }, + "nativeSrc": "4976:20:84", + "nodeType": "YulFunctionCall", + "src": "4976:20:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4964:3:84", + "nodeType": "YulIdentifier", + "src": "4964:3:84" + }, + "nativeSrc": "4964:33:84", + "nodeType": "YulFunctionCall", + "src": "4964:33:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4946:6:84", + "nodeType": "YulIdentifier", + "src": "4946:6:84" + }, + "nativeSrc": "4946:52:84", + "nodeType": "YulFunctionCall", + "src": "4946:52:84" + }, + "nativeSrc": "4946:52:84", + "nodeType": "YulExpressionStatement", + "src": "4946:52:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack_reversed", + "nativeSrc": "4802:202:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4870:9:84", + "nodeType": "YulTypedName", + "src": "4870:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4881:6:84", + "nodeType": "YulTypedName", + "src": "4881:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4892:4:84", + "nodeType": "YulTypedName", + "src": "4892:4:84", + "type": "" + } + ], + "src": "4802:202:84" + }, + { + "body": { + "nativeSrc": "5078:203:84", + "nodeType": "YulBlock", + "src": "5078:203:84", + "statements": [ + { + "body": { + "nativeSrc": "5124:16:84", + "nodeType": "YulBlock", + "src": "5124:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5133:1:84", + "nodeType": "YulLiteral", + "src": "5133:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5136:1:84", + "nodeType": "YulLiteral", + "src": "5136:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5126:6:84", + "nodeType": "YulIdentifier", + "src": "5126:6:84" + }, + "nativeSrc": "5126:12:84", + "nodeType": "YulFunctionCall", + "src": "5126:12:84" + }, + "nativeSrc": "5126:12:84", + "nodeType": "YulExpressionStatement", + "src": "5126:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5099:7:84", + "nodeType": "YulIdentifier", + "src": "5099:7:84" + }, + { + "name": "headStart", + "nativeSrc": "5108:9:84", + "nodeType": "YulIdentifier", + "src": "5108:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5095:3:84", + "nodeType": "YulIdentifier", + "src": "5095:3:84" + }, + "nativeSrc": "5095:23:84", + "nodeType": "YulFunctionCall", + "src": "5095:23:84" + }, + { + "kind": "number", + "nativeSrc": "5120:2:84", + "nodeType": "YulLiteral", + "src": "5120:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5091:3:84", + "nodeType": "YulIdentifier", + "src": "5091:3:84" + }, + "nativeSrc": "5091:32:84", + "nodeType": "YulFunctionCall", + "src": "5091:32:84" + }, + "nativeSrc": "5088:52:84", + "nodeType": "YulIf", + "src": "5088:52:84" + }, + { + "nativeSrc": "5149:36:84", + "nodeType": "YulVariableDeclaration", + "src": "5149:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5175:9:84", + "nodeType": "YulIdentifier", + "src": "5175:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "5162:12:84", + "nodeType": "YulIdentifier", + "src": "5162:12:84" + }, + "nativeSrc": "5162:23:84", + "nodeType": "YulFunctionCall", + "src": "5162:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "5153:5:84", + "nodeType": "YulTypedName", + "src": "5153:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "5235:16:84", + "nodeType": "YulBlock", + "src": "5235:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5244:1:84", + "nodeType": "YulLiteral", + "src": "5244:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5247:1:84", + "nodeType": "YulLiteral", + "src": "5247:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5237:6:84", + "nodeType": "YulIdentifier", + "src": "5237:6:84" + }, + "nativeSrc": "5237:12:84", + "nodeType": "YulFunctionCall", + "src": "5237:12:84" + }, + "nativeSrc": "5237:12:84", + "nodeType": "YulExpressionStatement", + "src": "5237:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5207:5:84", + "nodeType": "YulIdentifier", + "src": "5207:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5218:5:84", + "nodeType": "YulIdentifier", + "src": "5218:5:84" + }, + { + "kind": "number", + "nativeSrc": "5225:6:84", + "nodeType": "YulLiteral", + "src": "5225:6:84", + "type": "", + "value": "0xffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5214:3:84", + "nodeType": "YulIdentifier", + "src": "5214:3:84" + }, + "nativeSrc": "5214:18:84", + "nodeType": "YulFunctionCall", + "src": "5214:18:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "5204:2:84", + "nodeType": "YulIdentifier", + "src": "5204:2:84" + }, + "nativeSrc": "5204:29:84", + "nodeType": "YulFunctionCall", + "src": "5204:29:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "5197:6:84", + "nodeType": "YulIdentifier", + "src": "5197:6:84" + }, + "nativeSrc": "5197:37:84", + "nodeType": "YulFunctionCall", + "src": "5197:37:84" + }, + "nativeSrc": "5194:57:84", + "nodeType": "YulIf", + "src": "5194:57:84" + }, + { + "nativeSrc": "5260:15:84", + "nodeType": "YulAssignment", + "src": "5260:15:84", + "value": { + "name": "value", + "nativeSrc": "5270:5:84", + "nodeType": "YulIdentifier", + "src": "5270:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5260:6:84", + "nodeType": "YulIdentifier", + "src": "5260:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint16", + "nativeSrc": "5009:272:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5044:9:84", + "nodeType": "YulTypedName", + "src": "5044:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5055:7:84", + "nodeType": "YulTypedName", + "src": "5055:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5067:6:84", + "nodeType": "YulTypedName", + "src": "5067:6:84", + "type": "" + } + ], + "src": "5009:272:84" + }, + { + "body": { + "nativeSrc": "5407:275:84", + "nodeType": "YulBlock", + "src": "5407:275:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5424:9:84", + "nodeType": "YulIdentifier", + "src": "5424:9:84" + }, + { + "kind": "number", + "nativeSrc": "5435:2:84", + "nodeType": "YulLiteral", + "src": "5435:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5417:6:84", + "nodeType": "YulIdentifier", + "src": "5417:6:84" + }, + "nativeSrc": "5417:21:84", + "nodeType": "YulFunctionCall", + "src": "5417:21:84" + }, + "nativeSrc": "5417:21:84", + "nodeType": "YulExpressionStatement", + "src": "5417:21:84" + }, + { + "nativeSrc": "5447:27:84", + "nodeType": "YulVariableDeclaration", + "src": "5447:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5467:6:84", + "nodeType": "YulIdentifier", + "src": "5467:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "5461:5:84", + "nodeType": "YulIdentifier", + "src": "5461:5:84" + }, + "nativeSrc": "5461:13:84", + "nodeType": "YulFunctionCall", + "src": "5461:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "5451:6:84", + "nodeType": "YulTypedName", + "src": "5451:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5494:9:84", + "nodeType": "YulIdentifier", + "src": "5494:9:84" + }, + { + "kind": "number", + "nativeSrc": "5505:2:84", + "nodeType": "YulLiteral", + "src": "5505:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5490:3:84", + "nodeType": "YulIdentifier", + "src": "5490:3:84" + }, + "nativeSrc": "5490:18:84", + "nodeType": "YulFunctionCall", + "src": "5490:18:84" + }, + { + "name": "length", + "nativeSrc": "5510:6:84", + "nodeType": "YulIdentifier", + "src": "5510:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5483:6:84", + "nodeType": "YulIdentifier", + "src": "5483:6:84" + }, + "nativeSrc": "5483:34:84", + "nodeType": "YulFunctionCall", + "src": "5483:34:84" + }, + "nativeSrc": "5483:34:84", + "nodeType": "YulExpressionStatement", + "src": "5483:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "5565:6:84", + "nodeType": "YulIdentifier", + "src": "5565:6:84" + }, + { + "kind": "number", + "nativeSrc": "5573:2:84", + "nodeType": "YulLiteral", + "src": "5573:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5561:3:84", + "nodeType": "YulIdentifier", + "src": "5561:3:84" + }, + "nativeSrc": "5561:15:84", + "nodeType": "YulFunctionCall", + "src": "5561:15:84" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5582:9:84", + "nodeType": "YulIdentifier", + "src": "5582:9:84" + }, + { + "kind": "number", + "nativeSrc": "5593:2:84", + "nodeType": "YulLiteral", + "src": "5593:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5578:3:84", + "nodeType": "YulIdentifier", + "src": "5578:3:84" + }, + "nativeSrc": "5578:18:84", + "nodeType": "YulFunctionCall", + "src": "5578:18:84" + }, + { + "name": "length", + "nativeSrc": "5598:6:84", + "nodeType": "YulIdentifier", + "src": "5598:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "5526:34:84", + "nodeType": "YulIdentifier", + "src": "5526:34:84" + }, + "nativeSrc": "5526:79:84", + "nodeType": "YulFunctionCall", + "src": "5526:79:84" + }, + "nativeSrc": "5526:79:84", + "nodeType": "YulExpressionStatement", + "src": "5526:79:84" + }, + { + "nativeSrc": "5614:62:84", + "nodeType": "YulAssignment", + "src": "5614:62:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5630:9:84", + "nodeType": "YulIdentifier", + "src": "5630:9:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "5649:6:84", + "nodeType": "YulIdentifier", + "src": "5649:6:84" + }, + { + "kind": "number", + "nativeSrc": "5657:2:84", + "nodeType": "YulLiteral", + "src": "5657:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5645:3:84", + "nodeType": "YulIdentifier", + "src": "5645:3:84" + }, + "nativeSrc": "5645:15:84", + "nodeType": "YulFunctionCall", + "src": "5645:15:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5666:2:84", + "nodeType": "YulLiteral", + "src": "5666:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "5662:3:84", + "nodeType": "YulIdentifier", + "src": "5662:3:84" + }, + "nativeSrc": "5662:7:84", + "nodeType": "YulFunctionCall", + "src": "5662:7:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5641:3:84", + "nodeType": "YulIdentifier", + "src": "5641:3:84" + }, + "nativeSrc": "5641:29:84", + "nodeType": "YulFunctionCall", + "src": "5641:29:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5626:3:84", + "nodeType": "YulIdentifier", + "src": "5626:3:84" + }, + "nativeSrc": "5626:45:84", + "nodeType": "YulFunctionCall", + "src": "5626:45:84" + }, + { + "kind": "number", + "nativeSrc": "5673:2:84", + "nodeType": "YulLiteral", + "src": "5673:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5622:3:84", + "nodeType": "YulIdentifier", + "src": "5622:3:84" + }, + "nativeSrc": "5622:54:84", + "nodeType": "YulFunctionCall", + "src": "5622:54:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5614:4:84", + "nodeType": "YulIdentifier", + "src": "5614:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5286:396:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5376:9:84", + "nodeType": "YulTypedName", + "src": "5376:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5387:6:84", + "nodeType": "YulTypedName", + "src": "5387:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5398:4:84", + "nodeType": "YulTypedName", + "src": "5398:4:84", + "type": "" + } + ], + "src": "5286:396:84" + }, + { + "body": { + "nativeSrc": "5786:96:84", + "nodeType": "YulBlock", + "src": "5786:96:84", + "statements": [ + { + "body": { + "nativeSrc": "5832:16:84", + "nodeType": "YulBlock", + "src": "5832:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5841:1:84", + "nodeType": "YulLiteral", + "src": "5841:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5844:1:84", + "nodeType": "YulLiteral", + "src": "5844:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5834:6:84", + "nodeType": "YulIdentifier", + "src": "5834:6:84" + }, + "nativeSrc": "5834:12:84", + "nodeType": "YulFunctionCall", + "src": "5834:12:84" + }, + "nativeSrc": "5834:12:84", + "nodeType": "YulExpressionStatement", + "src": "5834:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5807:7:84", + "nodeType": "YulIdentifier", + "src": "5807:7:84" + }, + { + "name": "headStart", + "nativeSrc": "5816:9:84", + "nodeType": "YulIdentifier", + "src": "5816:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5803:3:84", + "nodeType": "YulIdentifier", + "src": "5803:3:84" + }, + "nativeSrc": "5803:23:84", + "nodeType": "YulFunctionCall", + "src": "5803:23:84" + }, + { + "kind": "number", + "nativeSrc": "5828:2:84", + "nodeType": "YulLiteral", + "src": "5828:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5799:3:84", + "nodeType": "YulIdentifier", + "src": "5799:3:84" + }, + "nativeSrc": "5799:32:84", + "nodeType": "YulFunctionCall", + "src": "5799:32:84" + }, + "nativeSrc": "5796:52:84", + "nodeType": "YulIf", + "src": "5796:52:84" + }, + { + "nativeSrc": "5857:19:84", + "nodeType": "YulAssignment", + "src": "5857:19:84", + "value": { + "name": "headStart", + "nativeSrc": "5867:9:84", + "nodeType": "YulIdentifier", + "src": "5867:9:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5857:6:84", + "nodeType": "YulIdentifier", + "src": "5857:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_RadonSLA_$23503_calldata_ptr", + "nativeSrc": "5687:195:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5752:9:84", + "nodeType": "YulTypedName", + "src": "5752:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5763:7:84", + "nodeType": "YulTypedName", + "src": "5763:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5775:6:84", + "nodeType": "YulTypedName", + "src": "5775:6:84", + "type": "" + } + ], + "src": "5687:195:84" + }, + { + "body": { + "nativeSrc": "5986:89:84", + "nodeType": "YulBlock", + "src": "5986:89:84", + "statements": [ + { + "nativeSrc": "5996:26:84", + "nodeType": "YulAssignment", + "src": "5996:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6008:9:84", + "nodeType": "YulIdentifier", + "src": "6008:9:84" + }, + { + "kind": "number", + "nativeSrc": "6019:2:84", + "nodeType": "YulLiteral", + "src": "6019:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6004:3:84", + "nodeType": "YulIdentifier", + "src": "6004:3:84" + }, + "nativeSrc": "6004:18:84", + "nodeType": "YulFunctionCall", + "src": "6004:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5996:4:84", + "nodeType": "YulIdentifier", + "src": "5996:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6038:9:84", + "nodeType": "YulIdentifier", + "src": "6038:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6053:6:84", + "nodeType": "YulIdentifier", + "src": "6053:6:84" + }, + { + "kind": "number", + "nativeSrc": "6061:6:84", + "nodeType": "YulLiteral", + "src": "6061:6:84", + "type": "", + "value": "0xffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6049:3:84", + "nodeType": "YulIdentifier", + "src": "6049:3:84" + }, + "nativeSrc": "6049:19:84", + "nodeType": "YulFunctionCall", + "src": "6049:19:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6031:6:84", + "nodeType": "YulIdentifier", + "src": "6031:6:84" + }, + "nativeSrc": "6031:38:84", + "nodeType": "YulFunctionCall", + "src": "6031:38:84" + }, + "nativeSrc": "6031:38:84", + "nodeType": "YulExpressionStatement", + "src": "6031:38:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint16__to_t_uint16__fromStack_reversed", + "nativeSrc": "5887:188:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5955:9:84", + "nodeType": "YulTypedName", + "src": "5955:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "5966:6:84", + "nodeType": "YulTypedName", + "src": "5966:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5977:4:84", + "nodeType": "YulTypedName", + "src": "5977:4:84", + "type": "" + } + ], + "src": "5887:188:84" + }, + { + "body": { + "nativeSrc": "6125:86:84", + "nodeType": "YulBlock", + "src": "6125:86:84", + "statements": [ + { + "body": { + "nativeSrc": "6189:16:84", + "nodeType": "YulBlock", + "src": "6189:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6198:1:84", + "nodeType": "YulLiteral", + "src": "6198:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6201:1:84", + "nodeType": "YulLiteral", + "src": "6201:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6191:6:84", + "nodeType": "YulIdentifier", + "src": "6191:6:84" + }, + "nativeSrc": "6191:12:84", + "nodeType": "YulFunctionCall", + "src": "6191:12:84" + }, + "nativeSrc": "6191:12:84", + "nodeType": "YulExpressionStatement", + "src": "6191:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "6148:5:84", + "nodeType": "YulIdentifier", + "src": "6148:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "6159:5:84", + "nodeType": "YulIdentifier", + "src": "6159:5:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6174:3:84", + "nodeType": "YulLiteral", + "src": "6174:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "6179:1:84", + "nodeType": "YulLiteral", + "src": "6179:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "6170:3:84", + "nodeType": "YulIdentifier", + "src": "6170:3:84" + }, + "nativeSrc": "6170:11:84", + "nodeType": "YulFunctionCall", + "src": "6170:11:84" + }, + { + "kind": "number", + "nativeSrc": "6183:1:84", + "nodeType": "YulLiteral", + "src": "6183:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6166:3:84", + "nodeType": "YulIdentifier", + "src": "6166:3:84" + }, + "nativeSrc": "6166:19:84", + "nodeType": "YulFunctionCall", + "src": "6166:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6155:3:84", + "nodeType": "YulIdentifier", + "src": "6155:3:84" + }, + "nativeSrc": "6155:31:84", + "nodeType": "YulFunctionCall", + "src": "6155:31:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "6145:2:84", + "nodeType": "YulIdentifier", + "src": "6145:2:84" + }, + "nativeSrc": "6145:42:84", + "nodeType": "YulFunctionCall", + "src": "6145:42:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "6138:6:84", + "nodeType": "YulIdentifier", + "src": "6138:6:84" + }, + "nativeSrc": "6138:50:84", + "nodeType": "YulFunctionCall", + "src": "6138:50:84" + }, + "nativeSrc": "6135:70:84", + "nodeType": "YulIf", + "src": "6135:70:84" + } + ] + }, + "name": "validator_revert_address", + "nativeSrc": "6080:131:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "6114:5:84", + "nodeType": "YulTypedName", + "src": "6114:5:84", + "type": "" + } + ], + "src": "6080:131:84" + }, + { + "body": { + "nativeSrc": "6286:177:84", + "nodeType": "YulBlock", + "src": "6286:177:84", + "statements": [ + { + "body": { + "nativeSrc": "6332:16:84", + "nodeType": "YulBlock", + "src": "6332:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6341:1:84", + "nodeType": "YulLiteral", + "src": "6341:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6344:1:84", + "nodeType": "YulLiteral", + "src": "6344:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6334:6:84", + "nodeType": "YulIdentifier", + "src": "6334:6:84" + }, + "nativeSrc": "6334:12:84", + "nodeType": "YulFunctionCall", + "src": "6334:12:84" + }, + "nativeSrc": "6334:12:84", + "nodeType": "YulExpressionStatement", + "src": "6334:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "6307:7:84", + "nodeType": "YulIdentifier", + "src": "6307:7:84" + }, + { + "name": "headStart", + "nativeSrc": "6316:9:84", + "nodeType": "YulIdentifier", + "src": "6316:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6303:3:84", + "nodeType": "YulIdentifier", + "src": "6303:3:84" + }, + "nativeSrc": "6303:23:84", + "nodeType": "YulFunctionCall", + "src": "6303:23:84" + }, + { + "kind": "number", + "nativeSrc": "6328:2:84", + "nodeType": "YulLiteral", + "src": "6328:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "6299:3:84", + "nodeType": "YulIdentifier", + "src": "6299:3:84" + }, + "nativeSrc": "6299:32:84", + "nodeType": "YulFunctionCall", + "src": "6299:32:84" + }, + "nativeSrc": "6296:52:84", + "nodeType": "YulIf", + "src": "6296:52:84" + }, + { + "nativeSrc": "6357:36:84", + "nodeType": "YulVariableDeclaration", + "src": "6357:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6383:9:84", + "nodeType": "YulIdentifier", + "src": "6383:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "6370:12:84", + "nodeType": "YulIdentifier", + "src": "6370:12:84" + }, + "nativeSrc": "6370:23:84", + "nodeType": "YulFunctionCall", + "src": "6370:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "6361:5:84", + "nodeType": "YulTypedName", + "src": "6361:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "6427:5:84", + "nodeType": "YulIdentifier", + "src": "6427:5:84" + } + ], + "functionName": { + "name": "validator_revert_address", + "nativeSrc": "6402:24:84", + "nodeType": "YulIdentifier", + "src": "6402:24:84" + }, + "nativeSrc": "6402:31:84", + "nodeType": "YulFunctionCall", + "src": "6402:31:84" + }, + "nativeSrc": "6402:31:84", + "nodeType": "YulExpressionStatement", + "src": "6402:31:84" + }, + { + "nativeSrc": "6442:15:84", + "nodeType": "YulAssignment", + "src": "6442:15:84", + "value": { + "name": "value", + "nativeSrc": "6452:5:84", + "nodeType": "YulIdentifier", + "src": "6452:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "6442:6:84", + "nodeType": "YulIdentifier", + "src": "6442:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nativeSrc": "6216:247:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6252:9:84", + "nodeType": "YulTypedName", + "src": "6252:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "6263:7:84", + "nodeType": "YulTypedName", + "src": "6263:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "6275:6:84", + "nodeType": "YulTypedName", + "src": "6275:6:84", + "type": "" + } + ], + "src": "6216:247:84" + }, + { + "body": { + "nativeSrc": "6756:353:84", + "nodeType": "YulBlock", + "src": "6756:353:84", + "statements": [ + { + "nativeSrc": "6766:27:84", + "nodeType": "YulVariableDeclaration", + "src": "6766:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6786:6:84", + "nodeType": "YulIdentifier", + "src": "6786:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6780:5:84", + "nodeType": "YulIdentifier", + "src": "6780:5:84" + }, + "nativeSrc": "6780:13:84", + "nodeType": "YulFunctionCall", + "src": "6780:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "6770:6:84", + "nodeType": "YulTypedName", + "src": "6770:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "6841:6:84", + "nodeType": "YulIdentifier", + "src": "6841:6:84" + }, + { + "kind": "number", + "nativeSrc": "6849:4:84", + "nodeType": "YulLiteral", + "src": "6849:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6837:3:84", + "nodeType": "YulIdentifier", + "src": "6837:3:84" + }, + "nativeSrc": "6837:17:84", + "nodeType": "YulFunctionCall", + "src": "6837:17:84" + }, + { + "name": "pos", + "nativeSrc": "6856:3:84", + "nodeType": "YulIdentifier", + "src": "6856:3:84" + }, + { + "name": "length", + "nativeSrc": "6861:6:84", + "nodeType": "YulIdentifier", + "src": "6861:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "6802:34:84", + "nodeType": "YulIdentifier", + "src": "6802:34:84" + }, + "nativeSrc": "6802:66:84", + "nodeType": "YulFunctionCall", + "src": "6802:66:84" + }, + "nativeSrc": "6802:66:84", + "nodeType": "YulExpressionStatement", + "src": "6802:66:84" + }, + { + "nativeSrc": "6877:29:84", + "nodeType": "YulVariableDeclaration", + "src": "6877:29:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "6894:3:84", + "nodeType": "YulIdentifier", + "src": "6894:3:84" + }, + { + "name": "length", + "nativeSrc": "6899:6:84", + "nodeType": "YulIdentifier", + "src": "6899:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6890:3:84", + "nodeType": "YulIdentifier", + "src": "6890:3:84" + }, + "nativeSrc": "6890:16:84", + "nodeType": "YulFunctionCall", + "src": "6890:16:84" + }, + "variables": [ + { + "name": "end_1", + "nativeSrc": "6881:5:84", + "nodeType": "YulTypedName", + "src": "6881:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "6922:5:84", + "nodeType": "YulIdentifier", + "src": "6922:5:84" + }, + { + "hexValue": "3a20", + "kind": "string", + "nativeSrc": "6929:4:84", + "nodeType": "YulLiteral", + "src": "6929:4:84", + "type": "", + "value": ": " + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6915:6:84", + "nodeType": "YulIdentifier", + "src": "6915:6:84" + }, + "nativeSrc": "6915:19:84", + "nodeType": "YulFunctionCall", + "src": "6915:19:84" + }, + "nativeSrc": "6915:19:84", + "nodeType": "YulExpressionStatement", + "src": "6915:19:84" + }, + { + "nativeSrc": "6943:29:84", + "nodeType": "YulVariableDeclaration", + "src": "6943:29:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "6965:6:84", + "nodeType": "YulIdentifier", + "src": "6965:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6959:5:84", + "nodeType": "YulIdentifier", + "src": "6959:5:84" + }, + "nativeSrc": "6959:13:84", + "nodeType": "YulFunctionCall", + "src": "6959:13:84" + }, + "variables": [ + { + "name": "length_1", + "nativeSrc": "6947:8:84", + "nodeType": "YulTypedName", + "src": "6947:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "7020:6:84", + "nodeType": "YulIdentifier", + "src": "7020:6:84" + }, + { + "kind": "number", + "nativeSrc": "7028:4:84", + "nodeType": "YulLiteral", + "src": "7028:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7016:3:84", + "nodeType": "YulIdentifier", + "src": "7016:3:84" + }, + "nativeSrc": "7016:17:84", + "nodeType": "YulFunctionCall", + "src": "7016:17:84" + }, + { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "7039:5:84", + "nodeType": "YulIdentifier", + "src": "7039:5:84" + }, + { + "kind": "number", + "nativeSrc": "7046:1:84", + "nodeType": "YulLiteral", + "src": "7046:1:84", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7035:3:84", + "nodeType": "YulIdentifier", + "src": "7035:3:84" + }, + "nativeSrc": "7035:13:84", + "nodeType": "YulFunctionCall", + "src": "7035:13:84" + }, + { + "name": "length_1", + "nativeSrc": "7050:8:84", + "nodeType": "YulIdentifier", + "src": "7050:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "6981:34:84", + "nodeType": "YulIdentifier", + "src": "6981:34:84" + }, + "nativeSrc": "6981:78:84", + "nodeType": "YulFunctionCall", + "src": "6981:78:84" + }, + "nativeSrc": "6981:78:84", + "nodeType": "YulExpressionStatement", + "src": "6981:78:84" + }, + { + "nativeSrc": "7068:35:84", + "nodeType": "YulAssignment", + "src": "7068:35:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "7083:5:84", + "nodeType": "YulIdentifier", + "src": "7083:5:84" + }, + { + "name": "length_1", + "nativeSrc": "7090:8:84", + "nodeType": "YulIdentifier", + "src": "7090:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7079:3:84", + "nodeType": "YulIdentifier", + "src": "7079:3:84" + }, + "nativeSrc": "7079:20:84", + "nodeType": "YulFunctionCall", + "src": "7079:20:84" + }, + { + "kind": "number", + "nativeSrc": "7101:1:84", + "nodeType": "YulLiteral", + "src": "7101:1:84", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7075:3:84", + "nodeType": "YulIdentifier", + "src": "7075:3:84" + }, + "nativeSrc": "7075:28:84", + "nodeType": "YulFunctionCall", + "src": "7075:28:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "7068:3:84", + "nodeType": "YulIdentifier", + "src": "7068:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_string_memory_ptr_t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "6468:641:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "6724:3:84", + "nodeType": "YulTypedName", + "src": "6724:3:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "6729:6:84", + "nodeType": "YulTypedName", + "src": "6729:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6737:6:84", + "nodeType": "YulTypedName", + "src": "6737:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "6748:3:84", + "nodeType": "YulTypedName", + "src": "6748:3:84", + "type": "" + } + ], + "src": "6468:641:84" + }, + { + "body": { + "nativeSrc": "7146:95:84", + "nodeType": "YulBlock", + "src": "7146:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7163:1:84", + "nodeType": "YulLiteral", + "src": "7163:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7170:3:84", + "nodeType": "YulLiteral", + "src": "7170:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "7175:10:84", + "nodeType": "YulLiteral", + "src": "7175:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7166:3:84", + "nodeType": "YulIdentifier", + "src": "7166:3:84" + }, + "nativeSrc": "7166:20:84", + "nodeType": "YulFunctionCall", + "src": "7166:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7156:6:84", + "nodeType": "YulIdentifier", + "src": "7156:6:84" + }, + "nativeSrc": "7156:31:84", + "nodeType": "YulFunctionCall", + "src": "7156:31:84" + }, + "nativeSrc": "7156:31:84", + "nodeType": "YulExpressionStatement", + "src": "7156:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7203:1:84", + "nodeType": "YulLiteral", + "src": "7203:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "7206:4:84", + "nodeType": "YulLiteral", + "src": "7206:4:84", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7196:6:84", + "nodeType": "YulIdentifier", + "src": "7196:6:84" + }, + "nativeSrc": "7196:15:84", + "nodeType": "YulFunctionCall", + "src": "7196:15:84" + }, + "nativeSrc": "7196:15:84", + "nodeType": "YulExpressionStatement", + "src": "7196:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7227:1:84", + "nodeType": "YulLiteral", + "src": "7227:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7230:4:84", + "nodeType": "YulLiteral", + "src": "7230:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7220:6:84", + "nodeType": "YulIdentifier", + "src": "7220:6:84" + }, + "nativeSrc": "7220:15:84", + "nodeType": "YulFunctionCall", + "src": "7220:15:84" + }, + "nativeSrc": "7220:15:84", + "nodeType": "YulExpressionStatement", + "src": "7220:15:84" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "7114:127:84", + "nodeType": "YulFunctionDefinition", + "src": "7114:127:84" + }, + { + "body": { + "nativeSrc": "7278:95:84", + "nodeType": "YulBlock", + "src": "7278:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7295:1:84", + "nodeType": "YulLiteral", + "src": "7295:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7302:3:84", + "nodeType": "YulLiteral", + "src": "7302:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "7307:10:84", + "nodeType": "YulLiteral", + "src": "7307:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7298:3:84", + "nodeType": "YulIdentifier", + "src": "7298:3:84" + }, + "nativeSrc": "7298:20:84", + "nodeType": "YulFunctionCall", + "src": "7298:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7288:6:84", + "nodeType": "YulIdentifier", + "src": "7288:6:84" + }, + "nativeSrc": "7288:31:84", + "nodeType": "YulFunctionCall", + "src": "7288:31:84" + }, + "nativeSrc": "7288:31:84", + "nodeType": "YulExpressionStatement", + "src": "7288:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7335:1:84", + "nodeType": "YulLiteral", + "src": "7335:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "7338:4:84", + "nodeType": "YulLiteral", + "src": "7338:4:84", + "type": "", + "value": "0x12" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7328:6:84", + "nodeType": "YulIdentifier", + "src": "7328:6:84" + }, + "nativeSrc": "7328:15:84", + "nodeType": "YulFunctionCall", + "src": "7328:15:84" + }, + "nativeSrc": "7328:15:84", + "nodeType": "YulExpressionStatement", + "src": "7328:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7359:1:84", + "nodeType": "YulLiteral", + "src": "7359:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7362:4:84", + "nodeType": "YulLiteral", + "src": "7362:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7352:6:84", + "nodeType": "YulIdentifier", + "src": "7352:6:84" + }, + "nativeSrc": "7352:15:84", + "nodeType": "YulFunctionCall", + "src": "7352:15:84" + }, + "nativeSrc": "7352:15:84", + "nodeType": "YulExpressionStatement", + "src": "7352:15:84" + } + ] + }, + "name": "panic_error_0x12", + "nativeSrc": "7246:127:84", + "nodeType": "YulFunctionDefinition", + "src": "7246:127:84" + }, + { + "body": { + "nativeSrc": "7410:95:84", + "nodeType": "YulBlock", + "src": "7410:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7427:1:84", + "nodeType": "YulLiteral", + "src": "7427:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7434:3:84", + "nodeType": "YulLiteral", + "src": "7434:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "7439:10:84", + "nodeType": "YulLiteral", + "src": "7439:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7430:3:84", + "nodeType": "YulIdentifier", + "src": "7430:3:84" + }, + "nativeSrc": "7430:20:84", + "nodeType": "YulFunctionCall", + "src": "7430:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7420:6:84", + "nodeType": "YulIdentifier", + "src": "7420:6:84" + }, + "nativeSrc": "7420:31:84", + "nodeType": "YulFunctionCall", + "src": "7420:31:84" + }, + "nativeSrc": "7420:31:84", + "nodeType": "YulExpressionStatement", + "src": "7420:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7467:1:84", + "nodeType": "YulLiteral", + "src": "7467:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "7470:4:84", + "nodeType": "YulLiteral", + "src": "7470:4:84", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7460:6:84", + "nodeType": "YulIdentifier", + "src": "7460:6:84" + }, + "nativeSrc": "7460:15:84", + "nodeType": "YulFunctionCall", + "src": "7460:15:84" + }, + "nativeSrc": "7460:15:84", + "nodeType": "YulExpressionStatement", + "src": "7460:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7491:1:84", + "nodeType": "YulLiteral", + "src": "7491:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "7494:4:84", + "nodeType": "YulLiteral", + "src": "7494:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "7484:6:84", + "nodeType": "YulIdentifier", + "src": "7484:6:84" + }, + "nativeSrc": "7484:15:84", + "nodeType": "YulFunctionCall", + "src": "7484:15:84" + }, + "nativeSrc": "7484:15:84", + "nodeType": "YulExpressionStatement", + "src": "7484:15:84" + } + ] + }, + "name": "panic_error_0x11", + "nativeSrc": "7378:127:84", + "nodeType": "YulFunctionDefinition", + "src": "7378:127:84" + }, + { + "body": { + "nativeSrc": "7554:121:84", + "nodeType": "YulBlock", + "src": "7554:121:84", + "statements": [ + { + "nativeSrc": "7564:23:84", + "nodeType": "YulVariableDeclaration", + "src": "7564:23:84", + "value": { + "arguments": [ + { + "name": "y", + "nativeSrc": "7579:1:84", + "nodeType": "YulIdentifier", + "src": "7579:1:84" + }, + { + "kind": "number", + "nativeSrc": "7582:4:84", + "nodeType": "YulLiteral", + "src": "7582:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7575:3:84", + "nodeType": "YulIdentifier", + "src": "7575:3:84" + }, + "nativeSrc": "7575:12:84", + "nodeType": "YulFunctionCall", + "src": "7575:12:84" + }, + "variables": [ + { + "name": "y_1", + "nativeSrc": "7568:3:84", + "nodeType": "YulTypedName", + "src": "7568:3:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7611:22:84", + "nodeType": "YulBlock", + "src": "7611:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x12", + "nativeSrc": "7613:16:84", + "nodeType": "YulIdentifier", + "src": "7613:16:84" + }, + "nativeSrc": "7613:18:84", + "nodeType": "YulFunctionCall", + "src": "7613:18:84" + }, + "nativeSrc": "7613:18:84", + "nodeType": "YulExpressionStatement", + "src": "7613:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "y_1", + "nativeSrc": "7606:3:84", + "nodeType": "YulIdentifier", + "src": "7606:3:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "7599:6:84", + "nodeType": "YulIdentifier", + "src": "7599:6:84" + }, + "nativeSrc": "7599:11:84", + "nodeType": "YulFunctionCall", + "src": "7599:11:84" + }, + "nativeSrc": "7596:37:84", + "nodeType": "YulIf", + "src": "7596:37:84" + }, + { + "nativeSrc": "7642:27:84", + "nodeType": "YulAssignment", + "src": "7642:27:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "7655:1:84", + "nodeType": "YulIdentifier", + "src": "7655:1:84" + }, + { + "kind": "number", + "nativeSrc": "7658:4:84", + "nodeType": "YulLiteral", + "src": "7658:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7651:3:84", + "nodeType": "YulIdentifier", + "src": "7651:3:84" + }, + "nativeSrc": "7651:12:84", + "nodeType": "YulFunctionCall", + "src": "7651:12:84" + }, + { + "name": "y_1", + "nativeSrc": "7665:3:84", + "nodeType": "YulIdentifier", + "src": "7665:3:84" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "7647:3:84", + "nodeType": "YulIdentifier", + "src": "7647:3:84" + }, + "nativeSrc": "7647:22:84", + "nodeType": "YulFunctionCall", + "src": "7647:22:84" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "7642:1:84", + "nodeType": "YulIdentifier", + "src": "7642:1:84" + } + ] + } + ] + }, + "name": "checked_div_t_uint8", + "nativeSrc": "7510:165:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "7539:1:84", + "nodeType": "YulTypedName", + "src": "7539:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "7542:1:84", + "nodeType": "YulTypedName", + "src": "7542:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "r", + "nativeSrc": "7548:1:84", + "nodeType": "YulTypedName", + "src": "7548:1:84", + "type": "" + } + ], + "src": "7510:165:84" + }, + { + "body": { + "nativeSrc": "7726:102:84", + "nodeType": "YulBlock", + "src": "7726:102:84", + "statements": [ + { + "nativeSrc": "7736:38:84", + "nodeType": "YulAssignment", + "src": "7736:38:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "7751:1:84", + "nodeType": "YulIdentifier", + "src": "7751:1:84" + }, + { + "kind": "number", + "nativeSrc": "7754:4:84", + "nodeType": "YulLiteral", + "src": "7754:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7747:3:84", + "nodeType": "YulIdentifier", + "src": "7747:3:84" + }, + "nativeSrc": "7747:12:84", + "nodeType": "YulFunctionCall", + "src": "7747:12:84" + }, + { + "arguments": [ + { + "name": "y", + "nativeSrc": "7765:1:84", + "nodeType": "YulIdentifier", + "src": "7765:1:84" + }, + { + "kind": "number", + "nativeSrc": "7768:4:84", + "nodeType": "YulLiteral", + "src": "7768:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7761:3:84", + "nodeType": "YulIdentifier", + "src": "7761:3:84" + }, + "nativeSrc": "7761:12:84", + "nodeType": "YulFunctionCall", + "src": "7761:12:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7743:3:84", + "nodeType": "YulIdentifier", + "src": "7743:3:84" + }, + "nativeSrc": "7743:31:84", + "nodeType": "YulFunctionCall", + "src": "7743:31:84" + }, + "variableNames": [ + { + "name": "sum", + "nativeSrc": "7736:3:84", + "nodeType": "YulIdentifier", + "src": "7736:3:84" + } + ] + }, + { + "body": { + "nativeSrc": "7800:22:84", + "nodeType": "YulBlock", + "src": "7800:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "7802:16:84", + "nodeType": "YulIdentifier", + "src": "7802:16:84" + }, + "nativeSrc": "7802:18:84", + "nodeType": "YulFunctionCall", + "src": "7802:18:84" + }, + "nativeSrc": "7802:18:84", + "nodeType": "YulExpressionStatement", + "src": "7802:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sum", + "nativeSrc": "7789:3:84", + "nodeType": "YulIdentifier", + "src": "7789:3:84" + }, + { + "kind": "number", + "nativeSrc": "7794:4:84", + "nodeType": "YulLiteral", + "src": "7794:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "7786:2:84", + "nodeType": "YulIdentifier", + "src": "7786:2:84" + }, + "nativeSrc": "7786:13:84", + "nodeType": "YulFunctionCall", + "src": "7786:13:84" + }, + "nativeSrc": "7783:39:84", + "nodeType": "YulIf", + "src": "7783:39:84" + } + ] + }, + "name": "checked_add_t_uint8", + "nativeSrc": "7680:148:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "7709:1:84", + "nodeType": "YulTypedName", + "src": "7709:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "7712:1:84", + "nodeType": "YulTypedName", + "src": "7712:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nativeSrc": "7718:3:84", + "nodeType": "YulTypedName", + "src": "7718:3:84", + "type": "" + } + ], + "src": "7680:148:84" + }, + { + "body": { + "nativeSrc": "7869:121:84", + "nodeType": "YulBlock", + "src": "7869:121:84", + "statements": [ + { + "nativeSrc": "7879:23:84", + "nodeType": "YulVariableDeclaration", + "src": "7879:23:84", + "value": { + "arguments": [ + { + "name": "y", + "nativeSrc": "7894:1:84", + "nodeType": "YulIdentifier", + "src": "7894:1:84" + }, + { + "kind": "number", + "nativeSrc": "7897:4:84", + "nodeType": "YulLiteral", + "src": "7897:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7890:3:84", + "nodeType": "YulIdentifier", + "src": "7890:3:84" + }, + "nativeSrc": "7890:12:84", + "nodeType": "YulFunctionCall", + "src": "7890:12:84" + }, + "variables": [ + { + "name": "y_1", + "nativeSrc": "7883:3:84", + "nodeType": "YulTypedName", + "src": "7883:3:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7926:22:84", + "nodeType": "YulBlock", + "src": "7926:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x12", + "nativeSrc": "7928:16:84", + "nodeType": "YulIdentifier", + "src": "7928:16:84" + }, + "nativeSrc": "7928:18:84", + "nodeType": "YulFunctionCall", + "src": "7928:18:84" + }, + "nativeSrc": "7928:18:84", + "nodeType": "YulExpressionStatement", + "src": "7928:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "y_1", + "nativeSrc": "7921:3:84", + "nodeType": "YulIdentifier", + "src": "7921:3:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "7914:6:84", + "nodeType": "YulIdentifier", + "src": "7914:6:84" + }, + "nativeSrc": "7914:11:84", + "nodeType": "YulFunctionCall", + "src": "7914:11:84" + }, + "nativeSrc": "7911:37:84", + "nodeType": "YulIf", + "src": "7911:37:84" + }, + { + "nativeSrc": "7957:27:84", + "nodeType": "YulAssignment", + "src": "7957:27:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "7970:1:84", + "nodeType": "YulIdentifier", + "src": "7970:1:84" + }, + { + "kind": "number", + "nativeSrc": "7973:4:84", + "nodeType": "YulLiteral", + "src": "7973:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7966:3:84", + "nodeType": "YulIdentifier", + "src": "7966:3:84" + }, + "nativeSrc": "7966:12:84", + "nodeType": "YulFunctionCall", + "src": "7966:12:84" + }, + { + "name": "y_1", + "nativeSrc": "7980:3:84", + "nodeType": "YulIdentifier", + "src": "7980:3:84" + } + ], + "functionName": { + "name": "mod", + "nativeSrc": "7962:3:84", + "nodeType": "YulIdentifier", + "src": "7962:3:84" + }, + "nativeSrc": "7962:22:84", + "nodeType": "YulFunctionCall", + "src": "7962:22:84" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "7957:1:84", + "nodeType": "YulIdentifier", + "src": "7957:1:84" + } + ] + } + ] + }, + "name": "mod_t_uint8", + "nativeSrc": "7833:157:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "7854:1:84", + "nodeType": "YulTypedName", + "src": "7854:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "7857:1:84", + "nodeType": "YulTypedName", + "src": "7857:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "r", + "nativeSrc": "7863:1:84", + "nodeType": "YulTypedName", + "src": "7863:1:84", + "type": "" + } + ], + "src": "7833:157:84" + }, + { + "body": { + "nativeSrc": "8027:95:84", + "nodeType": "YulBlock", + "src": "8027:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8044:1:84", + "nodeType": "YulLiteral", + "src": "8044:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8051:3:84", + "nodeType": "YulLiteral", + "src": "8051:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "8056:10:84", + "nodeType": "YulLiteral", + "src": "8056:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8047:3:84", + "nodeType": "YulIdentifier", + "src": "8047:3:84" + }, + "nativeSrc": "8047:20:84", + "nodeType": "YulFunctionCall", + "src": "8047:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8037:6:84", + "nodeType": "YulIdentifier", + "src": "8037:6:84" + }, + "nativeSrc": "8037:31:84", + "nodeType": "YulFunctionCall", + "src": "8037:31:84" + }, + "nativeSrc": "8037:31:84", + "nodeType": "YulExpressionStatement", + "src": "8037:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8084:1:84", + "nodeType": "YulLiteral", + "src": "8084:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "8087:4:84", + "nodeType": "YulLiteral", + "src": "8087:4:84", + "type": "", + "value": "0x32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8077:6:84", + "nodeType": "YulIdentifier", + "src": "8077:6:84" + }, + "nativeSrc": "8077:15:84", + "nodeType": "YulFunctionCall", + "src": "8077:15:84" + }, + "nativeSrc": "8077:15:84", + "nodeType": "YulExpressionStatement", + "src": "8077:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8108:1:84", + "nodeType": "YulLiteral", + "src": "8108:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8111:4:84", + "nodeType": "YulLiteral", + "src": "8111:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "8101:6:84", + "nodeType": "YulIdentifier", + "src": "8101:6:84" + }, + "nativeSrc": "8101:15:84", + "nodeType": "YulFunctionCall", + "src": "8101:15:84" + }, + "nativeSrc": "8101:15:84", + "nodeType": "YulExpressionStatement", + "src": "8101:15:84" + } + ] + }, + "name": "panic_error_0x32", + "nativeSrc": "7995:127:84", + "nodeType": "YulFunctionDefinition", + "src": "7995:127:84" + }, + { + "body": { + "nativeSrc": "8228:179:84", + "nodeType": "YulBlock", + "src": "8228:179:84", + "statements": [ + { + "body": { + "nativeSrc": "8274:16:84", + "nodeType": "YulBlock", + "src": "8274:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8283:1:84", + "nodeType": "YulLiteral", + "src": "8283:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8286:1:84", + "nodeType": "YulLiteral", + "src": "8286:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "8276:6:84", + "nodeType": "YulIdentifier", + "src": "8276:6:84" + }, + "nativeSrc": "8276:12:84", + "nodeType": "YulFunctionCall", + "src": "8276:12:84" + }, + "nativeSrc": "8276:12:84", + "nodeType": "YulExpressionStatement", + "src": "8276:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "8249:7:84", + "nodeType": "YulIdentifier", + "src": "8249:7:84" + }, + { + "name": "headStart", + "nativeSrc": "8258:9:84", + "nodeType": "YulIdentifier", + "src": "8258:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8245:3:84", + "nodeType": "YulIdentifier", + "src": "8245:3:84" + }, + "nativeSrc": "8245:23:84", + "nodeType": "YulFunctionCall", + "src": "8245:23:84" + }, + { + "kind": "number", + "nativeSrc": "8270:2:84", + "nodeType": "YulLiteral", + "src": "8270:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "8241:3:84", + "nodeType": "YulIdentifier", + "src": "8241:3:84" + }, + "nativeSrc": "8241:32:84", + "nodeType": "YulFunctionCall", + "src": "8241:32:84" + }, + "nativeSrc": "8238:52:84", + "nodeType": "YulIf", + "src": "8238:52:84" + }, + { + "nativeSrc": "8299:29:84", + "nodeType": "YulVariableDeclaration", + "src": "8299:29:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8318:9:84", + "nodeType": "YulIdentifier", + "src": "8318:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8312:5:84", + "nodeType": "YulIdentifier", + "src": "8312:5:84" + }, + "nativeSrc": "8312:16:84", + "nodeType": "YulFunctionCall", + "src": "8312:16:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "8303:5:84", + "nodeType": "YulTypedName", + "src": "8303:5:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "8361:16:84", + "nodeType": "YulBlock", + "src": "8361:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8370:1:84", + "nodeType": "YulLiteral", + "src": "8370:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8373:1:84", + "nodeType": "YulLiteral", + "src": "8373:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "8363:6:84", + "nodeType": "YulIdentifier", + "src": "8363:6:84" + }, + "nativeSrc": "8363:12:84", + "nodeType": "YulFunctionCall", + "src": "8363:12:84" + }, + "nativeSrc": "8363:12:84", + "nodeType": "YulExpressionStatement", + "src": "8363:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "8350:5:84", + "nodeType": "YulIdentifier", + "src": "8350:5:84" + }, + { + "kind": "number", + "nativeSrc": "8357:1:84", + "nodeType": "YulLiteral", + "src": "8357:1:84", + "type": "", + "value": "6" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "8347:2:84", + "nodeType": "YulIdentifier", + "src": "8347:2:84" + }, + "nativeSrc": "8347:12:84", + "nodeType": "YulFunctionCall", + "src": "8347:12:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8340:6:84", + "nodeType": "YulIdentifier", + "src": "8340:6:84" + }, + "nativeSrc": "8340:20:84", + "nodeType": "YulFunctionCall", + "src": "8340:20:84" + }, + "nativeSrc": "8337:40:84", + "nodeType": "YulIf", + "src": "8337:40:84" + }, + { + "nativeSrc": "8386:15:84", + "nodeType": "YulAssignment", + "src": "8386:15:84", + "value": { + "name": "value", + "nativeSrc": "8396:5:84", + "nodeType": "YulIdentifier", + "src": "8396:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "8386:6:84", + "nodeType": "YulIdentifier", + "src": "8386:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_enum$_ResponseStatus_$23496_fromMemory", + "nativeSrc": "8127:280:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8194:9:84", + "nodeType": "YulTypedName", + "src": "8194:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "8205:7:84", + "nodeType": "YulTypedName", + "src": "8205:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "8217:6:84", + "nodeType": "YulTypedName", + "src": "8217:6:84", + "type": "" + } + ], + "src": "8127:280:84" + }, + { + "body": { + "nativeSrc": "8453:207:84", + "nodeType": "YulBlock", + "src": "8453:207:84", + "statements": [ + { + "nativeSrc": "8463:19:84", + "nodeType": "YulAssignment", + "src": "8463:19:84", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8479:2:84", + "nodeType": "YulLiteral", + "src": "8479:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8473:5:84", + "nodeType": "YulIdentifier", + "src": "8473:5:84" + }, + "nativeSrc": "8473:9:84", + "nodeType": "YulFunctionCall", + "src": "8473:9:84" + }, + "variableNames": [ + { + "name": "memPtr", + "nativeSrc": "8463:6:84", + "nodeType": "YulIdentifier", + "src": "8463:6:84" + } + ] + }, + { + "nativeSrc": "8491:35:84", + "nodeType": "YulVariableDeclaration", + "src": "8491:35:84", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "8513:6:84", + "nodeType": "YulIdentifier", + "src": "8513:6:84" + }, + { + "kind": "number", + "nativeSrc": "8521:4:84", + "nodeType": "YulLiteral", + "src": "8521:4:84", + "type": "", + "value": "0xa0" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8509:3:84", + "nodeType": "YulIdentifier", + "src": "8509:3:84" + }, + "nativeSrc": "8509:17:84", + "nodeType": "YulFunctionCall", + "src": "8509:17:84" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "8495:10:84", + "nodeType": "YulTypedName", + "src": "8495:10:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "8601:22:84", + "nodeType": "YulBlock", + "src": "8601:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "8603:16:84", + "nodeType": "YulIdentifier", + "src": "8603:16:84" + }, + "nativeSrc": "8603:18:84", + "nodeType": "YulFunctionCall", + "src": "8603:18:84" + }, + "nativeSrc": "8603:18:84", + "nodeType": "YulExpressionStatement", + "src": "8603:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "8544:10:84", + "nodeType": "YulIdentifier", + "src": "8544:10:84" + }, + { + "kind": "number", + "nativeSrc": "8556:18:84", + "nodeType": "YulLiteral", + "src": "8556:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "8541:2:84", + "nodeType": "YulIdentifier", + "src": "8541:2:84" + }, + "nativeSrc": "8541:34:84", + "nodeType": "YulFunctionCall", + "src": "8541:34:84" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "8580:10:84", + "nodeType": "YulIdentifier", + "src": "8580:10:84" + }, + { + "name": "memPtr", + "nativeSrc": "8592:6:84", + "nodeType": "YulIdentifier", + "src": "8592:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "8577:2:84", + "nodeType": "YulIdentifier", + "src": "8577:2:84" + }, + "nativeSrc": "8577:22:84", + "nodeType": "YulFunctionCall", + "src": "8577:22:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "8538:2:84", + "nodeType": "YulIdentifier", + "src": "8538:2:84" + }, + "nativeSrc": "8538:62:84", + "nodeType": "YulFunctionCall", + "src": "8538:62:84" + }, + "nativeSrc": "8535:88:84", + "nodeType": "YulIf", + "src": "8535:88:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8639:2:84", + "nodeType": "YulLiteral", + "src": "8639:2:84", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "8643:10:84", + "nodeType": "YulIdentifier", + "src": "8643:10:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8632:6:84", + "nodeType": "YulIdentifier", + "src": "8632:6:84" + }, + "nativeSrc": "8632:22:84", + "nodeType": "YulFunctionCall", + "src": "8632:22:84" + }, + "nativeSrc": "8632:22:84", + "nodeType": "YulExpressionStatement", + "src": "8632:22:84" + } + ] + }, + "name": "allocate_memory", + "nativeSrc": "8412:248:84", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nativeSrc": "8442:6:84", + "nodeType": "YulTypedName", + "src": "8442:6:84", + "type": "" + } + ], + "src": "8412:248:84" + }, + { + "body": { + "nativeSrc": "8709:85:84", + "nodeType": "YulBlock", + "src": "8709:85:84", + "statements": [ + { + "body": { + "nativeSrc": "8772:16:84", + "nodeType": "YulBlock", + "src": "8772:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8781:1:84", + "nodeType": "YulLiteral", + "src": "8781:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8784:1:84", + "nodeType": "YulLiteral", + "src": "8784:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "8774:6:84", + "nodeType": "YulIdentifier", + "src": "8774:6:84" + }, + "nativeSrc": "8774:12:84", + "nodeType": "YulFunctionCall", + "src": "8774:12:84" + }, + "nativeSrc": "8774:12:84", + "nodeType": "YulExpressionStatement", + "src": "8774:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "8732:5:84", + "nodeType": "YulIdentifier", + "src": "8732:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "8743:5:84", + "nodeType": "YulIdentifier", + "src": "8743:5:84" + }, + { + "kind": "number", + "nativeSrc": "8750:18:84", + "nodeType": "YulLiteral", + "src": "8750:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8739:3:84", + "nodeType": "YulIdentifier", + "src": "8739:3:84" + }, + "nativeSrc": "8739:30:84", + "nodeType": "YulFunctionCall", + "src": "8739:30:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "8729:2:84", + "nodeType": "YulIdentifier", + "src": "8729:2:84" + }, + "nativeSrc": "8729:41:84", + "nodeType": "YulFunctionCall", + "src": "8729:41:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8722:6:84", + "nodeType": "YulIdentifier", + "src": "8722:6:84" + }, + "nativeSrc": "8722:49:84", + "nodeType": "YulFunctionCall", + "src": "8722:49:84" + }, + "nativeSrc": "8719:69:84", + "nodeType": "YulIf", + "src": "8719:69:84" + } + ] + }, + "name": "validator_revert_uint64", + "nativeSrc": "8665:129:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "8698:5:84", + "nodeType": "YulTypedName", + "src": "8698:5:84", + "type": "" + } + ], + "src": "8665:129:84" + }, + { + "body": { + "nativeSrc": "8862:635:84", + "nodeType": "YulBlock", + "src": "8862:635:84", + "statements": [ + { + "body": { + "nativeSrc": "8911:16:84", + "nodeType": "YulBlock", + "src": "8911:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8920:1:84", + "nodeType": "YulLiteral", + "src": "8920:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8923:1:84", + "nodeType": "YulLiteral", + "src": "8923:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "8913:6:84", + "nodeType": "YulIdentifier", + "src": "8913:6:84" + }, + "nativeSrc": "8913:12:84", + "nodeType": "YulFunctionCall", + "src": "8913:12:84" + }, + "nativeSrc": "8913:12:84", + "nodeType": "YulExpressionStatement", + "src": "8913:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "8890:6:84", + "nodeType": "YulIdentifier", + "src": "8890:6:84" + }, + { + "kind": "number", + "nativeSrc": "8898:4:84", + "nodeType": "YulLiteral", + "src": "8898:4:84", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8886:3:84", + "nodeType": "YulIdentifier", + "src": "8886:3:84" + }, + "nativeSrc": "8886:17:84", + "nodeType": "YulFunctionCall", + "src": "8886:17:84" + }, + { + "name": "end", + "nativeSrc": "8905:3:84", + "nodeType": "YulIdentifier", + "src": "8905:3:84" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "8882:3:84", + "nodeType": "YulIdentifier", + "src": "8882:3:84" + }, + "nativeSrc": "8882:27:84", + "nodeType": "YulFunctionCall", + "src": "8882:27:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8875:6:84", + "nodeType": "YulIdentifier", + "src": "8875:6:84" + }, + "nativeSrc": "8875:35:84", + "nodeType": "YulFunctionCall", + "src": "8875:35:84" + }, + "nativeSrc": "8872:55:84", + "nodeType": "YulIf", + "src": "8872:55:84" + }, + { + "nativeSrc": "8936:23:84", + "nodeType": "YulVariableDeclaration", + "src": "8936:23:84", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "8952:6:84", + "nodeType": "YulIdentifier", + "src": "8952:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8946:5:84", + "nodeType": "YulIdentifier", + "src": "8946:5:84" + }, + "nativeSrc": "8946:13:84", + "nodeType": "YulFunctionCall", + "src": "8946:13:84" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "8940:2:84", + "nodeType": "YulTypedName", + "src": "8940:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "8968:28:84", + "nodeType": "YulVariableDeclaration", + "src": "8968:28:84", + "value": { + "kind": "number", + "nativeSrc": "8978:18:84", + "nodeType": "YulLiteral", + "src": "8978:18:84", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "8972:2:84", + "nodeType": "YulTypedName", + "src": "8972:2:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "9019:22:84", + "nodeType": "YulBlock", + "src": "9019:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "9021:16:84", + "nodeType": "YulIdentifier", + "src": "9021:16:84" + }, + "nativeSrc": "9021:18:84", + "nodeType": "YulFunctionCall", + "src": "9021:18:84" + }, + "nativeSrc": "9021:18:84", + "nodeType": "YulExpressionStatement", + "src": "9021:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "9011:2:84", + "nodeType": "YulIdentifier", + "src": "9011:2:84" + }, + { + "name": "_2", + "nativeSrc": "9015:2:84", + "nodeType": "YulIdentifier", + "src": "9015:2:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9008:2:84", + "nodeType": "YulIdentifier", + "src": "9008:2:84" + }, + "nativeSrc": "9008:10:84", + "nodeType": "YulFunctionCall", + "src": "9008:10:84" + }, + "nativeSrc": "9005:36:84", + "nodeType": "YulIf", + "src": "9005:36:84" + }, + { + "nativeSrc": "9050:17:84", + "nodeType": "YulVariableDeclaration", + "src": "9050:17:84", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9064:2:84", + "nodeType": "YulLiteral", + "src": "9064:2:84", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "9060:3:84", + "nodeType": "YulIdentifier", + "src": "9060:3:84" + }, + "nativeSrc": "9060:7:84", + "nodeType": "YulFunctionCall", + "src": "9060:7:84" + }, + "variables": [ + { + "name": "_3", + "nativeSrc": "9054:2:84", + "nodeType": "YulTypedName", + "src": "9054:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "9076:23:84", + "nodeType": "YulVariableDeclaration", + "src": "9076:23:84", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9096:2:84", + "nodeType": "YulLiteral", + "src": "9096:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9090:5:84", + "nodeType": "YulIdentifier", + "src": "9090:5:84" + }, + "nativeSrc": "9090:9:84", + "nodeType": "YulFunctionCall", + "src": "9090:9:84" + }, + "variables": [ + { + "name": "memPtr", + "nativeSrc": "9080:6:84", + "nodeType": "YulTypedName", + "src": "9080:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "9108:71:84", + "nodeType": "YulVariableDeclaration", + "src": "9108:71:84", + "value": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "9130:6:84", + "nodeType": "YulIdentifier", + "src": "9130:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_1", + "nativeSrc": "9154:2:84", + "nodeType": "YulIdentifier", + "src": "9154:2:84" + }, + { + "kind": "number", + "nativeSrc": "9158:4:84", + "nodeType": "YulLiteral", + "src": "9158:4:84", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9150:3:84", + "nodeType": "YulIdentifier", + "src": "9150:3:84" + }, + "nativeSrc": "9150:13:84", + "nodeType": "YulFunctionCall", + "src": "9150:13:84" + }, + { + "name": "_3", + "nativeSrc": "9165:2:84", + "nodeType": "YulIdentifier", + "src": "9165:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9146:3:84", + "nodeType": "YulIdentifier", + "src": "9146:3:84" + }, + "nativeSrc": "9146:22:84", + "nodeType": "YulFunctionCall", + "src": "9146:22:84" + }, + { + "kind": "number", + "nativeSrc": "9170:2:84", + "nodeType": "YulLiteral", + "src": "9170:2:84", + "type": "", + "value": "63" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9142:3:84", + "nodeType": "YulIdentifier", + "src": "9142:3:84" + }, + "nativeSrc": "9142:31:84", + "nodeType": "YulFunctionCall", + "src": "9142:31:84" + }, + { + "name": "_3", + "nativeSrc": "9175:2:84", + "nodeType": "YulIdentifier", + "src": "9175:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9138:3:84", + "nodeType": "YulIdentifier", + "src": "9138:3:84" + }, + "nativeSrc": "9138:40:84", + "nodeType": "YulFunctionCall", + "src": "9138:40:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9126:3:84", + "nodeType": "YulIdentifier", + "src": "9126:3:84" + }, + "nativeSrc": "9126:53:84", + "nodeType": "YulFunctionCall", + "src": "9126:53:84" + }, + "variables": [ + { + "name": "newFreePtr", + "nativeSrc": "9112:10:84", + "nodeType": "YulTypedName", + "src": "9112:10:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "9238:22:84", + "nodeType": "YulBlock", + "src": "9238:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "9240:16:84", + "nodeType": "YulIdentifier", + "src": "9240:16:84" + }, + "nativeSrc": "9240:18:84", + "nodeType": "YulFunctionCall", + "src": "9240:18:84" + }, + "nativeSrc": "9240:18:84", + "nodeType": "YulExpressionStatement", + "src": "9240:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "9197:10:84", + "nodeType": "YulIdentifier", + "src": "9197:10:84" + }, + { + "name": "_2", + "nativeSrc": "9209:2:84", + "nodeType": "YulIdentifier", + "src": "9209:2:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9194:2:84", + "nodeType": "YulIdentifier", + "src": "9194:2:84" + }, + "nativeSrc": "9194:18:84", + "nodeType": "YulFunctionCall", + "src": "9194:18:84" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nativeSrc": "9217:10:84", + "nodeType": "YulIdentifier", + "src": "9217:10:84" + }, + { + "name": "memPtr", + "nativeSrc": "9229:6:84", + "nodeType": "YulIdentifier", + "src": "9229:6:84" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "9214:2:84", + "nodeType": "YulIdentifier", + "src": "9214:2:84" + }, + "nativeSrc": "9214:22:84", + "nodeType": "YulFunctionCall", + "src": "9214:22:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9191:2:84", + "nodeType": "YulIdentifier", + "src": "9191:2:84" + }, + "nativeSrc": "9191:46:84", + "nodeType": "YulFunctionCall", + "src": "9191:46:84" + }, + "nativeSrc": "9188:72:84", + "nodeType": "YulIf", + "src": "9188:72:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9276:2:84", + "nodeType": "YulLiteral", + "src": "9276:2:84", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nativeSrc": "9280:10:84", + "nodeType": "YulIdentifier", + "src": "9280:10:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9269:6:84", + "nodeType": "YulIdentifier", + "src": "9269:6:84" + }, + "nativeSrc": "9269:22:84", + "nodeType": "YulFunctionCall", + "src": "9269:22:84" + }, + "nativeSrc": "9269:22:84", + "nodeType": "YulExpressionStatement", + "src": "9269:22:84" + }, + { + "expression": { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "9307:6:84", + "nodeType": "YulIdentifier", + "src": "9307:6:84" + }, + { + "name": "_1", + "nativeSrc": "9315:2:84", + "nodeType": "YulIdentifier", + "src": "9315:2:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9300:6:84", + "nodeType": "YulIdentifier", + "src": "9300:6:84" + }, + "nativeSrc": "9300:18:84", + "nodeType": "YulFunctionCall", + "src": "9300:18:84" + }, + "nativeSrc": "9300:18:84", + "nodeType": "YulExpressionStatement", + "src": "9300:18:84" + }, + { + "body": { + "nativeSrc": "9366:16:84", + "nodeType": "YulBlock", + "src": "9366:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9375:1:84", + "nodeType": "YulLiteral", + "src": "9375:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9378:1:84", + "nodeType": "YulLiteral", + "src": "9378:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9368:6:84", + "nodeType": "YulIdentifier", + "src": "9368:6:84" + }, + "nativeSrc": "9368:12:84", + "nodeType": "YulFunctionCall", + "src": "9368:12:84" + }, + "nativeSrc": "9368:12:84", + "nodeType": "YulExpressionStatement", + "src": "9368:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "9341:6:84", + "nodeType": "YulIdentifier", + "src": "9341:6:84" + }, + { + "name": "_1", + "nativeSrc": "9349:2:84", + "nodeType": "YulIdentifier", + "src": "9349:2:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9337:3:84", + "nodeType": "YulIdentifier", + "src": "9337:3:84" + }, + "nativeSrc": "9337:15:84", + "nodeType": "YulFunctionCall", + "src": "9337:15:84" + }, + { + "kind": "number", + "nativeSrc": "9354:4:84", + "nodeType": "YulLiteral", + "src": "9354:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9333:3:84", + "nodeType": "YulIdentifier", + "src": "9333:3:84" + }, + "nativeSrc": "9333:26:84", + "nodeType": "YulFunctionCall", + "src": "9333:26:84" + }, + { + "name": "end", + "nativeSrc": "9361:3:84", + "nodeType": "YulIdentifier", + "src": "9361:3:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9330:2:84", + "nodeType": "YulIdentifier", + "src": "9330:2:84" + }, + "nativeSrc": "9330:35:84", + "nodeType": "YulFunctionCall", + "src": "9330:35:84" + }, + "nativeSrc": "9327:55:84", + "nodeType": "YulIf", + "src": "9327:55:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nativeSrc": "9430:6:84", + "nodeType": "YulIdentifier", + "src": "9430:6:84" + }, + { + "kind": "number", + "nativeSrc": "9438:4:84", + "nodeType": "YulLiteral", + "src": "9438:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9426:3:84", + "nodeType": "YulIdentifier", + "src": "9426:3:84" + }, + "nativeSrc": "9426:17:84", + "nodeType": "YulFunctionCall", + "src": "9426:17:84" + }, + { + "arguments": [ + { + "name": "memPtr", + "nativeSrc": "9449:6:84", + "nodeType": "YulIdentifier", + "src": "9449:6:84" + }, + { + "kind": "number", + "nativeSrc": "9457:4:84", + "nodeType": "YulLiteral", + "src": "9457:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9445:3:84", + "nodeType": "YulIdentifier", + "src": "9445:3:84" + }, + "nativeSrc": "9445:17:84", + "nodeType": "YulFunctionCall", + "src": "9445:17:84" + }, + { + "name": "_1", + "nativeSrc": "9464:2:84", + "nodeType": "YulIdentifier", + "src": "9464:2:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "9391:34:84", + "nodeType": "YulIdentifier", + "src": "9391:34:84" + }, + "nativeSrc": "9391:76:84", + "nodeType": "YulFunctionCall", + "src": "9391:76:84" + }, + "nativeSrc": "9391:76:84", + "nodeType": "YulExpressionStatement", + "src": "9391:76:84" + }, + { + "nativeSrc": "9476:15:84", + "nodeType": "YulAssignment", + "src": "9476:15:84", + "value": { + "name": "memPtr", + "nativeSrc": "9485:6:84", + "nodeType": "YulIdentifier", + "src": "9485:6:84" + }, + "variableNames": [ + { + "name": "array", + "nativeSrc": "9476:5:84", + "nodeType": "YulIdentifier", + "src": "9476:5:84" + } + ] + } + ] + }, + "name": "abi_decode_bytes_fromMemory", + "nativeSrc": "8799:698:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "8836:6:84", + "nodeType": "YulTypedName", + "src": "8836:6:84", + "type": "" + }, + { + "name": "end", + "nativeSrc": "8844:3:84", + "nodeType": "YulTypedName", + "src": "8844:3:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nativeSrc": "8852:5:84", + "nodeType": "YulTypedName", + "src": "8852:5:84", + "type": "" + } + ], + "src": "8799:698:84" + }, + { + "body": { + "nativeSrc": "9610:928:84", + "nodeType": "YulBlock", + "src": "9610:928:84", + "statements": [ + { + "body": { + "nativeSrc": "9656:16:84", + "nodeType": "YulBlock", + "src": "9656:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9665:1:84", + "nodeType": "YulLiteral", + "src": "9665:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9668:1:84", + "nodeType": "YulLiteral", + "src": "9668:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9658:6:84", + "nodeType": "YulIdentifier", + "src": "9658:6:84" + }, + "nativeSrc": "9658:12:84", + "nodeType": "YulFunctionCall", + "src": "9658:12:84" + }, + "nativeSrc": "9658:12:84", + "nodeType": "YulExpressionStatement", + "src": "9658:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9631:7:84", + "nodeType": "YulIdentifier", + "src": "9631:7:84" + }, + { + "name": "headStart", + "nativeSrc": "9640:9:84", + "nodeType": "YulIdentifier", + "src": "9640:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9627:3:84", + "nodeType": "YulIdentifier", + "src": "9627:3:84" + }, + "nativeSrc": "9627:23:84", + "nodeType": "YulFunctionCall", + "src": "9627:23:84" + }, + { + "kind": "number", + "nativeSrc": "9652:2:84", + "nodeType": "YulLiteral", + "src": "9652:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9623:3:84", + "nodeType": "YulIdentifier", + "src": "9623:3:84" + }, + "nativeSrc": "9623:32:84", + "nodeType": "YulFunctionCall", + "src": "9623:32:84" + }, + "nativeSrc": "9620:52:84", + "nodeType": "YulIf", + "src": "9620:52:84" + }, + { + "nativeSrc": "9681:30:84", + "nodeType": "YulVariableDeclaration", + "src": "9681:30:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9701:9:84", + "nodeType": "YulIdentifier", + "src": "9701:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9695:5:84", + "nodeType": "YulIdentifier", + "src": "9695:5:84" + }, + "nativeSrc": "9695:16:84", + "nodeType": "YulFunctionCall", + "src": "9695:16:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "9685:6:84", + "nodeType": "YulTypedName", + "src": "9685:6:84", + "type": "" + } + ] + }, + { + "nativeSrc": "9720:28:84", + "nodeType": "YulVariableDeclaration", + "src": "9720:28:84", + "value": { + "kind": "number", + "nativeSrc": "9730:18:84", + "nodeType": "YulLiteral", + "src": "9730:18:84", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "9724:2:84", + "nodeType": "YulTypedName", + "src": "9724:2:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "9775:16:84", + "nodeType": "YulBlock", + "src": "9775:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9784:1:84", + "nodeType": "YulLiteral", + "src": "9784:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9787:1:84", + "nodeType": "YulLiteral", + "src": "9787:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9777:6:84", + "nodeType": "YulIdentifier", + "src": "9777:6:84" + }, + "nativeSrc": "9777:12:84", + "nodeType": "YulFunctionCall", + "src": "9777:12:84" + }, + "nativeSrc": "9777:12:84", + "nodeType": "YulExpressionStatement", + "src": "9777:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "9763:6:84", + "nodeType": "YulIdentifier", + "src": "9763:6:84" + }, + { + "name": "_1", + "nativeSrc": "9771:2:84", + "nodeType": "YulIdentifier", + "src": "9771:2:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9760:2:84", + "nodeType": "YulIdentifier", + "src": "9760:2:84" + }, + "nativeSrc": "9760:14:84", + "nodeType": "YulFunctionCall", + "src": "9760:14:84" + }, + "nativeSrc": "9757:34:84", + "nodeType": "YulIf", + "src": "9757:34:84" + }, + { + "nativeSrc": "9800:32:84", + "nodeType": "YulVariableDeclaration", + "src": "9800:32:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9814:9:84", + "nodeType": "YulIdentifier", + "src": "9814:9:84" + }, + { + "name": "offset", + "nativeSrc": "9825:6:84", + "nodeType": "YulIdentifier", + "src": "9825:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9810:3:84", + "nodeType": "YulIdentifier", + "src": "9810:3:84" + }, + "nativeSrc": "9810:22:84", + "nodeType": "YulFunctionCall", + "src": "9810:22:84" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "9804:2:84", + "nodeType": "YulTypedName", + "src": "9804:2:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "9872:16:84", + "nodeType": "YulBlock", + "src": "9872:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9881:1:84", + "nodeType": "YulLiteral", + "src": "9881:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9884:1:84", + "nodeType": "YulLiteral", + "src": "9884:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9874:6:84", + "nodeType": "YulIdentifier", + "src": "9874:6:84" + }, + "nativeSrc": "9874:12:84", + "nodeType": "YulFunctionCall", + "src": "9874:12:84" + }, + "nativeSrc": "9874:12:84", + "nodeType": "YulExpressionStatement", + "src": "9874:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9852:7:84", + "nodeType": "YulIdentifier", + "src": "9852:7:84" + }, + { + "name": "_2", + "nativeSrc": "9861:2:84", + "nodeType": "YulIdentifier", + "src": "9861:2:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9848:3:84", + "nodeType": "YulIdentifier", + "src": "9848:3:84" + }, + "nativeSrc": "9848:16:84", + "nodeType": "YulFunctionCall", + "src": "9848:16:84" + }, + { + "kind": "number", + "nativeSrc": "9866:4:84", + "nodeType": "YulLiteral", + "src": "9866:4:84", + "type": "", + "value": "0xa0" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9844:3:84", + "nodeType": "YulIdentifier", + "src": "9844:3:84" + }, + "nativeSrc": "9844:27:84", + "nodeType": "YulFunctionCall", + "src": "9844:27:84" + }, + "nativeSrc": "9841:47:84", + "nodeType": "YulIf", + "src": "9841:47:84" + }, + { + "nativeSrc": "9897:30:84", + "nodeType": "YulVariableDeclaration", + "src": "9897:30:84", + "value": { + "arguments": [], + "functionName": { + "name": "allocate_memory", + "nativeSrc": "9910:15:84", + "nodeType": "YulIdentifier", + "src": "9910:15:84" + }, + "nativeSrc": "9910:17:84", + "nodeType": "YulFunctionCall", + "src": "9910:17:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "9901:5:84", + "nodeType": "YulTypedName", + "src": "9901:5:84", + "type": "" + } + ] + }, + { + "nativeSrc": "9936:24:84", + "nodeType": "YulVariableDeclaration", + "src": "9936:24:84", + "value": { + "arguments": [ + { + "name": "_2", + "nativeSrc": "9957:2:84", + "nodeType": "YulIdentifier", + "src": "9957:2:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9951:5:84", + "nodeType": "YulIdentifier", + "src": "9951:5:84" + }, + "nativeSrc": "9951:9:84", + "nodeType": "YulFunctionCall", + "src": "9951:9:84" + }, + "variables": [ + { + "name": "value_1", + "nativeSrc": "9940:7:84", + "nodeType": "YulTypedName", + "src": "9940:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_1", + "nativeSrc": "9994:7:84", + "nodeType": "YulIdentifier", + "src": "9994:7:84" + } + ], + "functionName": { + "name": "validator_revert_address", + "nativeSrc": "9969:24:84", + "nodeType": "YulIdentifier", + "src": "9969:24:84" + }, + "nativeSrc": "9969:33:84", + "nodeType": "YulFunctionCall", + "src": "9969:33:84" + }, + "nativeSrc": "9969:33:84", + "nodeType": "YulExpressionStatement", + "src": "9969:33:84" + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "10018:5:84", + "nodeType": "YulIdentifier", + "src": "10018:5:84" + }, + { + "name": "value_1", + "nativeSrc": "10025:7:84", + "nodeType": "YulIdentifier", + "src": "10025:7:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10011:6:84", + "nodeType": "YulIdentifier", + "src": "10011:6:84" + }, + "nativeSrc": "10011:22:84", + "nodeType": "YulFunctionCall", + "src": "10011:22:84" + }, + "nativeSrc": "10011:22:84", + "nodeType": "YulExpressionStatement", + "src": "10011:22:84" + }, + { + "nativeSrc": "10042:33:84", + "nodeType": "YulVariableDeclaration", + "src": "10042:33:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "10067:2:84", + "nodeType": "YulIdentifier", + "src": "10067:2:84" + }, + { + "kind": "number", + "nativeSrc": "10071:2:84", + "nodeType": "YulLiteral", + "src": "10071:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10063:3:84", + "nodeType": "YulIdentifier", + "src": "10063:3:84" + }, + "nativeSrc": "10063:11:84", + "nodeType": "YulFunctionCall", + "src": "10063:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10057:5:84", + "nodeType": "YulIdentifier", + "src": "10057:5:84" + }, + "nativeSrc": "10057:18:84", + "nodeType": "YulFunctionCall", + "src": "10057:18:84" + }, + "variables": [ + { + "name": "value_2", + "nativeSrc": "10046:7:84", + "nodeType": "YulTypedName", + "src": "10046:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_2", + "nativeSrc": "10108:7:84", + "nodeType": "YulIdentifier", + "src": "10108:7:84" + } + ], + "functionName": { + "name": "validator_revert_uint64", + "nativeSrc": "10084:23:84", + "nodeType": "YulIdentifier", + "src": "10084:23:84" + }, + "nativeSrc": "10084:32:84", + "nodeType": "YulFunctionCall", + "src": "10084:32:84" + }, + "nativeSrc": "10084:32:84", + "nodeType": "YulExpressionStatement", + "src": "10084:32:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "10136:5:84", + "nodeType": "YulIdentifier", + "src": "10136:5:84" + }, + { + "kind": "number", + "nativeSrc": "10143:2:84", + "nodeType": "YulLiteral", + "src": "10143:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10132:3:84", + "nodeType": "YulIdentifier", + "src": "10132:3:84" + }, + "nativeSrc": "10132:14:84", + "nodeType": "YulFunctionCall", + "src": "10132:14:84" + }, + { + "name": "value_2", + "nativeSrc": "10148:7:84", + "nodeType": "YulIdentifier", + "src": "10148:7:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10125:6:84", + "nodeType": "YulIdentifier", + "src": "10125:6:84" + }, + "nativeSrc": "10125:31:84", + "nodeType": "YulFunctionCall", + "src": "10125:31:84" + }, + "nativeSrc": "10125:31:84", + "nodeType": "YulExpressionStatement", + "src": "10125:31:84" + }, + { + "nativeSrc": "10165:33:84", + "nodeType": "YulVariableDeclaration", + "src": "10165:33:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "10190:2:84", + "nodeType": "YulIdentifier", + "src": "10190:2:84" + }, + { + "kind": "number", + "nativeSrc": "10194:2:84", + "nodeType": "YulLiteral", + "src": "10194:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10186:3:84", + "nodeType": "YulIdentifier", + "src": "10186:3:84" + }, + "nativeSrc": "10186:11:84", + "nodeType": "YulFunctionCall", + "src": "10186:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10180:5:84", + "nodeType": "YulIdentifier", + "src": "10180:5:84" + }, + "nativeSrc": "10180:18:84", + "nodeType": "YulFunctionCall", + "src": "10180:18:84" + }, + "variables": [ + { + "name": "value_3", + "nativeSrc": "10169:7:84", + "nodeType": "YulTypedName", + "src": "10169:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_3", + "nativeSrc": "10231:7:84", + "nodeType": "YulIdentifier", + "src": "10231:7:84" + } + ], + "functionName": { + "name": "validator_revert_uint32", + "nativeSrc": "10207:23:84", + "nodeType": "YulIdentifier", + "src": "10207:23:84" + }, + "nativeSrc": "10207:32:84", + "nodeType": "YulFunctionCall", + "src": "10207:32:84" + }, + "nativeSrc": "10207:32:84", + "nodeType": "YulExpressionStatement", + "src": "10207:32:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "10259:5:84", + "nodeType": "YulIdentifier", + "src": "10259:5:84" + }, + { + "kind": "number", + "nativeSrc": "10266:2:84", + "nodeType": "YulLiteral", + "src": "10266:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10255:3:84", + "nodeType": "YulIdentifier", + "src": "10255:3:84" + }, + "nativeSrc": "10255:14:84", + "nodeType": "YulFunctionCall", + "src": "10255:14:84" + }, + { + "name": "value_3", + "nativeSrc": "10271:7:84", + "nodeType": "YulIdentifier", + "src": "10271:7:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10248:6:84", + "nodeType": "YulIdentifier", + "src": "10248:6:84" + }, + "nativeSrc": "10248:31:84", + "nodeType": "YulFunctionCall", + "src": "10248:31:84" + }, + "nativeSrc": "10248:31:84", + "nodeType": "YulExpressionStatement", + "src": "10248:31:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "10299:5:84", + "nodeType": "YulIdentifier", + "src": "10299:5:84" + }, + { + "kind": "number", + "nativeSrc": "10306:2:84", + "nodeType": "YulLiteral", + "src": "10306:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10295:3:84", + "nodeType": "YulIdentifier", + "src": "10295:3:84" + }, + "nativeSrc": "10295:14:84", + "nodeType": "YulFunctionCall", + "src": "10295:14:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "10321:2:84", + "nodeType": "YulIdentifier", + "src": "10321:2:84" + }, + { + "kind": "number", + "nativeSrc": "10325:2:84", + "nodeType": "YulLiteral", + "src": "10325:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10317:3:84", + "nodeType": "YulIdentifier", + "src": "10317:3:84" + }, + "nativeSrc": "10317:11:84", + "nodeType": "YulFunctionCall", + "src": "10317:11:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10311:5:84", + "nodeType": "YulIdentifier", + "src": "10311:5:84" + }, + "nativeSrc": "10311:18:84", + "nodeType": "YulFunctionCall", + "src": "10311:18:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10288:6:84", + "nodeType": "YulIdentifier", + "src": "10288:6:84" + }, + "nativeSrc": "10288:42:84", + "nodeType": "YulFunctionCall", + "src": "10288:42:84" + }, + "nativeSrc": "10288:42:84", + "nodeType": "YulExpressionStatement", + "src": "10288:42:84" + }, + { + "nativeSrc": "10339:35:84", + "nodeType": "YulVariableDeclaration", + "src": "10339:35:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "10365:2:84", + "nodeType": "YulIdentifier", + "src": "10365:2:84" + }, + { + "kind": "number", + "nativeSrc": "10369:3:84", + "nodeType": "YulLiteral", + "src": "10369:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10361:3:84", + "nodeType": "YulIdentifier", + "src": "10361:3:84" + }, + "nativeSrc": "10361:12:84", + "nodeType": "YulFunctionCall", + "src": "10361:12:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10355:5:84", + "nodeType": "YulIdentifier", + "src": "10355:5:84" + }, + "nativeSrc": "10355:19:84", + "nodeType": "YulFunctionCall", + "src": "10355:19:84" + }, + "variables": [ + { + "name": "offset_1", + "nativeSrc": "10343:8:84", + "nodeType": "YulTypedName", + "src": "10343:8:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "10403:16:84", + "nodeType": "YulBlock", + "src": "10403:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10412:1:84", + "nodeType": "YulLiteral", + "src": "10412:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "10415:1:84", + "nodeType": "YulLiteral", + "src": "10415:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "10405:6:84", + "nodeType": "YulIdentifier", + "src": "10405:6:84" + }, + "nativeSrc": "10405:12:84", + "nodeType": "YulFunctionCall", + "src": "10405:12:84" + }, + "nativeSrc": "10405:12:84", + "nodeType": "YulExpressionStatement", + "src": "10405:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset_1", + "nativeSrc": "10389:8:84", + "nodeType": "YulIdentifier", + "src": "10389:8:84" + }, + { + "name": "_1", + "nativeSrc": "10399:2:84", + "nodeType": "YulIdentifier", + "src": "10399:2:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "10386:2:84", + "nodeType": "YulIdentifier", + "src": "10386:2:84" + }, + "nativeSrc": "10386:16:84", + "nodeType": "YulFunctionCall", + "src": "10386:16:84" + }, + "nativeSrc": "10383:36:84", + "nodeType": "YulIf", + "src": "10383:36:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "10439:5:84", + "nodeType": "YulIdentifier", + "src": "10439:5:84" + }, + { + "kind": "number", + "nativeSrc": "10446:3:84", + "nodeType": "YulLiteral", + "src": "10446:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10435:3:84", + "nodeType": "YulIdentifier", + "src": "10435:3:84" + }, + "nativeSrc": "10435:15:84", + "nodeType": "YulFunctionCall", + "src": "10435:15:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "10484:2:84", + "nodeType": "YulIdentifier", + "src": "10484:2:84" + }, + { + "name": "offset_1", + "nativeSrc": "10488:8:84", + "nodeType": "YulIdentifier", + "src": "10488:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10480:3:84", + "nodeType": "YulIdentifier", + "src": "10480:3:84" + }, + "nativeSrc": "10480:17:84", + "nodeType": "YulFunctionCall", + "src": "10480:17:84" + }, + { + "name": "dataEnd", + "nativeSrc": "10499:7:84", + "nodeType": "YulIdentifier", + "src": "10499:7:84" + } + ], + "functionName": { + "name": "abi_decode_bytes_fromMemory", + "nativeSrc": "10452:27:84", + "nodeType": "YulIdentifier", + "src": "10452:27:84" + }, + "nativeSrc": "10452:55:84", + "nodeType": "YulFunctionCall", + "src": "10452:55:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10428:6:84", + "nodeType": "YulIdentifier", + "src": "10428:6:84" + }, + "nativeSrc": "10428:80:84", + "nodeType": "YulFunctionCall", + "src": "10428:80:84" + }, + "nativeSrc": "10428:80:84", + "nodeType": "YulExpressionStatement", + "src": "10428:80:84" + }, + { + "nativeSrc": "10517:15:84", + "nodeType": "YulAssignment", + "src": "10517:15:84", + "value": { + "name": "value", + "nativeSrc": "10527:5:84", + "nodeType": "YulIdentifier", + "src": "10527:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "10517:6:84", + "nodeType": "YulIdentifier", + "src": "10517:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_Response_$23488_memory_ptr_fromMemory", + "nativeSrc": "9502:1036:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9576:9:84", + "nodeType": "YulTypedName", + "src": "9576:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "9587:7:84", + "nodeType": "YulTypedName", + "src": "9587:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "9599:6:84", + "nodeType": "YulTypedName", + "src": "9599:6:84", + "type": "" + } + ], + "src": "9502:1036:84" + }, + { + "body": { + "nativeSrc": "10672:145:84", + "nodeType": "YulBlock", + "src": "10672:145:84", + "statements": [ + { + "nativeSrc": "10682:26:84", + "nodeType": "YulAssignment", + "src": "10682:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10694:9:84", + "nodeType": "YulIdentifier", + "src": "10694:9:84" + }, + { + "kind": "number", + "nativeSrc": "10705:2:84", + "nodeType": "YulLiteral", + "src": "10705:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10690:3:84", + "nodeType": "YulIdentifier", + "src": "10690:3:84" + }, + "nativeSrc": "10690:18:84", + "nodeType": "YulFunctionCall", + "src": "10690:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10682:4:84", + "nodeType": "YulIdentifier", + "src": "10682:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10724:9:84", + "nodeType": "YulIdentifier", + "src": "10724:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "10739:6:84", + "nodeType": "YulIdentifier", + "src": "10739:6:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10755:3:84", + "nodeType": "YulLiteral", + "src": "10755:3:84", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "10760:1:84", + "nodeType": "YulLiteral", + "src": "10760:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10751:3:84", + "nodeType": "YulIdentifier", + "src": "10751:3:84" + }, + "nativeSrc": "10751:11:84", + "nodeType": "YulFunctionCall", + "src": "10751:11:84" + }, + { + "kind": "number", + "nativeSrc": "10764:1:84", + "nodeType": "YulLiteral", + "src": "10764:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "10747:3:84", + "nodeType": "YulIdentifier", + "src": "10747:3:84" + }, + "nativeSrc": "10747:19:84", + "nodeType": "YulFunctionCall", + "src": "10747:19:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10735:3:84", + "nodeType": "YulIdentifier", + "src": "10735:3:84" + }, + "nativeSrc": "10735:32:84", + "nodeType": "YulFunctionCall", + "src": "10735:32:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10717:6:84", + "nodeType": "YulIdentifier", + "src": "10717:6:84" + }, + "nativeSrc": "10717:51:84", + "nodeType": "YulFunctionCall", + "src": "10717:51:84" + }, + "nativeSrc": "10717:51:84", + "nodeType": "YulExpressionStatement", + "src": "10717:51:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10788:9:84", + "nodeType": "YulIdentifier", + "src": "10788:9:84" + }, + { + "kind": "number", + "nativeSrc": "10799:2:84", + "nodeType": "YulLiteral", + "src": "10799:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10784:3:84", + "nodeType": "YulIdentifier", + "src": "10784:3:84" + }, + "nativeSrc": "10784:18:84", + "nodeType": "YulFunctionCall", + "src": "10784:18:84" + }, + { + "name": "value1", + "nativeSrc": "10804:6:84", + "nodeType": "YulIdentifier", + "src": "10804:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10777:6:84", + "nodeType": "YulIdentifier", + "src": "10777:6:84" + }, + "nativeSrc": "10777:34:84", + "nodeType": "YulFunctionCall", + "src": "10777:34:84" + }, + "nativeSrc": "10777:34:84", + "nodeType": "YulExpressionStatement", + "src": "10777:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_bytes32__to_t_address_t_bytes32__fromStack_reversed", + "nativeSrc": "10543:274:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10633:9:84", + "nodeType": "YulTypedName", + "src": "10633:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "10644:6:84", + "nodeType": "YulTypedName", + "src": "10644:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "10652:6:84", + "nodeType": "YulTypedName", + "src": "10652:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10663:4:84", + "nodeType": "YulTypedName", + "src": "10663:4:84", + "type": "" + } + ], + "src": "10543:274:84" + }, + { + "body": { + "nativeSrc": "10882:162:84", + "nodeType": "YulBlock", + "src": "10882:162:84", + "statements": [ + { + "nativeSrc": "10892:29:84", + "nodeType": "YulVariableDeclaration", + "src": "10892:29:84", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "10915:5:84", + "nodeType": "YulIdentifier", + "src": "10915:5:84" + } + ], + "functionName": { + "name": "sload", + "nativeSrc": "10909:5:84", + "nodeType": "YulIdentifier", + "src": "10909:5:84" + }, + "nativeSrc": "10909:12:84", + "nodeType": "YulFunctionCall", + "src": "10909:12:84" + }, + "variables": [ + { + "name": "slotValue", + "nativeSrc": "10896:9:84", + "nodeType": "YulTypedName", + "src": "10896:9:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "10937:3:84", + "nodeType": "YulIdentifier", + "src": "10937:3:84" + }, + { + "arguments": [ + { + "name": "slotValue", + "nativeSrc": "10946:9:84", + "nodeType": "YulIdentifier", + "src": "10946:9:84" + }, + { + "kind": "number", + "nativeSrc": "10957:4:84", + "nodeType": "YulLiteral", + "src": "10957:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10942:3:84", + "nodeType": "YulIdentifier", + "src": "10942:3:84" + }, + "nativeSrc": "10942:20:84", + "nodeType": "YulFunctionCall", + "src": "10942:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10930:6:84", + "nodeType": "YulIdentifier", + "src": "10930:6:84" + }, + "nativeSrc": "10930:33:84", + "nodeType": "YulFunctionCall", + "src": "10930:33:84" + }, + "nativeSrc": "10930:33:84", + "nodeType": "YulExpressionStatement", + "src": "10930:33:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "10983:3:84", + "nodeType": "YulIdentifier", + "src": "10983:3:84" + }, + { + "kind": "number", + "nativeSrc": "10988:4:84", + "nodeType": "YulLiteral", + "src": "10988:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10979:3:84", + "nodeType": "YulIdentifier", + "src": "10979:3:84" + }, + "nativeSrc": "10979:14:84", + "nodeType": "YulFunctionCall", + "src": "10979:14:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11003:1:84", + "nodeType": "YulLiteral", + "src": "11003:1:84", + "type": "", + "value": "8" + }, + { + "name": "slotValue", + "nativeSrc": "11006:9:84", + "nodeType": "YulIdentifier", + "src": "11006:9:84" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10999:3:84", + "nodeType": "YulIdentifier", + "src": "10999:3:84" + }, + "nativeSrc": "10999:17:84", + "nodeType": "YulFunctionCall", + "src": "10999:17:84" + }, + { + "kind": "number", + "nativeSrc": "11018:18:84", + "nodeType": "YulLiteral", + "src": "11018:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10995:3:84", + "nodeType": "YulIdentifier", + "src": "10995:3:84" + }, + "nativeSrc": "10995:42:84", + "nodeType": "YulFunctionCall", + "src": "10995:42:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10972:6:84", + "nodeType": "YulIdentifier", + "src": "10972:6:84" + }, + "nativeSrc": "10972:66:84", + "nodeType": "YulFunctionCall", + "src": "10972:66:84" + }, + "nativeSrc": "10972:66:84", + "nodeType": "YulExpressionStatement", + "src": "10972:66:84" + } + ] + }, + "name": "abi_encode_struct_RadonSLA_storage", + "nativeSrc": "10822:222:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "10866:5:84", + "nodeType": "YulTypedName", + "src": "10866:5:84", + "type": "" + }, + { + "name": "pos", + "nativeSrc": "10873:3:84", + "nodeType": "YulTypedName", + "src": "10873:3:84", + "type": "" + } + ], + "src": "10822:222:84" + }, + { + "body": { + "nativeSrc": "11229:147:84", + "nodeType": "YulBlock", + "src": "11229:147:84", + "statements": [ + { + "nativeSrc": "11239:26:84", + "nodeType": "YulAssignment", + "src": "11239:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11251:9:84", + "nodeType": "YulIdentifier", + "src": "11251:9:84" + }, + { + "kind": "number", + "nativeSrc": "11262:2:84", + "nodeType": "YulLiteral", + "src": "11262:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11247:3:84", + "nodeType": "YulIdentifier", + "src": "11247:3:84" + }, + "nativeSrc": "11247:18:84", + "nodeType": "YulFunctionCall", + "src": "11247:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11239:4:84", + "nodeType": "YulIdentifier", + "src": "11239:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11281:9:84", + "nodeType": "YulIdentifier", + "src": "11281:9:84" + }, + { + "name": "value0", + "nativeSrc": "11292:6:84", + "nodeType": "YulIdentifier", + "src": "11292:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11274:6:84", + "nodeType": "YulIdentifier", + "src": "11274:6:84" + }, + "nativeSrc": "11274:25:84", + "nodeType": "YulFunctionCall", + "src": "11274:25:84" + }, + "nativeSrc": "11274:25:84", + "nodeType": "YulExpressionStatement", + "src": "11274:25:84" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "11343:6:84", + "nodeType": "YulIdentifier", + "src": "11343:6:84" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11355:9:84", + "nodeType": "YulIdentifier", + "src": "11355:9:84" + }, + { + "kind": "number", + "nativeSrc": "11366:2:84", + "nodeType": "YulLiteral", + "src": "11366:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11351:3:84", + "nodeType": "YulIdentifier", + "src": "11351:3:84" + }, + "nativeSrc": "11351:18:84", + "nodeType": "YulFunctionCall", + "src": "11351:18:84" + } + ], + "functionName": { + "name": "abi_encode_struct_RadonSLA_storage", + "nativeSrc": "11308:34:84", + "nodeType": "YulIdentifier", + "src": "11308:34:84" + }, + "nativeSrc": "11308:62:84", + "nodeType": "YulFunctionCall", + "src": "11308:62:84" + }, + "nativeSrc": "11308:62:84", + "nodeType": "YulExpressionStatement", + "src": "11308:62:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_struct$_RadonSLA_$23503_storage__to_t_bytes32_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed", + "nativeSrc": "11049:327:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11190:9:84", + "nodeType": "YulTypedName", + "src": "11190:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "11201:6:84", + "nodeType": "YulTypedName", + "src": "11201:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "11209:6:84", + "nodeType": "YulTypedName", + "src": "11209:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "11220:4:84", + "nodeType": "YulTypedName", + "src": "11220:4:84", + "type": "" + } + ], + "src": "11049:327:84" + }, + { + "body": { + "nativeSrc": "11462:103:84", + "nodeType": "YulBlock", + "src": "11462:103:84", + "statements": [ + { + "body": { + "nativeSrc": "11508:16:84", + "nodeType": "YulBlock", + "src": "11508:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11517:1:84", + "nodeType": "YulLiteral", + "src": "11517:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "11520:1:84", + "nodeType": "YulLiteral", + "src": "11520:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11510:6:84", + "nodeType": "YulIdentifier", + "src": "11510:6:84" + }, + "nativeSrc": "11510:12:84", + "nodeType": "YulFunctionCall", + "src": "11510:12:84" + }, + "nativeSrc": "11510:12:84", + "nodeType": "YulExpressionStatement", + "src": "11510:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "11483:7:84", + "nodeType": "YulIdentifier", + "src": "11483:7:84" + }, + { + "name": "headStart", + "nativeSrc": "11492:9:84", + "nodeType": "YulIdentifier", + "src": "11492:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "11479:3:84", + "nodeType": "YulIdentifier", + "src": "11479:3:84" + }, + "nativeSrc": "11479:23:84", + "nodeType": "YulFunctionCall", + "src": "11479:23:84" + }, + { + "kind": "number", + "nativeSrc": "11504:2:84", + "nodeType": "YulLiteral", + "src": "11504:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "11475:3:84", + "nodeType": "YulIdentifier", + "src": "11475:3:84" + }, + "nativeSrc": "11475:32:84", + "nodeType": "YulFunctionCall", + "src": "11475:32:84" + }, + "nativeSrc": "11472:52:84", + "nodeType": "YulIf", + "src": "11472:52:84" + }, + { + "nativeSrc": "11533:26:84", + "nodeType": "YulAssignment", + "src": "11533:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11549:9:84", + "nodeType": "YulIdentifier", + "src": "11549:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "11543:5:84", + "nodeType": "YulIdentifier", + "src": "11543:5:84" + }, + "nativeSrc": "11543:16:84", + "nodeType": "YulFunctionCall", + "src": "11543:16:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "11533:6:84", + "nodeType": "YulIdentifier", + "src": "11533:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nativeSrc": "11381:184:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11428:9:84", + "nodeType": "YulTypedName", + "src": "11428:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "11439:7:84", + "nodeType": "YulTypedName", + "src": "11439:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "11451:6:84", + "nodeType": "YulTypedName", + "src": "11451:6:84", + "type": "" + } + ], + "src": "11381:184:84" + }, + { + "body": { + "nativeSrc": "11834:278:84", + "nodeType": "YulBlock", + "src": "11834:278:84", + "statements": [ + { + "nativeSrc": "11844:27:84", + "nodeType": "YulAssignment", + "src": "11844:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11856:9:84", + "nodeType": "YulIdentifier", + "src": "11856:9:84" + }, + { + "kind": "number", + "nativeSrc": "11867:3:84", + "nodeType": "YulLiteral", + "src": "11867:3:84", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11852:3:84", + "nodeType": "YulIdentifier", + "src": "11852:3:84" + }, + "nativeSrc": "11852:19:84", + "nodeType": "YulFunctionCall", + "src": "11852:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11844:4:84", + "nodeType": "YulIdentifier", + "src": "11844:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11887:9:84", + "nodeType": "YulIdentifier", + "src": "11887:9:84" + }, + { + "name": "value0", + "nativeSrc": "11898:6:84", + "nodeType": "YulIdentifier", + "src": "11898:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11880:6:84", + "nodeType": "YulIdentifier", + "src": "11880:6:84" + }, + "nativeSrc": "11880:25:84", + "nodeType": "YulFunctionCall", + "src": "11880:25:84" + }, + "nativeSrc": "11880:25:84", + "nodeType": "YulExpressionStatement", + "src": "11880:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11925:9:84", + "nodeType": "YulIdentifier", + "src": "11925:9:84" + }, + { + "kind": "number", + "nativeSrc": "11936:2:84", + "nodeType": "YulLiteral", + "src": "11936:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11921:3:84", + "nodeType": "YulIdentifier", + "src": "11921:3:84" + }, + "nativeSrc": "11921:18:84", + "nodeType": "YulFunctionCall", + "src": "11921:18:84" + }, + { + "name": "value1", + "nativeSrc": "11941:6:84", + "nodeType": "YulIdentifier", + "src": "11941:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11914:6:84", + "nodeType": "YulIdentifier", + "src": "11914:6:84" + }, + "nativeSrc": "11914:34:84", + "nodeType": "YulFunctionCall", + "src": "11914:34:84" + }, + "nativeSrc": "11914:34:84", + "nodeType": "YulExpressionStatement", + "src": "11914:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11968:9:84", + "nodeType": "YulIdentifier", + "src": "11968:9:84" + }, + { + "kind": "number", + "nativeSrc": "11979:2:84", + "nodeType": "YulLiteral", + "src": "11979:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11964:3:84", + "nodeType": "YulIdentifier", + "src": "11964:3:84" + }, + "nativeSrc": "11964:18:84", + "nodeType": "YulFunctionCall", + "src": "11964:18:84" + }, + { + "name": "value2", + "nativeSrc": "11984:6:84", + "nodeType": "YulIdentifier", + "src": "11984:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11957:6:84", + "nodeType": "YulIdentifier", + "src": "11957:6:84" + }, + "nativeSrc": "11957:34:84", + "nodeType": "YulFunctionCall", + "src": "11957:34:84" + }, + "nativeSrc": "11957:34:84", + "nodeType": "YulExpressionStatement", + "src": "11957:34:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12011:9:84", + "nodeType": "YulIdentifier", + "src": "12011:9:84" + }, + { + "kind": "number", + "nativeSrc": "12022:2:84", + "nodeType": "YulLiteral", + "src": "12022:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12007:3:84", + "nodeType": "YulIdentifier", + "src": "12007:3:84" + }, + "nativeSrc": "12007:18:84", + "nodeType": "YulFunctionCall", + "src": "12007:18:84" + }, + { + "name": "value3", + "nativeSrc": "12027:6:84", + "nodeType": "YulIdentifier", + "src": "12027:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12000:6:84", + "nodeType": "YulIdentifier", + "src": "12000:6:84" + }, + "nativeSrc": "12000:34:84", + "nodeType": "YulFunctionCall", + "src": "12000:34:84" + }, + "nativeSrc": "12000:34:84", + "nodeType": "YulExpressionStatement", + "src": "12000:34:84" + }, + { + "expression": { + "arguments": [ + { + "name": "value4", + "nativeSrc": "12078:6:84", + "nodeType": "YulIdentifier", + "src": "12078:6:84" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12090:9:84", + "nodeType": "YulIdentifier", + "src": "12090:9:84" + }, + { + "kind": "number", + "nativeSrc": "12101:3:84", + "nodeType": "YulLiteral", + "src": "12101:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12086:3:84", + "nodeType": "YulIdentifier", + "src": "12086:3:84" + }, + "nativeSrc": "12086:19:84", + "nodeType": "YulFunctionCall", + "src": "12086:19:84" + } + ], + "functionName": { + "name": "abi_encode_struct_RadonSLA_storage", + "nativeSrc": "12043:34:84", + "nodeType": "YulIdentifier", + "src": "12043:34:84" + }, + "nativeSrc": "12043:63:84", + "nodeType": "YulFunctionCall", + "src": "12043:63:84" + }, + "nativeSrc": "12043:63:84", + "nodeType": "YulExpressionStatement", + "src": "12043:63:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256_t_struct$_RadonSLA_$23503_storage__to_t_uint256_t_uint256_t_uint256_t_uint256_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed", + "nativeSrc": "11570:542:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11771:9:84", + "nodeType": "YulTypedName", + "src": "11771:9:84", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "11782:6:84", + "nodeType": "YulTypedName", + "src": "11782:6:84", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "11790:6:84", + "nodeType": "YulTypedName", + "src": "11790:6:84", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "11798:6:84", + "nodeType": "YulTypedName", + "src": "11798:6:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "11806:6:84", + "nodeType": "YulTypedName", + "src": "11806:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "11814:6:84", + "nodeType": "YulTypedName", + "src": "11814:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "11825:4:84", + "nodeType": "YulTypedName", + "src": "11825:4:84", + "type": "" + } + ], + "src": "11570:542:84" + }, + { + "body": { + "nativeSrc": "12166:79:84", + "nodeType": "YulBlock", + "src": "12166:79:84", + "statements": [ + { + "nativeSrc": "12176:17:84", + "nodeType": "YulAssignment", + "src": "12176:17:84", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "12188:1:84", + "nodeType": "YulIdentifier", + "src": "12188:1:84" + }, + { + "name": "y", + "nativeSrc": "12191:1:84", + "nodeType": "YulIdentifier", + "src": "12191:1:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "12184:3:84", + "nodeType": "YulIdentifier", + "src": "12184:3:84" + }, + "nativeSrc": "12184:9:84", + "nodeType": "YulFunctionCall", + "src": "12184:9:84" + }, + "variableNames": [ + { + "name": "diff", + "nativeSrc": "12176:4:84", + "nodeType": "YulIdentifier", + "src": "12176:4:84" + } + ] + }, + { + "body": { + "nativeSrc": "12217:22:84", + "nodeType": "YulBlock", + "src": "12217:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "12219:16:84", + "nodeType": "YulIdentifier", + "src": "12219:16:84" + }, + "nativeSrc": "12219:18:84", + "nodeType": "YulFunctionCall", + "src": "12219:18:84" + }, + "nativeSrc": "12219:18:84", + "nodeType": "YulExpressionStatement", + "src": "12219:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "diff", + "nativeSrc": "12208:4:84", + "nodeType": "YulIdentifier", + "src": "12208:4:84" + }, + { + "name": "x", + "nativeSrc": "12214:1:84", + "nodeType": "YulIdentifier", + "src": "12214:1:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "12205:2:84", + "nodeType": "YulIdentifier", + "src": "12205:2:84" + }, + "nativeSrc": "12205:11:84", + "nodeType": "YulFunctionCall", + "src": "12205:11:84" + }, + "nativeSrc": "12202:37:84", + "nodeType": "YulIf", + "src": "12202:37:84" + } + ] + }, + "name": "checked_sub_t_uint256", + "nativeSrc": "12117:128:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "12148:1:84", + "nodeType": "YulTypedName", + "src": "12148:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "12151:1:84", + "nodeType": "YulTypedName", + "src": "12151:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "diff", + "nativeSrc": "12157:4:84", + "nodeType": "YulTypedName", + "src": "12157:4:84", + "type": "" + } + ], + "src": "12117:128:84" + }, + { + "body": { + "nativeSrc": "12379:119:84", + "nodeType": "YulBlock", + "src": "12379:119:84", + "statements": [ + { + "nativeSrc": "12389:26:84", + "nodeType": "YulAssignment", + "src": "12389:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12401:9:84", + "nodeType": "YulIdentifier", + "src": "12401:9:84" + }, + { + "kind": "number", + "nativeSrc": "12412:2:84", + "nodeType": "YulLiteral", + "src": "12412:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12397:3:84", + "nodeType": "YulIdentifier", + "src": "12397:3:84" + }, + "nativeSrc": "12397:18:84", + "nodeType": "YulFunctionCall", + "src": "12397:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "12389:4:84", + "nodeType": "YulIdentifier", + "src": "12389:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12431:9:84", + "nodeType": "YulIdentifier", + "src": "12431:9:84" + }, + { + "name": "value0", + "nativeSrc": "12442:6:84", + "nodeType": "YulIdentifier", + "src": "12442:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12424:6:84", + "nodeType": "YulIdentifier", + "src": "12424:6:84" + }, + "nativeSrc": "12424:25:84", + "nodeType": "YulFunctionCall", + "src": "12424:25:84" + }, + "nativeSrc": "12424:25:84", + "nodeType": "YulExpressionStatement", + "src": "12424:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12469:9:84", + "nodeType": "YulIdentifier", + "src": "12469:9:84" + }, + { + "kind": "number", + "nativeSrc": "12480:2:84", + "nodeType": "YulLiteral", + "src": "12480:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12465:3:84", + "nodeType": "YulIdentifier", + "src": "12465:3:84" + }, + "nativeSrc": "12465:18:84", + "nodeType": "YulFunctionCall", + "src": "12465:18:84" + }, + { + "name": "value1", + "nativeSrc": "12485:6:84", + "nodeType": "YulIdentifier", + "src": "12485:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12458:6:84", + "nodeType": "YulIdentifier", + "src": "12458:6:84" + }, + "nativeSrc": "12458:34:84", + "nodeType": "YulFunctionCall", + "src": "12458:34:84" + }, + "nativeSrc": "12458:34:84", + "nodeType": "YulExpressionStatement", + "src": "12458:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_bytes32__to_t_uint256_t_bytes32__fromStack_reversed", + "nativeSrc": "12250:248:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "12340:9:84", + "nodeType": "YulTypedName", + "src": "12340:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "12351:6:84", + "nodeType": "YulTypedName", + "src": "12351:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "12359:6:84", + "nodeType": "YulTypedName", + "src": "12359:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "12370:4:84", + "nodeType": "YulTypedName", + "src": "12370:4:84", + "type": "" + } + ], + "src": "12250:248:84" + }, + { + "body": { + "nativeSrc": "12630:132:84", + "nodeType": "YulBlock", + "src": "12630:132:84", + "statements": [ + { + "nativeSrc": "12640:26:84", + "nodeType": "YulAssignment", + "src": "12640:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12652:9:84", + "nodeType": "YulIdentifier", + "src": "12652:9:84" + }, + { + "kind": "number", + "nativeSrc": "12663:2:84", + "nodeType": "YulLiteral", + "src": "12663:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12648:3:84", + "nodeType": "YulIdentifier", + "src": "12648:3:84" + }, + "nativeSrc": "12648:18:84", + "nodeType": "YulFunctionCall", + "src": "12648:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "12640:4:84", + "nodeType": "YulIdentifier", + "src": "12640:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12682:9:84", + "nodeType": "YulIdentifier", + "src": "12682:9:84" + }, + { + "name": "value0", + "nativeSrc": "12693:6:84", + "nodeType": "YulIdentifier", + "src": "12693:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12675:6:84", + "nodeType": "YulIdentifier", + "src": "12675:6:84" + }, + "nativeSrc": "12675:25:84", + "nodeType": "YulFunctionCall", + "src": "12675:25:84" + }, + "nativeSrc": "12675:25:84", + "nodeType": "YulExpressionStatement", + "src": "12675:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "12720:9:84", + "nodeType": "YulIdentifier", + "src": "12720:9:84" + }, + { + "kind": "number", + "nativeSrc": "12731:2:84", + "nodeType": "YulLiteral", + "src": "12731:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12716:3:84", + "nodeType": "YulIdentifier", + "src": "12716:3:84" + }, + "nativeSrc": "12716:18:84", + "nodeType": "YulFunctionCall", + "src": "12716:18:84" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "12740:6:84", + "nodeType": "YulIdentifier", + "src": "12740:6:84" + }, + { + "kind": "number", + "nativeSrc": "12748:6:84", + "nodeType": "YulLiteral", + "src": "12748:6:84", + "type": "", + "value": "0xffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12736:3:84", + "nodeType": "YulIdentifier", + "src": "12736:3:84" + }, + "nativeSrc": "12736:19:84", + "nodeType": "YulFunctionCall", + "src": "12736:19:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12709:6:84", + "nodeType": "YulIdentifier", + "src": "12709:6:84" + }, + "nativeSrc": "12709:47:84", + "nodeType": "YulFunctionCall", + "src": "12709:47:84" + }, + "nativeSrc": "12709:47:84", + "nodeType": "YulExpressionStatement", + "src": "12709:47:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint16__to_t_uint256_t_uint16__fromStack_reversed", + "nativeSrc": "12503:259:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "12591:9:84", + "nodeType": "YulTypedName", + "src": "12591:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "12602:6:84", + "nodeType": "YulTypedName", + "src": "12602:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "12610:6:84", + "nodeType": "YulTypedName", + "src": "12610:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "12621:4:84", + "nodeType": "YulTypedName", + "src": "12621:4:84", + "type": "" + } + ], + "src": "12503:259:84" + }, + { + "body": { + "nativeSrc": "12814:121:84", + "nodeType": "YulBlock", + "src": "12814:121:84", + "statements": [ + { + "nativeSrc": "12824:16:84", + "nodeType": "YulVariableDeclaration", + "src": "12824:16:84", + "value": { + "kind": "number", + "nativeSrc": "12834:6:84", + "nodeType": "YulLiteral", + "src": "12834:6:84", + "type": "", + "value": "0xffff" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "12828:2:84", + "nodeType": "YulTypedName", + "src": "12828:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "12849:34:84", + "nodeType": "YulAssignment", + "src": "12849:34:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "12864:1:84", + "nodeType": "YulIdentifier", + "src": "12864:1:84" + }, + { + "name": "_1", + "nativeSrc": "12867:2:84", + "nodeType": "YulIdentifier", + "src": "12867:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12860:3:84", + "nodeType": "YulIdentifier", + "src": "12860:3:84" + }, + "nativeSrc": "12860:10:84", + "nodeType": "YulFunctionCall", + "src": "12860:10:84" + }, + { + "arguments": [ + { + "name": "y", + "nativeSrc": "12876:1:84", + "nodeType": "YulIdentifier", + "src": "12876:1:84" + }, + { + "name": "_1", + "nativeSrc": "12879:2:84", + "nodeType": "YulIdentifier", + "src": "12879:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12872:3:84", + "nodeType": "YulIdentifier", + "src": "12872:3:84" + }, + "nativeSrc": "12872:10:84", + "nodeType": "YulFunctionCall", + "src": "12872:10:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "12856:3:84", + "nodeType": "YulIdentifier", + "src": "12856:3:84" + }, + "nativeSrc": "12856:27:84", + "nodeType": "YulFunctionCall", + "src": "12856:27:84" + }, + "variableNames": [ + { + "name": "sum", + "nativeSrc": "12849:3:84", + "nodeType": "YulIdentifier", + "src": "12849:3:84" + } + ] + }, + { + "body": { + "nativeSrc": "12907:22:84", + "nodeType": "YulBlock", + "src": "12907:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "12909:16:84", + "nodeType": "YulIdentifier", + "src": "12909:16:84" + }, + "nativeSrc": "12909:18:84", + "nodeType": "YulFunctionCall", + "src": "12909:18:84" + }, + "nativeSrc": "12909:18:84", + "nodeType": "YulExpressionStatement", + "src": "12909:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sum", + "nativeSrc": "12898:3:84", + "nodeType": "YulIdentifier", + "src": "12898:3:84" + }, + { + "name": "_1", + "nativeSrc": "12903:2:84", + "nodeType": "YulIdentifier", + "src": "12903:2:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "12895:2:84", + "nodeType": "YulIdentifier", + "src": "12895:2:84" + }, + "nativeSrc": "12895:11:84", + "nodeType": "YulFunctionCall", + "src": "12895:11:84" + }, + "nativeSrc": "12892:37:84", + "nodeType": "YulIf", + "src": "12892:37:84" + } + ] + }, + "name": "checked_add_t_uint16", + "nativeSrc": "12767:168:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "12797:1:84", + "nodeType": "YulTypedName", + "src": "12797:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "12800:1:84", + "nodeType": "YulTypedName", + "src": "12800:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nativeSrc": "12806:3:84", + "nodeType": "YulTypedName", + "src": "12806:3:84", + "type": "" + } + ], + "src": "12767:168:84" + }, + { + "body": { + "nativeSrc": "12992:116:84", + "nodeType": "YulBlock", + "src": "12992:116:84", + "statements": [ + { + "nativeSrc": "13002:20:84", + "nodeType": "YulAssignment", + "src": "13002:20:84", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "13017:1:84", + "nodeType": "YulIdentifier", + "src": "13017:1:84" + }, + { + "name": "y", + "nativeSrc": "13020:1:84", + "nodeType": "YulIdentifier", + "src": "13020:1:84" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "13013:3:84", + "nodeType": "YulIdentifier", + "src": "13013:3:84" + }, + "nativeSrc": "13013:9:84", + "nodeType": "YulFunctionCall", + "src": "13013:9:84" + }, + "variableNames": [ + { + "name": "product", + "nativeSrc": "13002:7:84", + "nodeType": "YulIdentifier", + "src": "13002:7:84" + } + ] + }, + { + "body": { + "nativeSrc": "13080:22:84", + "nodeType": "YulBlock", + "src": "13080:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "13082:16:84", + "nodeType": "YulIdentifier", + "src": "13082:16:84" + }, + "nativeSrc": "13082:18:84", + "nodeType": "YulFunctionCall", + "src": "13082:18:84" + }, + "nativeSrc": "13082:18:84", + "nodeType": "YulExpressionStatement", + "src": "13082:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "13051:1:84", + "nodeType": "YulIdentifier", + "src": "13051:1:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13044:6:84", + "nodeType": "YulIdentifier", + "src": "13044:6:84" + }, + "nativeSrc": "13044:9:84", + "nodeType": "YulFunctionCall", + "src": "13044:9:84" + }, + { + "arguments": [ + { + "name": "y", + "nativeSrc": "13058:1:84", + "nodeType": "YulIdentifier", + "src": "13058:1:84" + }, + { + "arguments": [ + { + "name": "product", + "nativeSrc": "13065:7:84", + "nodeType": "YulIdentifier", + "src": "13065:7:84" + }, + { + "name": "x", + "nativeSrc": "13074:1:84", + "nodeType": "YulIdentifier", + "src": "13074:1:84" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "13061:3:84", + "nodeType": "YulIdentifier", + "src": "13061:3:84" + }, + "nativeSrc": "13061:15:84", + "nodeType": "YulFunctionCall", + "src": "13061:15:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "13055:2:84", + "nodeType": "YulIdentifier", + "src": "13055:2:84" + }, + "nativeSrc": "13055:22:84", + "nodeType": "YulFunctionCall", + "src": "13055:22:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "13041:2:84", + "nodeType": "YulIdentifier", + "src": "13041:2:84" + }, + "nativeSrc": "13041:37:84", + "nodeType": "YulFunctionCall", + "src": "13041:37:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13034:6:84", + "nodeType": "YulIdentifier", + "src": "13034:6:84" + }, + "nativeSrc": "13034:45:84", + "nodeType": "YulFunctionCall", + "src": "13034:45:84" + }, + "nativeSrc": "13031:71:84", + "nodeType": "YulIf", + "src": "13031:71:84" + } + ] + }, + "name": "checked_mul_t_uint256", + "nativeSrc": "12940:168:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "12971:1:84", + "nodeType": "YulTypedName", + "src": "12971:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "12974:1:84", + "nodeType": "YulTypedName", + "src": "12974:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "product", + "nativeSrc": "12980:7:84", + "nodeType": "YulTypedName", + "src": "12980:7:84", + "type": "" + } + ], + "src": "12940:168:84" + }, + { + "body": { + "nativeSrc": "13159:74:84", + "nodeType": "YulBlock", + "src": "13159:74:84", + "statements": [ + { + "body": { + "nativeSrc": "13182:22:84", + "nodeType": "YulBlock", + "src": "13182:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x12", + "nativeSrc": "13184:16:84", + "nodeType": "YulIdentifier", + "src": "13184:16:84" + }, + "nativeSrc": "13184:18:84", + "nodeType": "YulFunctionCall", + "src": "13184:18:84" + }, + "nativeSrc": "13184:18:84", + "nodeType": "YulExpressionStatement", + "src": "13184:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "y", + "nativeSrc": "13179:1:84", + "nodeType": "YulIdentifier", + "src": "13179:1:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13172:6:84", + "nodeType": "YulIdentifier", + "src": "13172:6:84" + }, + "nativeSrc": "13172:9:84", + "nodeType": "YulFunctionCall", + "src": "13172:9:84" + }, + "nativeSrc": "13169:35:84", + "nodeType": "YulIf", + "src": "13169:35:84" + }, + { + "nativeSrc": "13213:14:84", + "nodeType": "YulAssignment", + "src": "13213:14:84", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "13222:1:84", + "nodeType": "YulIdentifier", + "src": "13222:1:84" + }, + { + "name": "y", + "nativeSrc": "13225:1:84", + "nodeType": "YulIdentifier", + "src": "13225:1:84" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "13218:3:84", + "nodeType": "YulIdentifier", + "src": "13218:3:84" + }, + "nativeSrc": "13218:9:84", + "nodeType": "YulFunctionCall", + "src": "13218:9:84" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "13213:1:84", + "nodeType": "YulIdentifier", + "src": "13213:1:84" + } + ] + } + ] + }, + "name": "checked_div_t_uint256", + "nativeSrc": "13113:120:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "13144:1:84", + "nodeType": "YulTypedName", + "src": "13144:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "13147:1:84", + "nodeType": "YulTypedName", + "src": "13147:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "r", + "nativeSrc": "13153:1:84", + "nodeType": "YulTypedName", + "src": "13153:1:84", + "type": "" + } + ], + "src": "13113:120:84" + }, + { + "body": { + "nativeSrc": "13270:95:84", + "nodeType": "YulBlock", + "src": "13270:95:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13287:1:84", + "nodeType": "YulLiteral", + "src": "13287:1:84", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13294:3:84", + "nodeType": "YulLiteral", + "src": "13294:3:84", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "13299:10:84", + "nodeType": "YulLiteral", + "src": "13299:10:84", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "13290:3:84", + "nodeType": "YulIdentifier", + "src": "13290:3:84" + }, + "nativeSrc": "13290:20:84", + "nodeType": "YulFunctionCall", + "src": "13290:20:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "13280:6:84", + "nodeType": "YulIdentifier", + "src": "13280:6:84" + }, + "nativeSrc": "13280:31:84", + "nodeType": "YulFunctionCall", + "src": "13280:31:84" + }, + "nativeSrc": "13280:31:84", + "nodeType": "YulExpressionStatement", + "src": "13280:31:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13327:1:84", + "nodeType": "YulLiteral", + "src": "13327:1:84", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "13330:4:84", + "nodeType": "YulLiteral", + "src": "13330:4:84", + "type": "", + "value": "0x01" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "13320:6:84", + "nodeType": "YulIdentifier", + "src": "13320:6:84" + }, + "nativeSrc": "13320:15:84", + "nodeType": "YulFunctionCall", + "src": "13320:15:84" + }, + "nativeSrc": "13320:15:84", + "nodeType": "YulExpressionStatement", + "src": "13320:15:84" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13351:1:84", + "nodeType": "YulLiteral", + "src": "13351:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "13354:4:84", + "nodeType": "YulLiteral", + "src": "13354:4:84", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "13344:6:84", + "nodeType": "YulIdentifier", + "src": "13344:6:84" + }, + "nativeSrc": "13344:15:84", + "nodeType": "YulFunctionCall", + "src": "13344:15:84" + }, + "nativeSrc": "13344:15:84", + "nodeType": "YulExpressionStatement", + "src": "13344:15:84" + } + ] + }, + "name": "panic_error_0x01", + "nativeSrc": "13238:127:84", + "nodeType": "YulFunctionDefinition", + "src": "13238:127:84" + }, + { + "body": { + "nativeSrc": "13413:71:84", + "nodeType": "YulBlock", + "src": "13413:71:84", + "statements": [ + { + "body": { + "nativeSrc": "13462:16:84", + "nodeType": "YulBlock", + "src": "13462:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13471:1:84", + "nodeType": "YulLiteral", + "src": "13471:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "13474:1:84", + "nodeType": "YulLiteral", + "src": "13474:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "13464:6:84", + "nodeType": "YulIdentifier", + "src": "13464:6:84" + }, + "nativeSrc": "13464:12:84", + "nodeType": "YulFunctionCall", + "src": "13464:12:84" + }, + "nativeSrc": "13464:12:84", + "nodeType": "YulExpressionStatement", + "src": "13464:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "13436:5:84", + "nodeType": "YulIdentifier", + "src": "13436:5:84" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "13447:5:84", + "nodeType": "YulIdentifier", + "src": "13447:5:84" + }, + { + "kind": "number", + "nativeSrc": "13454:4:84", + "nodeType": "YulLiteral", + "src": "13454:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13443:3:84", + "nodeType": "YulIdentifier", + "src": "13443:3:84" + }, + "nativeSrc": "13443:16:84", + "nodeType": "YulFunctionCall", + "src": "13443:16:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "13433:2:84", + "nodeType": "YulIdentifier", + "src": "13433:2:84" + }, + "nativeSrc": "13433:27:84", + "nodeType": "YulFunctionCall", + "src": "13433:27:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13426:6:84", + "nodeType": "YulIdentifier", + "src": "13426:6:84" + }, + "nativeSrc": "13426:35:84", + "nodeType": "YulFunctionCall", + "src": "13426:35:84" + }, + "nativeSrc": "13423:55:84", + "nodeType": "YulIf", + "src": "13423:55:84" + } + ] + }, + "name": "validator_revert_uint8", + "nativeSrc": "13370:114:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "13402:5:84", + "nodeType": "YulTypedName", + "src": "13402:5:84", + "type": "" + } + ], + "src": "13370:114:84" + }, + { + "body": { + "nativeSrc": "13620:411:84", + "nodeType": "YulBlock", + "src": "13620:411:84", + "statements": [ + { + "nativeSrc": "13630:34:84", + "nodeType": "YulVariableDeclaration", + "src": "13630:34:84", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "13658:5:84", + "nodeType": "YulIdentifier", + "src": "13658:5:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "13645:12:84", + "nodeType": "YulIdentifier", + "src": "13645:12:84" + }, + "nativeSrc": "13645:19:84", + "nodeType": "YulFunctionCall", + "src": "13645:19:84" + }, + "variables": [ + { + "name": "value_1", + "nativeSrc": "13634:7:84", + "nodeType": "YulTypedName", + "src": "13634:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_1", + "nativeSrc": "13696:7:84", + "nodeType": "YulIdentifier", + "src": "13696:7:84" + } + ], + "functionName": { + "name": "validator_revert_uint8", + "nativeSrc": "13673:22:84", + "nodeType": "YulIdentifier", + "src": "13673:22:84" + }, + "nativeSrc": "13673:31:84", + "nodeType": "YulFunctionCall", + "src": "13673:31:84" + }, + "nativeSrc": "13673:31:84", + "nodeType": "YulExpressionStatement", + "src": "13673:31:84" + }, + { + "nativeSrc": "13713:28:84", + "nodeType": "YulVariableDeclaration", + "src": "13713:28:84", + "value": { + "arguments": [ + { + "name": "value_1", + "nativeSrc": "13727:7:84", + "nodeType": "YulIdentifier", + "src": "13727:7:84" + }, + { + "kind": "number", + "nativeSrc": "13736:4:84", + "nodeType": "YulLiteral", + "src": "13736:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13723:3:84", + "nodeType": "YulIdentifier", + "src": "13723:3:84" + }, + "nativeSrc": "13723:18:84", + "nodeType": "YulFunctionCall", + "src": "13723:18:84" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "13717:2:84", + "nodeType": "YulTypedName", + "src": "13717:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "13750:21:84", + "nodeType": "YulVariableDeclaration", + "src": "13750:21:84", + "value": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "13766:4:84", + "nodeType": "YulIdentifier", + "src": "13766:4:84" + } + ], + "functionName": { + "name": "sload", + "nativeSrc": "13760:5:84", + "nodeType": "YulIdentifier", + "src": "13760:5:84" + }, + "nativeSrc": "13760:11:84", + "nodeType": "YulFunctionCall", + "src": "13760:11:84" + }, + "variables": [ + { + "name": "_2", + "nativeSrc": "13754:2:84", + "nodeType": "YulTypedName", + "src": "13754:2:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "13787:4:84", + "nodeType": "YulIdentifier", + "src": "13787:4:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "13800:2:84", + "nodeType": "YulIdentifier", + "src": "13800:2:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13808:3:84", + "nodeType": "YulLiteral", + "src": "13808:3:84", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "13804:3:84", + "nodeType": "YulIdentifier", + "src": "13804:3:84" + }, + "nativeSrc": "13804:8:84", + "nodeType": "YulFunctionCall", + "src": "13804:8:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13796:3:84", + "nodeType": "YulIdentifier", + "src": "13796:3:84" + }, + "nativeSrc": "13796:17:84", + "nodeType": "YulFunctionCall", + "src": "13796:17:84" + }, + { + "name": "_1", + "nativeSrc": "13815:2:84", + "nodeType": "YulIdentifier", + "src": "13815:2:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "13793:2:84", + "nodeType": "YulIdentifier", + "src": "13793:2:84" + }, + "nativeSrc": "13793:25:84", + "nodeType": "YulFunctionCall", + "src": "13793:25:84" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "13780:6:84", + "nodeType": "YulIdentifier", + "src": "13780:6:84" + }, + "nativeSrc": "13780:39:84", + "nodeType": "YulFunctionCall", + "src": "13780:39:84" + }, + "nativeSrc": "13780:39:84", + "nodeType": "YulExpressionStatement", + "src": "13780:39:84" + }, + { + "nativeSrc": "13828:43:84", + "nodeType": "YulVariableDeclaration", + "src": "13828:43:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "13860:5:84", + "nodeType": "YulIdentifier", + "src": "13860:5:84" + }, + { + "kind": "number", + "nativeSrc": "13867:2:84", + "nodeType": "YulLiteral", + "src": "13867:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "13856:3:84", + "nodeType": "YulIdentifier", + "src": "13856:3:84" + }, + "nativeSrc": "13856:14:84", + "nodeType": "YulFunctionCall", + "src": "13856:14:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "13843:12:84", + "nodeType": "YulIdentifier", + "src": "13843:12:84" + }, + "nativeSrc": "13843:28:84", + "nodeType": "YulFunctionCall", + "src": "13843:28:84" + }, + "variables": [ + { + "name": "value_2", + "nativeSrc": "13832:7:84", + "nodeType": "YulTypedName", + "src": "13832:7:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value_2", + "nativeSrc": "13904:7:84", + "nodeType": "YulIdentifier", + "src": "13904:7:84" + } + ], + "functionName": { + "name": "validator_revert_uint64", + "nativeSrc": "13880:23:84", + "nodeType": "YulIdentifier", + "src": "13880:23:84" + }, + "nativeSrc": "13880:32:84", + "nodeType": "YulFunctionCall", + "src": "13880:32:84" + }, + "nativeSrc": "13880:32:84", + "nodeType": "YulExpressionStatement", + "src": "13880:32:84" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "13928:4:84", + "nodeType": "YulIdentifier", + "src": "13928:4:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "_2", + "nativeSrc": "13944:2:84", + "nodeType": "YulIdentifier", + "src": "13944:2:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13952:20:84", + "nodeType": "YulLiteral", + "src": "13952:20:84", + "type": "", + "value": "0xffffffffffffffffff" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "13948:3:84", + "nodeType": "YulIdentifier", + "src": "13948:3:84" + }, + "nativeSrc": "13948:25:84", + "nodeType": "YulFunctionCall", + "src": "13948:25:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13940:3:84", + "nodeType": "YulIdentifier", + "src": "13940:3:84" + }, + "nativeSrc": "13940:34:84", + "nodeType": "YulFunctionCall", + "src": "13940:34:84" + }, + { + "name": "_1", + "nativeSrc": "13976:2:84", + "nodeType": "YulIdentifier", + "src": "13976:2:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "13937:2:84", + "nodeType": "YulIdentifier", + "src": "13937:2:84" + }, + "nativeSrc": "13937:42:84", + "nodeType": "YulFunctionCall", + "src": "13937:42:84" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13989:1:84", + "nodeType": "YulLiteral", + "src": "13989:1:84", + "type": "", + "value": "8" + }, + { + "name": "value_2", + "nativeSrc": "13992:7:84", + "nodeType": "YulIdentifier", + "src": "13992:7:84" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "13985:3:84", + "nodeType": "YulIdentifier", + "src": "13985:3:84" + }, + "nativeSrc": "13985:15:84", + "nodeType": "YulFunctionCall", + "src": "13985:15:84" + }, + { + "kind": "number", + "nativeSrc": "14002:20:84", + "nodeType": "YulLiteral", + "src": "14002:20:84", + "type": "", + "value": "0xffffffffffffffff00" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13981:3:84", + "nodeType": "YulIdentifier", + "src": "13981:3:84" + }, + "nativeSrc": "13981:42:84", + "nodeType": "YulFunctionCall", + "src": "13981:42:84" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "13934:2:84", + "nodeType": "YulIdentifier", + "src": "13934:2:84" + }, + "nativeSrc": "13934:90:84", + "nodeType": "YulFunctionCall", + "src": "13934:90:84" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "13921:6:84", + "nodeType": "YulIdentifier", + "src": "13921:6:84" + }, + "nativeSrc": "13921:104:84", + "nodeType": "YulFunctionCall", + "src": "13921:104:84" + }, + "nativeSrc": "13921:104:84", + "nodeType": "YulExpressionStatement", + "src": "13921:104:84" + } + ] + }, + "name": "update_storage_value_offset_0t_struct$_RadonSLA_$23503_calldata_ptr_to_t_struct$_RadonSLA_$23503_storage", + "nativeSrc": "13489:542:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "slot", + "nativeSrc": "13603:4:84", + "nodeType": "YulTypedName", + "src": "13603:4:84", + "type": "" + }, + { + "name": "value", + "nativeSrc": "13609:5:84", + "nodeType": "YulTypedName", + "src": "13609:5:84", + "type": "" + } + ], + "src": "13489:542:84" + }, + { + "body": { + "nativeSrc": "14210:240:84", + "nodeType": "YulBlock", + "src": "14210:240:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14227:9:84", + "nodeType": "YulIdentifier", + "src": "14227:9:84" + }, + { + "kind": "number", + "nativeSrc": "14238:2:84", + "nodeType": "YulLiteral", + "src": "14238:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14220:6:84", + "nodeType": "YulIdentifier", + "src": "14220:6:84" + }, + "nativeSrc": "14220:21:84", + "nodeType": "YulFunctionCall", + "src": "14220:21:84" + }, + "nativeSrc": "14220:21:84", + "nodeType": "YulExpressionStatement", + "src": "14220:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14261:9:84", + "nodeType": "YulIdentifier", + "src": "14261:9:84" + }, + { + "kind": "number", + "nativeSrc": "14272:2:84", + "nodeType": "YulLiteral", + "src": "14272:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14257:3:84", + "nodeType": "YulIdentifier", + "src": "14257:3:84" + }, + "nativeSrc": "14257:18:84", + "nodeType": "YulFunctionCall", + "src": "14257:18:84" + }, + { + "kind": "number", + "nativeSrc": "14277:2:84", + "nodeType": "YulLiteral", + "src": "14277:2:84", + "type": "", + "value": "50" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14250:6:84", + "nodeType": "YulIdentifier", + "src": "14250:6:84" + }, + "nativeSrc": "14250:30:84", + "nodeType": "YulFunctionCall", + "src": "14250:30:84" + }, + "nativeSrc": "14250:30:84", + "nodeType": "YulExpressionStatement", + "src": "14250:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14300:9:84", + "nodeType": "YulIdentifier", + "src": "14300:9:84" + }, + { + "kind": "number", + "nativeSrc": "14311:2:84", + "nodeType": "YulLiteral", + "src": "14311:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14296:3:84", + "nodeType": "YulIdentifier", + "src": "14296:3:84" + }, + "nativeSrc": "14296:18:84", + "nodeType": "YulFunctionCall", + "src": "14296:18:84" + }, + { + "hexValue": "5769746e65743a20747269656420746f206465636f64652076616c7565206672", + "kind": "string", + "nativeSrc": "14316:34:84", + "nodeType": "YulLiteral", + "src": "14316:34:84", + "type": "", + "value": "Witnet: tried to decode value fr" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14289:6:84", + "nodeType": "YulIdentifier", + "src": "14289:6:84" + }, + "nativeSrc": "14289:62:84", + "nodeType": "YulFunctionCall", + "src": "14289:62:84" + }, + "nativeSrc": "14289:62:84", + "nodeType": "YulExpressionStatement", + "src": "14289:62:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14371:9:84", + "nodeType": "YulIdentifier", + "src": "14371:9:84" + }, + { + "kind": "number", + "nativeSrc": "14382:2:84", + "nodeType": "YulLiteral", + "src": "14382:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14367:3:84", + "nodeType": "YulIdentifier", + "src": "14367:3:84" + }, + "nativeSrc": "14367:18:84", + "nodeType": "YulFunctionCall", + "src": "14367:18:84" + }, + { + "hexValue": "6f6d206572726f72656420726573756c742e", + "kind": "string", + "nativeSrc": "14387:20:84", + "nodeType": "YulLiteral", + "src": "14387:20:84", + "type": "", + "value": "om errored result." + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14360:6:84", + "nodeType": "YulIdentifier", + "src": "14360:6:84" + }, + "nativeSrc": "14360:48:84", + "nodeType": "YulFunctionCall", + "src": "14360:48:84" + }, + "nativeSrc": "14360:48:84", + "nodeType": "YulExpressionStatement", + "src": "14360:48:84" + }, + { + "nativeSrc": "14417:27:84", + "nodeType": "YulAssignment", + "src": "14417:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14429:9:84", + "nodeType": "YulIdentifier", + "src": "14429:9:84" + }, + { + "kind": "number", + "nativeSrc": "14440:3:84", + "nodeType": "YulLiteral", + "src": "14440:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14425:3:84", + "nodeType": "YulIdentifier", + "src": "14425:3:84" + }, + "nativeSrc": "14425:19:84", + "nodeType": "YulFunctionCall", + "src": "14425:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "14417:4:84", + "nodeType": "YulIdentifier", + "src": "14417:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_c540643114d8824fc67c5a3bcabc32e042f198b987f1133b221fc24db5c15b9a__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "14036:414:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "14187:9:84", + "nodeType": "YulTypedName", + "src": "14187:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "14201:4:84", + "nodeType": "YulTypedName", + "src": "14201:4:84", + "type": "" + } + ], + "src": "14036:414:84" + }, + { + "body": { + "nativeSrc": "14584:119:84", + "nodeType": "YulBlock", + "src": "14584:119:84", + "statements": [ + { + "nativeSrc": "14594:26:84", + "nodeType": "YulAssignment", + "src": "14594:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14606:9:84", + "nodeType": "YulIdentifier", + "src": "14606:9:84" + }, + { + "kind": "number", + "nativeSrc": "14617:2:84", + "nodeType": "YulLiteral", + "src": "14617:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14602:3:84", + "nodeType": "YulIdentifier", + "src": "14602:3:84" + }, + "nativeSrc": "14602:18:84", + "nodeType": "YulFunctionCall", + "src": "14602:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "14594:4:84", + "nodeType": "YulIdentifier", + "src": "14594:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14636:9:84", + "nodeType": "YulIdentifier", + "src": "14636:9:84" + }, + { + "name": "value0", + "nativeSrc": "14647:6:84", + "nodeType": "YulIdentifier", + "src": "14647:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14629:6:84", + "nodeType": "YulIdentifier", + "src": "14629:6:84" + }, + "nativeSrc": "14629:25:84", + "nodeType": "YulFunctionCall", + "src": "14629:25:84" + }, + "nativeSrc": "14629:25:84", + "nodeType": "YulExpressionStatement", + "src": "14629:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14674:9:84", + "nodeType": "YulIdentifier", + "src": "14674:9:84" + }, + { + "kind": "number", + "nativeSrc": "14685:2:84", + "nodeType": "YulLiteral", + "src": "14685:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14670:3:84", + "nodeType": "YulIdentifier", + "src": "14670:3:84" + }, + "nativeSrc": "14670:18:84", + "nodeType": "YulFunctionCall", + "src": "14670:18:84" + }, + { + "name": "value1", + "nativeSrc": "14690:6:84", + "nodeType": "YulIdentifier", + "src": "14690:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14663:6:84", + "nodeType": "YulIdentifier", + "src": "14663:6:84" + }, + "nativeSrc": "14663:34:84", + "nodeType": "YulFunctionCall", + "src": "14663:34:84" + }, + "nativeSrc": "14663:34:84", + "nodeType": "YulExpressionStatement", + "src": "14663:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_uint256__to_t_bytes32_t_uint256__fromStack_reversed", + "nativeSrc": "14455:248:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "14545:9:84", + "nodeType": "YulTypedName", + "src": "14545:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "14556:6:84", + "nodeType": "YulTypedName", + "src": "14556:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "14564:6:84", + "nodeType": "YulTypedName", + "src": "14564:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "14575:4:84", + "nodeType": "YulTypedName", + "src": "14575:4:84", + "type": "" + } + ], + "src": "14455:248:84" + }, + { + "body": { + "nativeSrc": "14882:231:84", + "nodeType": "YulBlock", + "src": "14882:231:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14899:9:84", + "nodeType": "YulIdentifier", + "src": "14899:9:84" + }, + { + "kind": "number", + "nativeSrc": "14910:2:84", + "nodeType": "YulLiteral", + "src": "14910:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14892:6:84", + "nodeType": "YulIdentifier", + "src": "14892:6:84" + }, + "nativeSrc": "14892:21:84", + "nodeType": "YulFunctionCall", + "src": "14892:21:84" + }, + "nativeSrc": "14892:21:84", + "nodeType": "YulExpressionStatement", + "src": "14892:21:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14933:9:84", + "nodeType": "YulIdentifier", + "src": "14933:9:84" + }, + { + "kind": "number", + "nativeSrc": "14944:2:84", + "nodeType": "YulLiteral", + "src": "14944:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14929:3:84", + "nodeType": "YulIdentifier", + "src": "14929:3:84" + }, + "nativeSrc": "14929:18:84", + "nodeType": "YulFunctionCall", + "src": "14929:18:84" + }, + { + "kind": "number", + "nativeSrc": "14949:2:84", + "nodeType": "YulLiteral", + "src": "14949:2:84", + "type": "", + "value": "41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14922:6:84", + "nodeType": "YulIdentifier", + "src": "14922:6:84" + }, + "nativeSrc": "14922:30:84", + "nodeType": "YulFunctionCall", + "src": "14922:30:84" + }, + "nativeSrc": "14922:30:84", + "nodeType": "YulExpressionStatement", + "src": "14922:30:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "14972:9:84", + "nodeType": "YulIdentifier", + "src": "14972:9:84" + }, + { + "kind": "number", + "nativeSrc": "14983:2:84", + "nodeType": "YulLiteral", + "src": "14983:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14968:3:84", + "nodeType": "YulIdentifier", + "src": "14968:3:84" + }, + "nativeSrc": "14968:18:84", + "nodeType": "YulFunctionCall", + "src": "14968:18:84" + }, + { + "hexValue": "4f776e61626c6532537465703a2063616c6c6572206973206e6f742074686520", + "kind": "string", + "nativeSrc": "14988:34:84", + "nodeType": "YulLiteral", + "src": "14988:34:84", + "type": "", + "value": "Ownable2Step: caller is not the " + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "14961:6:84", + "nodeType": "YulIdentifier", + "src": "14961:6:84" + }, + "nativeSrc": "14961:62:84", + "nodeType": "YulFunctionCall", + "src": "14961:62:84" + }, + "nativeSrc": "14961:62:84", + "nodeType": "YulExpressionStatement", + "src": "14961:62:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15043:9:84", + "nodeType": "YulIdentifier", + "src": "15043:9:84" + }, + { + "kind": "number", + "nativeSrc": "15054:2:84", + "nodeType": "YulLiteral", + "src": "15054:2:84", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "15039:3:84", + "nodeType": "YulIdentifier", + "src": "15039:3:84" + }, + "nativeSrc": "15039:18:84", + "nodeType": "YulFunctionCall", + "src": "15039:18:84" + }, + { + "hexValue": "6e6577206f776e6572", + "kind": "string", + "nativeSrc": "15059:11:84", + "nodeType": "YulLiteral", + "src": "15059:11:84", + "type": "", + "value": "new owner" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "15032:6:84", + "nodeType": "YulIdentifier", + "src": "15032:6:84" + }, + "nativeSrc": "15032:39:84", + "nodeType": "YulFunctionCall", + "src": "15032:39:84" + }, + "nativeSrc": "15032:39:84", + "nodeType": "YulExpressionStatement", + "src": "15032:39:84" + }, + { + "nativeSrc": "15080:27:84", + "nodeType": "YulAssignment", + "src": "15080:27:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15092:9:84", + "nodeType": "YulIdentifier", + "src": "15092:9:84" + }, + { + "kind": "number", + "nativeSrc": "15103:3:84", + "nodeType": "YulLiteral", + "src": "15103:3:84", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "15088:3:84", + "nodeType": "YulIdentifier", + "src": "15088:3:84" + }, + "nativeSrc": "15088:19:84", + "nodeType": "YulFunctionCall", + "src": "15088:19:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "15080:4:84", + "nodeType": "YulIdentifier", + "src": "15080:4:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_225559eb8402045bea7ff07c35d0ad8c0547830223ac1c21d44fb948d6896ebc__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "14708:405:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "14859:9:84", + "nodeType": "YulTypedName", + "src": "14859:9:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "14873:4:84", + "nodeType": "YulTypedName", + "src": "14873:4:84", + "type": "" + } + ], + "src": "14708:405:84" + }, + { + "body": { + "nativeSrc": "15208:245:84", + "nodeType": "YulBlock", + "src": "15208:245:84", + "statements": [ + { + "body": { + "nativeSrc": "15254:16:84", + "nodeType": "YulBlock", + "src": "15254:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "15263:1:84", + "nodeType": "YulLiteral", + "src": "15263:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "15266:1:84", + "nodeType": "YulLiteral", + "src": "15266:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "15256:6:84", + "nodeType": "YulIdentifier", + "src": "15256:6:84" + }, + "nativeSrc": "15256:12:84", + "nodeType": "YulFunctionCall", + "src": "15256:12:84" + }, + "nativeSrc": "15256:12:84", + "nodeType": "YulExpressionStatement", + "src": "15256:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "15229:7:84", + "nodeType": "YulIdentifier", + "src": "15229:7:84" + }, + { + "name": "headStart", + "nativeSrc": "15238:9:84", + "nodeType": "YulIdentifier", + "src": "15238:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "15225:3:84", + "nodeType": "YulIdentifier", + "src": "15225:3:84" + }, + "nativeSrc": "15225:23:84", + "nodeType": "YulFunctionCall", + "src": "15225:23:84" + }, + { + "kind": "number", + "nativeSrc": "15250:2:84", + "nodeType": "YulLiteral", + "src": "15250:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "15221:3:84", + "nodeType": "YulIdentifier", + "src": "15221:3:84" + }, + "nativeSrc": "15221:32:84", + "nodeType": "YulFunctionCall", + "src": "15221:32:84" + }, + "nativeSrc": "15218:52:84", + "nodeType": "YulIf", + "src": "15218:52:84" + }, + { + "nativeSrc": "15279:30:84", + "nodeType": "YulVariableDeclaration", + "src": "15279:30:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15299:9:84", + "nodeType": "YulIdentifier", + "src": "15299:9:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "15293:5:84", + "nodeType": "YulIdentifier", + "src": "15293:5:84" + }, + "nativeSrc": "15293:16:84", + "nodeType": "YulFunctionCall", + "src": "15293:16:84" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "15283:6:84", + "nodeType": "YulTypedName", + "src": "15283:6:84", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "15352:16:84", + "nodeType": "YulBlock", + "src": "15352:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "15361:1:84", + "nodeType": "YulLiteral", + "src": "15361:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "15364:1:84", + "nodeType": "YulLiteral", + "src": "15364:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "15354:6:84", + "nodeType": "YulIdentifier", + "src": "15354:6:84" + }, + "nativeSrc": "15354:12:84", + "nodeType": "YulFunctionCall", + "src": "15354:12:84" + }, + "nativeSrc": "15354:12:84", + "nodeType": "YulExpressionStatement", + "src": "15354:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "15324:6:84", + "nodeType": "YulIdentifier", + "src": "15324:6:84" + }, + { + "kind": "number", + "nativeSrc": "15332:18:84", + "nodeType": "YulLiteral", + "src": "15332:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "15321:2:84", + "nodeType": "YulIdentifier", + "src": "15321:2:84" + }, + "nativeSrc": "15321:30:84", + "nodeType": "YulFunctionCall", + "src": "15321:30:84" + }, + "nativeSrc": "15318:50:84", + "nodeType": "YulIf", + "src": "15318:50:84" + }, + { + "nativeSrc": "15377:70:84", + "nodeType": "YulAssignment", + "src": "15377:70:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15419:9:84", + "nodeType": "YulIdentifier", + "src": "15419:9:84" + }, + { + "name": "offset", + "nativeSrc": "15430:6:84", + "nodeType": "YulIdentifier", + "src": "15430:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "15415:3:84", + "nodeType": "YulIdentifier", + "src": "15415:3:84" + }, + "nativeSrc": "15415:22:84", + "nodeType": "YulFunctionCall", + "src": "15415:22:84" + }, + { + "name": "dataEnd", + "nativeSrc": "15439:7:84", + "nodeType": "YulIdentifier", + "src": "15439:7:84" + } + ], + "functionName": { + "name": "abi_decode_bytes_fromMemory", + "nativeSrc": "15387:27:84", + "nodeType": "YulIdentifier", + "src": "15387:27:84" + }, + "nativeSrc": "15387:60:84", + "nodeType": "YulFunctionCall", + "src": "15387:60:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "15377:6:84", + "nodeType": "YulIdentifier", + "src": "15377:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes_memory_ptr_fromMemory", + "nativeSrc": "15118:335:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "15174:9:84", + "nodeType": "YulTypedName", + "src": "15174:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "15185:7:84", + "nodeType": "YulTypedName", + "src": "15185:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "15197:6:84", + "nodeType": "YulTypedName", + "src": "15197:6:84", + "type": "" + } + ], + "src": "15118:335:84" + }, + { + "body": { + "nativeSrc": "15527:176:84", + "nodeType": "YulBlock", + "src": "15527:176:84", + "statements": [ + { + "body": { + "nativeSrc": "15573:16:84", + "nodeType": "YulBlock", + "src": "15573:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "15582:1:84", + "nodeType": "YulLiteral", + "src": "15582:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "15585:1:84", + "nodeType": "YulLiteral", + "src": "15585:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "15575:6:84", + "nodeType": "YulIdentifier", + "src": "15575:6:84" + }, + "nativeSrc": "15575:12:84", + "nodeType": "YulFunctionCall", + "src": "15575:12:84" + }, + "nativeSrc": "15575:12:84", + "nodeType": "YulExpressionStatement", + "src": "15575:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "15548:7:84", + "nodeType": "YulIdentifier", + "src": "15548:7:84" + }, + { + "name": "headStart", + "nativeSrc": "15557:9:84", + "nodeType": "YulIdentifier", + "src": "15557:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "15544:3:84", + "nodeType": "YulIdentifier", + "src": "15544:3:84" + }, + "nativeSrc": "15544:23:84", + "nodeType": "YulFunctionCall", + "src": "15544:23:84" + }, + { + "kind": "number", + "nativeSrc": "15569:2:84", + "nodeType": "YulLiteral", + "src": "15569:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "15540:3:84", + "nodeType": "YulIdentifier", + "src": "15540:3:84" + }, + "nativeSrc": "15540:32:84", + "nodeType": "YulFunctionCall", + "src": "15540:32:84" + }, + "nativeSrc": "15537:52:84", + "nodeType": "YulIf", + "src": "15537:52:84" + }, + { + "nativeSrc": "15598:36:84", + "nodeType": "YulVariableDeclaration", + "src": "15598:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15624:9:84", + "nodeType": "YulIdentifier", + "src": "15624:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "15611:12:84", + "nodeType": "YulIdentifier", + "src": "15611:12:84" + }, + "nativeSrc": "15611:23:84", + "nodeType": "YulFunctionCall", + "src": "15611:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "15602:5:84", + "nodeType": "YulTypedName", + "src": "15602:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "15667:5:84", + "nodeType": "YulIdentifier", + "src": "15667:5:84" + } + ], + "functionName": { + "name": "validator_revert_uint64", + "nativeSrc": "15643:23:84", + "nodeType": "YulIdentifier", + "src": "15643:23:84" + }, + "nativeSrc": "15643:30:84", + "nodeType": "YulFunctionCall", + "src": "15643:30:84" + }, + "nativeSrc": "15643:30:84", + "nodeType": "YulExpressionStatement", + "src": "15643:30:84" + }, + { + "nativeSrc": "15682:15:84", + "nodeType": "YulAssignment", + "src": "15682:15:84", + "value": { + "name": "value", + "nativeSrc": "15692:5:84", + "nodeType": "YulIdentifier", + "src": "15692:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "15682:6:84", + "nodeType": "YulIdentifier", + "src": "15682:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint64", + "nativeSrc": "15458:245:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "15493:9:84", + "nodeType": "YulTypedName", + "src": "15493:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "15504:7:84", + "nodeType": "YulTypedName", + "src": "15504:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "15516:6:84", + "nodeType": "YulTypedName", + "src": "15516:6:84", + "type": "" + } + ], + "src": "15458:245:84" + }, + { + "body": { + "nativeSrc": "15776:175:84", + "nodeType": "YulBlock", + "src": "15776:175:84", + "statements": [ + { + "body": { + "nativeSrc": "15822:16:84", + "nodeType": "YulBlock", + "src": "15822:16:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "15831:1:84", + "nodeType": "YulLiteral", + "src": "15831:1:84", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "15834:1:84", + "nodeType": "YulLiteral", + "src": "15834:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "15824:6:84", + "nodeType": "YulIdentifier", + "src": "15824:6:84" + }, + "nativeSrc": "15824:12:84", + "nodeType": "YulFunctionCall", + "src": "15824:12:84" + }, + "nativeSrc": "15824:12:84", + "nodeType": "YulExpressionStatement", + "src": "15824:12:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "15797:7:84", + "nodeType": "YulIdentifier", + "src": "15797:7:84" + }, + { + "name": "headStart", + "nativeSrc": "15806:9:84", + "nodeType": "YulIdentifier", + "src": "15806:9:84" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "15793:3:84", + "nodeType": "YulIdentifier", + "src": "15793:3:84" + }, + "nativeSrc": "15793:23:84", + "nodeType": "YulFunctionCall", + "src": "15793:23:84" + }, + { + "kind": "number", + "nativeSrc": "15818:2:84", + "nodeType": "YulLiteral", + "src": "15818:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "15789:3:84", + "nodeType": "YulIdentifier", + "src": "15789:3:84" + }, + "nativeSrc": "15789:32:84", + "nodeType": "YulFunctionCall", + "src": "15789:32:84" + }, + "nativeSrc": "15786:52:84", + "nodeType": "YulIf", + "src": "15786:52:84" + }, + { + "nativeSrc": "15847:36:84", + "nodeType": "YulVariableDeclaration", + "src": "15847:36:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "15873:9:84", + "nodeType": "YulIdentifier", + "src": "15873:9:84" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "15860:12:84", + "nodeType": "YulIdentifier", + "src": "15860:12:84" + }, + "nativeSrc": "15860:23:84", + "nodeType": "YulFunctionCall", + "src": "15860:23:84" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "15851:5:84", + "nodeType": "YulTypedName", + "src": "15851:5:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nativeSrc": "15915:5:84", + "nodeType": "YulIdentifier", + "src": "15915:5:84" + } + ], + "functionName": { + "name": "validator_revert_uint8", + "nativeSrc": "15892:22:84", + "nodeType": "YulIdentifier", + "src": "15892:22:84" + }, + "nativeSrc": "15892:29:84", + "nodeType": "YulFunctionCall", + "src": "15892:29:84" + }, + "nativeSrc": "15892:29:84", + "nodeType": "YulExpressionStatement", + "src": "15892:29:84" + }, + { + "nativeSrc": "15930:15:84", + "nodeType": "YulAssignment", + "src": "15930:15:84", + "value": { + "name": "value", + "nativeSrc": "15940:5:84", + "nodeType": "YulIdentifier", + "src": "15940:5:84" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "15930:6:84", + "nodeType": "YulIdentifier", + "src": "15930:6:84" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint8", + "nativeSrc": "15708:243:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "15742:9:84", + "nodeType": "YulTypedName", + "src": "15742:9:84", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "15753:7:84", + "nodeType": "YulTypedName", + "src": "15753:7:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "15765:6:84", + "nodeType": "YulTypedName", + "src": "15765:6:84", + "type": "" + } + ], + "src": "15708:243:84" + }, + { + "body": { + "nativeSrc": "16007:206:84", + "nodeType": "YulBlock", + "src": "16007:206:84", + "statements": [ + { + "nativeSrc": "16017:28:84", + "nodeType": "YulVariableDeclaration", + "src": "16017:28:84", + "value": { + "kind": "number", + "nativeSrc": "16027:18:84", + "nodeType": "YulLiteral", + "src": "16027:18:84", + "type": "", + "value": "0xffffffffffffffff" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "16021:2:84", + "nodeType": "YulTypedName", + "src": "16021:2:84", + "type": "" + } + ] + }, + { + "nativeSrc": "16054:46:84", + "nodeType": "YulVariableDeclaration", + "src": "16054:46:84", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nativeSrc": "16081:1:84", + "nodeType": "YulIdentifier", + "src": "16081:1:84" + }, + { + "name": "_1", + "nativeSrc": "16084:2:84", + "nodeType": "YulIdentifier", + "src": "16084:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16077:3:84", + "nodeType": "YulIdentifier", + "src": "16077:3:84" + }, + "nativeSrc": "16077:10:84", + "nodeType": "YulFunctionCall", + "src": "16077:10:84" + }, + { + "arguments": [ + { + "name": "y", + "nativeSrc": "16093:1:84", + "nodeType": "YulIdentifier", + "src": "16093:1:84" + }, + { + "name": "_1", + "nativeSrc": "16096:2:84", + "nodeType": "YulIdentifier", + "src": "16096:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16089:3:84", + "nodeType": "YulIdentifier", + "src": "16089:3:84" + }, + "nativeSrc": "16089:10:84", + "nodeType": "YulFunctionCall", + "src": "16089:10:84" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "16073:3:84", + "nodeType": "YulIdentifier", + "src": "16073:3:84" + }, + "nativeSrc": "16073:27:84", + "nodeType": "YulFunctionCall", + "src": "16073:27:84" + }, + "variables": [ + { + "name": "product_raw", + "nativeSrc": "16058:11:84", + "nodeType": "YulTypedName", + "src": "16058:11:84", + "type": "" + } + ] + }, + { + "nativeSrc": "16109:31:84", + "nodeType": "YulAssignment", + "src": "16109:31:84", + "value": { + "arguments": [ + { + "name": "product_raw", + "nativeSrc": "16124:11:84", + "nodeType": "YulIdentifier", + "src": "16124:11:84" + }, + { + "name": "_1", + "nativeSrc": "16137:2:84", + "nodeType": "YulIdentifier", + "src": "16137:2:84" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16120:3:84", + "nodeType": "YulIdentifier", + "src": "16120:3:84" + }, + "nativeSrc": "16120:20:84", + "nodeType": "YulFunctionCall", + "src": "16120:20:84" + }, + "variableNames": [ + { + "name": "product", + "nativeSrc": "16109:7:84", + "nodeType": "YulIdentifier", + "src": "16109:7:84" + } + ] + }, + { + "body": { + "nativeSrc": "16185:22:84", + "nodeType": "YulBlock", + "src": "16185:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "16187:16:84", + "nodeType": "YulIdentifier", + "src": "16187:16:84" + }, + "nativeSrc": "16187:18:84", + "nodeType": "YulFunctionCall", + "src": "16187:18:84" + }, + "nativeSrc": "16187:18:84", + "nodeType": "YulExpressionStatement", + "src": "16187:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "product", + "nativeSrc": "16162:7:84", + "nodeType": "YulIdentifier", + "src": "16162:7:84" + }, + { + "name": "product_raw", + "nativeSrc": "16171:11:84", + "nodeType": "YulIdentifier", + "src": "16171:11:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "16159:2:84", + "nodeType": "YulIdentifier", + "src": "16159:2:84" + }, + "nativeSrc": "16159:24:84", + "nodeType": "YulFunctionCall", + "src": "16159:24:84" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "16152:6:84", + "nodeType": "YulIdentifier", + "src": "16152:6:84" + }, + "nativeSrc": "16152:32:84", + "nodeType": "YulFunctionCall", + "src": "16152:32:84" + }, + "nativeSrc": "16149:58:84", + "nodeType": "YulIf", + "src": "16149:58:84" + } + ] + }, + "name": "checked_mul_t_uint64", + "nativeSrc": "15956:257:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "15986:1:84", + "nodeType": "YulTypedName", + "src": "15986:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "15989:1:84", + "nodeType": "YulTypedName", + "src": "15989:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "product", + "nativeSrc": "15995:7:84", + "nodeType": "YulTypedName", + "src": "15995:7:84", + "type": "" + } + ], + "src": "15956:257:84" + }, + { + "body": { + "nativeSrc": "16265:88:84", + "nodeType": "YulBlock", + "src": "16265:88:84", + "statements": [ + { + "body": { + "nativeSrc": "16296:22:84", + "nodeType": "YulBlock", + "src": "16296:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "16298:16:84", + "nodeType": "YulIdentifier", + "src": "16298:16:84" + }, + "nativeSrc": "16298:18:84", + "nodeType": "YulFunctionCall", + "src": "16298:18:84" + }, + "nativeSrc": "16298:18:84", + "nodeType": "YulExpressionStatement", + "src": "16298:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "value", + "nativeSrc": "16281:5:84", + "nodeType": "YulIdentifier", + "src": "16281:5:84" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "16292:1:84", + "nodeType": "YulLiteral", + "src": "16292:1:84", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "16288:3:84", + "nodeType": "YulIdentifier", + "src": "16288:3:84" + }, + "nativeSrc": "16288:6:84", + "nodeType": "YulFunctionCall", + "src": "16288:6:84" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "16278:2:84", + "nodeType": "YulIdentifier", + "src": "16278:2:84" + }, + "nativeSrc": "16278:17:84", + "nodeType": "YulFunctionCall", + "src": "16278:17:84" + }, + "nativeSrc": "16275:43:84", + "nodeType": "YulIf", + "src": "16275:43:84" + }, + { + "nativeSrc": "16327:20:84", + "nodeType": "YulAssignment", + "src": "16327:20:84", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "16338:5:84", + "nodeType": "YulIdentifier", + "src": "16338:5:84" + }, + { + "kind": "number", + "nativeSrc": "16345:1:84", + "nodeType": "YulLiteral", + "src": "16345:1:84", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "16334:3:84", + "nodeType": "YulIdentifier", + "src": "16334:3:84" + }, + "nativeSrc": "16334:13:84", + "nodeType": "YulFunctionCall", + "src": "16334:13:84" + }, + "variableNames": [ + { + "name": "ret", + "nativeSrc": "16327:3:84", + "nodeType": "YulIdentifier", + "src": "16327:3:84" + } + ] + } + ] + }, + "name": "increment_t_uint256", + "nativeSrc": "16218:135:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "16247:5:84", + "nodeType": "YulTypedName", + "src": "16247:5:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "ret", + "nativeSrc": "16257:3:84", + "nodeType": "YulTypedName", + "src": "16257:3:84", + "type": "" + } + ], + "src": "16218:135:84" + }, + { + "body": { + "nativeSrc": "16406:77:84", + "nodeType": "YulBlock", + "src": "16406:77:84", + "statements": [ + { + "nativeSrc": "16416:16:84", + "nodeType": "YulAssignment", + "src": "16416:16:84", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "16427:1:84", + "nodeType": "YulIdentifier", + "src": "16427:1:84" + }, + { + "name": "y", + "nativeSrc": "16430:1:84", + "nodeType": "YulIdentifier", + "src": "16430:1:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "16423:3:84", + "nodeType": "YulIdentifier", + "src": "16423:3:84" + }, + "nativeSrc": "16423:9:84", + "nodeType": "YulFunctionCall", + "src": "16423:9:84" + }, + "variableNames": [ + { + "name": "sum", + "nativeSrc": "16416:3:84", + "nodeType": "YulIdentifier", + "src": "16416:3:84" + } + ] + }, + { + "body": { + "nativeSrc": "16455:22:84", + "nodeType": "YulBlock", + "src": "16455:22:84", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nativeSrc": "16457:16:84", + "nodeType": "YulIdentifier", + "src": "16457:16:84" + }, + "nativeSrc": "16457:18:84", + "nodeType": "YulFunctionCall", + "src": "16457:18:84" + }, + "nativeSrc": "16457:18:84", + "nodeType": "YulExpressionStatement", + "src": "16457:18:84" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nativeSrc": "16447:1:84", + "nodeType": "YulIdentifier", + "src": "16447:1:84" + }, + { + "name": "sum", + "nativeSrc": "16450:3:84", + "nodeType": "YulIdentifier", + "src": "16450:3:84" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "16444:2:84", + "nodeType": "YulIdentifier", + "src": "16444:2:84" + }, + "nativeSrc": "16444:10:84", + "nodeType": "YulFunctionCall", + "src": "16444:10:84" + }, + "nativeSrc": "16441:36:84", + "nodeType": "YulIf", + "src": "16441:36:84" + } + ] + }, + "name": "checked_add_t_uint256", + "nativeSrc": "16358:125:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nativeSrc": "16389:1:84", + "nodeType": "YulTypedName", + "src": "16389:1:84", + "type": "" + }, + { + "name": "y", + "nativeSrc": "16392:1:84", + "nodeType": "YulTypedName", + "src": "16392:1:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nativeSrc": "16398:3:84", + "nodeType": "YulTypedName", + "src": "16398:3:84", + "type": "" + } + ], + "src": "16358:125:84" + }, + { + "body": { + "nativeSrc": "16587:87:84", + "nodeType": "YulBlock", + "src": "16587:87:84", + "statements": [ + { + "nativeSrc": "16597:26:84", + "nodeType": "YulAssignment", + "src": "16597:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "16609:9:84", + "nodeType": "YulIdentifier", + "src": "16609:9:84" + }, + { + "kind": "number", + "nativeSrc": "16620:2:84", + "nodeType": "YulLiteral", + "src": "16620:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "16605:3:84", + "nodeType": "YulIdentifier", + "src": "16605:3:84" + }, + "nativeSrc": "16605:18:84", + "nodeType": "YulFunctionCall", + "src": "16605:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "16597:4:84", + "nodeType": "YulIdentifier", + "src": "16597:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "16639:9:84", + "nodeType": "YulIdentifier", + "src": "16639:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "16654:6:84", + "nodeType": "YulIdentifier", + "src": "16654:6:84" + }, + { + "kind": "number", + "nativeSrc": "16662:4:84", + "nodeType": "YulLiteral", + "src": "16662:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16650:3:84", + "nodeType": "YulIdentifier", + "src": "16650:3:84" + }, + "nativeSrc": "16650:17:84", + "nodeType": "YulFunctionCall", + "src": "16650:17:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "16632:6:84", + "nodeType": "YulIdentifier", + "src": "16632:6:84" + }, + "nativeSrc": "16632:36:84", + "nodeType": "YulFunctionCall", + "src": "16632:36:84" + }, + "nativeSrc": "16632:36:84", + "nodeType": "YulExpressionStatement", + "src": "16632:36:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint8__to_t_uint256__fromStack_reversed", + "nativeSrc": "16488:186:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "16556:9:84", + "nodeType": "YulTypedName", + "src": "16556:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "16567:6:84", + "nodeType": "YulTypedName", + "src": "16567:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "16578:4:84", + "nodeType": "YulTypedName", + "src": "16578:4:84", + "type": "" + } + ], + "src": "16488:186:84" + }, + { + "body": { + "nativeSrc": "16804:141:84", + "nodeType": "YulBlock", + "src": "16804:141:84", + "statements": [ + { + "nativeSrc": "16814:26:84", + "nodeType": "YulAssignment", + "src": "16814:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "16826:9:84", + "nodeType": "YulIdentifier", + "src": "16826:9:84" + }, + { + "kind": "number", + "nativeSrc": "16837:2:84", + "nodeType": "YulLiteral", + "src": "16837:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "16822:3:84", + "nodeType": "YulIdentifier", + "src": "16822:3:84" + }, + "nativeSrc": "16822:18:84", + "nodeType": "YulFunctionCall", + "src": "16822:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "16814:4:84", + "nodeType": "YulIdentifier", + "src": "16814:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "16856:9:84", + "nodeType": "YulIdentifier", + "src": "16856:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "16871:6:84", + "nodeType": "YulIdentifier", + "src": "16871:6:84" + }, + { + "kind": "number", + "nativeSrc": "16879:4:84", + "nodeType": "YulLiteral", + "src": "16879:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16867:3:84", + "nodeType": "YulIdentifier", + "src": "16867:3:84" + }, + "nativeSrc": "16867:17:84", + "nodeType": "YulFunctionCall", + "src": "16867:17:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "16849:6:84", + "nodeType": "YulIdentifier", + "src": "16849:6:84" + }, + "nativeSrc": "16849:36:84", + "nodeType": "YulFunctionCall", + "src": "16849:36:84" + }, + "nativeSrc": "16849:36:84", + "nodeType": "YulExpressionStatement", + "src": "16849:36:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "16905:9:84", + "nodeType": "YulIdentifier", + "src": "16905:9:84" + }, + { + "kind": "number", + "nativeSrc": "16916:2:84", + "nodeType": "YulLiteral", + "src": "16916:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "16901:3:84", + "nodeType": "YulIdentifier", + "src": "16901:3:84" + }, + "nativeSrc": "16901:18:84", + "nodeType": "YulFunctionCall", + "src": "16901:18:84" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "16925:6:84", + "nodeType": "YulIdentifier", + "src": "16925:6:84" + }, + { + "kind": "number", + "nativeSrc": "16933:4:84", + "nodeType": "YulLiteral", + "src": "16933:4:84", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "16921:3:84", + "nodeType": "YulIdentifier", + "src": "16921:3:84" + }, + "nativeSrc": "16921:17:84", + "nodeType": "YulFunctionCall", + "src": "16921:17:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "16894:6:84", + "nodeType": "YulIdentifier", + "src": "16894:6:84" + }, + "nativeSrc": "16894:45:84", + "nodeType": "YulFunctionCall", + "src": "16894:45:84" + }, + "nativeSrc": "16894:45:84", + "nodeType": "YulExpressionStatement", + "src": "16894:45:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint8_t_uint8__to_t_uint256_t_uint256__fromStack_reversed", + "nativeSrc": "16679:266:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "16765:9:84", + "nodeType": "YulTypedName", + "src": "16765:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "16776:6:84", + "nodeType": "YulTypedName", + "src": "16776:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "16784:6:84", + "nodeType": "YulTypedName", + "src": "16784:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "16795:4:84", + "nodeType": "YulTypedName", + "src": "16795:4:84", + "type": "" + } + ], + "src": "16679:266:84" + }, + { + "body": { + "nativeSrc": "17087:150:84", + "nodeType": "YulBlock", + "src": "17087:150:84", + "statements": [ + { + "nativeSrc": "17097:27:84", + "nodeType": "YulVariableDeclaration", + "src": "17097:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "17117:6:84", + "nodeType": "YulIdentifier", + "src": "17117:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "17111:5:84", + "nodeType": "YulIdentifier", + "src": "17111:5:84" + }, + "nativeSrc": "17111:13:84", + "nodeType": "YulFunctionCall", + "src": "17111:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "17101:6:84", + "nodeType": "YulTypedName", + "src": "17101:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "17172:6:84", + "nodeType": "YulIdentifier", + "src": "17172:6:84" + }, + { + "kind": "number", + "nativeSrc": "17180:4:84", + "nodeType": "YulLiteral", + "src": "17180:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17168:3:84", + "nodeType": "YulIdentifier", + "src": "17168:3:84" + }, + "nativeSrc": "17168:17:84", + "nodeType": "YulFunctionCall", + "src": "17168:17:84" + }, + { + "name": "pos", + "nativeSrc": "17187:3:84", + "nodeType": "YulIdentifier", + "src": "17187:3:84" + }, + { + "name": "length", + "nativeSrc": "17192:6:84", + "nodeType": "YulIdentifier", + "src": "17192:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "17133:34:84", + "nodeType": "YulIdentifier", + "src": "17133:34:84" + }, + "nativeSrc": "17133:66:84", + "nodeType": "YulFunctionCall", + "src": "17133:66:84" + }, + "nativeSrc": "17133:66:84", + "nodeType": "YulExpressionStatement", + "src": "17133:66:84" + }, + { + "nativeSrc": "17208:23:84", + "nodeType": "YulAssignment", + "src": "17208:23:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "17219:3:84", + "nodeType": "YulIdentifier", + "src": "17219:3:84" + }, + { + "name": "length", + "nativeSrc": "17224:6:84", + "nodeType": "YulIdentifier", + "src": "17224:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17215:3:84", + "nodeType": "YulIdentifier", + "src": "17215:3:84" + }, + "nativeSrc": "17215:16:84", + "nodeType": "YulFunctionCall", + "src": "17215:16:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "17208:3:84", + "nodeType": "YulIdentifier", + "src": "17208:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "16950:287:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "17063:3:84", + "nodeType": "YulTypedName", + "src": "17063:3:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "17068:6:84", + "nodeType": "YulTypedName", + "src": "17068:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "17079:3:84", + "nodeType": "YulTypedName", + "src": "17079:3:84", + "type": "" + } + ], + "src": "16950:287:84" + }, + { + "body": { + "nativeSrc": "17425:309:84", + "nodeType": "YulBlock", + "src": "17425:309:84", + "statements": [ + { + "nativeSrc": "17435:27:84", + "nodeType": "YulVariableDeclaration", + "src": "17435:27:84", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "17455:6:84", + "nodeType": "YulIdentifier", + "src": "17455:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "17449:5:84", + "nodeType": "YulIdentifier", + "src": "17449:5:84" + }, + "nativeSrc": "17449:13:84", + "nodeType": "YulFunctionCall", + "src": "17449:13:84" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "17439:6:84", + "nodeType": "YulTypedName", + "src": "17439:6:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "17510:6:84", + "nodeType": "YulIdentifier", + "src": "17510:6:84" + }, + { + "kind": "number", + "nativeSrc": "17518:4:84", + "nodeType": "YulLiteral", + "src": "17518:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17506:3:84", + "nodeType": "YulIdentifier", + "src": "17506:3:84" + }, + "nativeSrc": "17506:17:84", + "nodeType": "YulFunctionCall", + "src": "17506:17:84" + }, + { + "name": "pos", + "nativeSrc": "17525:3:84", + "nodeType": "YulIdentifier", + "src": "17525:3:84" + }, + { + "name": "length", + "nativeSrc": "17530:6:84", + "nodeType": "YulIdentifier", + "src": "17530:6:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "17471:34:84", + "nodeType": "YulIdentifier", + "src": "17471:34:84" + }, + "nativeSrc": "17471:66:84", + "nodeType": "YulFunctionCall", + "src": "17471:66:84" + }, + "nativeSrc": "17471:66:84", + "nodeType": "YulExpressionStatement", + "src": "17471:66:84" + }, + { + "nativeSrc": "17546:29:84", + "nodeType": "YulVariableDeclaration", + "src": "17546:29:84", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "17563:3:84", + "nodeType": "YulIdentifier", + "src": "17563:3:84" + }, + { + "name": "length", + "nativeSrc": "17568:6:84", + "nodeType": "YulIdentifier", + "src": "17568:6:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17559:3:84", + "nodeType": "YulIdentifier", + "src": "17559:3:84" + }, + "nativeSrc": "17559:16:84", + "nodeType": "YulFunctionCall", + "src": "17559:16:84" + }, + "variables": [ + { + "name": "end_1", + "nativeSrc": "17550:5:84", + "nodeType": "YulTypedName", + "src": "17550:5:84", + "type": "" + } + ] + }, + { + "nativeSrc": "17584:29:84", + "nodeType": "YulVariableDeclaration", + "src": "17584:29:84", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "17606:6:84", + "nodeType": "YulIdentifier", + "src": "17606:6:84" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "17600:5:84", + "nodeType": "YulIdentifier", + "src": "17600:5:84" + }, + "nativeSrc": "17600:13:84", + "nodeType": "YulFunctionCall", + "src": "17600:13:84" + }, + "variables": [ + { + "name": "length_1", + "nativeSrc": "17588:8:84", + "nodeType": "YulTypedName", + "src": "17588:8:84", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "17661:6:84", + "nodeType": "YulIdentifier", + "src": "17661:6:84" + }, + { + "kind": "number", + "nativeSrc": "17669:4:84", + "nodeType": "YulLiteral", + "src": "17669:4:84", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17657:3:84", + "nodeType": "YulIdentifier", + "src": "17657:3:84" + }, + "nativeSrc": "17657:17:84", + "nodeType": "YulFunctionCall", + "src": "17657:17:84" + }, + { + "name": "end_1", + "nativeSrc": "17676:5:84", + "nodeType": "YulIdentifier", + "src": "17676:5:84" + }, + { + "name": "length_1", + "nativeSrc": "17683:8:84", + "nodeType": "YulIdentifier", + "src": "17683:8:84" + } + ], + "functionName": { + "name": "copy_memory_to_memory_with_cleanup", + "nativeSrc": "17622:34:84", + "nodeType": "YulIdentifier", + "src": "17622:34:84" + }, + "nativeSrc": "17622:70:84", + "nodeType": "YulFunctionCall", + "src": "17622:70:84" + }, + "nativeSrc": "17622:70:84", + "nodeType": "YulExpressionStatement", + "src": "17622:70:84" + }, + { + "nativeSrc": "17701:27:84", + "nodeType": "YulAssignment", + "src": "17701:27:84", + "value": { + "arguments": [ + { + "name": "end_1", + "nativeSrc": "17712:5:84", + "nodeType": "YulIdentifier", + "src": "17712:5:84" + }, + { + "name": "length_1", + "nativeSrc": "17719:8:84", + "nodeType": "YulIdentifier", + "src": "17719:8:84" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17708:3:84", + "nodeType": "YulIdentifier", + "src": "17708:3:84" + }, + "nativeSrc": "17708:20:84", + "nodeType": "YulFunctionCall", + "src": "17708:20:84" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "17701:3:84", + "nodeType": "YulIdentifier", + "src": "17701:3:84" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr_t_bytes_memory_ptr__to_t_bytes_memory_ptr_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "17242:492:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "17393:3:84", + "nodeType": "YulTypedName", + "src": "17393:3:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "17398:6:84", + "nodeType": "YulTypedName", + "src": "17398:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "17406:6:84", + "nodeType": "YulTypedName", + "src": "17406:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "17417:3:84", + "nodeType": "YulTypedName", + "src": "17417:3:84", + "type": "" + } + ], + "src": "17242:492:84" + }, + { + "body": { + "nativeSrc": "17868:119:84", + "nodeType": "YulBlock", + "src": "17868:119:84", + "statements": [ + { + "nativeSrc": "17878:26:84", + "nodeType": "YulAssignment", + "src": "17878:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "17890:9:84", + "nodeType": "YulIdentifier", + "src": "17890:9:84" + }, + { + "kind": "number", + "nativeSrc": "17901:2:84", + "nodeType": "YulLiteral", + "src": "17901:2:84", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17886:3:84", + "nodeType": "YulIdentifier", + "src": "17886:3:84" + }, + "nativeSrc": "17886:18:84", + "nodeType": "YulFunctionCall", + "src": "17886:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "17878:4:84", + "nodeType": "YulIdentifier", + "src": "17878:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "17920:9:84", + "nodeType": "YulIdentifier", + "src": "17920:9:84" + }, + { + "name": "value0", + "nativeSrc": "17931:6:84", + "nodeType": "YulIdentifier", + "src": "17931:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "17913:6:84", + "nodeType": "YulIdentifier", + "src": "17913:6:84" + }, + "nativeSrc": "17913:25:84", + "nodeType": "YulFunctionCall", + "src": "17913:25:84" + }, + "nativeSrc": "17913:25:84", + "nodeType": "YulExpressionStatement", + "src": "17913:25:84" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "17958:9:84", + "nodeType": "YulIdentifier", + "src": "17958:9:84" + }, + { + "kind": "number", + "nativeSrc": "17969:2:84", + "nodeType": "YulLiteral", + "src": "17969:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "17954:3:84", + "nodeType": "YulIdentifier", + "src": "17954:3:84" + }, + "nativeSrc": "17954:18:84", + "nodeType": "YulFunctionCall", + "src": "17954:18:84" + }, + { + "name": "value1", + "nativeSrc": "17974:6:84", + "nodeType": "YulIdentifier", + "src": "17974:6:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "17947:6:84", + "nodeType": "YulIdentifier", + "src": "17947:6:84" + }, + "nativeSrc": "17947:34:84", + "nodeType": "YulFunctionCall", + "src": "17947:34:84" + }, + "nativeSrc": "17947:34:84", + "nodeType": "YulExpressionStatement", + "src": "17947:34:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed", + "nativeSrc": "17739:248:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "17829:9:84", + "nodeType": "YulTypedName", + "src": "17829:9:84", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "17840:6:84", + "nodeType": "YulTypedName", + "src": "17840:6:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "17848:6:84", + "nodeType": "YulTypedName", + "src": "17848:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "17859:4:84", + "nodeType": "YulTypedName", + "src": "17859:4:84", + "type": "" + } + ], + "src": "17739:248:84" + }, + { + "body": { + "nativeSrc": "18092:101:84", + "nodeType": "YulBlock", + "src": "18092:101:84", + "statements": [ + { + "nativeSrc": "18102:26:84", + "nodeType": "YulAssignment", + "src": "18102:26:84", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "18114:9:84", + "nodeType": "YulIdentifier", + "src": "18114:9:84" + }, + { + "kind": "number", + "nativeSrc": "18125:2:84", + "nodeType": "YulLiteral", + "src": "18125:2:84", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18110:3:84", + "nodeType": "YulIdentifier", + "src": "18110:3:84" + }, + "nativeSrc": "18110:18:84", + "nodeType": "YulFunctionCall", + "src": "18110:18:84" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "18102:4:84", + "nodeType": "YulIdentifier", + "src": "18102:4:84" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "18144:9:84", + "nodeType": "YulIdentifier", + "src": "18144:9:84" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "18159:6:84", + "nodeType": "YulIdentifier", + "src": "18159:6:84" + }, + { + "kind": "number", + "nativeSrc": "18167:18:84", + "nodeType": "YulLiteral", + "src": "18167:18:84", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "18155:3:84", + "nodeType": "YulIdentifier", + "src": "18155:3:84" + }, + "nativeSrc": "18155:31:84", + "nodeType": "YulFunctionCall", + "src": "18155:31:84" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18137:6:84", + "nodeType": "YulIdentifier", + "src": "18137:6:84" + }, + "nativeSrc": "18137:50:84", + "nodeType": "YulFunctionCall", + "src": "18137:50:84" + }, + "nativeSrc": "18137:50:84", + "nodeType": "YulExpressionStatement", + "src": "18137:50:84" + } + ] + }, + "name": "abi_encode_tuple_t_uint64__to_t_uint256__fromStack_reversed", + "nativeSrc": "17992:201:84", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "18061:9:84", + "nodeType": "YulTypedName", + "src": "18061:9:84", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "18072:6:84", + "nodeType": "YulTypedName", + "src": "18072:6:84", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "18083:4:84", + "nodeType": "YulTypedName", + "src": "18083:4:84", + "type": "" + } + ], + "src": "17992:201:84" + } + ] + }, + "contents": "{\n { }\n function copy_memory_to_memory_with_cleanup(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n function abi_encode_tuple_packed_t_stringliteral_6aa2932fe75962e4eb862ba4982429ce713637712a759cb9d40b6d5260a002eb_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value3, value2, value1, value0) -> end\n {\n mstore(pos, \"not implemented: 0x\")\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), add(pos, 19), length)\n let _1 := add(pos, length)\n let length_1 := mload(value1)\n copy_memory_to_memory_with_cleanup(add(value1, 0x20), add(_1, 19), length_1)\n let _2 := add(_1, length_1)\n let length_2 := mload(value2)\n copy_memory_to_memory_with_cleanup(add(value2, 0x20), add(_2, 19), length_2)\n let _3 := add(_2, length_2)\n let length_3 := mload(value3)\n copy_memory_to_memory_with_cleanup(add(value3, 0x20), add(_3, 19), length_3)\n end := add(add(_3, length_3), 19)\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_bytes32_t_uint64_t_bytes32_t_uint256__to_t_bytes32_t_uint64_t_bytes32_t_uint256__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xffffffffffffffff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n function validator_revert_uint32(value)\n {\n if iszero(eq(value, and(value, 0xffffffff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_uint32t_uint256t_uint256(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_uint32(value)\n value0 := value\n value1 := calldataload(add(headStart, 32))\n value2 := calldataload(add(headStart, 64))\n }\n function abi_encode_tuple_t_uint32__to_t_uint32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffffffff))\n }\n function abi_encode_tuple_t_contract$_WitnetOracle_$749__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function panic_error_0x21()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_enum$_ResponseStatus_$23496__to_t_uint8__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n if iszero(lt(value0, 6))\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_struct$_RadonSLA_$23503_memory_ptr__to_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(mload(value0), 0xff))\n mstore(add(headStart, 0x20), and(mload(add(value0, 0x20)), 0xffffffffffffffff))\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_encode_tuple_t_uint256_t_uint256_t_uint256__to_t_uint256_t_uint256_t_uint256__fromStack_reversed(headStart, value2, value1, value0) -> tail\n {\n tail := add(headStart, 96)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n }\n function abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, shl(224, 0xffffffff)))\n }\n function abi_decode_tuple_t_uint16(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, 0xffff))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n let length := mload(value0)\n mstore(add(headStart, 32), length)\n copy_memory_to_memory_with_cleanup(add(value0, 32), add(headStart, 64), length)\n tail := add(add(headStart, and(add(length, 31), not(31))), 64)\n }\n function abi_decode_tuple_t_struct$_RadonSLA_$23503_calldata_ptr(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := headStart\n }\n function abi_encode_tuple_t_uint16__to_t_uint16__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffff))\n }\n function validator_revert_address(value)\n {\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_address(value)\n value0 := value\n }\n function abi_encode_tuple_packed_t_string_memory_ptr_t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n let end_1 := add(pos, length)\n mstore(end_1, \": \")\n let length_1 := mload(value1)\n copy_memory_to_memory_with_cleanup(add(value1, 0x20), add(end_1, 2), length_1)\n end := add(add(end_1, length_1), 2)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function panic_error_0x12()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n function panic_error_0x11()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n function checked_div_t_uint8(x, y) -> r\n {\n let y_1 := and(y, 0xff)\n if iszero(y_1) { panic_error_0x12() }\n r := div(and(x, 0xff), y_1)\n }\n function checked_add_t_uint8(x, y) -> sum\n {\n sum := add(and(x, 0xff), and(y, 0xff))\n if gt(sum, 0xff) { panic_error_0x11() }\n }\n function mod_t_uint8(x, y) -> r\n {\n let y_1 := and(y, 0xff)\n if iszero(y_1) { panic_error_0x12() }\n r := mod(and(x, 0xff), y_1)\n }\n function panic_error_0x32()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n function abi_decode_tuple_t_enum$_ResponseStatus_$23496_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(lt(value, 6)) { revert(0, 0) }\n value0 := value\n }\n function allocate_memory() -> memPtr\n {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, 0xa0)\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n function validator_revert_uint64(value)\n {\n if iszero(eq(value, and(value, 0xffffffffffffffff))) { revert(0, 0) }\n }\n function abi_decode_bytes_fromMemory(offset, end) -> array\n {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let _1 := mload(offset)\n let _2 := 0xffffffffffffffff\n if gt(_1, _2) { panic_error_0x41() }\n let _3 := not(31)\n let memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(and(add(_1, 0x1f), _3), 63), _3))\n if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n mstore(memPtr, _1)\n if gt(add(add(offset, _1), 0x20), end) { revert(0, 0) }\n copy_memory_to_memory_with_cleanup(add(offset, 0x20), add(memPtr, 0x20), _1)\n array := memPtr\n }\n function abi_decode_tuple_t_struct$_Response_$23488_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := mload(headStart)\n let _1 := 0xffffffffffffffff\n if gt(offset, _1) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if slt(sub(dataEnd, _2), 0xa0) { revert(0, 0) }\n let value := allocate_memory()\n let value_1 := mload(_2)\n validator_revert_address(value_1)\n mstore(value, value_1)\n let value_2 := mload(add(_2, 32))\n validator_revert_uint64(value_2)\n mstore(add(value, 32), value_2)\n let value_3 := mload(add(_2, 64))\n validator_revert_uint32(value_3)\n mstore(add(value, 64), value_3)\n mstore(add(value, 96), mload(add(_2, 96)))\n let offset_1 := mload(add(_2, 128))\n if gt(offset_1, _1) { revert(0, 0) }\n mstore(add(value, 128), abi_decode_bytes_fromMemory(add(_2, offset_1), dataEnd))\n value0 := value\n }\n function abi_encode_tuple_t_address_t_bytes32__to_t_address_t_bytes32__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_struct_RadonSLA_storage(value, pos)\n {\n let slotValue := sload(value)\n mstore(pos, and(slotValue, 0xff))\n mstore(add(pos, 0x20), and(shr(8, slotValue), 0xffffffffffffffff))\n }\n function abi_encode_tuple_t_bytes32_t_struct$_RadonSLA_$23503_storage__to_t_bytes32_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 96)\n mstore(headStart, value0)\n abi_encode_struct_RadonSLA_storage(value1, add(headStart, 32))\n }\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function abi_encode_tuple_t_uint256_t_uint256_t_uint256_t_uint256_t_struct$_RadonSLA_$23503_storage__to_t_uint256_t_uint256_t_uint256_t_uint256_t_struct$_RadonSLA_$23503_memory_ptr__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 192)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n abi_encode_struct_RadonSLA_storage(value4, add(headStart, 128))\n }\n function checked_sub_t_uint256(x, y) -> diff\n {\n diff := sub(x, y)\n if gt(diff, x) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_uint256_t_bytes32__to_t_uint256_t_bytes32__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_tuple_t_uint256_t_uint16__to_t_uint256_t_uint16__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xffff))\n }\n function checked_add_t_uint16(x, y) -> sum\n {\n let _1 := 0xffff\n sum := add(and(x, _1), and(y, _1))\n if gt(sum, _1) { panic_error_0x11() }\n }\n function checked_mul_t_uint256(x, y) -> product\n {\n product := mul(x, y)\n if iszero(or(iszero(x), eq(y, div(product, x)))) { panic_error_0x11() }\n }\n function checked_div_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := div(x, y)\n }\n function panic_error_0x01()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x01)\n revert(0, 0x24)\n }\n function validator_revert_uint8(value)\n {\n if iszero(eq(value, and(value, 0xff))) { revert(0, 0) }\n }\n function update_storage_value_offset_0t_struct$_RadonSLA_$23503_calldata_ptr_to_t_struct$_RadonSLA_$23503_storage(slot, value)\n {\n let value_1 := calldataload(value)\n validator_revert_uint8(value_1)\n let _1 := and(value_1, 0xff)\n let _2 := sload(slot)\n sstore(slot, or(and(_2, not(255)), _1))\n let value_2 := calldataload(add(value, 32))\n validator_revert_uint64(value_2)\n sstore(slot, or(or(and(_2, not(0xffffffffffffffffff)), _1), and(shl(8, value_2), 0xffffffffffffffff00)))\n }\n function abi_encode_tuple_t_stringliteral_c540643114d8824fc67c5a3bcabc32e042f198b987f1133b221fc24db5c15b9a__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 50)\n mstore(add(headStart, 64), \"Witnet: tried to decode value fr\")\n mstore(add(headStart, 96), \"om errored result.\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_bytes32_t_uint256__to_t_bytes32_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_tuple_t_stringliteral_225559eb8402045bea7ff07c35d0ad8c0547830223ac1c21d44fb948d6896ebc__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 41)\n mstore(add(headStart, 64), \"Ownable2Step: caller is not the \")\n mstore(add(headStart, 96), \"new owner\")\n tail := add(headStart, 128)\n }\n function abi_decode_tuple_t_bytes_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_bytes_fromMemory(add(headStart, offset), dataEnd)\n }\n function abi_decode_tuple_t_uint64(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_uint64(value)\n value0 := value\n }\n function abi_decode_tuple_t_uint8(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_uint8(value)\n value0 := value\n }\n function checked_mul_t_uint64(x, y) -> product\n {\n let _1 := 0xffffffffffffffff\n let product_raw := mul(and(x, _1), and(y, _1))\n product := and(product_raw, _1)\n if iszero(eq(product, product_raw)) { panic_error_0x11() }\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0)) { panic_error_0x11() }\n ret := add(value, 1)\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n sum := add(x, y)\n if gt(x, sum) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_uint8__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xff))\n }\n function abi_encode_tuple_t_uint8_t_uint8__to_t_uint256_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, 0xff))\n mstore(add(headStart, 32), and(value1, 0xff))\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n end := add(pos, length)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr_t_bytes_memory_ptr__to_t_bytes_memory_ptr_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), pos, length)\n let end_1 := add(pos, length)\n let length_1 := mload(value1)\n copy_memory_to_memory_with_cleanup(add(value1, 0x20), end_1, length_1)\n end := add(end_1, length_1)\n }\n function abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_tuple_t_uint64__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffffffffffffffff))\n }\n}", + "id": 84, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "387:21272:23:-:0;;;1169:1618;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1308:7;1276:9;-1:-1:-1;;;;;1273:26:1;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:1;;1350:1;1322:31;;;748:51:84;721:18;;1322:31:1;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;1225:187;-1:-1:-1;;;;;;;;1219:47:16;;:4;-1:-1:-1;;;;;1219:10:16;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;;1219:47:16;;1197:134;;;;-1:-1:-1;;;1197:134:16;;1307:2:84;1197:134:16;;;1289:21:84;1346:2;1326:18;;;1319:30;1385:34;1365:18;;;1358:62;-1:-1:-1;;;1436:18:84;;;1429:35;1481:19;;1197:134:16;1105:401:84;1197:134:16;-1:-1:-1;;;;;1342:15:16;;;;;1389:355;;;;;;;;;1543:2;1389:355;;1696:11;1389:355;;;;;1368:18;:376;;;-1:-1:-1;;;;;;1368:376:16;;;;;;1765:33;:38;;-1:-1:-1;;1765:38:16;1801:2;1765:38;;;1333:176:23::2;::::0;1356:30;::::2;::::0;;:101:::2;;;-1:-1:-1::0;;;;;;;;1407:50:23::2;;:7;-1:-1:-1::0;;;;;1407:13:23::2;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;;1407:50:23::2;;1356:101;1333:176;::::0;;;;::::2;::::0;;;::::2;::::0;;::::2;;::::0;::::2;::::0;:8:::2;:176::i;:::-;1520:32;1555:8;:6;:8::i;:::-;-1:-1:-1::0;;;;;1555:17:23::2;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1684:16;::::0;;1698:1:::2;1684:16:::0;;;;;::::2;::::0;;;1520:54;;-1:-1:-1;1653:28:23::2;::::0;1684:16;::::2;::::0;;::::2;::::0;;::::2;::::0;::::2;-1:-1:-1::0;;1913:18:23::2;::::0;;1929:1:::2;1913:18:::0;;;::::2;::::0;::::2;::::0;;;1653:47;;-1:-1:-1;;;;;;1732:30:23;::::2;::::0;::::2;::::0;-1:-1:-1;1781:34:23::2;::::0;1913:18:::2;::::0;::::2;;;:::i;:::-;;;;;;;;;;;;;;;;;1732:289;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1715:11;1727:1;1715:14;;;;;;;;:::i;:::-;;;;;;:306;;;::::0;::::2;2036:36;2087:19;2109:9;-1:-1:-1::0;;;;;2109:28:23::2;;2138:144;;;;;;;;2185:31;2138:144;;;;;;;;:::i;:::-;;;;;2244:8;2138:144;;::::0;2109:174:::2;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2087:196;;2298:14;2315:9;-1:-1:-1::0;;;;;2315:28:23::2;;2344:158;;;;;;;;2391:45;2344:158:::0;::::2;;;;;;;:::i;:::-;;;;;2464:8;2344:158;;::::0;2315:188:::2;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2298:205;;2534:9;-1:-1:-1::0;;;;;2534:28:23::2;;2581:11;2611;2641:6;2666:2;2734:11;:18;-1:-1:-1::0;;;;;2719:34:23::2;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2534:234;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2518:250;::::0;-1:-1:-1;387:21272:23;;-1:-1:-1;;;;;;387:21272:23;1478:156:79;1568:13;1561:20;;-1:-1:-1;;;;;;1561:20:79;;;1592:34;1617:8;1592:24;:34::i;:::-;1478:156;:::o;19954:204:23:-;20095:10;20090:61;;20122:17;20130:8;20122:7;:17::i;:::-;19954:204;;:::o;3544:155::-;3634:12;3671:20;2377:8:16;;;2298:95;3671:20:23;3664:27;;3544:155;:::o;2912:187:1:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:1;;;-1:-1:-1;;;;;;3020:17:1;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;20166:235:23:-;3366:29;;;;;;;;;;;;-1:-1:-1;;;3366:29:23;;;;20358:8;20274:107;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;20274:107:23;;;;;;;;;;-1:-1:-1;;;20246:147:23;;;;;;;:::i;387:21272::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:145:84:-;-1:-1:-1;;;;;103:31:84;;93:42;;83:70;;149:1;146;139:12;164:433;263:6;271;324:2;312:9;303:7;299:23;295:32;292:52;;;340:1;337;330:12;292:52;372:9;366:16;391:45;430:5;391:45;:::i;:::-;505:2;490:18;;484:25;455:5;;-1:-1:-1;518:47:84;484:25;518:47;:::i;:::-;584:7;574:17;;;164:433;;;;;:::o;810:290::-;879:6;932:2;920:9;911:7;907:23;903:32;900:52;;;948:1;945;938:12;900:52;974:16;;-1:-1:-1;;;;;;1019:32:84;;1009:43;;999:71;;1066:1;1063;1056:12;999:71;1089:5;810:290;-1:-1:-1;;;810:290:84:o;1511:295::-;1611:6;1664:2;1652:9;1643:7;1639:23;1635:32;1632:52;;;1680:1;1677;1670:12;1632:52;1712:9;1706:16;1731:45;1770:5;1731:45;:::i;1811:127::-;1872:10;1867:3;1863:20;1860:1;1853:31;1903:4;1900:1;1893:15;1927:4;1924:1;1917:15;1943:127;2004:10;1999:3;1995:20;1992:1;1985:31;2035:4;2032:1;2025:15;2059:4;2056:1;2049:15;2075:250;2160:1;2170:113;2184:6;2181:1;2178:13;2170:113;;;2260:11;;;2254:18;2241:11;;;2234:39;2206:2;2199:10;2170:113;;;-1:-1:-1;;2317:1:84;2299:16;;2292:27;2075:250::o;2330:271::-;2372:3;2410:5;2404:12;2437:6;2432:3;2425:19;2453:76;2522:6;2515:4;2510:3;2506:14;2499:4;2492:5;2488:16;2453:76;:::i;:::-;2583:2;2562:15;-1:-1:-1;;2558:29:84;2549:39;;;;2590:4;2545:50;;2330:271;-1:-1:-1;;2330:271:84:o;2768:2087::-;3333:4;3373:1;3365:6;3362:13;3352:47;;3379:18;;:::i;:::-;3426:6;3415:9;3408:25;3452:2;3490:3;3485:2;3474:9;3470:18;3463:31;3513:1;3551;3545:3;3534:9;3530:19;3523:30;3572:2;3610:3;3605:2;3594:9;3590:18;3583:31;3651:1;3645:3;3634:9;3630:19;3623:30;3696:3;3685:9;3681:19;3736:3;3731:2;3720:9;3716:18;3709:31;3760:11;3800:6;3794:13;3836:6;3823:11;3816:27;3862:3;3852:13;;3896:2;3885:9;3881:18;3874:25;;3958:2;3948:6;3945:1;3941:14;3930:9;3926:30;3922:39;3908:53;;3996:2;3988:6;3984:15;4017:1;4027:708;4041:6;4038:1;4035:13;4027:708;;;4106:22;;;-1:-1:-1;;4102:37:84;4090:50;;4163:13;;4110:6;4263:15;;;4333:2;4348:278;4364:4;4359:3;4356:13;4348:278;;;4449:6;4441;4437:19;4430:5;4423:34;4484:42;4519:6;4508:8;4502:15;4484:42;:::i;:::-;4555:17;;;;4598:14;;;;4474:52;-1:-1:-1;4388:1:84;4379:11;4348:278;;;-1:-1:-1;4649:6:84;-1:-1:-1;;;4713:12:84;;;;4678:15;;;;4063:1;4056:9;4027:708;;;-1:-1:-1;;;;4772:22:84;;;4766:3;4751:19;;4744:51;2683:1;2671:14;;-1:-1:-1;;;2710:4:84;2701:14;;2694:35;2754:2;2745:12;;4804:45;2768:2087;-1:-1:-1;;;;;;;;2768:2087:84:o;4860:184::-;4930:6;4983:2;4971:9;4962:7;4958:23;4954:32;4951:52;;;4999:1;4996;4989:12;4951:52;-1:-1:-1;5022:16:84;;4860:184;-1:-1:-1;4860:184:84:o;5049:127::-;5110:10;5105:3;5101:20;5098:1;5091:31;5141:4;5138:1;5131:15;5165:4;5162:1;5155:15;5181:1310;5335:4;5364:2;5393;5382:9;5375:21;5434:2;5423:9;5419:18;5462:6;5456:13;5495:2;5491;5488:10;5478:44;;5502:18;;:::i;:::-;5538;;;5531:30;5596:15;;;5590:22;5631:4;5651:20;;;5644:34;;;5727:19;;5755:22;;;;5808:3;5858:1;5854:14;;;5839:30;;5835:40;;;5898:21;;;;5793:19;;;;5937:1;5947:515;5961:6;5958:1;5955:13;5947:515;;;6026:22;;;-1:-1:-1;;6022:37:84;6010:50;;6083:13;;6119:9;;6158:2;6151:10;;6141:44;;6165:18;;:::i;:::-;6198;;6257:11;;6251:18;6289:15;;;6282:27;;;6332:50;6366:15;;;6251:18;6332:50;:::i;:::-;6322:60;-1:-1:-1;;6405:15:84;;;;6440:12;;;;5983:1;5976:9;5947:515;;;-1:-1:-1;6479:6:84;;5181:1310;-1:-1:-1;;;;;;;;5181:1310:84:o;6496:2225::-;6926:3;6939:22;;;7010:13;;6911:19;;;7032:22;;;6878:4;;7108;;7085:3;7070:19;;;7135:15;;;6878:4;7178:169;7192:6;7189:1;7186:13;7178:169;;;7253:13;;7241:26;;7287:12;;;;7322:15;;;;7214:1;7207:9;7178:169;;;7182:3;;;7383:6;7378:2;7367:9;7363:18;7356:34;7426:6;7421:2;7410:9;7406:18;7399:34;7481:6;7473;7469:19;7464:2;7453:9;7449:18;7442:47;7535:9;7530:3;7526:19;7520:3;7509:9;7505:19;7498:48;7568:3;7602:6;7596:13;7630:8;7625:3;7618:21;7666:2;7661:3;7657:12;7648:21;;7688:1;7744:2;7732:8;7729:1;7725:16;7720:3;7716:26;7712:35;7784:2;7776:6;7772:15;7807:1;7817:875;7833:8;7828:3;7825:17;7817:875;;;-1:-1:-1;;7936:16:84;;;7932:25;;7918:40;;7981:15;;8057:9;;8079:24;;;8235:11;;;;8125:15;;;;8183:17;;;8171:30;;8167:39;;8270:1;8284:291;8300:8;8295:3;8292:17;8284:291;;;8402:2;8393:6;8385;8381:19;8377:28;8370:5;8363:43;8433:42;8468:6;8457:8;8451:15;8433:42;:::i;:::-;8504:17;;;;8547:14;;;;8423:52;-1:-1:-1;8328:1:84;8319:11;8284:291;;;-1:-1:-1;8668:14:84;;;;8598:6;-1:-1:-1;;;8629:17:84;;;;-1:-1:-1;;7861:1:84;7852:11;7817:875;;;-1:-1:-1;8709:6:84;;6496:2225;-1:-1:-1;;;;;;;;;;;;;6496:2225:84:o;8726:641::-;9006:3;9044:6;9038:13;9060:66;9119:6;9114:3;9107:4;9099:6;9095:17;9060:66;:::i;:::-;-1:-1:-1;;;9148:16:84;;;9173:19;;;9217:13;;9239:78;9217:13;9304:1;9293:13;;9286:4;9274:17;;9239:78;:::i;:::-;9337:20;9359:1;9333:28;;8726:641;-1:-1:-1;;;;8726:641:84:o;9372:220::-;9521:2;9510:9;9503:21;9484:4;9541:45;9582:2;9571:9;9567:18;9559:6;9541:45;:::i;9372:220::-;387:21272:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "387:21272:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2841:32;;;;;;;;;;;;;;-1:-1:-1;;;2841:32:23;;;:7;:32::i;:::-;387:21272;;2937:325;3019:42;3051:7;;3038:22;;3019:18;:42::i;:::-;3076:47;3095:27;3108:7;;3095:27;;;3076:18;:47::i;:::-;3138:48;3157:28;3170:7;;3157:28;;;3138:18;:48::i;:::-;3201;3220:28;3233:7;;3220:28;;;3201:18;:48::i;:::-;2952:308;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2937:7;:325::i;7974:1714::-;;;;;;;;;;-1:-1:-1;7974:1714:23;;;;;:::i;:::-;;:::i;:::-;;;;1760:25:84;;;-1:-1:-1;;;;;1821:31:84;;;1816:2;1801:18;;1794:59;1869:18;;;1862:34;1927:2;1912:18;;1905:34;1747:3;1732:19;7974:1714:23;;;;;;;;15348:434;;;;;;;;;;-1:-1:-1;15348:434:23;;;;;:::i;:::-;;:::i;:::-;;;2636:10:84;2624:23;;;2606:42;;2594:2;2579:18;15348:434:23;2462:192:84;3544:155:23;;;;;;;;;;-1:-1:-1;2377:8:16;3544:155:23;;;-1:-1:-1;;;;;2843:32:84;;;2825:51;;2813:2;2798:18;3544:155:23;2659:223:84;1113:47:23;;;;;;;;;;;;;;;;;;3033:25:84;;;3021:2;3006:18;1113:47:23;2887:177:84;16070:1381:23;;;:::i;2293:101:1:-;;;;;;;;;;;;;:::i;13209:1057:23:-;;;;;;;;;;-1:-1:-1;13209:1057:23;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;18214:162::-;;;;;;;;;;;;;:::i;5180:302::-;;;;;;;;;;-1:-1:-1;5180:302:23;;;;;:::i;:::-;;:::i;18569:172::-;;;;;;;;;;-1:-1:-1;18686:7:23;1710:6:1;-1:-1:-1;;;;;1710:6:1;18569:172:23;3544:155;9775:170;;;;;;;;;;;;;:::i;17791:169::-;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;17927:25:23;;;;;;;17934:18;17927:25;;;;;;;-1:-1:-1;;;;;17927:25:23;;;;;;;;;;;;17791:169;;4144:43:84;;;4229:24;;4225:49;4203:20;;;4196:79;;;;4117:18;17791:169:23;3944:337:84;14480:237:23;;;;;;;;;;-1:-1:-1;14480:237:23;;;;;:::i;:::-;;:::i;:::-;;;4451:14:84;;4444:22;4426:41;;4414:2;4399:18;14480:237:23;4286:187:84;10566:500:23;;;;;;;;;;-1:-1:-1;10566:500:23;;;;;:::i;:::-;;:::i;:::-;;;;4680:25:84;;;4736:2;4721:18;;4714:34;;;;4764:18;;;4757:34;4668:2;4653:18;10566:500:23;4478:319:84;4104:363:23;;;;;;;;;;-1:-1:-1;4104:363:23;;;;;:::i;:::-;;:::i;3411:125::-;;;;;;;;;;-1:-1:-1;3411:125:23;;-1:-1:-1;;;4946:52:84;;4934:2;4919:18;3411:125:23;4802:202:84;19172:225:23;;;;;;;;;;-1:-1:-1;19172:225:23;;;;;:::i;:::-;;:::i;3278:125::-;;;;;;;;;;-1:-1:-1;3366:29:23;;;;;;;;;;;-1:-1:-1;;;3366:29:23;;;;3278:125;;;;3366:29;3278:125;:::i;12067:451::-;;;;;;;;;;-1:-1:-1;12067:451:23;;;;;:::i;:::-;;:::i;19405:295::-;;;;;;;;;;-1:-1:-1;19405:295:23;;;;;:::i;:::-;;:::i;11354:418::-;;;;;;;;;;-1:-1:-1;11354:418:23;;;;;:::i;:::-;;:::i;18749:196::-;;;;;;;;;;;;;:::i;18384:177::-;;;;;;;;;;-1:-1:-1;18520:33:23;;18384:177;;18520:33;;;;6031:38:84;;6019:2;6004:18;18384:177:23;5887:188:84;18957:207:23;;;;;;;;;;-1:-1:-1;18957:207:23;;;;;:::i;:::-;;:::i;20166:235::-;3366:29;;;;;;;;;;;;-1:-1:-1;;;3366:29:23;;;;20358:8;20274:107;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;20274:107:23;;;;;;;;;;-1:-1:-1;;;20246:147:23;;;;;;;:::i;:::-;;;;;;;;19878:397:64;19999:12;;;20009:1;19999:12;;;;;;;;;19950:13;;19981:15;;19999:12;;;;;;;;;;;-1:-1:-1;;19981:30:64;-1:-1:-1;20022:8:64;20039:7;20044:2;20039;:7;:::i;:::-;20033:19;;20050:2;20033:19;:::i;:::-;20022:30;-1:-1:-1;20063:8:64;20080:7;20085:2;20080;:7;:::i;:::-;20074:19;;20091:2;20074:19;:::i;:::-;20063:30;;20113:2;20108;:7;;;20104:33;;;20130:7;20136:1;20130:7;;:::i;:::-;;;20104:33;20157:2;20152;:7;;;20148:33;;;20174:7;20180:1;20174:7;;:::i;:::-;;;20148:33;20207:2;20200:10;;20192:2;20195:1;20192:5;;;;;;;;:::i;:::-;;;;:18;-1:-1:-1;;;;;20192:18:64;;;;;;;;;20236:2;20229:10;;20221:2;20224:1;20221:5;;;;;;;;:::i;:::-;;;;:18;-1:-1:-1;;;;;20221:18:64;;;;;;;;-1:-1:-1;20264:2:64;;19878:397;-1:-1:-1;;;;19878:397:64:o;7974:1714:23:-;8112:31;8158:30;8203;8248:34;8314:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:50;:55;;8310:138;;8401:35;8423:12;8401:21;:35::i;:::-;8386:50;;8310:138;8460:29;8492:11;:9;:11::i;:::-;:22;;:36;8515:12;8492:36;;;;;;;;;;;8460:68;;8539:22;8564:11;:25;;;8539:50;;8600:85;8623:14;8641:1;8623:19;;8600:85;;;;;;;;;;;;;-1:-1:-1;;;8600:85:23;;;:8;:85::i;:::-;8740:47;;-1:-1:-1;;;8740:47:23;;;;;3033:25:84;;;8706:31:23;;8740:8;-1:-1:-1;;;;;8740:31:23;;;;3006:18:84;;8740:47:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8706:81;-1:-1:-1;8813:29:23;8802:7;:40;;;;;;;;:::i;:::-;;8798:883;;8907:41;;-1:-1:-1;;;8907:41:23;;;;;3033:25:84;;;8859:45:23;;8907:8;-1:-1:-1;;;;;8907:25:23;;;;3006:18:84;;8907:41:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8907:41:23;;;;;;;;;;;;:::i;:::-;8859:89;;8988:20;:36;;;8963:61;;;;9064:20;:36;;;9039:61;;9144:20;:29;;;-1:-1:-1;;;;;9115:58:23;;;9214:65;:53;:20;:36;;;:51;:53::i;:::-;:63;:65::i;:::-;9188:91;;8844:449;8798:883;;;9314:29;9303:7;:40;;;;;;;;:::i;:::-;;9299:382;;9390:21;;;;9426:104;;;;;;;;;;;;-1:-1:-1;;;9426:104:23;;;;;;9453:24;;;;9426:8;:104::i;:::-;9552:46;9578:19;9552:25;:46::i;:::-;9545:53;;;;;;;;;;;;;;9299:382;9641:28;;;;;;;;;;;;;;-1:-1:-1;;;9641:28:23;;;:7;:28::i;:::-;8299:1389;;;7974:1714;;;;;;:::o;15348:434::-;15485:6;15516:258;15559:6;15580;15662:10;15695:34;15716:12;15695:20;:34::i;:::-;15629:119;;;-1:-1:-1;;;;;10735:32:84;;;15629:119:23;;;10717:51:84;10784:18;;10777:34;10690:18;;15629:119:23;;;;;;;;;;;;15601:162;;;;;;15516:28;:258::i;:::-;15509:265;;15348:434;;;;;;:::o;3671:20::-;3664:27;;3544:155;:::o;16070:1381::-;16161:24;16240:12;16207:11;:9;:11::i;:::-;:30;:45;16203:1072;;;16288:9;16269:28;;16364:19;16386:8;-1:-1:-1;;;;;16386:20:23;;16432:16;16482:13;16514:18;16386:163;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;16364:185;;16612:29;16644:11;:9;:11::i;:::-;16667:12;16644:36;;;;:22;;;;;:36;;;;;16695:42;;;16644:36;-1:-1:-1;16809:11:23;:9;:11::i;:::-;:30;16854:21;;;:34;;;16809:30;-1:-1:-1;16950:12:23;16903:11;:9;:11::i;:::-;:34;;;;:22;;;;;:34;;;;;:44;;:59;17010:12;16977:11;:9;:11::i;:::-;:45;17071:192;;;;;;17101:12;;17132:11;;17162:16;;17197:14;;17230:18;;17071:192;:::i;:::-;;;;;;;;16254:1021;;;16203:1072;17348:9;17329:16;:28;17325:119;;;17382:10;17374:58;17403:28;17415:16;17403:9;:28;:::i;:::-;17374:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17325:119;16070:1381;:::o;2293:101:1:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;13209:1057:23:-;13325:23;13370:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:50;:55;;13366:138;;13457:35;13479:12;13457:21;:35::i;:::-;13442:50;;13366:138;13514:22;13539:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:50;;-1:-1:-1;13604:19:23;;;13600:659;;-1:-1:-1;13647:28:23;;13209:1057;-1:-1:-1;;13209:1057:23:o;13600:659::-;13752:47;;-1:-1:-1;;;13752:47:23;;;;;3033:25:84;;;13718:31:23;;13752:8;-1:-1:-1;;;;;13752:31:23;;;;3006:18:84;;13752:47:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13718:81;-1:-1:-1;13829:29:23;13818:7;:40;;;;;;;;:::i;:::-;;13814:434;;13879:27;13909:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:46;;;;-1:-1:-1;13978:24:23;;13974:204;;14034:39;14053:19;14034:18;:39::i;:::-;14027:46;13209:1057;-1:-1:-1;;;;;13209:1057:23:o;13974:204::-;-1:-1:-1;14129:29:23;;13209:1057;-1:-1:-1;;;;13209:1057:23:o;13974:204::-;13860:333;13814:434;13703:556;13355:911;13209:1057;;;:::o;18214:162::-;18338:30;:28;:30::i;5180:302::-;5297:7;5382:12;5413:35;5435:12;5413:21;:35::i;:::-;5353:110;;;;;;12424:25:84;;;;12465:18;;12458:34;12397:18;;5353:110:23;;;;;;;;;;;;5329:145;;;;;;5322:152;;5180:302;;;:::o;9775:170::-;9875:7;9907:11;:9;:11::i;:::-;:30;;9775:170;-1:-1:-1;9775:170:23:o;14480:237::-;14589:4;14669:29;14633:32;14652:12;14633:18;:32::i;:::-;:65;;;;;;;;:::i;:::-;;;14480:237;-1:-1:-1;;14480:237:23:o;10566:500::-;10695:22;10732:27;10774;10829:29;10861:11;:9;:11::i;:::-;:36;;;;:22;;;;:36;;;;;;10925:25;;10983:21;;;;11037;;;;;10925:25;;10983:21;;11037;-1:-1:-1;10566:500:23;-1:-1:-1;;;10566:500:23:o;4104:363::-;4329:112;;-1:-1:-1;;;4329:112:23;;;;;12675:25:84;;;4419:2:23;12716:18:84;;;12709:47;4221:7:23;;4456:3;;-1:-1:-1;;;;;4329:8:23;:24;;;;12648:18:84;;4329:112:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4275:33;;4269:39;;4275:33;;4269:3;:39;:::i;:::-;4268:173;;;;;;:::i;:::-;4253:206;;;;:::i;:::-;4246:213;4104:363;-1:-1:-1;;4104:363:23:o;19172:225::-;1531:13:1;:11;:13::i;:::-;19327:33:23::1;:62:::0;;-1:-1:-1;;19327:62:23::1;;::::0;;;::::1;::::0;;;::::1;::::0;;19172:225::o;12067:451::-;12185:7;12232:1;12217:12;:16;12210:24;;;;:::i;:::-;12245:15;12263:11;:9;:11::i;:::-;:30;;-1:-1:-1;12313:22:23;;;12312:187;;12426:73;12443:12;12457:11;:9;:11::i;:::-;:31;;;;:22;;;;:31;;;;;:41;;12426:16;:73::i;:::-;12312:187;;19405:295;1531:13:1;:11;:13::i;:::-;19558:87:23::1;19581:25;:15;:23;:25::i;:::-;19558:87;;;;;;;;;;;;;-1:-1:-1::0;;;19558:87:23::1;;::::0;:8:::1;:87::i;:::-;19677:15:::0;19656:18:::1;:36;19677:15:::0;19656:18;:36:::1;:::i;:::-;-1:-1:-1::0;;;19405:295:23:o;11354:418::-;11472:7;11506:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:50;:55;;11505:248;;11691:62;11708:12;11722:11;:9;:11::i;:::-;:30;11691:16;:62::i;:::-;11505:248;;;11578:11;:9;:11::i;:::-;:36;;;;:22;;:36;;-1:-1:-1;11578:36:23;;;:46;;;;11354:418::o;18749:196::-;18878:7;18910:27;887:13:79;;-1:-1:-1;;;;;887:13:79;;807:101;18957:207:23;1531:13:1;:11;:13::i;:::-;19120:36:23::1;19146:9;19120:25;:36::i;:::-;18957:207:::0;:::o;21511:145::-;21625:13;;21511:145::o;19954:204::-;20095:10;20090:61;;20122:17;20130:8;20122:7;:17::i;:::-;19954:204;;:::o;22195:250:64:-;22284:20;;:::i;:::-;22322:32;22357:31;22378:9;22357:20;:31::i;:::-;22322:66;;22406:31;22427:9;22406:20;:31::i;26954:181::-;27069:7;27043:6;25524;:14;;;25516:77;;;;-1:-1:-1;;;25516:77:64;;;;;;;:::i;:::-;27101:26:::1;27111:15;27119:6;27111:7;:15::i;:::-;27101:9;:26::i;4476:338:70:-:0;4590:6;4615:15;-1:-1:-1;;;;;4694:4:70;4700:5;4683:23;;;;;;;;12424:25:84;;;12480:2;12465:18;;12458:34;12412:2;12397:18;;12250:248;4683:23:70;;;;-1:-1:-1;;4683:23:70;;;;;;;;;4655:66;;4683:23;4655:66;;;;4633:123;;-1:-1:-1;4802:3:70;4782:15;;;;4633:123;4782:15;:::i;:::-;4781:24;;;4476:338;-1:-1:-1;;;;;4476:338:70:o;1796:162:1:-;18686:7:23;1710:6:1;-1:-1:-1;;;;;1710:6:1;735:10:3;1855:23:1;1851:101;;1901:40;;-1:-1:-1;;;1901:40:1;;735:10:3;1901:40:1;;;2825:51:84;2798:18;;1901:40:1;2659:223:84;1478:156:79;1568:13;1561:20;;-1:-1:-1;;;;;;1561:20:79;;;1592:34;1617:8;1592:24;:34::i;1719:245::-;735:10:3;;1816:14:79;:12;:14::i;:::-;-1:-1:-1;;;;;1816:24:79;;1812:108;;1857:51;;-1:-1:-1;;;1857:51:79;;14910:2:84;1857:51:79;;;14892:21:84;14949:2;14929:18;;;14922:30;14988:34;14968:18;;;14961:62;-1:-1:-1;;;15039:18:84;;;15032:39;15088:19;;1857:51:79;14708:405:84;1812:108:79;1930:26;1949:6;1930:18;:26::i;5494:1242:23:-;5597:7;5626:11;:9;:11::i;:::-;:36;;;;:22;;;;;:36;;;;;:50;:55;;5622:138;;5713:35;5735:12;5713:21;:35::i;:::-;5698:50;;5622:138;5772:29;5804:11;:9;:11::i;:::-;:22;;:36;5827:12;5804:36;;;;;;;;;;;5772:68;;5851:22;5876:11;:25;;;5851:50;;5912:85;5935:14;5953:1;5935:19;;5912:85;;;;;;;;;;;;;-1:-1:-1;;;5912:85:23;;;:8;:85::i;:::-;6052:47;;-1:-1:-1;;;6052:47:23;;;;;3033:25:84;;;6018:31:23;;6052:8;-1:-1:-1;;;;;6052:31:23;;;;3006:18:84;;6052:47:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6018:81;-1:-1:-1;6125:29:23;6114:7;:40;;;;;;;;:::i;:::-;;6110:619;;6197:48;;-1:-1:-1;;;6197:48:23;;;;;3033:25:84;;;6197:121:23;;:87;;-1:-1:-1;;;;;6197:8:23;:32;;;;3006:18:84;;6197:48:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6197:48:23;;;;;;;;;;;;:::i;:::-;:85;:87::i;6110:619::-;6366:29;6355:7;:40;;;;;;;;:::i;:::-;;6351:378;;6442:21;;;;6478:104;;;;;;;;;;;;-1:-1:-1;;;6478:104:23;;;;;;6505:24;;;;6478:8;:104::i;:::-;6604:42;6626:19;6604:21;:42::i;:::-;6597:49;5494:1242;-1:-1:-1;;;;;;5494:1242:23:o;6351:378::-;6689:28;;;;;;;;;;;;;;-1:-1:-1;;;6689:28:23;;;:7;:28::i;21066:256::-;21149:7;21188;21178;:17;21177:126;;21235:68;21252:7;21261:11;:9;:11::i;:::-;:31;;;;:22;;;;:31;;;;;:41;;21235:16;:68::i;21177:126::-;-1:-1:-1;21212:7:23;21169:145;-1:-1:-1;21066:256:23:o;3081:380:70:-;3144:4;;3183:24;;;;;;;;:::i;:::-;-1:-1:-1;;;;;3183:28:70;;:71;;;;-1:-1:-1;3253:1:70;3233:17;;;;:3;:17;:::i;:::-;:21;;;3183:71;:99;;;;-1:-1:-1;3279:3:70;3258:17;;;;:3;:17;:::i;:::-;:24;;;;3183:99;:258;;;;-1:-1:-1;3429:12:70;3395:24;;;;;;;;:::i;:::-;:30;;3422:3;3395:30;:::i;:::-;-1:-1:-1;;;;;3395:46:70;;;3161:292;3081:380;-1:-1:-1;;3081:380:70:o;20587:292:23:-;20670:7;20710;20699;:18;;20698:162;;20792:68;20809:7;20818:11;:9;:11::i;:::-;:31;;;;:22;;;;:31;;;;;:41;;20792:16;:68::i;20698:162::-;20735:11;:9;:11::i;:::-;:31;;;;:22;;:31;;-1:-1:-1;20735:31:23;;;:41;;;;20587:292;-1:-1:-1;20587:292:23:o;2543:215:1:-;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:1;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:1;;2700:1:::1;2672:31;::::0;::::1;2825:51:84::0;2798:18;;2672:31:1::1;2659:223:84::0;2488:204:66;2563:11;;:::i;:::-;2622:32;;;;;;;;;;;;2586:33;2622:32;;;;2668:18;2622:32;2668:10;:18::i;31124:414:64:-;31223:20;;:::i;:::-;-1:-1:-1;31470:8:64;;;;31502:28;;;;;;;;;-1:-1:-1;;;;;31470:14:64;;;31482:2;31470:14;;31502:28;;;;;;;;;;31124:414::o;26428:181::-;26540:12;26515:6;25524;:14;;;25516:77;;;;-1:-1:-1;;;25516:77:64;;;;;;;:::i;:::-;26577:24:::1;:6;:12;;;:22;:24::i;22867:122::-:0;22930:7;22957:24;22970:6;22978:2;22957:12;:24::i;2912:187:1:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:1;;;-1:-1:-1;;;;;;3020:17:1;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;3010:1033:66:-;3120:11;;:::i;:::-;1949;;:18;3098:6;;1949:11;:23;1945:79;;1990:26;;-1:-1:-1;;;1990:26:66;;;;;;;;;;;1945:79;3143:17:::1;3185:3;3143:17:::0;-1:-1:-1;;;;;3143:17:66;3293:4:::1;3304:492;3311:8;3304:492;;;3401:18;:6;:16;:18::i;:::-;3387:32:::0;-1:-1:-1;3428:6:66;::::1;::::0;::::1;:::i;:::-;3455:16:::0;3470:1:::1;3455:16:::0;;;;;-1:-1:-1;3518:4:66::1;3504:18:::0;::::1;::::0;-1:-1:-1;3428:6:66;-1:-1:-1;;;;3569:27:66;;3565:224:::1;;3624:13;::::0;::::1;::::0;3654:41:::1;3624:6:::0;3673:21;3654:10:::1;:41::i;:::-;3648:47;;3729:7;3713:6;:13;;;:23;;;;:::i;:::-;3706:30;::::0;;::::1;:::i;:::-;;;3598:148;3304:492;;3565:224;-1:-1:-1::0;3774:5:66::1;3304:492;;;1320:1;3806:35;::::0;::::1;;3802:96;;;3859:31;::::0;-1:-1:-1;;;3859:31:66;;16662:4:84;16650:17;;3859:31:66::1;::::0;::::1;16632:36:84::0;16605:18;;3859:31:66::1;16488:186:84::0;3802:96:66::1;-1:-1:-1::0;3911:126:66::1;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;::::0;;;;-1:-1:-1;;;;;3911:126:66;;::::1;::::0;;;;::::1;::::0;;;;-1:-1:-1;3911:126:66;;3010:1033;-1:-1:-1;3010:1033:66:o;10269:921::-;10380:19;10342:4;1071:1;1787:8;1769:26;;:4;:14;;;:26;;;1765:101;;1833:14;;;;;1813:45;;-1:-1:-1;;;1813:45:66;;16879:4:84;16867:17;;;1813:45:66;;;16849:36:84;16921:17;;;16901:18;;;16894:45;16822:18;;1813:45:66;16679:266:84;1765:101:66;10422:72:::1;10441:4;:11;;;10461:4;:26;;;10422:10;:72::i;:::-;-1:-1:-1::0;;;;;10411:83:66::1;:8;::::0;::::1;:83:::0;;;-1:-1:-1;;10505:22:66;10501:684:::1;;10626:13;10649:83;10687:4;:11;;;10709:4;:14;;;10649:27;:83::i;:::-;10626:107:::0;-1:-1:-1;1366:16:66::1;10746:19:::0;;::::1;;10742:372;;;10804:11:::0;;:24:::1;::::0;::::1;::::0;;::::1;::::0;:16:::1;:24;:::i;:::-;10787:42;;;;;;;;:::i;:::-;;;;;;;;;;;;;10778:51;;10856:89;10896:4;:11;;;10920:4;:14;;;10856:27;:89::i;:::-;10840:106:::0;-1:-1:-1;1366:16:66::1;10961:19:::0;;::::1;;10957:148;;;11056:11:::0;;11035:6;;11056:24:::1;::::0;::::1;::::0;;::::1;::::0;:16:::1;:24;:::i;:::-;11004:89;;;;;;;;;:::i;:::-;;;;;;;;;;;;;10995:98;;10529:592;10501:684;;;11167:8;::::0;::::1;::::0;11143:11;;:34:::1;::::0;::::1;::::0;;::::1;::::0;:16:::1;:34;:::i;:::-;11136:41;;;;22997:413:64::0;23098:16;23152:2;23139:9;:15;;;;23132:23;;;;:::i;:::-;23191:9;23219;23203:25;;:6;:13;:25;:53;;23243:6;:13;23203:53;;;23231:9;23203:53;;;23191:65;;23276:7;23271:121;23294:4;23289:2;:9;23271:121;;;23369:2;23374:1;23369:6;23346;23353:2;23346:10;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;;23346:10:64;23338:38;;23326:50;;;;;23300:5;;23271:121;;;;23166:237;22997:413;;;;:::o;13731:315:65:-;13857:11;13808:6;:13;;;13823:6;:11;;;:18;1012:6;1004:5;:14;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;13900:11;;13932:13:::1;::::0;::::1;::::0;;13985:25;;;13999:1:::1;13985:25:::0;13979:32;;-1:-1:-1;13932:13:65;;;14024:16:::1;13932:13:::0;14024:16:::1;:::i;:::-;;;::::0;::::1;13873:173;;13731:315:::0;;;;;:::o;8833:697:66:-;8972:6;9018:2;8994:21;:26;;;8990:77;;;-1:-1:-1;9031:28:66;;;;;8990:77;9077:21;:27;;9102:2;9077:27;9073:75;;9122:18;:6;:16;:18::i;:::-;9115:25;;;;;;9073:75;9158:21;:27;;9183:2;9158:27;9154:76;;9203:19;:6;:17;:19::i;:::-;9196:26;;;;;;9154:76;9240:21;:27;;9265:2;9240:27;9236:76;;9285:19;:6;:17;:19::i;:::-;9278:26;;;;;;9236:76;9322:21;:27;;9347:2;9322:27;9318:76;;9367:19;:6;:17;:19::i;:::-;9360:26;;;;9318:76;9404:21;:27;;9429:2;9404:27;9400:67;;-1:-1:-1;;;;;;9442:17:66;;9400:67;9480:44;;-1:-1:-1;;;9480:44:66;;16662:4:84;16650:17;;9480:44:66;;;16632:36:84;16605:18;;9480:44:66;16488:186:84;18997:541:66;19139:10;19161:17;19181:18;:6;:16;:18::i;:::-;19161:38;;19210:11;:19;;19225:4;19210:19;19206:59;;-1:-1:-1;;;;;19240:17:66;;;;;19206:59;19277;19296:6;19311:11;19325:4;19311:18;19277:10;:59::i;:::-;19271:65;-1:-1:-1;;;;;;19347:17:66;;;;19343:190;;19382:26;;-1:-1:-1;;;19382:26:66;;-1:-1:-1;;;;;18155:31:84;;19382:26:66;;;18137:50:84;18110:18;;19382:26:66;17992:201:84;19343:190:66;19440:16;19426:31;;19440:16;19455:1;19440:16;;;;19426:31;19422:111;;19475:50;;-1:-1:-1;;;19475:50:66;;19496:16;19511:1;19496:16;;;;19475:50;;;16849:36:84;19496:16:66;16921:17:84;;16901:18;;;16894:45;16822:18;;19475:50:66;16679:266:84;19422:111:66;19154:384;18997:541;;;;:::o;5250:934:65:-;5393:19;5351:6;5335;:13;;;:22;;;;:::i;:::-;5359:11;;:18;1004:14;;;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;5497:6:::1;-1:-1:-1::0;;;;;5487:17:65::1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;::::1;::::0;::::1;;::::0;-1:-1:-1;5487:17:65::1;-1:-1:-1::0;5478:26:65;-1:-1:-1;5567:10:65;;5563:616:::1;;5609:11:::0;;5643:13:::1;::::0;;::::1;::::0;;5815:27;;;;;;5874:15;::::1;5963:85;5874:15:::0;5815:27;6033:6;5963::::1;:85::i;:::-;6109:62;6124:6;6141;6158:4;6109;:62::i;:::-;;5579:600;;;;5250:934:::0;;;;;;:::o;14288:323::-;14419:12;14366:6;:13;;;14382:1;14366:17;;;;:::i;:::-;14385:11;;:18;1004:14;;;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;14463:11;;14495:13:::1;::::0;::::1;::::0;;14562:1:::1;14548:25:::0;;;;;14542:32;;-1:-1:-1;14495:13:65;;14587:18:::1;14562:1:::0;14495:13;14587:18:::1;:::i;:::-;::::0;;-1:-1:-1;14288:323:65;;;-1:-1:-1;;;;;14288:323:65:o;14853:::-;14984:12;14931:6;:13;;;14947:1;14931:17;;;;:::i;:::-;14950:11;;:18;1004:14;;;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;15028:11;;15060:13:::1;::::0;::::1;::::0;;15127:1:::1;15113:25:::0;;;;;15107:32;;-1:-1:-1;15060:13:65;;15152:18:::1;15127:1:::0;15060:13;15152:18:::1;:::i;15418:323::-:0;15549:12;15496:6;:13;;;15512:1;15496:17;;;;:::i;:::-;15515:11;;:18;1004:14;;;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;15593:11;;15625:13:::1;::::0;::::1;::::0;;15692:1:::1;15678:25:::0;;;;;15672:32;;-1:-1:-1;15625:13:65;;15717:18:::1;15692:1:::0;15625:13;15717:18:::1;:::i;23103:622::-:0;23274:147;23288:2;23281:3;:9;23274:147;;23349:10;;23336:24;;23389:2;23381:10;;;;23402:9;;;;-1:-1:-1;;23292:9:65;23274:147;;;23433:7;;23429:284;;23572:10;;23627:11;;23507:2;:8;;;23499:3;:17;-1:-1:-1;;23499:21:65;23584:10;;23568:27;;;23623:23;;23671:21;23658:35;;23103:622;;;:::o;21757:329::-;21927:4;21885:6;21893;:11;;;:18;1012:6;1004:5;:14;1000:75;;;1036:31;;-1:-1:-1;;;1036:31:65;;;;;12424:25:84;;;12465:18;;;12458:34;;;12397:18;;1036:31:65;12250:248:84;1000:75:65;21982:8:::1;21978:54;;;22011:13;::::0;::::1;::::0;22001:23:::1;::::0;;::::1;:::i;:::-;;;21978:54;-1:-1:-1::0;;;;22038:13:65::1;::::0;;;::::1;:22:::0;;;;21757:329::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:250:84:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:84;238:16;;231:27;14:250::o;269:1072::-;-1:-1:-1;;;670:3:84;663:34;645:3;726:6;720:13;742:75;810:6;805:2;800:3;796:12;789:4;781:6;777:17;742:75;:::i;:::-;877:13;;836:16;;;;899:76;877:13;961:2;953:11;;946:4;934:17;;899:76;:::i;:::-;1036:13;;994:17;;;1058:76;1036:13;1120:2;1112:11;;1105:4;1093:17;;1058:76;:::i;:::-;1195:13;;1153:17;;;1217:76;1195:13;1279:2;1271:11;;1264:4;1252:17;;1217:76;:::i;:::-;1313:17;1332:2;1309:26;;269:1072;-1:-1:-1;;;;;;269:1072:84:o;1346:180::-;1405:6;1458:2;1446:9;1437:7;1433:23;1429:32;1426:52;;;1474:1;1471;1464:12;1426:52;-1:-1:-1;1497:23:84;;1346:180;-1:-1:-1;1346:180:84:o;1950:121::-;2035:10;2028:5;2024:22;2017:5;2014:33;2004:61;;2061:1;2058;2051:12;2076:381;2152:6;2160;2168;2221:2;2209:9;2200:7;2196:23;2192:32;2189:52;;;2237:1;2234;2227:12;2189:52;2276:9;2263:23;2295:30;2319:5;2295:30;:::i;:::-;2344:5;2396:2;2381:18;;2368:32;;-1:-1:-1;2447:2:84;2432:18;;;2419:32;;2076:381;-1:-1:-1;;;2076:381:84:o;3251:127::-;3312:10;3307:3;3303:20;3300:1;3293:31;3343:4;3340:1;3333:15;3367:4;3364:1;3357:15;3383:348;3535:2;3520:18;;3568:1;3557:13;;3547:144;;3613:10;3608:3;3604:20;3601:1;3594:31;3648:4;3645:1;3638:15;3676:4;3673:1;3666:15;3547:144;3700:25;;;3383:348;:::o;5009:272::-;5067:6;5120:2;5108:9;5099:7;5095:23;5091:32;5088:52;;;5136:1;5133;5126:12;5088:52;5175:9;5162:23;5225:6;5218:5;5214:18;5207:5;5204:29;5194:57;;5247:1;5244;5237:12;5286:396;5435:2;5424:9;5417:21;5398:4;5467:6;5461:13;5510:6;5505:2;5494:9;5490:18;5483:34;5526:79;5598:6;5593:2;5582:9;5578:18;5573:2;5565:6;5561:15;5526:79;:::i;:::-;5666:2;5645:15;-1:-1:-1;;5641:29:84;5626:45;;;;5673:2;5622:54;;5286:396;-1:-1:-1;;5286:396:84:o;5687:195::-;5775:6;5828:2;5816:9;5807:7;5803:23;5799:32;5796:52;;;5844:1;5841;5834:12;6080:131;-1:-1:-1;;;;;6155:31:84;;6145:42;;6135:70;;6201:1;6198;6191:12;6216:247;6275:6;6328:2;6316:9;6307:7;6303:23;6299:32;6296:52;;;6344:1;6341;6334:12;6296:52;6383:9;6370:23;6402:31;6427:5;6402:31;:::i;6468:641::-;6748:3;6786:6;6780:13;6802:66;6861:6;6856:3;6849:4;6841:6;6837:17;6802:66;:::i;:::-;-1:-1:-1;;;6890:16:84;;;6915:19;;;6959:13;;6981:78;6959:13;7046:1;7035:13;;7028:4;7016:17;;6981:78;:::i;:::-;7079:20;7101:1;7075:28;;6468:641;-1:-1:-1;;;;6468:641:84:o;7114:127::-;7175:10;7170:3;7166:20;7163:1;7156:31;7206:4;7203:1;7196:15;7230:4;7227:1;7220:15;7246:127;7307:10;7302:3;7298:20;7295:1;7288:31;7338:4;7335:1;7328:15;7362:4;7359:1;7352:15;7378:127;7439:10;7434:3;7430:20;7427:1;7420:31;7470:4;7467:1;7460:15;7494:4;7491:1;7484:15;7510:165;7548:1;7582:4;7579:1;7575:12;7606:3;7596:37;;7613:18;;:::i;:::-;7665:3;7658:4;7655:1;7651:12;7647:22;7642:27;;;7510:165;;;;:::o;7680:148::-;7768:4;7747:12;;;7761;;;7743:31;;7786:13;;7783:39;;;7802:18;;:::i;7833:157::-;7863:1;7897:4;7894:1;7890:12;7921:3;7911:37;;7928:18;;:::i;:::-;7980:3;7973:4;7970:1;7966:12;7962:22;7957:27;;;7833:157;;;;:::o;7995:127::-;8056:10;8051:3;8047:20;8044:1;8037:31;8087:4;8084:1;8077:15;8111:4;8108:1;8101:15;8127:280;8217:6;8270:2;8258:9;8249:7;8245:23;8241:32;8238:52;;;8286:1;8283;8276:12;8238:52;8318:9;8312:16;8357:1;8350:5;8347:12;8337:40;;8373:1;8370;8363:12;8412:248;8479:2;8473:9;8521:4;8509:17;;-1:-1:-1;;;;;8541:34:84;;8577:22;;;8538:62;8535:88;;;8603:18;;:::i;:::-;8639:2;8632:22;8412:248;:::o;8665:129::-;-1:-1:-1;;;;;8743:5:84;8739:30;8732:5;8729:41;8719:69;;8784:1;8781;8774:12;8799:698;8852:5;8905:3;8898:4;8890:6;8886:17;8882:27;8872:55;;8923:1;8920;8913:12;8872:55;8952:6;8946:13;-1:-1:-1;;;;;9015:2:84;9011;9008:10;9005:36;;;9021:18;;:::i;:::-;9096:2;9090:9;9064:2;9150:13;;-1:-1:-1;;9146:22:84;;;9170:2;9142:31;9138:40;9126:53;;;9194:18;;;9214:22;;;9191:46;9188:72;;;9240:18;;:::i;:::-;9280:10;9276:2;9269:22;9315:2;9307:6;9300:18;9361:3;9354:4;9349:2;9341:6;9337:15;9333:26;9330:35;9327:55;;;9378:1;9375;9368:12;9327:55;9391:76;9464:2;9457:4;9449:6;9445:17;9438:4;9430:6;9426:17;9391:76;:::i;9502:1036::-;9599:6;9652:2;9640:9;9631:7;9627:23;9623:32;9620:52;;;9668:1;9665;9658:12;9620:52;9701:9;9695:16;-1:-1:-1;;;;;9771:2:84;9763:6;9760:14;9757:34;;;9787:1;9784;9777:12;9757:34;9810:22;;;;9866:4;9848:16;;;9844:27;9841:47;;;9884:1;9881;9874:12;9841:47;9910:17;;:::i;:::-;9957:2;9951:9;9969:33;9994:7;9969:33;:::i;:::-;10011:22;;10071:2;10063:11;;10057:18;10084:32;10057:18;10084:32;:::i;:::-;10143:2;10132:14;;10125:31;10194:2;10186:11;;10180:18;10207:32;10180:18;10207:32;:::i;:::-;10266:2;10255:14;;10248:31;10325:2;10317:11;;;10311:18;10295:14;;;10288:42;10369:3;10361:12;;10355:19;10386:16;;;10383:36;;;10415:1;10412;10405:12;10383:36;10452:55;10499:7;10488:8;10484:2;10480:17;10452:55;:::i;:::-;10446:3;10435:15;;10428:80;-1:-1:-1;10439:5:84;9502:1036;-1:-1:-1;;;;;9502:1036:84:o;11049:327::-;11274:25;;;11262:2;11247:18;;11308:62;11366:2;11351:18;;11343:6;10909:12;10957:4;10942:20;;10930:33;;11003:1;10999:17;-1:-1:-1;;;;;10995:42:84;10988:4;10979:14;;;10972:66;10822:222;11381:184;11451:6;11504:2;11492:9;11483:7;11479:23;11475:32;11472:52;;;11520:1;11517;11510:12;11472:52;-1:-1:-1;11543:16:84;;11381:184;-1:-1:-1;11381:184:84:o;11570:542::-;11825:4;11867:3;11856:9;11852:19;11844:27;;11898:6;11887:9;11880:25;11941:6;11936:2;11925:9;11921:18;11914:34;11984:6;11979:2;11968:9;11964:18;11957:34;12027:6;12022:2;12011:9;12007:18;12000:34;12043:63;12101:3;12090:9;12086:19;12078:6;10909:12;10957:4;10942:20;;10930:33;;11003:1;10999:17;-1:-1:-1;;;;;10995:42:84;10988:4;10979:14;;;10972:66;10822:222;12117:128;12184:9;;;12205:11;;;12202:37;;;12219:18;;:::i;12767:168::-;12834:6;12860:10;;;12872;;;12856:27;;12895:11;;;12892:37;;;12909:18;;:::i;12940:168::-;13013:9;;;13044;;13061:15;;;13055:22;;13041:37;13031:71;;13082:18;;:::i;13113:120::-;13153:1;13179;13169:35;;13184:18;;:::i;:::-;-1:-1:-1;13218:9:84;;13113:120::o;13238:127::-;13299:10;13294:3;13290:20;13287:1;13280:31;13330:4;13327:1;13320:15;13354:4;13351:1;13344:15;13370:114;13454:4;13447:5;13443:16;13436:5;13433:27;13423:55;;13474:1;13471;13464:12;13489:542;13658:5;13645:19;13673:31;13696:7;13673:31;:::i;:::-;13736:4;13727:7;13723:18;13713:28;;13766:4;13760:11;13815:2;13808:3;13804:8;13800:2;13796:17;13793:25;13787:4;13780:39;13867:2;13860:5;13856:14;13843:28;13880:32;13904:7;13880:32;:::i;:::-;14002:20;13992:7;13989:1;13985:15;13981:42;13976:2;13952:20;13948:25;13944:2;13940:34;13937:42;13934:90;13928:4;13921:104;;;;13489:542;;:::o;14036:414::-;14238:2;14220:21;;;14277:2;14257:18;;;14250:30;14316:34;14311:2;14296:18;;14289:62;-1:-1:-1;;;14382:2:84;14367:18;;14360:48;14440:3;14425:19;;14036:414::o;15118:335::-;15197:6;15250:2;15238:9;15229:7;15225:23;15221:32;15218:52;;;15266:1;15263;15256:12;15218:52;15299:9;15293:16;-1:-1:-1;;;;;15324:6:84;15321:30;15318:50;;;15364:1;15361;15354:12;15318:50;15387:60;15439:7;15430:6;15419:9;15415:22;15387:60;:::i;:::-;15377:70;15118:335;-1:-1:-1;;;;15118:335:84:o;15458:245::-;15516:6;15569:2;15557:9;15548:7;15544:23;15540:32;15537:52;;;15585:1;15582;15575:12;15537:52;15624:9;15611:23;15643:30;15667:5;15643:30;:::i;15708:243::-;15765:6;15818:2;15806:9;15797:7;15793:23;15789:32;15786:52;;;15834:1;15831;15824:12;15786:52;15873:9;15860:23;15892:29;15915:5;15892:29;:::i;15956:257::-;-1:-1:-1;;;;;16077:10:84;;;16089;;;16073:27;16120:20;;;;16027:18;16159:24;;;16149:58;;16187:18;;:::i;16218:135::-;16257:3;16278:17;;;16275:43;;16298:18;;:::i;:::-;-1:-1:-1;16345:1:84;16334:13;;16218:135::o;16358:125::-;16423:9;;;16444:10;;;16441:36;;;16457:18;;:::i;16950:287::-;17079:3;17117:6;17111:13;17133:66;17192:6;17187:3;17180:4;17172:6;17168:17;17133:66;:::i;:::-;17215:16;;;;;16950:287;-1:-1:-1;;16950:287:84:o;17242:492::-;17417:3;17455:6;17449:13;17471:66;17530:6;17525:3;17518:4;17510:6;17506:17;17471:66;:::i;:::-;17600:13;;17559:16;;;;17622:70;17600:13;17559:16;17669:4;17657:17;;17622:70;:::i;:::-;17708:20;;17242:492;-1:-1:-1;;;;17242:492:84:o", + "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport \"../WitnetRandomness.sol\";\r\nimport \"../apps/UsingWitnet.sol\";\r\nimport \"../interfaces/IWitnetRandomnessAdmin.sol\";\r\nimport \"../patterns/Ownable2Step.sol\";\r\n\r\n/// @title WitnetRandomnessV2: Unmalleable and provably-fair randomness generation based on the Witnet Oracle v2.*.\r\n/// @author The Witnet Foundation.\r\ncontract WitnetRandomnessV2\r\n is\r\n Ownable2Step,\r\n UsingWitnet,\r\n WitnetRandomness,\r\n IWitnetRandomnessAdmin\r\n{\r\n using Witnet for bytes;\r\n using Witnet for Witnet.Result;\r\n using WitnetV2 for WitnetV2.RadonSLA;\r\n\r\n struct Randomize {\r\n uint256 witnetQueryId;\r\n uint256 prevBlock;\r\n uint256 nextBlock;\r\n }\r\n\r\n struct Storage {\r\n uint256 lastRandomizeBlock;\r\n mapping (uint256 => Randomize) randomize_;\r\n }\r\n\r\n /// @notice Unique identifier of the RNG data request used on the Witnet Oracle blockchain for solving randomness.\r\n /// @dev Can be used to track all randomness requests solved so far on the Witnet Oracle blockchain.\r\n bytes32 immutable public override witnetRadHash;\r\n\r\n constructor(\r\n WitnetOracle _witnet,\r\n address _operator\r\n )\r\n Ownable(_operator)\r\n UsingWitnet(_witnet)\r\n {\r\n _require(\r\n address(_witnet) == address(0)\r\n || _witnet.specs() == type(IWitnetOracle).interfaceId,\r\n \"uncompliant WitnetOracle\"\r\n );\r\n WitnetRequestBytecodes _registry = witnet().registry();\r\n {\r\n // Build own Witnet Randomness Request:\r\n bytes32[] memory _retrievals = new bytes32[](1);\r\n _retrievals[0] = _registry.verifyRadonRetrieval(\r\n Witnet.RadonDataRequestMethods.RNG,\r\n \"\", // no request url\r\n \"\", // no request body\r\n new string[2][](0), // no request headers\r\n hex\"80\" // no request Radon script\r\n );\r\n Witnet.RadonFilter[] memory _filters;\r\n bytes32 _aggregator = _registry.verifyRadonReducer(Witnet.RadonReducer({\r\n opcode: Witnet.RadonReducerOpcodes.Mode,\r\n filters: _filters // no filters\r\n }));\r\n bytes32 _tally = _registry.verifyRadonReducer(Witnet.RadonReducer({\r\n opcode: Witnet.RadonReducerOpcodes.ConcatenateAndHash,\r\n filters: _filters // no filters\r\n }));\r\n witnetRadHash = _registry.verifyRadonRequest(\r\n _retrievals,\r\n _aggregator,\r\n _tally,\r\n 32, // 256 bits of pure entropy ;-)\r\n new string[][](_retrievals.length)\r\n );\r\n }\r\n }\r\n\r\n receive() virtual external payable {\r\n _revert(\"no transfers accepted\");\r\n }\r\n\r\n fallback() virtual external payable { \r\n _revert(string(abi.encodePacked(\r\n \"not implemented: 0x\",\r\n Witnet.toHexString(uint8(bytes1(msg.sig))),\r\n Witnet.toHexString(uint8(bytes1(msg.sig << 8))),\r\n Witnet.toHexString(uint8(bytes1(msg.sig << 16))),\r\n Witnet.toHexString(uint8(bytes1(msg.sig << 24)))\r\n )));\r\n }\r\n\r\n function class() virtual override public pure returns (string memory) {\r\n return type(WitnetRandomnessV2).name;\r\n }\r\n\r\n function specs() virtual override external pure returns (bytes4) {\r\n return type(WitnetRandomness).interfaceId;\r\n }\r\n\r\n function witnet() override (IWitnetRandomness, UsingWitnet)\r\n public view returns (WitnetOracle)\r\n {\r\n return UsingWitnet.witnet();\r\n }\r\n\r\n \r\n /// ===============================================================================================================\r\n /// --- 'IWitnetRandomness' implementation ------------------------------------------------------------------------\r\n\r\n /// Returns amount of wei required to be paid as a fee when requesting randomization with a \r\n /// transaction gas price as the one given.\r\n function estimateRandomizeFee(uint256 _evmGasPrice)\r\n public view\r\n virtual override\r\n returns (uint256)\r\n {\r\n return (\r\n (100 + __witnetBaseFeeOverheadPercentage)\r\n * __witnet.estimateBaseFee(\r\n _evmGasPrice, \r\n uint16(34)\r\n ) \r\n ) / 100;\r\n }\r\n\r\n /// @notice Retrieves the result of keccak256-hashing the given block number with the randomness value \r\n /// @notice generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved \r\n /// @notice after such block number.\r\n /// @dev Reverts if:\r\n /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards.\r\n /// @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.\r\n /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors.\r\n /// @param _blockNumber Block number from which the search will start\r\n function fetchRandomnessAfter(uint256 _blockNumber)\r\n public view\r\n virtual override\r\n returns (bytes32)\r\n {\r\n return keccak256(\r\n abi.encode(\r\n _blockNumber,\r\n _fetchRandomnessAfter(_blockNumber)\r\n )\r\n );\r\n }\r\n \r\n function _fetchRandomnessAfter(uint256 _blockNumber)\r\n virtual internal view \r\n returns (bytes32)\r\n {\r\n if (__storage().randomize_[_blockNumber].witnetQueryId == 0) {\r\n _blockNumber = getRandomizeNextBlock(_blockNumber);\r\n }\r\n\r\n Randomize storage __randomize = __storage().randomize_[_blockNumber];\r\n uint256 _witnetQueryId = __randomize.witnetQueryId;\r\n _require(\r\n _witnetQueryId != 0, \r\n \"not randomized\"\r\n );\r\n \r\n WitnetV2.ResponseStatus _status = __witnet.getQueryResponseStatus(_witnetQueryId);\r\n if (_status == WitnetV2.ResponseStatus.Ready) {\r\n return (\r\n __witnet.getQueryResultCborBytes(_witnetQueryId)\r\n .toWitnetResult()\r\n .asBytes32()\r\n );\r\n } else if (_status == WitnetV2.ResponseStatus.Error) {\r\n uint256 _nextRandomizeBlock = __randomize.nextBlock;\r\n _require(\r\n _nextRandomizeBlock != 0, \r\n \"faulty randomize\"\r\n );\r\n return _fetchRandomnessAfter(_nextRandomizeBlock);\r\n \r\n } else {\r\n _revert(\"pending randomize\");\r\n }\r\n }\r\n\r\n /// @notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took\r\n /// @notice place in the Witnet Oracle blockchain in response to the first non-errored randomize request\r\n /// @notice solved after the given block number.\r\n /// @dev Reverts if:\r\n /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards.\r\n /// @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.\r\n /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors.\r\n /// @param _blockNumber Block number from which the search will start.\r\n /// @return _witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block.\r\n /// @return _witnetResultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain.\r\n /// @return _witnetResultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\r\n /// @return _witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final.\r\n function fetchRandomnessAfterProof(uint256 _blockNumber) \r\n virtual override\r\n public view \r\n returns (\r\n bytes32 _witnetResultRandomness,\r\n uint64 _witnetResultTimestamp,\r\n bytes32 _witnetResultTallyHash,\r\n uint256 _witnetResultFinalityBlock\r\n )\r\n {\r\n if (__storage().randomize_[_blockNumber].witnetQueryId == 0) {\r\n _blockNumber = getRandomizeNextBlock(_blockNumber);\r\n }\r\n\r\n Randomize storage __randomize = __storage().randomize_[_blockNumber];\r\n uint256 _witnetQueryId = __randomize.witnetQueryId;\r\n _require(\r\n _witnetQueryId != 0, \r\n \"not randomized\"\r\n );\r\n \r\n WitnetV2.ResponseStatus _status = __witnet.getQueryResponseStatus(_witnetQueryId);\r\n if (_status == WitnetV2.ResponseStatus.Ready) {\r\n WitnetV2.Response memory _witnetQueryResponse = __witnet.getQueryResponse(_witnetQueryId);\r\n _witnetResultTimestamp = _witnetQueryResponse.resultTimestamp;\r\n _witnetResultTallyHash = _witnetQueryResponse.resultTallyHash;\r\n _witnetResultFinalityBlock = _witnetQueryResponse.finality;\r\n _witnetResultRandomness = _witnetQueryResponse.resultCborBytes.toWitnetResult().asBytes32();\r\n\r\n } else if (_status == WitnetV2.ResponseStatus.Error) {\r\n uint256 _nextRandomizeBlock = __randomize.nextBlock;\r\n _require(\r\n _nextRandomizeBlock != 0, \r\n \"faulty randomize\"\r\n );\r\n return fetchRandomnessAfterProof(_nextRandomizeBlock);\r\n \r\n } else {\r\n _revert(\"pending randomize\");\r\n }\r\n }\r\n\r\n /// @notice Returns last block number on which a randomize was requested.\r\n function getLastRandomizeBlock()\r\n virtual override\r\n external view\r\n returns (uint256)\r\n {\r\n return __storage().lastRandomizeBlock;\r\n }\r\n\r\n /// @notice Retrieves metadata related to the randomize request that got posted to the \r\n /// @notice Witnet Oracle contract on the given block number.\r\n /// @dev Returns zero values if no randomize request was actually posted on the given block.\r\n /// @return _witnetQueryId Identifier of the underlying Witnet query created on the given block number. \r\n /// @return _prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none.\r\n /// @return _nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none.\r\n function getRandomizeData(uint256 _blockNumber)\r\n external view\r\n virtual override\r\n returns (\r\n uint256 _witnetQueryId,\r\n uint256 _prevRandomizeBlock,\r\n uint256 _nextRandomizeBlock\r\n )\r\n {\r\n Randomize storage __randomize = __storage().randomize_[_blockNumber];\r\n _witnetQueryId = __randomize.witnetQueryId;\r\n _prevRandomizeBlock = __randomize.prevBlock;\r\n _nextRandomizeBlock = __randomize.nextBlock;\r\n }\r\n\r\n /// @notice Returns the number of the next block in which a randomize request was posted after the given one. \r\n /// @param _blockNumber Block number from which the search will start.\r\n /// @return Number of the first block found after the given one, or `0` otherwise.\r\n function getRandomizeNextBlock(uint256 _blockNumber)\r\n public view\r\n virtual override\r\n returns (uint256)\r\n {\r\n return ((__storage().randomize_[_blockNumber].witnetQueryId != 0)\r\n ? __storage().randomize_[_blockNumber].nextBlock\r\n // start search from the latest block\r\n : _searchNextBlock(_blockNumber, __storage().lastRandomizeBlock)\r\n );\r\n }\r\n\r\n /// @notice Returns the number of the previous block in which a randomize request was posted before the given one.\r\n /// @param _blockNumber Block number from which the search will start. Cannot be zero.\r\n /// @return First block found before the given one, or `0` otherwise.\r\n function getRandomizePrevBlock(uint256 _blockNumber)\r\n public view\r\n virtual override\r\n returns (uint256)\r\n {\r\n assert(_blockNumber > 0);\r\n uint256 _latest = __storage().lastRandomizeBlock;\r\n return ((_blockNumber > _latest)\r\n ? _latest\r\n // start search from the latest block\r\n : _searchPrevBlock(_blockNumber, __storage().randomize_[_latest].prevBlock)\r\n );\r\n }\r\n\r\n /// @notice Returns status of the first non-errored randomize request posted on or after the given block number.\r\n /// @dev Possible values:\r\n /// @dev - 0 -> Void: no randomize request was actually posted on or after the given block number.\r\n /// @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.\r\n /// @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read.\r\n /// @dev - 3 -> Error: all randomize requests after the given block were solved with errors.\r\n /// @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. \r\n function getRandomizeStatus(uint256 _blockNumber)\r\n virtual override\r\n public view \r\n returns (WitnetV2.ResponseStatus)\r\n {\r\n if (__storage().randomize_[_blockNumber].witnetQueryId == 0) {\r\n _blockNumber = getRandomizeNextBlock(_blockNumber);\r\n }\r\n uint256 _witnetQueryId = __storage().randomize_[_blockNumber].witnetQueryId;\r\n if (_witnetQueryId == 0) {\r\n return WitnetV2.ResponseStatus.Void;\r\n \r\n } else {\r\n WitnetV2.ResponseStatus _status = __witnet.getQueryResponseStatus(_witnetQueryId);\r\n if (_status == WitnetV2.ResponseStatus.Error) {\r\n uint256 _nextRandomizeBlock = __storage().randomize_[_blockNumber].nextBlock;\r\n if (_nextRandomizeBlock != 0) {\r\n return getRandomizeStatus(_nextRandomizeBlock);\r\n } else {\r\n return WitnetV2.ResponseStatus.Error;\r\n }\r\n } else {\r\n return _status;\r\n }\r\n }\r\n }\r\n\r\n /// @notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first \r\n /// @notice non-errored randomize request posted on or after the given block number.\r\n function isRandomized(uint256 _blockNumber)\r\n public view\r\n virtual override\r\n returns (bool)\r\n {\r\n return (\r\n getRandomizeStatus(_blockNumber) == WitnetV2.ResponseStatus.Ready\r\n );\r\n }\r\n\r\n /// @notice Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using \r\n /// @notice the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \r\n /// @dev Fails under same conditions as `getRandomnessAfter(uint256)` does.\r\n /// @param _range Range within which the uniformly-distributed random number will be generated.\r\n /// @param _nonce Nonce value enabling multiple random numbers from the same randomness value.\r\n /// @param _blockNumber Block number from which the search for the first randomize request solved aftewards will start.\r\n function random(uint32 _range, uint256 _nonce, uint256 _blockNumber)\r\n external view \r\n virtual override\r\n returns (uint32)\r\n {\r\n return WitnetV2.randomUniformUint32(\r\n _range,\r\n _nonce,\r\n keccak256(\r\n abi.encode(\r\n msg.sender,\r\n fetchRandomnessAfter(_blockNumber)\r\n )\r\n )\r\n );\r\n }\r\n\r\n /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \r\n /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. \r\n /// @return _evmRandomizeFee Funds actually paid as randomize fee.\r\n function randomize()\r\n external payable\r\n virtual override\r\n returns (uint256 _evmRandomizeFee)\r\n {\r\n if (__storage().lastRandomizeBlock < block.number) {\r\n _evmRandomizeFee = msg.value;\r\n // Post the Witnet Randomness request:\r\n uint _witnetQueryId = __witnet.postRequest{\r\n value: _evmRandomizeFee\r\n }(\r\n witnetRadHash,\r\n __witnetDefaultSLA \r\n );\r\n // Keep Randomize data in storage:\r\n Randomize storage __randomize = __storage().randomize_[block.number];\r\n __randomize.witnetQueryId = _witnetQueryId;\r\n // Update block links:\r\n uint256 _prevBlock = __storage().lastRandomizeBlock;\r\n __randomize.prevBlock = _prevBlock;\r\n __storage().randomize_[_prevBlock].nextBlock = block.number;\r\n __storage().lastRandomizeBlock = block.number;\r\n // Throw event:\r\n emit Randomizing(\r\n block.number,\r\n tx.gasprice,\r\n _evmRandomizeFee,\r\n _witnetQueryId,\r\n __witnetDefaultSLA\r\n );\r\n }\r\n // Transfer back unused funds:\r\n if (_evmRandomizeFee < msg.value) {\r\n payable(msg.sender).transfer(msg.value - _evmRandomizeFee);\r\n }\r\n }\r\n\r\n /// @notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill \r\n /// @notice when solving randomness requests:\r\n /// @notice - number of witnessing nodes contributing to randomness generation\r\n /// @notice - reward in $nanoWIT received by every contributing node in the Witnet blockchain\r\n function witnetQuerySLA() \r\n virtual override\r\n external view\r\n returns (WitnetV2.RadonSLA memory)\r\n {\r\n return __witnetDefaultSLA;\r\n }\r\n\r\n\r\n /// ===============================================================================================================\r\n /// --- 'IWitnetRandomnessAdmin' implementation -------------------------------------------------------------------\r\n\r\n function acceptOwnership()\r\n virtual override (IWitnetRandomnessAdmin, Ownable2Step)\r\n public\r\n {\r\n Ownable2Step.acceptOwnership();\r\n }\r\n\r\n function baseFeeOverheadPercentage()\r\n virtual override\r\n external view \r\n returns (uint16)\r\n {\r\n return __witnetBaseFeeOverheadPercentage;\r\n }\r\n\r\n function owner()\r\n virtual override (IWitnetRandomnessAdmin, Ownable)\r\n public view \r\n returns (address)\r\n {\r\n return Ownable.owner();\r\n }\r\n\r\n function pendingOwner() \r\n virtual override (IWitnetRandomnessAdmin, Ownable2Step)\r\n public view\r\n returns (address)\r\n {\r\n return Ownable2Step.pendingOwner();\r\n }\r\n \r\n function transferOwnership(address _newOwner)\r\n virtual override (IWitnetRandomnessAdmin, Ownable2Step)\r\n public \r\n onlyOwner\r\n {\r\n Ownable.transferOwnership(_newOwner);\r\n }\r\n\r\n function settleBaseFeeOverheadPercentage(uint16 _baseFeeOverheadPercentage)\r\n virtual override\r\n external\r\n onlyOwner\r\n {\r\n __witnetBaseFeeOverheadPercentage = _baseFeeOverheadPercentage;\r\n }\r\n\r\n function settleWitnetQuerySLA(WitnetV2.RadonSLA calldata _witnetQuerySLA)\r\n virtual override\r\n external\r\n onlyOwner\r\n {\r\n _require(\r\n _witnetQuerySLA.isValid(),\r\n \"invalid SLA\"\r\n );\r\n __witnetDefaultSLA = _witnetQuerySLA;\r\n }\r\n\r\n\r\n // ================================================================================================================\r\n // --- Internal methods -------------------------------------------------------------------------------------------\r\n\r\n function _require(\r\n bool _condition, \r\n string memory _message\r\n )\r\n internal pure\r\n {\r\n if (!_condition) {\r\n _revert(_message);\r\n }\r\n }\r\n\r\n function _revert(string memory _message)\r\n internal pure\r\n {\r\n revert(\r\n string(abi.encodePacked(\r\n class(),\r\n \": \",\r\n _message\r\n ))\r\n );\r\n }\r\n\r\n /// @dev Recursively searches for the number of the first block after the given one in which a Witnet \r\n /// @dev randomness request was posted. Returns 0 if none found.\r\n function _searchNextBlock(uint256 _target, uint256 _latest) internal view returns (uint256) {\r\n return ((_target >= _latest) \r\n ? __storage().randomize_[_latest].nextBlock\r\n : _searchNextBlock(_target, __storage().randomize_[_latest].prevBlock)\r\n );\r\n }\r\n\r\n /// @dev Recursively searches for the number of the first block before the given one in which a Witnet \r\n /// @dev randomness request was posted. Returns 0 if none found.\r\n function _searchPrevBlock(uint256 _target, uint256 _latest) internal view returns (uint256) {\r\n return ((_target > _latest)\r\n ? _latest\r\n : _searchPrevBlock(_target, __storage().randomize_[_latest].prevBlock)\r\n );\r\n }\r\n\r\n bytes32 private constant _STORAGE_SLOT = \r\n // keccak256(\"io.witnet.apps.randomness.v20\")\r\n 0x643778935c57df947f6944f6a5242a3e91445f6337f4b2ec670c8642153b614f;\r\n\r\n function __storage() internal pure returns (Storage storage _ptr) {\r\n assembly {\r\n _ptr.slot := _STORAGE_SLOT\r\n }\r\n }\r\n}\r\n", + "ast": { + "absolutePath": "project:/contracts/apps/WitnetRandomnessV2.sol", + "exportedSymbols": { + "Context": [ + 509 + ], + "IWitnetOracle": [ + 13265 + ], + "IWitnetOracleEvents": [ + 13315 + ], + "IWitnetRandomness": [ + 13639 + ], + "IWitnetRandomnessAdmin": [ + 13677 + ], + "IWitnetRandomnessEvents": [ + 13696 + ], + "IWitnetRequestBytecodes": [ + 13979 + ], + "IWitnetRequestFactory": [ + 14002 + ], + "Ownable": [ + 401 + ], + "Ownable2Step": [ + 24105 + ], + "UsingWitnet": [ + 1157 + ], + "Witnet": [ + 17557 + ], + "WitnetBuffer": [ + 19191 + ], + "WitnetCBOR": [ + 20734 + ], + "WitnetOracle": [ + 749 + ], + "WitnetRandomness": [ + 794 + ], + "WitnetRandomnessV2": [ + 3137 + ], + "WitnetRequestBytecodes": [ + 849 + ], + "WitnetRequestFactory": [ + 880 + ], + "WitnetV2": [ + 23651 + ] + }, + "id": 3138, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1994, + "literals": [ + "solidity", + ">=", + "0.8", + ".0", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "35:31:23" + }, + { + "absolutePath": "project:/contracts/WitnetRandomness.sol", + "file": "../WitnetRandomness.sol", + "id": 1995, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3138, + "sourceUnit": 795, + "src": "70:33:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/apps/UsingWitnet.sol", + "file": "../apps/UsingWitnet.sol", + "id": 1996, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3138, + "sourceUnit": 1158, + "src": "105:33:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/interfaces/IWitnetRandomnessAdmin.sol", + "file": "../interfaces/IWitnetRandomnessAdmin.sol", + "id": 1997, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3138, + "sourceUnit": 13678, + "src": "140:50:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/patterns/Ownable2Step.sol", + "file": "../patterns/Ownable2Step.sol", + "id": 1998, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3138, + "sourceUnit": 24106, + "src": "192:38:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2000, + "name": "Ownable2Step", + "nameLocations": [ + "432:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 24105, + "src": "432:12:23" + }, + "id": 2001, + "nodeType": "InheritanceSpecifier", + "src": "432:12:23" + }, + { + "baseName": { + "id": 2002, + "name": "UsingWitnet", + "nameLocations": [ + "455:11:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1157, + "src": "455:11:23" + }, + "id": 2003, + "nodeType": "InheritanceSpecifier", + "src": "455:11:23" + }, + { + "baseName": { + "id": 2004, + "name": "WitnetRandomness", + "nameLocations": [ + "477:16:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 794, + "src": "477:16:23" + }, + "id": 2005, + "nodeType": "InheritanceSpecifier", + "src": "477:16:23" + }, + { + "baseName": { + "id": 2006, + "name": "IWitnetRandomnessAdmin", + "nameLocations": [ + "504:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13677, + "src": "504:22:23" + }, + "id": 2007, + "nodeType": "InheritanceSpecifier", + "src": "504:22:23" + } + ], + "canonicalName": "WitnetRandomnessV2", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 1999, + "nodeType": "StructuredDocumentation", + "src": "234:153:23", + "text": "@title WitnetRandomnessV2: Unmalleable and provably-fair randomness generation based on the Witnet Oracle v2.*.\n @author The Witnet Foundation." + }, + "fullyImplemented": true, + "id": 3137, + "linearizedBaseContracts": [ + 3137, + 13677, + 794, + 13696, + 13639, + 1157, + 13315, + 24105, + 401, + 509 + ], + "name": "WitnetRandomnessV2", + "nameLocation": "396:18:23", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 2010, + "libraryName": { + "id": 2008, + "name": "Witnet", + "nameLocations": [ + "541:6:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 17557, + "src": "541:6:23" + }, + "nodeType": "UsingForDirective", + "src": "535:23:23", + "typeName": { + "id": 2009, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "552:5:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + { + "global": false, + "id": 2014, + "libraryName": { + "id": 2011, + "name": "Witnet", + "nameLocations": [ + "570:6:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 17557, + "src": "570:6:23" + }, + "nodeType": "UsingForDirective", + "src": "564:31:23", + "typeName": { + "id": 2013, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2012, + "name": "Witnet.Result", + "nameLocations": [ + "581:6:23", + "588:6:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 16042, + "src": "581:13:23" + }, + "referencedDeclaration": 16042, + "src": "581:13:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Result_$16042_storage_ptr", + "typeString": "struct Witnet.Result" + } + } + }, + { + "global": false, + "id": 2018, + "libraryName": { + "id": 2015, + "name": "WitnetV2", + "nameLocations": [ + "607:8:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23651, + "src": "607:8:23" + }, + "nodeType": "UsingForDirective", + "src": "601:37:23", + "typeName": { + "id": 2017, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2016, + "name": "WitnetV2.RadonSLA", + "nameLocations": [ + "620:8:23", + "629:8:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23503, + "src": "620:17:23" + }, + "referencedDeclaration": 23503, + "src": "620:17:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr", + "typeString": "struct WitnetV2.RadonSLA" + } + } + }, + { + "canonicalName": "WitnetRandomnessV2.Randomize", + "id": 2025, + "members": [ + { + "constant": false, + "id": 2020, + "mutability": "mutable", + "name": "witnetQueryId", + "nameLocation": "682:13:23", + "nodeType": "VariableDeclaration", + "scope": 2025, + "src": "674:21:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2019, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2022, + "mutability": "mutable", + "name": "prevBlock", + "nameLocation": "714:9:23", + "nodeType": "VariableDeclaration", + "scope": 2025, + "src": "706:17:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "706:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2024, + "mutability": "mutable", + "name": "nextBlock", + "nameLocation": "742:9:23", + "nodeType": "VariableDeclaration", + "scope": 2025, + "src": "734:17:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "734:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Randomize", + "nameLocation": "653:9:23", + "nodeType": "StructDefinition", + "scope": 3137, + "src": "646:113:23", + "visibility": "public" + }, + { + "canonicalName": "WitnetRandomnessV2.Storage", + "id": 2033, + "members": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "lastRandomizeBlock", + "nameLocation": "801:18:23", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "793:26:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "793:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2032, + "mutability": "mutable", + "name": "randomize_", + "nameLocation": "861:10:23", + "nodeType": "VariableDeclaration", + "scope": 2033, + "src": "830:41:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize)" + }, + "typeName": { + "id": 2031, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 2028, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "839:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "830:30:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 2030, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2029, + "name": "Randomize", + "nameLocations": [ + "850:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2025, + "src": "850:9:23" + }, + "referencedDeclaration": 2025, + "src": "850:9:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + } + } + }, + "visibility": "internal" + } + ], + "name": "Storage", + "nameLocation": "774:7:23", + "nodeType": "StructDefinition", + "scope": 3137, + "src": "767:112:23", + "visibility": "public" + }, + { + "baseFunctions": [ + 13638 + ], + "constant": false, + "documentation": { + "id": 2034, + "nodeType": "StructuredDocumentation", + "src": "887:220:23", + "text": "@notice Unique identifier of the RNG data request used on the Witnet Oracle blockchain for solving randomness.\n @dev Can be used to track all randomness requests solved so far on the Witnet Oracle blockchain." + }, + "functionSelector": "613e9978", + "id": 2037, + "mutability": "immutable", + "name": "witnetRadHash", + "nameLocation": "1147:13:23", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 2036, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1138:8:23" + }, + "scope": 3137, + "src": "1113:47:23", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2035, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1113:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 2164, + "nodeType": "Block", + "src": "1322:1465:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2054, + "name": "_witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2040, + "src": "1364:7:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + ], + "id": 2053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1356:7:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1356:7:23", + "typeDescriptions": {} + } + }, + "id": 2055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1356:16:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1384:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1376:7:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2056, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1376:7:23", + "typeDescriptions": {} + } + }, + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1376:10:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1356:30:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 2068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2061, + "name": "_witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2040, + "src": "1407:7:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1415:5:23", + "memberName": "specs", + "nodeType": "MemberAccess", + "referencedDeclaration": 748, + "src": "1407:13:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bytes4_$", + "typeString": "function () view external returns (bytes4)" + } + }, + "id": 2063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1407:15:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 2065, + "name": "IWitnetOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13265, + "src": "1431:13:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IWitnetOracle_$13265_$", + "typeString": "type(contract IWitnetOracle)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IWitnetOracle_$13265_$", + "typeString": "type(contract IWitnetOracle)" + } + ], + "id": 2064, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "1426:4:23", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1426:19:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IWitnetOracle_$13265", + "typeString": "type(contract IWitnetOracle)" + } + }, + "id": 2067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1446:11:23", + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1426:31:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1407:50:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1356:101:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "756e636f6d706c69616e74205769746e65744f7261636c65", + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1472:26:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_98c42522887e2e66d5e822d8a9a13397d343c9bcc32d75b082108d48d1e12bfa", + "typeString": "literal_string \"uncompliant WitnetOracle\"" + }, + "value": "uncompliant WitnetOracle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_98c42522887e2e66d5e822d8a9a13397d343c9bcc32d75b082108d48d1e12bfa", + "typeString": "literal_string \"uncompliant WitnetOracle\"" + } + ], + "id": 2051, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "1333:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1333:176:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2072, + "nodeType": "ExpressionStatement", + "src": "1333:176:23" + }, + { + "assignments": [ + 2075 + ], + "declarations": [ + { + "constant": false, + "id": 2075, + "mutability": "mutable", + "name": "_registry", + "nameLocation": "1543:9:23", + "nodeType": "VariableDeclaration", + "scope": 2164, + "src": "1520:32:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + }, + "typeName": { + "id": 2074, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2073, + "name": "WitnetRequestBytecodes", + "nameLocations": [ + "1520:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 849, + "src": "1520:22:23" + }, + "referencedDeclaration": 849, + "src": "1520:22:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "visibility": "internal" + } + ], + "id": 2080, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2076, + "name": "witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2275 + ], + "referencedDeclaration": 2275, + "src": "1555:6:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_WitnetOracle_$749_$", + "typeString": "function () view returns (contract WitnetOracle)" + } + }, + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1555:8:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1564:8:23", + "memberName": "registry", + "nodeType": "MemberAccess", + "referencedDeclaration": 743, + "src": "1555:17:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_WitnetRequestBytecodes_$849_$", + "typeString": "function () view external returns (contract WitnetRequestBytecodes)" + } + }, + "id": 2079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1555:19:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1520:54:23" + }, + { + "id": 2163, + "nodeType": "Block", + "src": "1585:1195:23", + "statements": [ + { + "assignments": [ + 2085 + ], + "declarations": [ + { + "constant": false, + "id": 2085, + "mutability": "mutable", + "name": "_retrievals", + "nameLocation": "1670:11:23", + "nodeType": "VariableDeclaration", + "scope": 2163, + "src": "1653:28:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1653:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2084, + "nodeType": "ArrayTypeName", + "src": "1653:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "id": 2091, + "initialValue": { + "arguments": [ + { + "hexValue": "31", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1698:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 2088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1684:13:23", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes32[] memory)" + }, + "typeName": { + "baseType": { + "id": 2086, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1688:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2087, + "nodeType": "ArrayTypeName", + "src": "1688:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1684:16:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1653:47:23" + }, + { + "expression": { + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2092, + "name": "_retrievals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "1715:11:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 2094, + "indexExpression": { + "hexValue": "30", + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1727:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1715:14:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2097, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "1781:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1788:23:23", + "memberName": "RadonDataRequestMethods", + "nodeType": "MemberAccess", + "referencedDeclaration": 16410, + "src": "1781:30:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RadonDataRequestMethods_$16410_$", + "typeString": "type(enum Witnet.RadonDataRequestMethods)" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1812:3:23", + "memberName": "RNG", + "nodeType": "MemberAccess", + "referencedDeclaration": 16407, + "src": "1781:34:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RadonDataRequestMethods_$16410", + "typeString": "enum Witnet.RadonDataRequestMethods" + } + }, + { + "hexValue": "", + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1834:2:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "hexValue": "", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1873:2:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 2107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1929:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1913:15:23", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory[2] memory[] memory)" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 2102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1917:6:23", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 2104, + "length": { + "hexValue": "32", + "id": 2103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1924:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "1917:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$2_storage_ptr", + "typeString": "string[2]" + } + }, + "id": 2105, + "nodeType": "ArrayTypeName", + "src": "1917:11:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_string_storage_$2_storage_$dyn_storage_ptr", + "typeString": "string[2][]" + } + } + }, + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1913:18:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr", + "typeString": "string memory[2] memory[] memory" + } + }, + { + "hexValue": "80", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "hexString", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1972:7:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "typeString": "literal_string hex\"80\"" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RadonDataRequestMethods_$16410", + "typeString": "enum Witnet.RadonDataRequestMethods" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr", + "typeString": "string memory[2] memory[] memory" + }, + { + "typeIdentifier": "t_stringliteral_56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "typeString": "literal_string hex\"80\"" + } + ], + "expression": { + "id": 2095, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2075, + "src": "1732:9:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1742:20:23", + "memberName": "verifyRadonRetrieval", + "nodeType": "MemberAccess", + "referencedDeclaration": 13947, + "src": "1732:30:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_enum$_RadonDataRequestMethods_$16410_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_array$_t_string_memory_ptr_$2_memory_ptr_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (enum Witnet.RadonDataRequestMethods,string memory,string memory,string memory[2] memory[] memory,bytes memory) external returns (bytes32)" + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1732:289:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1715:306:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2112, + "nodeType": "ExpressionStatement", + "src": "1715:306:23" + }, + { + "assignments": [ + 2118 + ], + "declarations": [ + { + "constant": false, + "id": 2118, + "mutability": "mutable", + "name": "_filters", + "nameLocation": "2064:8:23", + "nodeType": "VariableDeclaration", + "scope": 2163, + "src": "2036:36:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_memory_ptr_$dyn_memory_ptr", + "typeString": "struct Witnet.RadonFilter[]" + }, + "typeName": { + "baseType": { + "id": 2116, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2115, + "name": "Witnet.RadonFilter", + "nameLocations": [ + "2036:6:23", + "2043:11:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 16439, + "src": "2036:18:23" + }, + "referencedDeclaration": 16439, + "src": "2036:18:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonFilter_$16439_storage_ptr", + "typeString": "struct Witnet.RadonFilter" + } + }, + "id": 2117, + "nodeType": "ArrayTypeName", + "src": "2036:20:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_storage_$dyn_storage_ptr", + "typeString": "struct Witnet.RadonFilter[]" + } + }, + "visibility": "internal" + } + ], + "id": 2119, + "nodeType": "VariableDeclarationStatement", + "src": "2036:36:23" + }, + { + "assignments": [ + 2121 + ], + "declarations": [ + { + "constant": false, + "id": 2121, + "mutability": "mutable", + "name": "_aggregator", + "nameLocation": "2095:11:23", + "nodeType": "VariableDeclaration", + "scope": 2163, + "src": "2087:19:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2120, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2087:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2132, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "expression": { + "id": 2126, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "2185:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2192:19:23", + "memberName": "RadonReducerOpcodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 16474, + "src": "2185:26:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RadonReducerOpcodes_$16474_$", + "typeString": "type(enum Witnet.RadonReducerOpcodes)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2212:4:23", + "memberName": "Mode", + "nodeType": "MemberAccess", + "referencedDeclaration": 16464, + "src": "2185:31:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RadonReducerOpcodes_$16474", + "typeString": "enum Witnet.RadonReducerOpcodes" + } + }, + { + "id": 2129, + "name": "_filters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2118, + "src": "2244:8:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_memory_ptr_$dyn_memory_ptr", + "typeString": "struct Witnet.RadonFilter memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RadonReducerOpcodes_$16474", + "typeString": "enum Witnet.RadonReducerOpcodes" + }, + { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_memory_ptr_$dyn_memory_ptr", + "typeString": "struct Witnet.RadonFilter memory[] memory" + } + ], + "expression": { + "id": 2124, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "2138:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2145:12:23", + "memberName": "RadonReducer", + "nodeType": "MemberAccess", + "referencedDeclaration": 16460, + "src": "2138:19:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_RadonReducer_$16460_storage_ptr_$", + "typeString": "type(struct Witnet.RadonReducer storage pointer)" + } + }, + "id": 2130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "2177:6:23", + "2235:7:23" + ], + "names": [ + "opcode", + "filters" + ], + "nodeType": "FunctionCall", + "src": "2138:144:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonReducer_$16460_memory_ptr", + "typeString": "struct Witnet.RadonReducer memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RadonReducer_$16460_memory_ptr", + "typeString": "struct Witnet.RadonReducer memory" + } + ], + "expression": { + "id": 2122, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2075, + "src": "2109:9:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "id": 2123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2119:18:23", + "memberName": "verifyRadonReducer", + "nodeType": "MemberAccess", + "referencedDeclaration": 13955, + "src": "2109:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_struct$_RadonReducer_$16460_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (struct Witnet.RadonReducer memory) external returns (bytes32)" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2109:174:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2087:196:23" + }, + { + "assignments": [ + 2134 + ], + "declarations": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "_tally", + "nameLocation": "2306:6:23", + "nodeType": "VariableDeclaration", + "scope": 2163, + "src": "2298:14:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2133, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2298:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2145, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "expression": { + "id": 2139, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "2391:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2398:19:23", + "memberName": "RadonReducerOpcodes", + "nodeType": "MemberAccess", + "referencedDeclaration": 16474, + "src": "2391:26:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RadonReducerOpcodes_$16474_$", + "typeString": "type(enum Witnet.RadonReducerOpcodes)" + } + }, + "id": 2141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2418:18:23", + "memberName": "ConcatenateAndHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 16473, + "src": "2391:45:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RadonReducerOpcodes_$16474", + "typeString": "enum Witnet.RadonReducerOpcodes" + } + }, + { + "id": 2142, + "name": "_filters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2118, + "src": "2464:8:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_memory_ptr_$dyn_memory_ptr", + "typeString": "struct Witnet.RadonFilter memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RadonReducerOpcodes_$16474", + "typeString": "enum Witnet.RadonReducerOpcodes" + }, + { + "typeIdentifier": "t_array$_t_struct$_RadonFilter_$16439_memory_ptr_$dyn_memory_ptr", + "typeString": "struct Witnet.RadonFilter memory[] memory" + } + ], + "expression": { + "id": 2137, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "2344:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2351:12:23", + "memberName": "RadonReducer", + "nodeType": "MemberAccess", + "referencedDeclaration": 16460, + "src": "2344:19:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_RadonReducer_$16460_storage_ptr_$", + "typeString": "type(struct Witnet.RadonReducer storage pointer)" + } + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "2383:6:23", + "2455:7:23" + ], + "names": [ + "opcode", + "filters" + ], + "nodeType": "FunctionCall", + "src": "2344:158:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonReducer_$16460_memory_ptr", + "typeString": "struct Witnet.RadonReducer memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RadonReducer_$16460_memory_ptr", + "typeString": "struct Witnet.RadonReducer memory" + } + ], + "expression": { + "id": 2135, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2075, + "src": "2315:9:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2325:18:23", + "memberName": "verifyRadonReducer", + "nodeType": "MemberAccess", + "referencedDeclaration": 13955, + "src": "2315:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_struct$_RadonReducer_$16460_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (struct Witnet.RadonReducer memory) external returns (bytes32)" + } + }, + "id": 2144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2315:188:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2298:205:23" + }, + { + "expression": { + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2146, + "name": "witnetRadHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2037, + "src": "2518:13:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2149, + "name": "_retrievals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2581:11:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + { + "id": 2150, + "name": "_aggregator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2121, + "src": "2611:11:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2151, + "name": "_tally", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "2641:6:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "hexValue": "3332", + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2666:2:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + { + "arguments": [ + { + "expression": { + "id": 2157, + "name": "_retrievals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2734:11:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2746:6:23", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2734:18:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2719:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory[] memory[] memory)" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 2153, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2723:6:23", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 2154, + "nodeType": "ArrayTypeName", + "src": "2723:8:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "id": 2155, + "nodeType": "ArrayTypeName", + "src": "2723:10:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_string_storage_$dyn_storage_$dyn_storage_ptr", + "typeString": "string[][]" + } + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2719:34:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr", + "typeString": "string memory[] memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + { + "typeIdentifier": "t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr", + "typeString": "string memory[] memory[] memory" + } + ], + "expression": { + "id": 2147, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2075, + "src": "2534:9:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetRequestBytecodes_$849", + "typeString": "contract WitnetRequestBytecodes" + } + }, + "id": 2148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2544:18:23", + "memberName": "verifyRadonRequest", + "nodeType": "MemberAccess", + "referencedDeclaration": 13973, + "src": "2534:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_bytes32_$_t_bytes32_$_t_uint16_$_t_array$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes32[] memory,bytes32,bytes32,uint16,string memory[] memory[] memory) external returns (bytes32)" + } + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2534:234:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2518:250:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2162, + "nodeType": "ExpressionStatement", + "src": "2518:250:23" + } + ] + } + ] + }, + "id": 2165, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 2045, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2042, + "src": "1276:9:23", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 2046, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 2044, + "name": "Ownable", + "nameLocations": [ + "1268:7:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 401, + "src": "1268:7:23" + }, + "nodeType": "ModifierInvocation", + "src": "1268:18:23" + }, + { + "arguments": [ + { + "id": 2048, + "name": "_witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2040, + "src": "1308:7:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + } + ], + "id": 2049, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 2047, + "name": "UsingWitnet", + "nameLocations": [ + "1296:11:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1157, + "src": "1296:11:23" + }, + "nodeType": "ModifierInvocation", + "src": "1296:20:23" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "_witnet", + "nameLocation": "1208:7:23", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "1195:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + }, + "typeName": { + "id": 2039, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2038, + "name": "WitnetOracle", + "nameLocations": [ + "1195:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 749, + "src": "1195:12:23" + }, + "referencedDeclaration": 749, + "src": "1195:12:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "_operator", + "nameLocation": "1238:9:23", + "nodeType": "VariableDeclaration", + "scope": 2165, + "src": "1230:17:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1230:7:23", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1180:78:23" + }, + "returnParameters": { + "id": 2050, + "nodeType": "ParameterList", + "parameters": [], + "src": "1322:0:23" + }, + "scope": 3137, + "src": "1169:1618:23", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2172, + "nodeType": "Block", + "src": "2830:51:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "6e6f207472616e7366657273206163636570746564", + "id": 2169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2849:23:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6a3de9692f94e64d352d00a12d05352c77c858c192f0bd7d2824e77178191cf", + "typeString": "literal_string \"no transfers accepted\"" + }, + "value": "no transfers accepted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f6a3de9692f94e64d352d00a12d05352c77c858c192f0bd7d2824e77178191cf", + "typeString": "literal_string \"no transfers accepted\"" + } + ], + "id": 2168, + "name": "_revert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "2841:7:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2841:32:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "2841:32:23" + } + ] + }, + "id": 2173, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2166, + "nodeType": "ParameterList", + "parameters": [], + "src": "2802:2:23" + }, + "returnParameters": { + "id": 2167, + "nodeType": "ParameterList", + "parameters": [], + "src": "2830:0:23" + }, + "scope": 3137, + "src": "2795:86:23", + "stateMutability": "payable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 2236, + "nodeType": "Block", + "src": "2925:345:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6e6f7420696d706c656d656e7465643a203078", + "id": 2181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2983:21:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6aa2932fe75962e4eb862ba4982429ce713637712a759cb9d40b6d5260a002eb", + "typeString": "literal_string \"not implemented: 0x\"" + }, + "value": "not implemented: 0x" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3051:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3055:3:23", + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "3051:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3044:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2186, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3044:6:23", + "typeDescriptions": {} + } + }, + "id": 2190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3044:15:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3038:5:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2184, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3038:5:23", + "typeDescriptions": {} + } + }, + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3038:22:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 2182, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "3019:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3026:11:23", + "memberName": "toHexString", + "nodeType": "MemberAccess", + "referencedDeclaration": 16596, + "src": "3019:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint8) pure returns (string memory)" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3019:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2199, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3108:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3112:3:23", + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "3108:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 2201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3119:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "3108:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3101:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2197, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3101:6:23", + "typeDescriptions": {} + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3101:20:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3095:5:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2195, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3095:5:23", + "typeDescriptions": {} + } + }, + "id": 2204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3095:27:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 2193, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "3076:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3083:11:23", + "memberName": "toHexString", + "nodeType": "MemberAccess", + "referencedDeclaration": 16596, + "src": "3076:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint8) pure returns (string memory)" + } + }, + "id": 2205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3076:47:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 2215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2212, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3170:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3174:3:23", + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "3170:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 2214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3181:2:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "3170:13:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3163:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2210, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3163:6:23", + "typeDescriptions": {} + } + }, + "id": 2216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3163:21:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3157:5:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2208, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3157:5:23", + "typeDescriptions": {} + } + }, + "id": 2217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3157:28:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 2206, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "3138:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3145:11:23", + "memberName": "toHexString", + "nodeType": "MemberAccess", + "referencedDeclaration": 16596, + "src": "3138:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint8) pure returns (string memory)" + } + }, + "id": 2218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3138:48:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2225, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3233:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3237:3:23", + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "3233:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3234", + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3244:2:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + "src": "3233:13:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3226:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2223, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3226:6:23", + "typeDescriptions": {} + } + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3226:21:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3220:5:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2221, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3220:5:23", + "typeDescriptions": {} + } + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3220:28:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 2219, + "name": "Witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17557, + "src": "3201:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Witnet_$17557_$", + "typeString": "type(library Witnet)" + } + }, + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3208:11:23", + "memberName": "toHexString", + "nodeType": "MemberAccess", + "referencedDeclaration": 16596, + "src": "3201:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint8) pure returns (string memory)" + } + }, + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3201:48:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6aa2932fe75962e4eb862ba4982429ce713637712a759cb9d40b6d5260a002eb", + "typeString": "literal_string \"not implemented: 0x\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 2179, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2952:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2956:12:23", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2952:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2952:308:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2945:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2177, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2945:6:23", + "typeDescriptions": {} + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2945:316:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2176, + "name": "_revert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "2937:7:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 2234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2937:325:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2235, + "nodeType": "ExpressionStatement", + "src": "2937:325:23" + } + ] + }, + "id": 2237, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2174, + "nodeType": "ParameterList", + "parameters": [], + "src": "2897:2:23" + }, + "returnParameters": { + "id": 2175, + "nodeType": "ParameterList", + "parameters": [], + "src": "2925:0:23" + }, + "scope": 3137, + "src": "2889:381:23", + "stateMutability": "payable", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 788 + ], + "body": { + "id": 2248, + "nodeType": "Block", + "src": "3348:55:23", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2244, + "name": "WitnetRandomnessV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3137, + "src": "3371:18:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetRandomnessV2_$3137_$", + "typeString": "type(contract WitnetRandomnessV2)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetRandomnessV2_$3137_$", + "typeString": "type(contract WitnetRandomnessV2)" + } + ], + "id": 2243, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "3366:4:23", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3366:24:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetRandomnessV2_$3137", + "typeString": "type(contract WitnetRandomnessV2)" + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3391:4:23", + "memberName": "name", + "nodeType": "MemberAccess", + "src": "3366:29:23", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2242, + "id": 2247, + "nodeType": "Return", + "src": "3359:36:23" + } + ] + }, + "functionSelector": "bff852fa", + "id": 2249, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "class", + "nameLocation": "3287:5:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2239, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3303:8:23" + }, + "parameters": { + "id": 2238, + "nodeType": "ParameterList", + "parameters": [], + "src": "3292:2:23" + }, + "returnParameters": { + "id": 2242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2241, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2249, + "src": "3333:13:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2240, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3333:6:23", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3332:15:23" + }, + "scope": 3137, + "src": "3278:125:23", + "stateMutability": "pure", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 793 + ], + "body": { + "id": 2260, + "nodeType": "Block", + "src": "3476:60:23", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2256, + "name": "WitnetRandomness", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "3499:16:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetRandomness_$794_$", + "typeString": "type(contract WitnetRandomness)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_WitnetRandomness_$794_$", + "typeString": "type(contract WitnetRandomness)" + } + ], + "id": 2255, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967269, + "src": "3494:4:23", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3494:22:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_WitnetRandomness_$794", + "typeString": "type(contract WitnetRandomness)" + } + }, + "id": 2258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3517:11:23", + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "3494:34:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "functionReturnParameters": 2254, + "id": 2259, + "nodeType": "Return", + "src": "3487:41:23" + } + ] + }, + "functionSelector": "adb7c3f7", + "id": 2261, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "specs", + "nameLocation": "3420:5:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2251, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3436:8:23" + }, + "parameters": { + "id": 2250, + "nodeType": "ParameterList", + "parameters": [], + "src": "3425:2:23" + }, + "returnParameters": { + "id": 2254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2253, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2261, + "src": "3468:6:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2252, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "3468:6:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "3467:8:23" + }, + "scope": 3137, + "src": "3411:125:23", + "stateMutability": "pure", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 1086, + 13625 + ], + "body": { + "id": 2274, + "nodeType": "Block", + "src": "3653:46:23", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2270, + "name": "UsingWitnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "3671:11:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_UsingWitnet_$1157_$", + "typeString": "type(contract UsingWitnet)" + } + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3683:6:23", + "memberName": "witnet", + "nodeType": "MemberAccess", + "referencedDeclaration": 1086, + "src": "3671:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_WitnetOracle_$749_$", + "typeString": "function () view returns (contract WitnetOracle)" + } + }, + "id": 2272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3671:20:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "functionReturnParameters": 2269, + "id": 2273, + "nodeType": "Return", + "src": "3664:27:23" + } + ] + }, + "functionSelector": "46d1d21a", + "id": 2275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "witnet", + "nameLocation": "3553:6:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2265, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 2263, + "name": "IWitnetRandomness", + "nameLocations": [ + "3572:17:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13639, + "src": "3572:17:23" + }, + { + "id": 2264, + "name": "UsingWitnet", + "nameLocations": [ + "3591:11:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1157, + "src": "3591:11:23" + } + ], + "src": "3562:41:23" + }, + "parameters": { + "id": 2262, + "nodeType": "ParameterList", + "parameters": [], + "src": "3559:2:23" + }, + "returnParameters": { + "id": 2269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2268, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2275, + "src": "3634:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + }, + "typeName": { + "id": 2267, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2266, + "name": "WitnetOracle", + "nameLocations": [ + "3634:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 749, + "src": "3634:12:23" + }, + "referencedDeclaration": 749, + "src": "3634:12:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "visibility": "internal" + } + ], + "src": "3633:14:23" + }, + "scope": 3137, + "src": "3544:155:23", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13527 + ], + "body": { + "id": 2301, + "nodeType": "Block", + "src": "4235:232:23", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 2286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "313030", + "id": 2284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4269:3:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2285, + "name": "__witnetBaseFeeOverheadPercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1023, + "src": "4275:33:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "4269:39:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 2287, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4268:41:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 2290, + "name": "_evmGasPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2278, + "src": "4376:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "hexValue": "3334", + "id": 2293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4419:2:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "34" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + } + ], + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4412:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 2291, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "4412:6:23", + "typeDescriptions": {} + } + }, + "id": 2294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4412:10:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "id": 2288, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "4329:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4338:15:23", + "memberName": "estimateBaseFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "4329:24:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint16_$returns$_t_uint256_$", + "typeString": "function (uint256,uint16) view external returns (uint256)" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4329:112:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4268:173:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2297, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4253:200:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "313030", + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4456:3:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "src": "4253:206:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2283, + "id": 2300, + "nodeType": "Return", + "src": "4246:213:23" + } + ] + }, + "documentation": { + "id": 2276, + "nodeType": "StructuredDocumentation", + "src": "3957:141:23", + "text": "Returns amount of wei required to be paid as a fee when requesting randomization with a \n transaction gas price as the one given." + }, + "functionSelector": "a60ee268", + "id": 2302, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "estimateRandomizeFee", + "nameLocation": "4113:20:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4194:8:23" + }, + "parameters": { + "id": 2279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2278, + "mutability": "mutable", + "name": "_evmGasPrice", + "nameLocation": "4142:12:23", + "nodeType": "VariableDeclaration", + "scope": 2302, + "src": "4134:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4134:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4133:22:23" + }, + "returnParameters": { + "id": 2283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2282, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2302, + "src": "4221:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2281, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4221:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4220:9:23" + }, + "scope": 3137, + "src": "4104:363:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13535 + ], + "body": { + "id": 2321, + "nodeType": "Block", + "src": "5311:171:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2314, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "5382:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2316, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "5435:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2315, + "name": "_fetchRandomnessAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "5413:21:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5413:35:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 2312, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "5353:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5357:6:23", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "5353:10:23", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5353:110:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2311, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "5329:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5329:145:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2310, + "id": 2320, + "nodeType": "Return", + "src": "5322:152:23" + } + ] + }, + "documentation": { + "id": 2303, + "nodeType": "StructuredDocumentation", + "src": "4475:699:23", + "text": "@notice Retrieves the result of keccak256-hashing the given block number with the randomness value \n @notice generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved \n @notice after such block number.\n @dev Reverts if:\n @dev i. no `randomize()` was requested on neither the given block, nor afterwards.\n @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.\n @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors.\n @param _blockNumber Block number from which the search will start" + }, + "functionSelector": "82b1c174", + "id": 2322, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fetchRandomnessAfter", + "nameLocation": "5189:20:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2307, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5270:8:23" + }, + "parameters": { + "id": 2306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "5218:12:23", + "nodeType": "VariableDeclaration", + "scope": 2322, + "src": "5210:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5210:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5209:22:23" + }, + "returnParameters": { + "id": 2310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2309, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2322, + "src": "5297:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2308, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5297:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5296:9:23" + }, + "scope": 3137, + "src": "5180:302:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 2421, + "nodeType": "Block", + "src": "5611:1125:23", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2329, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "5626:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5626:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2331, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5638:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "5626:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2333, + "indexExpression": { + "id": 2332, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "5649:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5626:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5663:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "5626:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5680:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5626:55:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2344, + "nodeType": "IfStatement", + "src": "5622:138:23", + "trueBody": { + "id": 2343, + "nodeType": "Block", + "src": "5683:77:23", + "statements": [ + { + "expression": { + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2337, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "5698:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2339, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "5735:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2338, + "name": "getRandomizeNextBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2638, + "src": "5713:21:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5713:35:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5698:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2342, + "nodeType": "ExpressionStatement", + "src": "5698:50:23" + } + ] + } + }, + { + "assignments": [ + 2347 + ], + "declarations": [ + { + "constant": false, + "id": 2347, + "mutability": "mutable", + "name": "__randomize", + "nameLocation": "5790:11:23", + "nodeType": "VariableDeclaration", + "scope": 2421, + "src": "5772:29:23", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + }, + "typeName": { + "id": 2346, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2345, + "name": "Randomize", + "nameLocations": [ + "5772:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2025, + "src": "5772:9:23" + }, + "referencedDeclaration": 2025, + "src": "5772:9:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + } + }, + "visibility": "internal" + } + ], + "id": 2353, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2348, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "5804:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5804:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5816:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "5804:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2352, + "indexExpression": { + "id": 2351, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "5827:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5804:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5772:68:23" + }, + { + "assignments": [ + 2355 + ], + "declarations": [ + { + "constant": false, + "id": 2355, + "mutability": "mutable", + "name": "_witnetQueryId", + "nameLocation": "5859:14:23", + "nodeType": "VariableDeclaration", + "scope": 2421, + "src": "5851:22:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5851:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2358, + "initialValue": { + "expression": { + "id": 2356, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2347, + "src": "5876:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5888:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "5876:25:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5851:50:23" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2360, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2355, + "src": "5935:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5953:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5935:19:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6e6f742072616e646f6d697a6564", + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5970:16:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c549dc5ce1d0aff824742be5f2f4b215e9ee5536765ca70c98e8aef45943fde8", + "typeString": "literal_string \"not randomized\"" + }, + "value": "not randomized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c549dc5ce1d0aff824742be5f2f4b215e9ee5536765ca70c98e8aef45943fde8", + "typeString": "literal_string \"not randomized\"" + } + ], + "id": 2359, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "5912:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5912:85:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2365, + "nodeType": "ExpressionStatement", + "src": "5912:85:23" + }, + { + "assignments": [ + 2370 + ], + "declarations": [ + { + "constant": false, + "id": 2370, + "mutability": "mutable", + "name": "_status", + "nameLocation": "6042:7:23", + "nodeType": "VariableDeclaration", + "scope": 2421, + "src": "6018:31:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "typeName": { + "id": 2369, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2368, + "name": "WitnetV2.ResponseStatus", + "nameLocations": [ + "6018:8:23", + "6027:14:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23496, + "src": "6018:23:23" + }, + "referencedDeclaration": 23496, + "src": "6018:23:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "visibility": "internal" + } + ], + "id": 2375, + "initialValue": { + "arguments": [ + { + "id": 2373, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2355, + "src": "6084:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2371, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "6052:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6061:22:23", + "memberName": "getQueryResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 13178, + "src": "6052:31:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$", + "typeString": "function (uint256) view external returns (enum WitnetV2.ResponseStatus)" + } + }, + "id": 2374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6052:47:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6018:81:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2376, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2370, + "src": "6114:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2377, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "6125:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6134:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "6125:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6149:5:23", + "memberName": "Ready", + "nodeType": "MemberAccess", + "referencedDeclaration": 23492, + "src": "6125:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "6114:40:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2392, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2370, + "src": "6355:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2393, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "6366:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6375:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "6366:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6390:5:23", + "memberName": "Error", + "nodeType": "MemberAccess", + "referencedDeclaration": 23493, + "src": "6366:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "6355:40:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2418, + "nodeType": "Block", + "src": "6674:55:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "70656e64696e672072616e646f6d697a65", + "id": 2415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6697:19:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06a39c1cfbbaaebf65cb621f56a07759f8e599c84ca52e82092ad3e68603dc57", + "typeString": "literal_string \"pending randomize\"" + }, + "value": "pending randomize" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_06a39c1cfbbaaebf65cb621f56a07759f8e599c84ca52e82092ad3e68603dc57", + "typeString": "literal_string \"pending randomize\"" + } + ], + "id": 2414, + "name": "_revert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "6689:7:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6689:28:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2417, + "nodeType": "ExpressionStatement", + "src": "6689:28:23" + } + ] + }, + "id": 2419, + "nodeType": "IfStatement", + "src": "6351:378:23", + "trueBody": { + "id": 2413, + "nodeType": "Block", + "src": "6397:271:23", + "statements": [ + { + "assignments": [ + 2398 + ], + "declarations": [ + { + "constant": false, + "id": 2398, + "mutability": "mutable", + "name": "_nextRandomizeBlock", + "nameLocation": "6420:19:23", + "nodeType": "VariableDeclaration", + "scope": 2413, + "src": "6412:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2397, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6412:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2401, + "initialValue": { + "expression": { + "id": 2399, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2347, + "src": "6442:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2400, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6454:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "6442:21:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6412:51:23" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2403, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2398, + "src": "6505:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6528:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6505:24:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6661756c74792072616e646f6d697a65", + "id": 2406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6549:18:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d731e0516442c736dfbb6f256f71c0ed003a49137803c96a11e1e78c0e9b9ddd", + "typeString": "literal_string \"faulty randomize\"" + }, + "value": "faulty randomize" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d731e0516442c736dfbb6f256f71c0ed003a49137803c96a11e1e78c0e9b9ddd", + "typeString": "literal_string \"faulty randomize\"" + } + ], + "id": 2402, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "6478:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6478:104:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2408, + "nodeType": "ExpressionStatement", + "src": "6478:104:23" + }, + { + "expression": { + "arguments": [ + { + "id": 2410, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2398, + "src": "6626:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2409, + "name": "_fetchRandomnessAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "6604:21:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 2411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6604:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2328, + "id": 2412, + "nodeType": "Return", + "src": "6597:49:23" + } + ] + } + }, + "id": 2420, + "nodeType": "IfStatement", + "src": "6110:619:23", + "trueBody": { + "id": 2391, + "nodeType": "Block", + "src": "6156:189:23", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 2383, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2355, + "src": "6230:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2381, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "6197:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6206:23:23", + "memberName": "getQueryResultCborBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 13186, + "src": "6197:32:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) view external returns (bytes memory)" + } + }, + "id": 2384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6197:48:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6268:14:23", + "memberName": "toWitnetResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 16864, + "src": "6197:85:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_struct$_Result_$16042_memory_ptr_$attached_to$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) pure returns (struct Witnet.Result memory)" + } + }, + "id": 2386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6197:87:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Result_$16042_memory_ptr", + "typeString": "struct Witnet.Result memory" + } + }, + "id": 2387, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6307:9:23", + "memberName": "asBytes32", + "nodeType": "MemberAccess", + "referencedDeclaration": 17324, + "src": "6197:119:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Result_$16042_memory_ptr_$returns$_t_bytes32_$attached_to$_t_struct$_Result_$16042_memory_ptr_$", + "typeString": "function (struct Witnet.Result memory) pure returns (bytes32)" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6197:121:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 2389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6178:155:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2328, + "id": 2390, + "nodeType": "Return", + "src": "6171:162:23" + } + ] + } + } + ] + }, + "id": 2422, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_fetchRandomnessAfter", + "nameLocation": "5503:21:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "5533:12:23", + "nodeType": "VariableDeclaration", + "scope": 2422, + "src": "5525:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5525:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5524:22:23" + }, + "returnParameters": { + "id": 2328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2327, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2422, + "src": "5597:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2326, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5597:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5596:9:23" + }, + "scope": 3137, + "src": "5494:1242:23", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 13549 + ], + "body": { + "id": 2553, + "nodeType": "Block", + "src": "8299:1389:23", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2437, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "8314:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8314:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8326:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "8314:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2441, + "indexExpression": { + "id": 2440, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2425, + "src": "8337:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8314:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2442, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8351:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "8314:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8368:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8314:55:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2452, + "nodeType": "IfStatement", + "src": "8310:138:23", + "trueBody": { + "id": 2451, + "nodeType": "Block", + "src": "8371:77:23", + "statements": [ + { + "expression": { + "id": 2449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2445, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2425, + "src": "8386:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2447, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2425, + "src": "8423:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2446, + "name": "getRandomizeNextBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2638, + "src": "8401:21:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8401:35:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8386:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2450, + "nodeType": "ExpressionStatement", + "src": "8386:50:23" + } + ] + } + }, + { + "assignments": [ + 2455 + ], + "declarations": [ + { + "constant": false, + "id": 2455, + "mutability": "mutable", + "name": "__randomize", + "nameLocation": "8478:11:23", + "nodeType": "VariableDeclaration", + "scope": 2553, + "src": "8460:29:23", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + }, + "typeName": { + "id": 2454, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2453, + "name": "Randomize", + "nameLocations": [ + "8460:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2025, + "src": "8460:9:23" + }, + "referencedDeclaration": 2025, + "src": "8460:9:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + } + }, + "visibility": "internal" + } + ], + "id": 2461, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2456, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "8492:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8492:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2458, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8504:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "8492:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2460, + "indexExpression": { + "id": 2459, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2425, + "src": "8515:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8492:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8460:68:23" + }, + { + "assignments": [ + 2463 + ], + "declarations": [ + { + "constant": false, + "id": 2463, + "mutability": "mutable", + "name": "_witnetQueryId", + "nameLocation": "8547:14:23", + "nodeType": "VariableDeclaration", + "scope": 2553, + "src": "8539:22:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2462, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8539:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2466, + "initialValue": { + "expression": { + "id": 2464, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2455, + "src": "8564:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8576:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "8564:25:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8539:50:23" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2468, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2463, + "src": "8623:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8641:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8623:19:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6e6f742072616e646f6d697a6564", + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8658:16:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c549dc5ce1d0aff824742be5f2f4b215e9ee5536765ca70c98e8aef45943fde8", + "typeString": "literal_string \"not randomized\"" + }, + "value": "not randomized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c549dc5ce1d0aff824742be5f2f4b215e9ee5536765ca70c98e8aef45943fde8", + "typeString": "literal_string \"not randomized\"" + } + ], + "id": 2467, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "8600:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8600:85:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2473, + "nodeType": "ExpressionStatement", + "src": "8600:85:23" + }, + { + "assignments": [ + 2478 + ], + "declarations": [ + { + "constant": false, + "id": 2478, + "mutability": "mutable", + "name": "_status", + "nameLocation": "8730:7:23", + "nodeType": "VariableDeclaration", + "scope": 2553, + "src": "8706:31:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "typeName": { + "id": 2477, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2476, + "name": "WitnetV2.ResponseStatus", + "nameLocations": [ + "8706:8:23", + "8715:14:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23496, + "src": "8706:23:23" + }, + "referencedDeclaration": 23496, + "src": "8706:23:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "visibility": "internal" + } + ], + "id": 2483, + "initialValue": { + "arguments": [ + { + "id": 2481, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2463, + "src": "8772:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2479, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "8740:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8749:22:23", + "memberName": "getQueryResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 13178, + "src": "8740:31:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$", + "typeString": "function (uint256) view external returns (enum WitnetV2.ResponseStatus)" + } + }, + "id": 2482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8740:47:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8706:81:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2484, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "8802:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2485, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "8813:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8822:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "8813:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8837:5:23", + "memberName": "Ready", + "nodeType": "MemberAccess", + "referencedDeclaration": 23492, + "src": "8813:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "8802:40:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2524, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "9303:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2525, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "9314:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9323:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "9314:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "9338:5:23", + "memberName": "Error", + "nodeType": "MemberAccess", + "referencedDeclaration": 23493, + "src": "9314:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "9303:40:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2550, + "nodeType": "Block", + "src": "9626:55:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "70656e64696e672072616e646f6d697a65", + "id": 2547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9649:19:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06a39c1cfbbaaebf65cb621f56a07759f8e599c84ca52e82092ad3e68603dc57", + "typeString": "literal_string \"pending randomize\"" + }, + "value": "pending randomize" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_06a39c1cfbbaaebf65cb621f56a07759f8e599c84ca52e82092ad3e68603dc57", + "typeString": "literal_string \"pending randomize\"" + } + ], + "id": 2546, + "name": "_revert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "9641:7:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 2548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9641:28:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2549, + "nodeType": "ExpressionStatement", + "src": "9641:28:23" + } + ] + }, + "id": 2551, + "nodeType": "IfStatement", + "src": "9299:382:23", + "trueBody": { + "id": 2545, + "nodeType": "Block", + "src": "9345:275:23", + "statements": [ + { + "assignments": [ + 2530 + ], + "declarations": [ + { + "constant": false, + "id": 2530, + "mutability": "mutable", + "name": "_nextRandomizeBlock", + "nameLocation": "9368:19:23", + "nodeType": "VariableDeclaration", + "scope": 2545, + "src": "9360:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2529, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9360:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2533, + "initialValue": { + "expression": { + "id": 2531, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2455, + "src": "9390:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2532, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9402:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "9390:21:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9360:51:23" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2535, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2530, + "src": "9453:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9476:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9453:24:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6661756c74792072616e646f6d697a65", + "id": 2538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9497:18:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d731e0516442c736dfbb6f256f71c0ed003a49137803c96a11e1e78c0e9b9ddd", + "typeString": "literal_string \"faulty randomize\"" + }, + "value": "faulty randomize" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d731e0516442c736dfbb6f256f71c0ed003a49137803c96a11e1e78c0e9b9ddd", + "typeString": "literal_string \"faulty randomize\"" + } + ], + "id": 2534, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "9426:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9426:104:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2540, + "nodeType": "ExpressionStatement", + "src": "9426:104:23" + }, + { + "expression": { + "arguments": [ + { + "id": 2542, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2530, + "src": "9578:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2541, + "name": "fetchRandomnessAfterProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2554, + "src": "9552:25:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$_t_uint64_$_t_bytes32_$_t_uint256_$", + "typeString": "function (uint256) view returns (bytes32,uint64,bytes32,uint256)" + } + }, + "id": 2543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9552:46:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint64_$_t_bytes32_$_t_uint256_$", + "typeString": "tuple(bytes32,uint64,bytes32,uint256)" + } + }, + "functionReturnParameters": 2436, + "id": 2544, + "nodeType": "Return", + "src": "9545:53:23" + } + ] + } + }, + "id": 2552, + "nodeType": "IfStatement", + "src": "8798:883:23", + "trueBody": { + "id": 2523, + "nodeType": "Block", + "src": "8844:449:23", + "statements": [ + { + "assignments": [ + 2493 + ], + "declarations": [ + { + "constant": false, + "id": 2493, + "mutability": "mutable", + "name": "_witnetQueryResponse", + "nameLocation": "8884:20:23", + "nodeType": "VariableDeclaration", + "scope": 2523, + "src": "8859:45:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response" + }, + "typeName": { + "id": 2492, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2491, + "name": "WitnetV2.Response", + "nameLocations": [ + "8859:8:23", + "8868:8:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23488, + "src": "8859:17:23" + }, + "referencedDeclaration": 23488, + "src": "8859:17:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_storage_ptr", + "typeString": "struct WitnetV2.Response" + } + }, + "visibility": "internal" + } + ], + "id": 2498, + "initialValue": { + "arguments": [ + { + "id": 2496, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2463, + "src": "8933:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2494, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "8907:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8916:16:23", + "memberName": "getQueryResponse", + "nodeType": "MemberAccess", + "referencedDeclaration": 13169, + "src": "8907:25:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_Response_$23488_memory_ptr_$", + "typeString": "function (uint256) view external returns (struct WitnetV2.Response memory)" + } + }, + "id": 2497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8907:41:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8859:89:23" + }, + { + "expression": { + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2499, + "name": "_witnetResultTimestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2431, + "src": "8963:22:23", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2500, + "name": "_witnetQueryResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2493, + "src": "8988:20:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response memory" + } + }, + "id": 2501, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9009:15:23", + "memberName": "resultTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 23483, + "src": "8988:36:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8963:61:23", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 2503, + "nodeType": "ExpressionStatement", + "src": "8963:61:23" + }, + { + "expression": { + "id": 2507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2504, + "name": "_witnetResultTallyHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2433, + "src": "9039:22:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2505, + "name": "_witnetQueryResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2493, + "src": "9064:20:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response memory" + } + }, + "id": 2506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9085:15:23", + "memberName": "resultTallyHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 23485, + "src": "9064:36:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9039:61:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2508, + "nodeType": "ExpressionStatement", + "src": "9039:61:23" + }, + { + "expression": { + "id": 2512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2509, + "name": "_witnetResultFinalityBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2435, + "src": "9115:26:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2510, + "name": "_witnetQueryResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2493, + "src": "9144:20:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response memory" + } + }, + "id": 2511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9165:8:23", + "memberName": "finality", + "nodeType": "MemberAccess", + "referencedDeclaration": 23481, + "src": "9144:29:23", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "9115:58:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2513, + "nodeType": "ExpressionStatement", + "src": "9115:58:23" + }, + { + "expression": { + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2514, + "name": "_witnetResultRandomness", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "9188:23:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 2515, + "name": "_witnetQueryResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2493, + "src": "9214:20:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Response_$23488_memory_ptr", + "typeString": "struct WitnetV2.Response memory" + } + }, + "id": 2516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9235:15:23", + "memberName": "resultCborBytes", + "nodeType": "MemberAccess", + "referencedDeclaration": 23487, + "src": "9214:36:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9251:14:23", + "memberName": "toWitnetResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 16864, + "src": "9214:51:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_struct$_Result_$16042_memory_ptr_$attached_to$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) pure returns (struct Witnet.Result memory)" + } + }, + "id": 2518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9214:53:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Result_$16042_memory_ptr", + "typeString": "struct Witnet.Result memory" + } + }, + "id": 2519, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9268:9:23", + "memberName": "asBytes32", + "nodeType": "MemberAccess", + "referencedDeclaration": 17324, + "src": "9214:63:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Result_$16042_memory_ptr_$returns$_t_bytes32_$attached_to$_t_struct$_Result_$16042_memory_ptr_$", + "typeString": "function (struct Witnet.Result memory) pure returns (bytes32)" + } + }, + "id": 2520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9214:65:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9188:91:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2522, + "nodeType": "ExpressionStatement", + "src": "9188:91:23" + } + ] + } + } + ] + }, + "documentation": { + "id": 2423, + "nodeType": "StructuredDocumentation", + "src": "6744:1224:23", + "text": "@notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took\n @notice place in the Witnet Oracle blockchain in response to the first non-errored randomize request\n @notice solved after the given block number.\n @dev Reverts if:\n @dev i. no `randomize()` was requested on neither the given block, nor afterwards.\n @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.\n @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors.\n @param _blockNumber Block number from which the search will start.\n @return _witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block.\n @return _witnetResultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain.\n @return _witnetResultTallyHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.\n @return _witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final." + }, + "functionSelector": "17f45487", + "id": 2554, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fetchRandomnessAfterProof", + "nameLocation": "7983:25:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2427, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8049:8:23" + }, + "parameters": { + "id": 2426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2425, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "8017:12:23", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "8009:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2424, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8009:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8008:22:23" + }, + "returnParameters": { + "id": 2436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2429, + "mutability": "mutable", + "name": "_witnetResultRandomness", + "nameLocation": "8120:23:23", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "8112:31:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2428, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8112:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2431, + "mutability": "mutable", + "name": "_witnetResultTimestamp", + "nameLocation": "8166:22:23", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "8158:30:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2430, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8158:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2433, + "mutability": "mutable", + "name": "_witnetResultTallyHash", + "nameLocation": "8211:22:23", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "8203:30:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2432, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8203:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2435, + "mutability": "mutable", + "name": "_witnetResultFinalityBlock", + "nameLocation": "8256:26:23", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "8248:34:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8248:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8097:196:23" + }, + "scope": 3137, + "src": "7974:1714:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13555 + ], + "body": { + "id": 2565, + "nodeType": "Block", + "src": "9889:56:23", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2561, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "9907:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9907:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2563, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9919:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "9907:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2560, + "id": 2564, + "nodeType": "Return", + "src": "9900:37:23" + } + ] + }, + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "9696:73:23", + "text": "@notice Returns last block number on which a randomize was requested." + }, + "functionSelector": "8f261684", + "id": 2566, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLastRandomizeBlock", + "nameLocation": "9784:21:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2557, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9825:8:23" + }, + "parameters": { + "id": 2556, + "nodeType": "ParameterList", + "parameters": [], + "src": "9805:2:23" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2559, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2566, + "src": "9875:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9875:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9874:9:23" + }, + "scope": 3137, + "src": "9775:170:23", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13567 + ], + "body": { + "id": 2603, + "nodeType": "Block", + "src": "10818:248:23", + "statements": [ + { + "assignments": [ + 2581 + ], + "declarations": [ + { + "constant": false, + "id": 2581, + "mutability": "mutable", + "name": "__randomize", + "nameLocation": "10847:11:23", + "nodeType": "VariableDeclaration", + "scope": 2603, + "src": "10829:29:23", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + }, + "typeName": { + "id": 2580, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2579, + "name": "Randomize", + "nameLocations": [ + "10829:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2025, + "src": "10829:9:23" + }, + "referencedDeclaration": 2025, + "src": "10829:9:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + } + }, + "visibility": "internal" + } + ], + "id": 2587, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2582, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "10861:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10861:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10873:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "10861:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2586, + "indexExpression": { + "id": 2585, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2569, + "src": "10884:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10861:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10829:68:23" + }, + { + "expression": { + "id": 2591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2588, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2573, + "src": "10908:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2589, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2581, + "src": "10925:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2590, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10937:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "10925:25:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10908:42:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2592, + "nodeType": "ExpressionStatement", + "src": "10908:42:23" + }, + { + "expression": { + "id": 2596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2593, + "name": "_prevRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2575, + "src": "10961:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2594, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2581, + "src": "10983:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10995:9:23", + "memberName": "prevBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2022, + "src": "10983:21:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10961:43:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2597, + "nodeType": "ExpressionStatement", + "src": "10961:43:23" + }, + { + "expression": { + "id": 2601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2598, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2577, + "src": "11015:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2599, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2581, + "src": "11037:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2600, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11049:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "11037:21:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11015:43:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2602, + "nodeType": "ExpressionStatement", + "src": "11015:43:23" + } + ] + }, + "documentation": { + "id": 2567, + "nodeType": "StructuredDocumentation", + "src": "9953:607:23", + "text": "@notice Retrieves metadata related to the randomize request that got posted to the \n @notice Witnet Oracle contract on the given block number.\n @dev Returns zero values if no randomize request was actually posted on the given block.\n @return _witnetQueryId Identifier of the underlying Witnet query created on the given block number. \n @return _prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none.\n @return _nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none." + }, + "functionSelector": "a3252f68", + "id": 2604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRandomizeData", + "nameLocation": "10575:16:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2571, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10654:8:23" + }, + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "10600:12:23", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "10592:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2568, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10592:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10591:22:23" + }, + "returnParameters": { + "id": 2578, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2573, + "mutability": "mutable", + "name": "_witnetQueryId", + "nameLocation": "10703:14:23", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "10695:22:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10695:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2575, + "mutability": "mutable", + "name": "_prevRandomizeBlock", + "nameLocation": "10740:19:23", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "10732:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2574, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10732:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2577, + "mutability": "mutable", + "name": "_nextRandomizeBlock", + "nameLocation": "10782:19:23", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "10774:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2576, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10774:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10680:132:23" + }, + "scope": 3137, + "src": "10566:500:23", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13575 + ], + "body": { + "id": 2637, + "nodeType": "Block", + "src": "11486:286:23", + "statements": [ + { + "expression": { + "components": [ + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2613, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "11506:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11506:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11518:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "11506:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2617, + "indexExpression": { + "id": 2616, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "11529:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11506:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2618, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11543:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "11506:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11560:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11506:55:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2621, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11505:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 2629, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "11708:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2630, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "11722:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11722:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11734:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "11722:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2628, + "name": "_searchNextBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "11691:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11691:62:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "11505:248:23", + "trueExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2622, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "11578:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11578:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2624, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11590:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "11578:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2626, + "indexExpression": { + "id": 2625, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "11601:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11578:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2627, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11615:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "11578:46:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2635, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11504:260:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2612, + "id": 2636, + "nodeType": "Return", + "src": "11497:267:23" + } + ] + }, + "documentation": { + "id": 2605, + "nodeType": "StructuredDocumentation", + "src": "11074:274:23", + "text": "@notice Returns the number of the next block in which a randomize request was posted after the given one. \n @param _blockNumber Block number from which the search will start.\n @return Number of the first block found after the given one, or `0` otherwise." + }, + "functionSelector": "de0958ac", + "id": 2638, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRandomizeNextBlock", + "nameLocation": "11363:21:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2609, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11445:8:23" + }, + "parameters": { + "id": 2608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2607, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "11393:12:23", + "nodeType": "VariableDeclaration", + "scope": 2638, + "src": "11385:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2606, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11385:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11384:22:23" + }, + "returnParameters": { + "id": 2612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2611, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2638, + "src": "11472:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2610, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11472:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11471:9:23" + }, + "scope": 3137, + "src": "11354:418:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13583 + ], + "body": { + "id": 2676, + "nodeType": "Block", + "src": "12199:319:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2648, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2641, + "src": "12217:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12232:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12217:16:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2647, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967293, + "src": "12210:6:23", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12210:24:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2652, + "nodeType": "ExpressionStatement", + "src": "12210:24:23" + }, + { + "assignments": [ + 2654 + ], + "declarations": [ + { + "constant": false, + "id": 2654, + "mutability": "mutable", + "name": "_latest", + "nameLocation": "12253:7:23", + "nodeType": "VariableDeclaration", + "scope": 2676, + "src": "12245:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12245:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2658, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2655, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "12263:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12263:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2657, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12275:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "12263:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12245:48:23" + }, + { + "expression": { + "components": [ + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2659, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2641, + "src": "12313:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 2660, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2654, + "src": "12328:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12313:22:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2662, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12312:24:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 2665, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2641, + "src": "12443:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2666, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "12457:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12457:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12469:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "12457:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2670, + "indexExpression": { + "id": 2669, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2654, + "src": "12480:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12457:31:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12489:9:23", + "memberName": "prevBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2022, + "src": "12457:41:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2664, + "name": "_searchPrevBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "12426:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 2672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12426:73:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "12312:187:23", + "trueExpression": { + "id": 2663, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2654, + "src": "12352:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2674, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12311:199:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2646, + "id": 2675, + "nodeType": "Return", + "src": "12304:206:23" + } + ] + }, + "documentation": { + "id": 2639, + "nodeType": "StructuredDocumentation", + "src": "11780:281:23", + "text": "@notice Returns the number of the previous block in which a randomize request was posted before the given one.\n @param _blockNumber Block number from which the search will start. Cannot be zero.\n @return First block found before the given one, or `0` otherwise." + }, + "functionSelector": "c0248bf1", + "id": 2677, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRandomizePrevBlock", + "nameLocation": "12076:21:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2643, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12158:8:23" + }, + "parameters": { + "id": 2642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2641, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "12106:12:23", + "nodeType": "VariableDeclaration", + "scope": 2677, + "src": "12098:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2640, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12098:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12097:22:23" + }, + "returnParameters": { + "id": 2646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2645, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2677, + "src": "12185:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2644, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12185:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12184:9:23" + }, + "scope": 3137, + "src": "12067:451:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13592 + ], + "body": { + "id": 2765, + "nodeType": "Block", + "src": "13355:911:23", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2687, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "13370:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13370:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2689, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13382:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "13370:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2691, + "indexExpression": { + "id": 2690, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "13393:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13370:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2692, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13407:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "13370:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13424:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13370:55:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2702, + "nodeType": "IfStatement", + "src": "13366:138:23", + "trueBody": { + "id": 2701, + "nodeType": "Block", + "src": "13427:77:23", + "statements": [ + { + "expression": { + "id": 2699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2695, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "13442:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2697, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "13479:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2696, + "name": "getRandomizeNextBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2638, + "src": "13457:21:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13457:35:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13442:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2700, + "nodeType": "ExpressionStatement", + "src": "13442:50:23" + } + ] + } + }, + { + "assignments": [ + 2704 + ], + "declarations": [ + { + "constant": false, + "id": 2704, + "mutability": "mutable", + "name": "_witnetQueryId", + "nameLocation": "13522:14:23", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "13514:22:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2703, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13514:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2705, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "13539:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13539:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13551:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "13539:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2709, + "indexExpression": { + "id": 2708, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "13562:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13539:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2710, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13576:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "13539:50:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13514:75:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2712, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2704, + "src": "13604:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13622:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13604:19:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2763, + "nodeType": "Block", + "src": "13703:556:23", + "statements": [ + { + "assignments": [ + 2724 + ], + "declarations": [ + { + "constant": false, + "id": 2724, + "mutability": "mutable", + "name": "_status", + "nameLocation": "13742:7:23", + "nodeType": "VariableDeclaration", + "scope": 2763, + "src": "13718:31:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "typeName": { + "id": 2723, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2722, + "name": "WitnetV2.ResponseStatus", + "nameLocations": [ + "13718:8:23", + "13727:14:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23496, + "src": "13718:23:23" + }, + "referencedDeclaration": 23496, + "src": "13718:23:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "visibility": "internal" + } + ], + "id": 2729, + "initialValue": { + "arguments": [ + { + "id": 2727, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2704, + "src": "13784:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2725, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "13752:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13761:22:23", + "memberName": "getQueryResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 13178, + "src": "13752:31:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$", + "typeString": "function (uint256) view external returns (enum WitnetV2.ResponseStatus)" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13752:47:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13718:81:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2730, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2724, + "src": "13818:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2731, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "13829:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13838:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "13829:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13853:5:23", + "memberName": "Error", + "nodeType": "MemberAccess", + "referencedDeclaration": 23493, + "src": "13829:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "13818:40:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2761, + "nodeType": "Block", + "src": "14199:49:23", + "statements": [ + { + "expression": { + "id": 2759, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2724, + "src": "14225:7:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "functionReturnParameters": 2686, + "id": 2760, + "nodeType": "Return", + "src": "14218:14:23" + } + ] + }, + "id": 2762, + "nodeType": "IfStatement", + "src": "13814:434:23", + "trueBody": { + "id": 2758, + "nodeType": "Block", + "src": "13860:333:23", + "statements": [ + { + "assignments": [ + 2736 + ], + "declarations": [ + { + "constant": false, + "id": 2736, + "mutability": "mutable", + "name": "_nextRandomizeBlock", + "nameLocation": "13887:19:23", + "nodeType": "VariableDeclaration", + "scope": 2758, + "src": "13879:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13879:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2743, + "initialValue": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2737, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "13909:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13909:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13921:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "13909:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2741, + "indexExpression": { + "id": 2740, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2680, + "src": "13932:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13909:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2742, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13946:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "13909:46:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13879:76:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2744, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "13978:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14001:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13978:24:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2756, + "nodeType": "Block", + "src": "14099:79:23", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2752, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "14129:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14138:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "14129:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14153:5:23", + "memberName": "Error", + "nodeType": "MemberAccess", + "referencedDeclaration": 23493, + "src": "14129:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "functionReturnParameters": 2686, + "id": 2755, + "nodeType": "Return", + "src": "14122:36:23" + } + ] + }, + "id": 2757, + "nodeType": "IfStatement", + "src": "13974:204:23", + "trueBody": { + "id": 2751, + "nodeType": "Block", + "src": "14004:89:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2748, + "name": "_nextRandomizeBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2736, + "src": "14053:19:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2747, + "name": "getRandomizeStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2766, + "src": "14034:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$", + "typeString": "function (uint256) view returns (enum WitnetV2.ResponseStatus)" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14034:39:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "functionReturnParameters": 2686, + "id": 2750, + "nodeType": "Return", + "src": "14027:46:23" + } + ] + } + } + ] + } + } + ] + }, + "id": 2764, + "nodeType": "IfStatement", + "src": "13600:659:23", + "trueBody": { + "id": 2719, + "nodeType": "Block", + "src": "13625:72:23", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2715, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "13647:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13656:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "13647:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13671:4:23", + "memberName": "Void", + "nodeType": "MemberAccess", + "referencedDeclaration": 23490, + "src": "13647:28:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "functionReturnParameters": 2686, + "id": 2718, + "nodeType": "Return", + "src": "13640:35:23" + } + ] + } + } + ] + }, + "documentation": { + "id": 2678, + "nodeType": "StructuredDocumentation", + "src": "12526:677:23", + "text": "@notice Returns status of the first non-errored randomize request posted on or after the given block number.\n @dev Possible values:\n @dev - 0 -> Void: no randomize request was actually posted on or after the given block number.\n @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.\n @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read.\n @dev - 3 -> Error: all randomize requests after the given block were solved with errors.\n @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. " + }, + "functionSelector": "76fa9d20", + "id": 2766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRandomizeStatus", + "nameLocation": "13218:18:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2682, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13276:8:23" + }, + "parameters": { + "id": 2681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2680, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "13245:12:23", + "nodeType": "VariableDeclaration", + "scope": 2766, + "src": "13237:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13237:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13236:22:23" + }, + "returnParameters": { + "id": 2686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2685, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2766, + "src": "13325:23:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "typeName": { + "id": 2684, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2683, + "name": "WitnetV2.ResponseStatus", + "nameLocations": [ + "13325:8:23", + "13334:14:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23496, + "src": "13325:23:23" + }, + "referencedDeclaration": 23496, + "src": "13325:23:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "visibility": "internal" + } + ], + "src": "13324:25:23" + }, + "scope": 3137, + "src": "13209:1057:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13600 + ], + "body": { + "id": 2784, + "nodeType": "Block", + "src": "14600:117:23", + "statements": [ + { + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2776, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2769, + "src": "14652:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2775, + "name": "getRandomizeStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2766, + "src": "14633:18:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ResponseStatus_$23496_$", + "typeString": "function (uint256) view returns (enum WitnetV2.ResponseStatus)" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14633:32:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 2778, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "14669:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14678:14:23", + "memberName": "ResponseStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 23496, + "src": "14669:23:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ResponseStatus_$23496_$", + "typeString": "type(enum WitnetV2.ResponseStatus)" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14693:5:23", + "memberName": "Ready", + "nodeType": "MemberAccess", + "referencedDeclaration": 23492, + "src": "14669:29:23", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ResponseStatus_$23496", + "typeString": "enum WitnetV2.ResponseStatus" + } + }, + "src": "14633:65:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2782, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14618:91:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2774, + "id": 2783, + "nodeType": "Return", + "src": "14611:98:23" + } + ] + }, + "documentation": { + "id": 2767, + "nodeType": "StructuredDocumentation", + "src": "14274:200:23", + "text": "@notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first \n @notice non-errored randomize request posted on or after the given block number." + }, + "functionSelector": "9bc86fec", + "id": 2785, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRandomized", + "nameLocation": "14489:12:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2771, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "14562:8:23" + }, + "parameters": { + "id": 2770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2769, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "14510:12:23", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "14502:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2768, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14502:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14501:22:23" + }, + "returnParameters": { + "id": 2774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2773, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "14589:4:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2772, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14589:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "14588:6:23" + }, + "scope": 3137, + "src": "14480:237:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13612 + ], + "body": { + "id": 2814, + "nodeType": "Block", + "src": "15498:284:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2800, + "name": "_range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "15559:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "id": 2801, + "name": "_nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2790, + "src": "15580:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2805, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "15662:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15666:6:23", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15662:10:23", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2808, + "name": "_blockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2792, + "src": "15716:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2807, + "name": "fetchRandomnessAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "15695:20:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 2809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15695:34:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 2803, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "15629:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "15633:6:23", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "15629:10:23", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 2810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15629:119:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2802, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "15601:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 2811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15601:162:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 2798, + "name": "WitnetV2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23651, + "src": "15516:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_WitnetV2_$23651_$", + "typeString": "type(library WitnetV2)" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15525:19:23", + "memberName": "randomUniformUint32", + "nodeType": "MemberAccess", + "referencedDeclaration": 23650, + "src": "15516:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint32_$_t_uint256_$_t_bytes32_$returns$_t_uint32_$", + "typeString": "function (uint32,uint256,bytes32) pure returns (uint32)" + } + }, + "id": 2812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15516:258:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 2797, + "id": 2813, + "nodeType": "Return", + "src": "15509:265:23" + } + ] + }, + "documentation": { + "id": 2786, + "nodeType": "StructuredDocumentation", + "src": "14725:617:23", + "text": "@notice Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using \n @notice the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. \n @dev Fails under same conditions as `getRandomnessAfter(uint256)` does.\n @param _range Range within which the uniformly-distributed random number will be generated.\n @param _nonce Nonce value enabling multiple random numbers from the same randomness value.\n @param _blockNumber Block number from which the search for the first randomize request solved aftewards will start." + }, + "functionSelector": "24cbbfc1", + "id": 2815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "random", + "nameLocation": "15357:6:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2794, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15458:8:23" + }, + "parameters": { + "id": 2793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "_range", + "nameLocation": "15371:6:23", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "15364:13:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 2787, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15364:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2790, + "mutability": "mutable", + "name": "_nonce", + "nameLocation": "15387:6:23", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "15379:14:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15379:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2792, + "mutability": "mutable", + "name": "_blockNumber", + "nameLocation": "15403:12:23", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "15395:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15395:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15363:53:23" + }, + "returnParameters": { + "id": 2797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2796, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "15485:6:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 2795, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15485:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "15484:8:23" + }, + "scope": 3137, + "src": "15348:434:23", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13618 + ], + "body": { + "id": 2918, + "nodeType": "Block", + "src": "16192:1259:23", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2822, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "16207:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16207:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16219:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "16207:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2825, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "16240:5:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16246:6:23", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "16240:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16207:45:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2899, + "nodeType": "IfStatement", + "src": "16203:1072:23", + "trueBody": { + "id": 2898, + "nodeType": "Block", + "src": "16254:1021:23", + "statements": [ + { + "expression": { + "id": 2831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2828, + "name": "_evmRandomizeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "16269:16:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2829, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "16288:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16292:5:23", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "16288:9:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16269:28:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2832, + "nodeType": "ExpressionStatement", + "src": "16269:28:23" + }, + { + "assignments": [ + 2834 + ], + "declarations": [ + { + "constant": false, + "id": 2834, + "mutability": "mutable", + "name": "_witnetQueryId", + "nameLocation": "16369:14:23", + "nodeType": "VariableDeclaration", + "scope": 2898, + "src": "16364:19:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2833, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16364:4:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2842, + "initialValue": { + "arguments": [ + { + "id": 2839, + "name": "witnetRadHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2037, + "src": "16482:13:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2840, + "name": "__witnetDefaultSLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "16514:18:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + ], + "expression": { + "id": 2835, + "name": "__witnet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "16386:8:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_WitnetOracle_$749", + "typeString": "contract WitnetOracle" + } + }, + "id": 2836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16395:11:23", + "memberName": "postRequest", + "nodeType": "MemberAccess", + "referencedDeclaration": 13232, + "src": "16386:20:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes32_$_t_struct$_RadonSLA_$23503_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (bytes32,struct WitnetV2.RadonSLA memory) payable external returns (uint256)" + } + }, + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2837, + "name": "_evmRandomizeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "16432:16:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "16386:77:23", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes32_$_t_struct$_RadonSLA_$23503_memory_ptr_$returns$_t_uint256_$value", + "typeString": "function (bytes32,struct WitnetV2.RadonSLA memory) payable external returns (uint256)" + } + }, + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16386:163:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16364:185:23" + }, + { + "assignments": [ + 2845 + ], + "declarations": [ + { + "constant": false, + "id": 2845, + "mutability": "mutable", + "name": "__randomize", + "nameLocation": "16630:11:23", + "nodeType": "VariableDeclaration", + "scope": 2898, + "src": "16612:29:23", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + }, + "typeName": { + "id": 2844, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2843, + "name": "Randomize", + "nameLocations": [ + "16612:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2025, + "src": "16612:9:23" + }, + "referencedDeclaration": 2025, + "src": "16612:9:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize" + } + }, + "visibility": "internal" + } + ], + "id": 2852, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2846, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "16644:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16644:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16656:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "16644:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2851, + "indexExpression": { + "expression": { + "id": 2849, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "16667:5:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16673:6:23", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "16667:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16644:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16612:68:23" + }, + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2853, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2845, + "src": "16695:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "16707:13:23", + "memberName": "witnetQueryId", + "nodeType": "MemberAccess", + "referencedDeclaration": 2020, + "src": "16695:25:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2856, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "16723:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16695:42:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "16695:42:23" + }, + { + "assignments": [ + 2860 + ], + "declarations": [ + { + "constant": false, + "id": 2860, + "mutability": "mutable", + "name": "_prevBlock", + "nameLocation": "16796:10:23", + "nodeType": "VariableDeclaration", + "scope": 2898, + "src": "16788:18:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16788:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2864, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2861, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "16809:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16809:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2863, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16821:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "16809:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16788:51:23" + }, + { + "expression": { + "id": 2869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2865, + "name": "__randomize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2845, + "src": "16854:11:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Randomize storage pointer" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "16866:9:23", + "memberName": "prevBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2022, + "src": "16854:21:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2868, + "name": "_prevBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2860, + "src": "16878:10:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16854:34:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2870, + "nodeType": "ExpressionStatement", + "src": "16854:34:23" + }, + { + "expression": { + "id": 2879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2871, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "16903:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16903:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16915:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "16903:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 2875, + "indexExpression": { + "id": 2874, + "name": "_prevBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2860, + "src": "16926:10:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16903:34:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 2876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "16938:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "16903:44:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2877, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "16950:5:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16956:6:23", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "16950:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16903:59:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2880, + "nodeType": "ExpressionStatement", + "src": "16903:59:23" + }, + { + "expression": { + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2881, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "16977:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16977:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 2883, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "16989:18:23", + "memberName": "lastRandomizeBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2027, + "src": "16977:30:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 2884, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "17010:5:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17016:6:23", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "17010:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16977:45:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2887, + "nodeType": "ExpressionStatement", + "src": "16977:45:23" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 2889, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "17101:5:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17107:6:23", + "memberName": "number", + "nodeType": "MemberAccess", + "src": "17101:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2891, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967270, + "src": "17132:2:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17135:8:23", + "memberName": "gasprice", + "nodeType": "MemberAccess", + "src": "17132:11:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2893, + "name": "_evmRandomizeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "17162:16:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2894, + "name": "_witnetQueryId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2834, + "src": "17197:14:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2895, + "name": "__witnetDefaultSLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "17230:18:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + ], + "id": 2888, + "name": "Randomizing", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13695, + "src": "17071:11:23", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_struct$_RadonSLA_$23503_memory_ptr_$returns$__$", + "typeString": "function (uint256,uint256,uint256,uint256,struct WitnetV2.RadonSLA memory)" + } + }, + "id": 2896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17071:192:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2897, + "nodeType": "EmitStatement", + "src": "17066:197:23" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2900, + "name": "_evmRandomizeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "17329:16:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2901, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "17348:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17352:5:23", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "17348:9:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17329:28:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2917, + "nodeType": "IfStatement", + "src": "17325:119:23", + "trueBody": { + "id": 2916, + "nodeType": "Block", + "src": "17359:85:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "17403:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17407:5:23", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "17403:9:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 2912, + "name": "_evmRandomizeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2820, + "src": "17415:16:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17403:28:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 2906, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "17382:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17386:6:23", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "17382:10:23", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17374:8:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2904, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17374:8:23", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 2908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17374:19:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "17394:8:23", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "17374:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 2914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17374:58:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2915, + "nodeType": "ExpressionStatement", + "src": "17374:58:23" + } + ] + } + } + ] + }, + "documentation": { + "id": 2816, + "nodeType": "StructuredDocumentation", + "src": "15790:274:23", + "text": "@notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. \n @dev Only one randomness request per block will be actually posted to the Witnet Oracle. \n @return _evmRandomizeFee Funds actually paid as randomize fee." + }, + "functionSelector": "699b328a", + "id": 2919, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "randomize", + "nameLocation": "16079:9:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2818, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "16134:8:23" + }, + "parameters": { + "id": 2817, + "nodeType": "ParameterList", + "parameters": [], + "src": "16088:2:23" + }, + "returnParameters": { + "id": 2821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2820, + "mutability": "mutable", + "name": "_evmRandomizeFee", + "nameLocation": "16169:16:23", + "nodeType": "VariableDeclaration", + "scope": 2919, + "src": "16161:24:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16161:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16160:26:23" + }, + "scope": 3137, + "src": "16070:1381:23", + "stateMutability": "payable", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13632 + ], + "body": { + "id": 2929, + "nodeType": "Block", + "src": "17916:44:23", + "statements": [ + { + "expression": { + "id": 2927, + "name": "__witnetDefaultSLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "17934:18:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + }, + "functionReturnParameters": 2926, + "id": 2928, + "nodeType": "Return", + "src": "17927:25:23" + } + ] + }, + "documentation": { + "id": 2920, + "nodeType": "StructuredDocumentation", + "src": "17459:326:23", + "text": "@notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill \n @notice when solving randomness requests:\n @notice - number of witnessing nodes contributing to randomness generation\n @notice - reward in $nanoWIT received by every contributing node in the Witnet blockchain" + }, + "functionSelector": "9353badd", + "id": 2930, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "witnetQuerySLA", + "nameLocation": "17800:14:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2922, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17835:8:23" + }, + "parameters": { + "id": 2921, + "nodeType": "ParameterList", + "parameters": [], + "src": "17814:2:23" + }, + "returnParameters": { + "id": 2926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2930, + "src": "17885:24:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_memory_ptr", + "typeString": "struct WitnetV2.RadonSLA" + }, + "typeName": { + "id": 2924, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2923, + "name": "WitnetV2.RadonSLA", + "nameLocations": [ + "17885:8:23", + "17894:8:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23503, + "src": "17885:17:23" + }, + "referencedDeclaration": 23503, + "src": "17885:17:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr", + "typeString": "struct WitnetV2.RadonSLA" + } + }, + "visibility": "internal" + } + ], + "src": "17884:26:23" + }, + "scope": 3137, + "src": "17791:169:23", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13645, + 24104 + ], + "body": { + "id": 2942, + "nodeType": "Block", + "src": "18327:49:23", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2937, + "name": "Ownable2Step", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24105, + "src": "18338:12:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Ownable2Step_$24105_$", + "typeString": "type(contract Ownable2Step)" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18351:15:23", + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 24104, + "src": "18338:28:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 2940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18338:30:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2941, + "nodeType": "ExpressionStatement", + "src": "18338:30:23" + } + ] + }, + "documentation": { + "id": 2931, + "nodeType": "StructuredDocumentation", + "src": "17970:238:23", + "text": "===============================================================================================================\n --- 'IWitnetRandomnessAdmin' implementation -------------------------------------------------------------------" + }, + "functionSelector": "79ba5097", + "id": 2943, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "18223:15:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2935, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 2933, + "name": "IWitnetRandomnessAdmin", + "nameLocations": [ + "18268:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13677, + "src": "18268:22:23" + }, + { + "id": 2934, + "name": "Ownable2Step", + "nameLocations": [ + "18292:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 24105, + "src": "18292:12:23" + } + ], + "src": "18258:47:23" + }, + "parameters": { + "id": 2932, + "nodeType": "ParameterList", + "parameters": [], + "src": "18238:2:23" + }, + "returnParameters": { + "id": 2936, + "nodeType": "ParameterList", + "parameters": [], + "src": "18327:0:23" + }, + "scope": 3137, + "src": "18214:162:23", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13650 + ], + "body": { + "id": 2951, + "nodeType": "Block", + "src": "18502:59:23", + "statements": [ + { + "expression": { + "id": 2949, + "name": "__witnetBaseFeeOverheadPercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1023, + "src": "18520:33:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 2948, + "id": 2950, + "nodeType": "Return", + "src": "18513:40:23" + } + ] + }, + "functionSelector": "eb92b29b", + "id": 2952, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "baseFeeOverheadPercentage", + "nameLocation": "18393:25:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2945, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "18438:8:23" + }, + "parameters": { + "id": 2944, + "nodeType": "ParameterList", + "parameters": [], + "src": "18418:2:23" + }, + "returnParameters": { + "id": 2948, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2947, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2952, + "src": "18489:6:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2946, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "18489:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "internal" + } + ], + "src": "18488:8:23" + }, + "scope": 3137, + "src": "18384:177:23", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 321, + 13655 + ], + "body": { + "id": 2964, + "nodeType": "Block", + "src": "18700:41:23", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2960, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "18718:7:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Ownable_$401_$", + "typeString": "type(contract Ownable)" + } + }, + "id": 2961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18726:5:23", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 321, + "src": "18718:13:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18718:15:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2959, + "id": 2963, + "nodeType": "Return", + "src": "18711:22:23" + } + ] + }, + "functionSelector": "8da5cb5b", + "id": 2965, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "18578:5:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2956, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 2954, + "name": "IWitnetRandomnessAdmin", + "nameLocations": [ + "18613:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13677, + "src": "18613:22:23" + }, + { + "id": 2955, + "name": "Ownable", + "nameLocations": [ + "18637:7:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 401, + "src": "18637:7:23" + } + ], + "src": "18603:42:23" + }, + "parameters": { + "id": 2953, + "nodeType": "ParameterList", + "parameters": [], + "src": "18583:2:23" + }, + "returnParameters": { + "id": 2959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2965, + "src": "18686:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18686:7:23", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "18685:9:23" + }, + "scope": 3137, + "src": "18569:172:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13660, + 24043 + ], + "body": { + "id": 2977, + "nodeType": "Block", + "src": "18892:53:23", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2973, + "name": "Ownable2Step", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24105, + "src": "18910:12:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Ownable2Step_$24105_$", + "typeString": "type(contract Ownable2Step)" + } + }, + "id": 2974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18923:12:23", + "memberName": "pendingOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 24043, + "src": "18910:25:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18910:27:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 2972, + "id": 2976, + "nodeType": "Return", + "src": "18903:34:23" + } + ] + }, + "functionSelector": "e30c3978", + "id": 2978, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "pendingOwner", + "nameLocation": "18758:12:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2969, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 2967, + "name": "IWitnetRandomnessAdmin", + "nameLocations": [ + "18801:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13677, + "src": "18801:22:23" + }, + { + "id": 2968, + "name": "Ownable2Step", + "nameLocations": [ + "18825:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 24105, + "src": "18825:12:23" + } + ], + "src": "18791:47:23" + }, + "parameters": { + "id": 2966, + "nodeType": "ParameterList", + "parameters": [], + "src": "18770:2:23" + }, + "returnParameters": { + "id": 2972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2978, + "src": "18878:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18878:7:23", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "18877:9:23" + }, + "scope": 3137, + "src": "18749:196:23", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13665, + 24063 + ], + "body": { + "id": 2994, + "nodeType": "Block", + "src": "19109:55:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2991, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2980, + "src": "19146:9:23", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2988, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "19120:7:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Ownable_$401_$", + "typeString": "type(contract Ownable)" + } + }, + "id": 2990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19128:17:23", + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 380, + "src": "19120:25:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19120:36:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2993, + "nodeType": "ExpressionStatement", + "src": "19120:36:23" + } + ] + }, + "functionSelector": "f2fde38b", + "id": 2995, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 2986, + "kind": "modifierInvocation", + "modifierName": { + "id": 2985, + "name": "onlyOwner", + "nameLocations": [ + "19094:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 312, + "src": "19094:9:23" + }, + "nodeType": "ModifierInvocation", + "src": "19094:9:23" + } + ], + "name": "transferOwnership", + "nameLocation": "18966:17:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2984, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 2982, + "name": "IWitnetRandomnessAdmin", + "nameLocations": [ + "19030:22:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 13677, + "src": "19030:22:23" + }, + { + "id": 2983, + "name": "Ownable2Step", + "nameLocations": [ + "19054:12:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 24105, + "src": "19054:12:23" + } + ], + "src": "19020:47:23" + }, + "parameters": { + "id": 2981, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2980, + "mutability": "mutable", + "name": "_newOwner", + "nameLocation": "18992:9:23", + "nodeType": "VariableDeclaration", + "scope": 2995, + "src": "18984:17:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2979, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18984:7:23", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "18983:19:23" + }, + "returnParameters": { + "id": 2987, + "nodeType": "ParameterList", + "parameters": [], + "src": "19109:0:23" + }, + "scope": 3137, + "src": "18957:207:23", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13670 + ], + "body": { + "id": 3007, + "nodeType": "Block", + "src": "19316:81:23", + "statements": [ + { + "expression": { + "id": 3005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3003, + "name": "__witnetBaseFeeOverheadPercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1023, + "src": "19327:33:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3004, + "name": "_baseFeeOverheadPercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2997, + "src": "19363:26:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "19327:62:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 3006, + "nodeType": "ExpressionStatement", + "src": "19327:62:23" + } + ] + }, + "functionSelector": "b8d38c96", + "id": 3008, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3001, + "kind": "modifierInvocation", + "modifierName": { + "id": 3000, + "name": "onlyOwner", + "nameLocations": [ + "19301:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 312, + "src": "19301:9:23" + }, + "nodeType": "ModifierInvocation", + "src": "19301:9:23" + } + ], + "name": "settleBaseFeeOverheadPercentage", + "nameLocation": "19181:31:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2999, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19265:8:23" + }, + "parameters": { + "id": 2998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2997, + "mutability": "mutable", + "name": "_baseFeeOverheadPercentage", + "nameLocation": "19220:26:23", + "nodeType": "VariableDeclaration", + "scope": 3008, + "src": "19213:33:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2996, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "19213:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "internal" + } + ], + "src": "19212:35:23" + }, + "returnParameters": { + "id": 3002, + "nodeType": "ParameterList", + "parameters": [], + "src": "19316:0:23" + }, + "scope": 3137, + "src": "19172:225:23", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 13676 + ], + "body": { + "id": 3028, + "nodeType": "Block", + "src": "19547:153:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 3018, + "name": "_witnetQuerySLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3011, + "src": "19581:15:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr", + "typeString": "struct WitnetV2.RadonSLA calldata" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19597:7:23", + "memberName": "isValid", + "nodeType": "MemberAccess", + "referencedDeclaration": 23559, + "src": "19581:23:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_RadonSLA_$23503_calldata_ptr_$returns$_t_bool_$attached_to$_t_struct$_RadonSLA_$23503_calldata_ptr_$", + "typeString": "function (struct WitnetV2.RadonSLA calldata) pure returns (bool)" + } + }, + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19581:25:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "696e76616c696420534c41", + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19621:13:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_649dbe9d60b1f0c53e04c2d59e7afec11199b4ea79256e4be931f59e1bb314a7", + "typeString": "literal_string \"invalid SLA\"" + }, + "value": "invalid SLA" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_649dbe9d60b1f0c53e04c2d59e7afec11199b4ea79256e4be931f59e1bb314a7", + "typeString": "literal_string \"invalid SLA\"" + } + ], + "id": 3017, + "name": "_require", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "19558:8:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19558:87:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3023, + "nodeType": "ExpressionStatement", + "src": "19558:87:23" + }, + { + "expression": { + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3024, + "name": "__witnetDefaultSLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "19656:18:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3025, + "name": "_witnetQuerySLA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3011, + "src": "19677:15:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr", + "typeString": "struct WitnetV2.RadonSLA calldata" + } + }, + "src": "19656:36:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage", + "typeString": "struct WitnetV2.RadonSLA storage ref" + } + }, + "id": 3027, + "nodeType": "ExpressionStatement", + "src": "19656:36:23" + } + ] + }, + "functionSelector": "d2bc459b", + "id": 3029, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3015, + "kind": "modifierInvocation", + "modifierName": { + "id": 3014, + "name": "onlyOwner", + "nameLocations": [ + "19532:9:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 312, + "src": "19532:9:23" + }, + "nodeType": "ModifierInvocation", + "src": "19532:9:23" + } + ], + "name": "settleWitnetQuerySLA", + "nameLocation": "19414:20:23", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3013, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19496:8:23" + }, + "parameters": { + "id": 3012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3011, + "mutability": "mutable", + "name": "_witnetQuerySLA", + "nameLocation": "19462:15:23", + "nodeType": "VariableDeclaration", + "scope": 3029, + "src": "19435:42:23", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_calldata_ptr", + "typeString": "struct WitnetV2.RadonSLA" + }, + "typeName": { + "id": 3010, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3009, + "name": "WitnetV2.RadonSLA", + "nameLocations": [ + "19435:8:23", + "19444:8:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 23503, + "src": "19435:17:23" + }, + "referencedDeclaration": 23503, + "src": "19435:17:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RadonSLA_$23503_storage_ptr", + "typeString": "struct WitnetV2.RadonSLA" + } + }, + "visibility": "internal" + } + ], + "src": "19434:44:23" + }, + "returnParameters": { + "id": 3016, + "nodeType": "ParameterList", + "parameters": [], + "src": "19547:0:23" + }, + "scope": 3137, + "src": "19405:295:23", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 3044, + "nodeType": "Block", + "src": "20079:79:23", + "statements": [ + { + "condition": { + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20094:11:23", + "subExpression": { + "id": 3036, + "name": "_condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3031, + "src": "20095:10:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3043, + "nodeType": "IfStatement", + "src": "20090:61:23", + "trueBody": { + "id": 3042, + "nodeType": "Block", + "src": "20107:44:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3039, + "name": "_message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3033, + "src": "20130:8:23", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3038, + "name": "_revert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "20122:7:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20122:17:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3041, + "nodeType": "ExpressionStatement", + "src": "20122:17:23" + } + ] + } + } + ] + }, + "id": 3045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_require", + "nameLocation": "19963:8:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3031, + "mutability": "mutable", + "name": "_condition", + "nameLocation": "19991:10:23", + "nodeType": "VariableDeclaration", + "scope": 3045, + "src": "19986:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3030, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19986:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3033, + "mutability": "mutable", + "name": "_message", + "nameLocation": "20031:8:23", + "nodeType": "VariableDeclaration", + "scope": 3045, + "src": "20017:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3032, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20017:6:23", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "19971:79:23" + }, + "returnParameters": { + "id": 3035, + "nodeType": "ParameterList", + "parameters": [], + "src": "20079:0:23" + }, + "scope": 3137, + "src": "19954:204:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3063, + "nodeType": "Block", + "src": "20235:166:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3055, + "name": "class", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2249, + "src": "20309:5:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_string_memory_ptr_$", + "typeString": "function () pure returns (string memory)" + } + }, + "id": 3056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20309:7:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "3a20", + "id": 3057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20335:4:23", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73", + "typeString": "literal_string \": \"" + }, + "value": ": " + }, + { + "id": 3058, + "name": "_message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3047, + "src": "20358:8:23", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_e64009107d042bdc478cc69a5433e4573ea2e8a23a46646c0ee241e30c888e73", + "typeString": "literal_string \": \"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 3053, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "20274:3:23", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "20278:12:23", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "20274:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20274:107:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20267:6:23", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3051, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20267:6:23", + "typeDescriptions": {} + } + }, + "id": 3060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20267:115:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3050, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967277, + 4294967277 + ], + "referencedDeclaration": 4294967277, + "src": "20246:6:23", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20246:147:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3062, + "nodeType": "ExpressionStatement", + "src": "20246:147:23" + } + ] + }, + "id": 3064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_revert", + "nameLocation": "20175:7:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3047, + "mutability": "mutable", + "name": "_message", + "nameLocation": "20197:8:23", + "nodeType": "VariableDeclaration", + "scope": 3064, + "src": "20183:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3046, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20183:6:23", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "20182:24:23" + }, + "returnParameters": { + "id": 3049, + "nodeType": "ParameterList", + "parameters": [], + "src": "20235:0:23" + }, + "scope": 3137, + "src": "20166:235:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3096, + "nodeType": "Block", + "src": "20679:200:23", + "statements": [ + { + "expression": { + "components": [ + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3074, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3067, + "src": "20699:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3075, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "20710:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20699:18:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3077, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "20698:20:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 3085, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3067, + "src": "20809:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3086, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "20818:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20818:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 3088, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20830:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "20818:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 3090, + "indexExpression": { + "id": 3089, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "20841:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20850:9:23", + "memberName": "prevBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2022, + "src": "20818:41:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3084, + "name": "_searchNextBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3097, + "src": "20792:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 3092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20792:68:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "20698:162:23", + "trueExpression": { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3078, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "20735:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 3079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20735:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 3080, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20747:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "20735:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 3082, + "indexExpression": { + "id": 3081, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "20758:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20735:31:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 3083, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20767:9:23", + "memberName": "nextBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2024, + "src": "20735:41:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "20697:174:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3073, + "id": 3095, + "nodeType": "Return", + "src": "20690:181:23" + } + ] + }, + "documentation": { + "id": 3065, + "nodeType": "StructuredDocumentation", + "src": "20409:172:23", + "text": "@dev Recursively searches for the number of the first block after the given one in which a Witnet \n @dev randomness request was posted. Returns 0 if none found." + }, + "id": 3097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_searchNextBlock", + "nameLocation": "20596:16:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3067, + "mutability": "mutable", + "name": "_target", + "nameLocation": "20621:7:23", + "nodeType": "VariableDeclaration", + "scope": 3097, + "src": "20613:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20613:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3069, + "mutability": "mutable", + "name": "_latest", + "nameLocation": "20638:7:23", + "nodeType": "VariableDeclaration", + "scope": 3097, + "src": "20630:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3068, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20630:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20612:34:23" + }, + "returnParameters": { + "id": 3073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3072, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3097, + "src": "20670:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20670:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20669:9:23" + }, + "scope": 3137, + "src": "20587:292:23", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3124, + "nodeType": "Block", + "src": "21158:164:23", + "statements": [ + { + "expression": { + "components": [ + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3107, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3100, + "src": "21178:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3108, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "21188:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21178:17:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3110, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "21177:19:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 3113, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3100, + "src": "21252:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3114, + "name": "__storage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3136, + "src": "21261:9:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Storage_$2033_storage_ptr_$", + "typeString": "function () pure returns (struct WitnetRandomnessV2.Storage storage pointer)" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21261:11:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage storage pointer" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "21273:10:23", + "memberName": "randomize_", + "nodeType": "MemberAccess", + "referencedDeclaration": 2032, + "src": "21261:22:23", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Randomize_$2025_storage_$", + "typeString": "mapping(uint256 => struct WitnetRandomnessV2.Randomize storage ref)" + } + }, + "id": 3118, + "indexExpression": { + "id": 3117, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "21284:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21261:31:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Randomize_$2025_storage", + "typeString": "struct WitnetRandomnessV2.Randomize storage ref" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "21293:9:23", + "memberName": "prevBlock", + "nodeType": "MemberAccess", + "referencedDeclaration": 2022, + "src": "21261:41:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3112, + "name": "_searchPrevBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3125, + "src": "21235:16:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21235:68:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "21177:126:23", + "trueExpression": { + "id": 3111, + "name": "_latest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "21212:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "21176:138:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3106, + "id": 3123, + "nodeType": "Return", + "src": "21169:145:23" + } + ] + }, + "documentation": { + "id": 3098, + "nodeType": "StructuredDocumentation", + "src": "20887:173:23", + "text": "@dev Recursively searches for the number of the first block before the given one in which a Witnet \n @dev randomness request was posted. Returns 0 if none found." + }, + "id": 3125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_searchPrevBlock", + "nameLocation": "21075:16:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3100, + "mutability": "mutable", + "name": "_target", + "nameLocation": "21100:7:23", + "nodeType": "VariableDeclaration", + "scope": 3125, + "src": "21092:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21092:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "_latest", + "nameLocation": "21117:7:23", + "nodeType": "VariableDeclaration", + "scope": 3125, + "src": "21109:15:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21109:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "21091:34:23" + }, + "returnParameters": { + "id": 3106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3105, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3125, + "src": "21149:7:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21149:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "21148:9:23" + }, + "scope": 3137, + "src": "21066:256:23", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 3128, + "mutability": "constant", + "name": "_STORAGE_SLOT", + "nameLocation": "21355:13:23", + "nodeType": "VariableDeclaration", + "scope": 3137, + "src": "21330:172:23", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "21330:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307836343337373839333563353764663934376636393434663661353234326133653931343435663633333766346232656336373063383634323135336236313466", + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21436:66:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_45329293629288104751206077111318907569952776749509868207876443788206898110799_by_1", + "typeString": "int_const 4532...(69 digits omitted)...0799" + }, + "value": "0x643778935c57df947f6944f6a5242a3e91445f6337f4b2ec670c8642153b614f" + }, + "visibility": "private" + }, + { + "body": { + "id": 3135, + "nodeType": "Block", + "src": "21577:79:23", + "statements": [ + { + "AST": { + "nativeSrc": "21597:52:23", + "nodeType": "YulBlock", + "src": "21597:52:23", + "statements": [ + { + "nativeSrc": "21612:26:23", + "nodeType": "YulAssignment", + "src": "21612:26:23", + "value": { + "name": "_STORAGE_SLOT", + "nativeSrc": "21625:13:23", + "nodeType": "YulIdentifier", + "src": "21625:13:23" + }, + "variableNames": [ + { + "name": "_ptr.slot", + "nativeSrc": "21612:9:23", + "nodeType": "YulIdentifier", + "src": "21612:9:23" + } + ] + } + ] + }, + "evmVersion": "paris", + "externalReferences": [ + { + "declaration": 3128, + "isOffset": false, + "isSlot": false, + "src": "21625:13:23", + "valueSize": 1 + }, + { + "declaration": 3132, + "isOffset": false, + "isSlot": true, + "src": "21612:9:23", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 3134, + "nodeType": "InlineAssembly", + "src": "21588:61:23" + } + ] + }, + "id": 3136, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "__storage", + "nameLocation": "21520:9:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3129, + "nodeType": "ParameterList", + "parameters": [], + "src": "21529:2:23" + }, + "returnParameters": { + "id": 3133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3132, + "mutability": "mutable", + "name": "_ptr", + "nameLocation": "21571:4:23", + "nodeType": "VariableDeclaration", + "scope": 3136, + "src": "21555:20:23", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage" + }, + "typeName": { + "id": 3131, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3130, + "name": "Storage", + "nameLocations": [ + "21555:7:23" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2033, + "src": "21555:7:23" + }, + "referencedDeclaration": 2033, + "src": "21555:7:23", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Storage_$2033_storage_ptr", + "typeString": "struct WitnetRandomnessV2.Storage" + } + }, + "visibility": "internal" + } + ], + "src": "21554:22:23" + }, + "scope": 3137, + "src": "21511:145:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 3138, + "src": "387:21272:23", + "usedErrors": [ + 267, + 272, + 17562, + 17568, + 19262, + 19268, + 19276 + ], + "usedEvents": [ + 278, + 13278, + 13285, + 13294, + 13307, + 13314, + 13695, + 24034 + ] + } + ], + "src": "35:21626:23" + }, + "compiler": { + "name": "solc", + "version": "0.8.25+commit.b61c2a91.Emscripten.clang" + }, + "networks": { + "4801": { + "events": {}, + "links": {}, + "address": "0xC0FFEE98AD1434aCbDB894BbB752e138c1006fAB" + } + }, + "schemaVersion": "3.4.16", + "updatedAt": "2024-10-23T18:57:33.375Z", + "networkType": "ethereum", + "devdoc": { + "author": "The Witnet Foundation.", + "errors": { + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "kind": "dev", + "methods": { + "fetchRandomnessAfter(uint256)": { + "details": "Reverts if:i. no `randomize()` was requested on neither the given block, nor afterwards.ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.", + "params": { + "_blockNumber": "Block number from which the search will start" + } + }, + "fetchRandomnessAfterProof(uint256)": { + "details": "Reverts if:i. no `randomize()` was requested on neither the given block, nor afterwards.ii. the first non-errored `randomize()` request found on or after the given block is not solved yet.iii. all `randomize()` requests that took place on or after the given block were solved with errors.", + "params": { + "_blockNumber": "Block number from which the search will start." + }, + "returns": { + "_witnetResultFinalityBlock": "EVM block number from which the provided randomness can be considered to be final.", + "_witnetResultRandomness": "Random value provided by the Witnet blockchain and used for solving randomness after given block.", + "_witnetResultTallyHash": "Hash of the witnessing commit/reveal act that took place on the Witnet blockchain.", + "_witnetResultTimestamp": "Timestamp at which the randomness value was generated by the Witnet blockchain." + } + }, + "getRandomizeData(uint256)": { + "details": "Returns zero values if no randomize request was actually posted on the given block.", + "returns": { + "_nextRandomizeBlock": "Block number in which a randomize request got posted just after this one, 0 if none.", + "_prevRandomizeBlock": "Block number in which a randomize request got posted just before this one. 0 if none.", + "_witnetQueryId": "Identifier of the underlying Witnet query created on the given block number. " + } + }, + "getRandomizeNextBlock(uint256)": { + "params": { + "_blockNumber": "Block number from which the search will start." + }, + "returns": { + "_0": "Number of the first block found after the given one, or `0` otherwise." + } + }, + "getRandomizePrevBlock(uint256)": { + "params": { + "_blockNumber": "Block number from which the search will start. Cannot be zero." + }, + "returns": { + "_0": "First block found before the given one, or `0` otherwise." + } + }, + "getRandomizeStatus(uint256)": { + "details": "Possible values:- 0 -> Void: no randomize request was actually posted on or after the given block number.- 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain.- 2 -> Ready: a successfull randomize value was reported and ready to be read.- 3 -> Error: all randomize requests after the given block were solved with errors.- 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. " + }, + "random(uint32,uint256,uint256)": { + "details": "Fails under same conditions as `getRandomnessAfter(uint256)` does.", + "params": { + "_blockNumber": "Block number from which the search for the first randomize request solved aftewards will start.", + "_nonce": "Nonce value enabling multiple random numbers from the same randomness value.", + "_range": "Range within which the uniformly-distributed random number will be generated." + } + }, + "randomize()": { + "details": "Only one randomness request per block will be actually posted to the Witnet Oracle. ", + "returns": { + "_evmRandomizeFee": "Funds actually paid as randomize fee." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + } + }, + "stateVariables": { + "witnetRadHash": { + "details": "Can be used to track all randomness requests solved so far on the Witnet Oracle blockchain." + } + }, + "title": "WitnetRandomnessV2: Unmalleable and provably-fair randomness generation based on the Witnet Oracle v2.*.", + "version": 1 + }, + "userdoc": { + "events": { + "WitnetQuery(uint256,uint256,(uint8,uint64))": { + "notice": "Emitted every time a new query containing some verified data request is posted to the WRB." + }, + "WitnetQueryResponse(uint256,uint256)": { + "notice": "Emitted when a query with no callback gets reported into the WRB." + }, + "WitnetQueryResponseDelivered(uint256,uint256,uint256)": { + "notice": "Emitted when a query with a callback gets successfully reported into the WRB." + }, + "WitnetQueryResponseDeliveryFailed(uint256,bytes,uint256,uint256,string)": { + "notice": "Emitted when a query with a callback cannot get reported into the WRB." + }, + "WitnetQueryRewardUpgraded(uint256,uint256)": { + "notice": "Emitted when the reward of some not-yet reported query is upgraded." + } + }, + "kind": "user", + "methods": { + "acceptOwnership()": { + "notice": "=============================================================================================================== --- 'IWitnetRandomnessAdmin' implementation -------------------------------------------------------------------" + }, + "estimateRandomizeFee(uint256)": { + "notice": "Returns amount of wei required to be paid as a fee when requesting randomization with a transaction gas price as the one given." + }, + "fetchRandomnessAfter(uint256)": { + "notice": "Retrieves the result of keccak256-hashing the given block number with the randomness value generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved after such block number." + }, + "fetchRandomnessAfterProof(uint256)": { + "notice": "Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that tookplace in the Witnet Oracle blockchain in response to the first non-errored randomize requestsolved after the given block number." + }, + "getLastRandomizeBlock()": { + "notice": "Returns last block number on which a randomize was requested." + }, + "getRandomizeData(uint256)": { + "notice": "Retrieves metadata related to the randomize request that got posted to the Witnet Oracle contract on the given block number." + }, + "getRandomizeNextBlock(uint256)": { + "notice": "Returns the number of the next block in which a randomize request was posted after the given one. " + }, + "getRandomizePrevBlock(uint256)": { + "notice": "Returns the number of the previous block in which a randomize request was posted before the given one." + }, + "getRandomizeStatus(uint256)": { + "notice": "Returns status of the first non-errored randomize request posted on or after the given block number." + }, + "isRandomized(uint256)": { + "notice": "Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first non-errored randomize request posted on or after the given block number." + }, + "random(uint32,uint256,uint256)": { + "notice": "Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using the given `nonce` and the randomness returned by `getRandomnessAfter(blockNumber)`. " + }, + "randomize()": { + "notice": "Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. " + }, + "witnetQuerySLA()": { + "notice": "Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill when solving randomness requests:- number of witnessing nodes contributing to randomness generation- reward in $nanoWIT received by every contributing node in the Witnet blockchain" + }, + "witnetRadHash()": { + "notice": "Unique identifier of the RNG data request used on the Witnet Oracle blockchain for solving randomness." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index 65ef85aa..a1ab4d50 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -15,14 +15,22 @@ module.exports = async function (_, network, [, from]) { for (const index in networkArtifacts.libs) { const base = networkArtifacts.libs[index] const impl = networkArtifacts.libs[base] + let libNetworkAddr = utils.getNetworkLibsArtifactAddress(network, addresses, impl) + if ( + process.argv.includes("--artifacts") && !process.argv.includes("--upgrade-all") + && !selection.includes(impl) && !selection.includes(base) + ) { + utils.traceHeader(`Skipped '${impl}`) + console.info(" > library address: ", libNetworkAddr) + continue; + } const libImplArtifact = artifacts.require(impl) const libInitCode = libImplArtifact.toJSON().bytecode const libTargetAddr = await deployer.determineAddr.call(libInitCode, "0x0", { from }) const libTargetCode = await web3.eth.getCode(libTargetAddr) - let libNetworkAddr = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if ( - // lib implementation artifact is listed as --artifacts on CLI - selection.includes(impl) || + // lib implementation artifact is listed as --artifacts on CLI + selection.includes(impl) || selection.includes(base) || // or, no address found in addresses file but code is already deployed into target address (utils.isNullAddress(libNetworkAddr) && libTargetCode.length > 3) || // or, address found in addresses file but no code currently deployed in such diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 8676ee47..9dc753f9 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -53,8 +53,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { const impl = networkArtifacts[domain][base] if (impl.indexOf(base) < 0) { - console.info(`Mismatching inheriting artifact names on settings/artifacts.js: ${base} contract address: ${targetBaseAddr}`) + continue + } + const targetSpecs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) const targetAddr = await determineTargetAddr(impl, targetSpecs, networkArtifacts) const targetCode = await web3.eth.getCode(targetAddr) @@ -102,9 +107,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { implArtifact.address = proxyImplAddr } } catch (ex) { - console.info("Error: trying to upgrade from non-upgradable artifact?") - console.info(ex) - process.exit(1) + panic(base, "Trying to upgrade non-upgradable artifact?", ex) } } else { @@ -164,7 +167,13 @@ module.exports = async function (_, network, [, from, reporter, curator]) { && versionLastCommitOf(targetVersion) !== versionLastCommitOf(legacyVersion) && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) ) { - console.info(` > \x1b[90mPlease, consider bumping up the package version.\x1b[0m`) + if (process.argv.includes("--changelog")) { + const changelog = execSync(`git log ${versionCodehashOf(legacyVersion)}^.. --format=%s ../../contracts`).toString() + console.log(changelog) + + } else { + console.info(` > \x1b[90mPlease, consider bumping up the package version.\x1b[0m`) + } } } if ( @@ -195,28 +204,35 @@ module.exports = async function (_, network, [, from, reporter, curator]) { ] for (const ix in targets) { const target = targets[ix] + + if (process.argv.includes("--artifacts") && !process.argv.includes("--upgrade-all") && !selection.includes(target.impl)) { + utils.traceHeader(`Skipped '${target.impl}'`) + console.info(" ", `> contract address: ${target.addr}`) + continue; + } + + let targetAddr = target.addr + target.specs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) - let targetAddr; if (target.impl === impl) { - target.specs = await unfoldTargetSpecs(domain, impl, base, from, network, networkArtifacts, networkSpecs) targetAddr = await determineTargetAddr(impl, target.specs, networkArtifacts) } + if ( selection.includes(target.impl) && (target.impl === impl || utils.isNullAddress(target.addr) || (await web3.eth.getCode(target.addr)).length < 3) ) { if (target.impl !== impl) { - if (!fs.existsSync(`../frosts/${domain}/${target.impl}.json`)) { - traceHeader(`Legacy '${target.impl}'`) + if (!fs.existsSync(`migrations/frosts/${domain}/${target.impl}.json`)) { + utils.traceHeader(`Legacy '${target.impl}'`) console.info(" ", `> \x1b[91mMissing migrations/frosts/${domain}/${target.impl}.json\x1b[0m`) continue; } else { fs.writeFileSync( `build/contracts/${target.impl}.json`, - fs.readFileSync(`migrations/frosts/${target.impl}.json`), + fs.readFileSync(`migrations/frosts/${domain}/${target.impl}.json`), { encoding: "utf8", flag: "w" } ) - targetAddr = target.addr target.addr = await defrostTarget(network, target.impl, target.specs, target.addr) } } else { @@ -310,29 +326,27 @@ async function upgradeCoreBase (proxyAddr, targetSpecs, targetAddr) { } async function defrostTarget (network, target, targetSpecs, targetAddr) { - const deployer = WitnetDeployer.deployed() + const deployer = await WitnetDeployer.deployed() + utils.traceHeader(`Defrosting '${target}'...`) const artifact = artifacts.require(target) const defrostCode = artifact.bytecode if (defrostCode.indexOf("__") > -1) { - console.info(`Cannot defrost '${target}: external libs not yet supported.`) - process.exit(1) + panic("Frosted libs not yet supported") } const constructorArgs = await utils.readJsonFromFile("./migrations/constructorArgs.json") const defrostConstructorArgs = constructorArgs[network][target] || constructorArgs.default[target] || "" - const defrostInitCode = targetCode + defrostConstructorArgs + const defrostInitCode = defrostCode + defrostConstructorArgs const defrostSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") - const defrostAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) + const defrostAddr = await deployer.determineAddr.call(defrostInitCode, defrostSalt, { from: targetSpecs.from }) if (defrostAddr !== targetAddr) { - console.info(`Cannot defrost '${target}: irreproducible address: ${defrostAddr} != ${targetAddr}`) - process.exit(1) - } else { - utils.traceHeader(`Defrosted ${target.impl}`) - const metadata = JSON.parse(target.artifact.metadata) + panic("Irreproducible address", `\x1b[91m${defrostAddr}\x1b[0m != \x1b[97m${targetAddr}\x1b[0m`) + } else {1 + const metadata = JSON.parse(artifact.metadata) console.info(" ", "> compiler: ", metadata.compiler.version) console.info(" ", "> evm version: ", metadata.settings.evmVersion.toUpperCase()) console.info(" ", "> optimizer: ", JSON.stringify(metadata.settings.optimizer)) console.info(" ", "> source code path: ", metadata.settings.compilationTarget) - console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(target.artifact.toJSON().deployedBytecode)) + console.info(" ", "> artifact codehash: ", web3.utils.soliditySha3(artifact.toJSON().deployedBytecode)) } try { utils.traceHeader(`Deploying '${target}'...`) @@ -342,9 +356,7 @@ async function defrostTarget (network, target, targetSpecs, targetAddr) { } utils.traceTx(await deployer.deploy(defrostInitCode, defrostSalt, { from: targetSpecs.from })) } catch (ex) { - console.info(`Cannot defrost '${target}': deployment failed:`) - console.log(ex) - process.exit(1) + panic("Deployment failed", null, ex) } return defrostAddr } @@ -358,7 +370,7 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts, leg const targetAddr = await deployer.determineAddr.call(targetInitCode, targetSalt, { from: targetSpecs.from }) utils.traceHeader(`Deploying '${target}'...`) if (targetSpecs.isUpgradable && versionLastCommitOf(legacyVersion) && legacyVersion.slice(-7) === version.slice(-7)) { - console.info( ` > \x1b[41mWARNING:\x1b[0m \x1b[31mLatest changes were not committed into Github!\x1b[0m`) + console.info( ` > \x1b[91mLatest changes were not previously committed into Github!\x1b[0m`) } if (targetSpecs?.baseLibs && Array.isArray(targetSpecs.baseLibs)) { for (const index in targetSpecs.baseLibs) { @@ -374,21 +386,21 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts, leg try { utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) } catch (ex) { - console.info(`Error: cannot deploy artifact ${target} on expected address ${targetAddr}:`) - console.log(ex) - process.exit(1) - } - if ((await web3.eth.getCode(targetAddr)).length <= 3) { - console.info(`Error: deployment of '${target}' into ${targetAddr} failed.`) - process.exit(1) - } else { - if (!constructorArgs[network]) constructorArgs[network] = {} - constructorArgs[network][target] = targetConstructorArgs - await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) + panic("Deployment failed", `Expected address: ${targetAddr}`, ex) } + if (!constructorArgs[network]) constructorArgs[network] = {} + constructorArgs[network][target] = targetConstructorArgs + await utils.overwriteJsonFile("./migrations/constructorArgs.json", constructorArgs) return targetAddr } +function panic(header, body, exception) { + console.info(" ", `> \x1b[97;41m ${header} failed \x1b[0m ${body}`) + if (exception) console.info(exception) + console.info() + process.exit(0) +} + async function determineTargetAddr (target, targetSpecs, networkArtifacts) { const targetInitCode = encodeTargetInitCode(target, targetSpecs, networkArtifacts) const targetSalt = "0x" + ethUtils.setLengthLeft(ethUtils.toBuffer(targetSpecs.vanity), 32).toString("hex") @@ -409,8 +421,7 @@ function encodeTargetInitCode (target, targetSpecs, networkArtifacts) { // extract bytecode from target's artifact, replacing lib references to actual addresses const targetCodeUnlinked = artifacts.require(target).toJSON().bytecode if (targetCodeUnlinked.length < 3) { - console.info(`Error: cannot deploy abstract arfifact ${target}.`) - process.exit(1) + panic(target, "Abstract contract") } const targetCode = linkBaseLibs( targetCodeUnlinked, @@ -418,13 +429,7 @@ function encodeTargetInitCode (target, targetSpecs, networkArtifacts) { networkArtifacts ) if (targetCode.indexOf("__") > -1) { - // console.info(targetCode) - console.info( - `Error: artifact ${target} depends on library`, - targetCode.substring(targetCode.indexOf("__"), 42), - "which is not known or has not been deployed." - ) - process.exit(1) + panic(target, `Missing library: ${targetCode.substring(targetCode.indexOf("__"), 42)}`) } const targetConstructorArgsEncoded = encodeTargetConstructorArgs(targetSpecs) return targetCode + targetConstructorArgsEncoded.slice(2) @@ -450,8 +455,7 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { - console.info(`Core dependencies loop detected: '${targetBase}' in ${ancestors}`,) - process.exit(1) + panic(target, `Dependencies loop: "${targetBase}" in ${ancestors}`) } const specs = { baseDeps: [], diff --git a/scripts/prepare.js b/scripts/prepare.js index ca330381..ba4e943a 100644 --- a/scripts/prepare.js +++ b/scripts/prepare.js @@ -17,3 +17,7 @@ if (fs.existsSync("./build/contracts")) { if (fs.existsSync("./migrations/frosts")) { exec(`sed -i -- /\bsourcePath\b/d migrations/frosts/*.json`) } + +if (fs.existsSync("./migrations/frosts/apps")) { + exec(`sed -i -- /\bsourcePath\b/d migrations/frosts/apps/*.json`) +} From a4ee74c984187a1a7ba93f4ac546af5a4d070f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Thu, 24 Oct 2024 10:35:10 +0200 Subject: [PATCH 40/62] feat(migrations): --changelog --- migrations/scripts/3_framework.js | 74 ++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 9dc753f9..f394f5da 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -82,7 +82,12 @@ module.exports = async function (_, network, [, from, reporter, curator]) { if (utils.isUpgradableArtifact(impl)) { - if (process.argv.includes("--artifacts") && !selection.includes(base) && !process.argv.includes("--upgrade-all")) { + if ( + process.argv.includes("--artifacts") + && process.argv.includes("--compile-none") + && !process.argv.includes("--upgrade-all") + && !selection.includes(base) + ) { utils.traceHeader(`Skipped '${base}'`) console.info(" ", `> contract address: ${targetBaseAddr}`) continue @@ -153,28 +158,9 @@ module.exports = async function (_, network, [, from, reporter, curator]) { } else { utils.traceHeader(`Upgradable '${base}'`) - if (skipUpgrade) { - console.info(` > \x1b[91mPlease, commit your changes before upgrading!\x1b[0m`) - - } else if ( - selection.includes(base) - && versionCodehashOf(targetVersion) === versionCodehashOf(legacyVersion) - ) { - console.info(` > \x1b[91mSorry, nothing to upgrade.\x1b[0m`) - - } else if ( - versionTagOf(targetVersion) === versionTagOf(legacyVersion) - && versionLastCommitOf(targetVersion) !== versionLastCommitOf(legacyVersion) - && versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) - ) { - if (process.argv.includes("--changelog")) { - const changelog = execSync(`git log ${versionCodehashOf(legacyVersion)}^.. --format=%s ../../contracts`).toString() - console.log(changelog) - - } else { - console.info(` > \x1b[90mPlease, consider bumping up the package version.\x1b[0m`) - } - } + } + if (!upgradeProxy && targetVersion.slice(0, 4) !== legacyVersion.slice(0, 4)) { + console.info(` > \x1b[30;43m MAJOR UPGRADE IS REQUIRED \x1b[0m`) } if ( targetAddr !== implArtifact.address @@ -193,6 +179,37 @@ module.exports = async function (_, network, [, from, reporter, curator]) { ) } await traceDeployedContractInfo(await implArtifact.at(baseArtifact.address), from, targetVersion) + if (!upgradeProxy) { + if (skipUpgrade) { + console.info(` > \x1b[91mPlease, commit your changes before upgrading!\x1b[0m`) + + } else if ( + selection.includes(base) + && versionCodehashOf(targetVersion) === versionCodehashOf(legacyVersion) + ) { + console.info(` > \x1b[91mSorry, nothing to upgrade.\x1b[0m`) + + } else if ( + versionLastCommitOf(targetVersion) !== versionLastCommitOf(legacyVersion) && + versionCodehashOf(targetVersion) !== versionCodehashOf(legacyVersion) + ) { + if (targetVersion.slice(0, 4) === legacyVersion.slice(0, 4) || process.argv.includes("--changelog")) { + const changelog = require("child_process").execSync( + `git log ${versionLastCommitOf(legacyVersion)}.. --date=short --color --format="%C(yellow)%cd %C(bold)%s%C(dim)" -- contracts/` + ).toString() + const changes = changelog.split("\n").slice(0, -1) + console.info(` > contract changelog: ${changes[0]}\x1b[0m`) + changes.slice(1).forEach(log => { + console.info(` ${log}\x1b[0m`) + }) + } + if (versionTagOf(targetVersion) === versionTagOf(legacyVersion)) { + // both on same release tag + console.info(` > \x1b[90mPlease, consider bumping up the package version.\x1b[0m`) + } + } + } + console.info() } else { @@ -205,7 +222,12 @@ module.exports = async function (_, network, [, from, reporter, curator]) { for (const ix in targets) { const target = targets[ix] - if (process.argv.includes("--artifacts") && !process.argv.includes("--upgrade-all") && !selection.includes(target.impl)) { + if ( + process.argv.includes("--artifacts") + && process.argv.includes("--compile-none") + && !process.argv.includes("--upgrade-all") + && !selection.includes(target.impl) + ) { utils.traceHeader(`Skipped '${target.impl}'`) console.info(" ", `> contract address: ${target.addr}`) continue; @@ -260,6 +282,7 @@ module.exports = async function (_, network, [, from, reporter, curator]) { implArtifact.address = target.addr } await traceDeployedContractInfo(await baseArtifact.at(target.addr), from) + console.info() } // for targets } // !targetSpecs.isUpgradable } // for bases @@ -279,13 +302,12 @@ async function traceDeployedContractInfo(contract, from, targetVersion) { // if (versionTagOf(deployedVersion) !== versionTagOf(getArtifactVersion(impl))) { // if (deployedVersion !== targetVersion) { if (targetVersion && versionCodehashOf(deployedVersion) !== versionCodehashOf(targetVersion)) { - console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)} !== \x1b[93m${targetVersion}\x1b[0m`) + console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)} !== \x1b[33m${targetVersion}\x1b[0m`) } else { console.info(" ", `> contract version: \x1b[1;39m${deployedVersion.slice(0, 5)}\x1b[0m${deployedVersion.slice(5)}`) } } catch {} console.info(" ", "> contract specs: ", await contract.specs.call({ from }), "\x1b[0m") - console.info() } async function deployCoreBase (targetSpecs, targetAddr) { From ef966155173bc65f1cb741d659f66a26edf90dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Sat, 26 Oct 2024 22:09:15 +0200 Subject: [PATCH 41/62] feat: subscribable SLA's capable committees --- contracts/apps/WitPriceFeedsUpgradable.sol | 76 ++-- contracts/apps/WitRandomnessV21.sol | 48 +-- contracts/core/base/WitOracleBase.sol | 154 +++++--- .../core/base/WitOracleBaseTrustable.sol | 105 ++--- .../core/base/WitOracleBaseTrustless.sol | 46 +-- .../core/base/WitOracleRadonRegistryBase.sol | 6 +- .../trustable/WitOracleTrustableObscuro.sol | 6 +- .../core/trustable/WitOracleTrustableOvm2.sol | 42 +- .../core/trustable/WitOracleTrustableReef.sol | 6 +- contracts/data/WitOracleDataLib.sol | 370 ++++++------------ contracts/data/WitPriceFeedsData.sol | 6 +- contracts/interfaces/IWitFeeds.sol | 8 +- contracts/interfaces/IWitFeedsAdmin.sol | 4 +- contracts/interfaces/IWitFeedsLegacy.sol | 4 +- contracts/interfaces/IWitOracle.sol | 46 ++- contracts/interfaces/IWitOracleEvents.sol | 16 +- contracts/interfaces/IWitOracleLegacy.sol | 4 +- .../interfaces/IWitOracleRadonRegistry.sol | 4 +- contracts/interfaces/IWitRandomness.sol | 8 +- contracts/interfaces/IWitRandomnessAdmin.sol | 2 +- contracts/libs/Witnet.sol | 173 ++++---- contracts/mockups/UsingWitOracle.sol | 21 +- contracts/mockups/UsingWitOracleRequest.sol | 8 +- .../mockups/UsingWitOracleRequestTemplate.sol | 14 +- contracts/mockups/WitOracleConsumer.sol | 6 +- .../mockups/WitOracleRandomnessConsumer.sol | 23 +- .../mockups/WitOracleRequestConsumer.sol | 19 +- .../WitOracleRequestTemplateConsumer.sol | 19 +- 28 files changed, 609 insertions(+), 635 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 8bde1de1..3d4cff03 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -28,7 +28,7 @@ contract WitPriceFeedsUpgradable { using Witnet for bytes; using Witnet for Witnet.QueryResponse; - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; using Witnet for Witnet.Result; function class() virtual override public view returns (string memory) { @@ -38,7 +38,7 @@ contract WitPriceFeedsUpgradable WitOracle immutable public override witOracle; WitOracleRadonRegistry immutable internal __registry; - Witnet.RadonSLA private __defaultRadonSLA; + Witnet.QuerySLA private __defaultRadonSLA; uint16 private __baseFeeOverheadPercentage; constructor( @@ -103,24 +103,25 @@ contract WitPriceFeedsUpgradable /// @notice Re-initialize contract's storage context upon a new upgrade from a proxy. function __initializeUpgradableData(bytes memory _initData) virtual override internal { if (__proxiable().codehash == bytes32(0)) { - __defaultRadonSLA = Witnet.RadonSLA({ - witNumWitnesses: 10, - witUnitaryReward: 2 * 10 ** 8, - maxTallyResultSize: 16 + __defaultRadonSLA = Witnet.QuerySLA({ + witCommitteeCapacity: 10, + witCommitteeUnitaryReward: 2 * 10 ** 8, + witResultMaxSize: 16, + witCapability: Witnet.QueryCapability.wrap(0) }); // settle default base fee overhead percentage __baseFeeOverheadPercentage = 10; } else { // otherwise, store beacon read from _initData, if any if (_initData.length > 0) { - (uint16 _baseFeeOverheadPercentage, Witnet.RadonSLA memory _defaultRadonSLA) = abi.decode( - _initData, (uint16, Witnet.RadonSLA) + (uint16 _baseFeeOverheadPercentage, Witnet.QuerySLA memory _defaultRadonSLA) = abi.decode( + _initData, (uint16, Witnet.QuerySLA) ); __baseFeeOverheadPercentage = _baseFeeOverheadPercentage; __defaultRadonSLA = _defaultRadonSLA; - } else if (__defaultRadonSLA.maxTallyResultSize < 16) { + } else if (__defaultRadonSLA.witResultMaxSize < 16) { // possibly, an upgrade from a previous branch took place: - __defaultRadonSLA.maxTallyResultSize = 16; + __defaultRadonSLA.witResultMaxSize = 16; } } } @@ -212,7 +213,7 @@ contract WitPriceFeedsUpgradable function defaultRadonSLA() override public view - returns (Witnet.RadonSLA memory) + returns (Witnet.QuerySLA memory) { return __defaultRadonSLA; } @@ -233,7 +234,7 @@ contract WitPriceFeedsUpgradable function lastValidQueryId(bytes4 feedId) override public view - returns (uint256) + returns (Witnet.QueryId) { return _lastValidQueryId(feedId); } @@ -247,7 +248,7 @@ contract WitPriceFeedsUpgradable function latestUpdateQueryId(bytes4 feedId) override public view - returns (uint256) + returns (Witnet.QueryId) { return __records_(feedId).latestUpdateQueryId; } @@ -337,7 +338,7 @@ contract WitPriceFeedsUpgradable return __requestUpdate(feedId, __defaultRadonSLA); } - function requestUpdate(bytes4 feedId, Witnet.RadonSLA memory updateSLA) + function requestUpdate(bytes4 feedId, Witnet.QuerySLA calldata updateSLA) public payable virtual override returns (uint256 _usedFunds) @@ -349,17 +350,18 @@ contract WitPriceFeedsUpgradable return __requestUpdate(feedId, updateSLA); } - function requestUpdate(bytes4 feedId, IWitFeedsLegacy.RadonSLA memory updateSLA) + function requestUpdate(bytes4 feedId, IWitFeedsLegacy.RadonSLA calldata updateSLA) external payable virtual override returns (uint256) { - return requestUpdate( - feedId, - Witnet.RadonSLA({ - witNumWitnesses: updateSLA.witNumWitnesses, - witUnitaryReward: updateSLA.witUnitaryReward, - maxTallyResultSize: __defaultRadonSLA.maxTallyResultSize + return __requestUpdate( + feedId, + Witnet.QuerySLA({ + witCommitteeCapacity: updateSLA.witCommitteeCapacity, + witCommitteeUnitaryReward: updateSLA.witCommitteeUnitaryReward, + witResultMaxSize: __defaultRadonSLA.witResultMaxSize, + witCapability: Witnet.QueryCapability.wrap(0) }) ); } @@ -452,7 +454,7 @@ contract WitPriceFeedsUpgradable __baseFeeOverheadPercentage = _baseFeeOverheadPercentage; } - function settleDefaultRadonSLA(Witnet.RadonSLA calldata defaultSLA) + function settleDefaultRadonSLA(Witnet.QuerySLA calldata defaultSLA) override public onlyOwner { @@ -598,8 +600,8 @@ contract WitPriceFeedsUpgradable public view returns (IWitPriceFeedsSolver.Price memory) { - uint _queryId = _lastValidQueryId(feedId); - if (_queryId > 0) { + Witnet.QueryId _queryId = _lastValidQueryId(feedId); + if (Witnet.QueryId.unwrap(_queryId) > 0) { Witnet.QueryResponse memory _lastValidQueryResponse = lastValidQueryResponse(feedId); Witnet.Result memory _latestResult = _lastValidQueryResponse.resultCborBytes.toWitnetResult(); return IWitPriceFeedsSolver.Price({ @@ -701,11 +703,11 @@ contract WitPriceFeedsUpgradable // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- - function _checkQueryResponseStatus(uint _queryId) + function _checkQueryResponseStatus(Witnet.QueryId _queryId) internal view returns (Witnet.QueryResponseStatus) { - if (_queryId > 0) { + if (Witnet.QueryId.unwrap(_queryId) > 0) { return witOracle.getQueryResponseStatus(_queryId); } else { return Witnet.QueryResponseStatus.Ready; @@ -722,11 +724,11 @@ contract WitPriceFeedsUpgradable function _lastValidQueryId(bytes4 feedId) virtual internal view - returns (uint256) + returns (Witnet.QueryId) { - uint _latestUpdateQueryId = latestUpdateQueryId(feedId); + Witnet.QueryId _latestUpdateQueryId = latestUpdateQueryId(feedId); if ( - _latestUpdateQueryId > 0 + Witnet.QueryId.unwrap(_latestUpdateQueryId) > 0 && witOracle.getQueryResponseStatus(_latestUpdateQueryId) == Witnet.QueryResponseStatus.Ready ) { return _latestUpdateQueryId; @@ -745,7 +747,7 @@ contract WitPriceFeedsUpgradable } } - function __requestUpdate(bytes4[] memory _deps, Witnet.RadonSLA memory sla) + function __requestUpdate(bytes4[] memory _deps, Witnet.QuerySLA memory sla) virtual internal returns (uint256 _usedFunds) { @@ -755,7 +757,7 @@ contract WitPriceFeedsUpgradable } } - function __requestUpdate(bytes4 feedId, Witnet.RadonSLA memory querySLA) + function __requestUpdate(bytes4 feedId, Witnet.QuerySLA memory querySLA) virtual internal returns (uint256 _usedFunds) { @@ -764,13 +766,13 @@ contract WitPriceFeedsUpgradable if (__feed.radHash != 0) { _usedFunds = estimateUpdateRequestFee(tx.gasprice); _require(msg.value >= _usedFunds, "insufficient reward"); - uint _latestId = __feed.latestUpdateQueryId; + Witnet.QueryId _latestId = __feed.latestUpdateQueryId; Witnet.QueryResponseStatus _latestStatus = _checkQueryResponseStatus(_latestId); if (_latestStatus == Witnet.QueryResponseStatus.Awaiting) { // latest update is still pending, so just increase the reward // accordingly to current tx gasprice: - Witnet.QueryRequest memory _request = witOracle.getQueryRequest(_latestId); - int _deltaReward = int(int72(_request.evmReward)) - int(_usedFunds); + uint72 _evmReward = Witnet.QueryReward.unwrap(witOracle.getQueryEvmReward(_latestId)); + int _deltaReward = int(int72(_evmReward)) - int(_usedFunds); if (_deltaReward > 0) { _usedFunds = uint(_deltaReward); witOracle.upgradeQueryEvmReward{value: _usedFunds}(_latestId); @@ -781,7 +783,7 @@ contract WitPriceFeedsUpgradable // Check if latest update ended successfully: if (_latestStatus == Witnet.QueryResponseStatus.Ready) { // If so, remove previous last valid query from the WRB: - if (__feed.lastValidQueryId > 0) { + if (Witnet.QueryId.unwrap(__feed.lastValidQueryId) > 0) { witOracle.fetchQueryResponse(__feed.lastValidQueryId); } __feed.lastValidQueryId = _latestId; @@ -791,7 +793,7 @@ contract WitPriceFeedsUpgradable try witOracle.fetchQueryResponse(_latestId) {} catch {} } // Post update request to the WRB: - _latestId = witOracle.postQuery{value: _usedFunds}( + _latestId = witOracle.pullData{value: _usedFunds}( __feed.radHash, querySLA ); @@ -802,7 +804,7 @@ contract WitPriceFeedsUpgradable tx.origin, _msgSender(), feedId, - _latestId + Witnet.QueryId.unwrap(_latestId) ); } } else if (__feed.solver != address(0)) { diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index 6592d25e..0064b067 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -18,7 +18,7 @@ contract WitRandomnessV21 { using Witnet for bytes; using Witnet for Witnet.Result; - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; struct Randomize { uint256 queryId; @@ -63,7 +63,7 @@ contract WitRandomnessV21 filters: new Witnet.RadonFilter[](0) }) ); - __witOracleDefaultQuerySLA.maxTallyResultSize = 34; + __witOracleDefaultQuerySLA.witResultMaxSize = 34; } receive() virtual external payable { @@ -135,21 +135,22 @@ contract WitRandomnessV21 if (__storage().randomize_[_blockNumber].queryId == 0) { _blockNumber = getRandomizeNextBlock(_blockNumber); } - Randomize storage __randomize = __storage().randomize_[_blockNumber]; uint256 _queryId = __randomize.queryId; _require( _queryId != 0, "not randomized" ); - - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus(_queryId); + Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( + Witnet.QueryId.wrap(_queryId) + ); if (_status == Witnet.QueryResponseStatus.Ready) { return ( - __witOracle.getQueryResultCborBytes(_queryId) + __witOracle.getQueryResultCborBytes(Witnet.QueryId.wrap(_queryId)) .toWitnetResult() .asBytes32() ); + } else if (_status == Witnet.QueryResponseStatus.Error) { uint256 _nextRandomizeBlock = __randomize.nextBlock; _require( @@ -174,15 +175,13 @@ contract WitRandomnessV21 /// @return _resultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. /// @return _resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. /// @return _resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. - /// @return _resultFinalityBlock EVM block number from which the provided randomness can be considered to be final. function fetchRandomnessAfterProof(uint256 _blockNumber) virtual override public view returns ( bytes32 _resultRandomness, uint64 _resultTimestamp, - bytes32 _resultDrTxHash, - uint256 _resultFinalityBlock + bytes32 _resultDrTxHash ) { if (__storage().randomize_[_blockNumber].queryId == 0) { @@ -196,12 +195,15 @@ contract WitRandomnessV21 "not randomized" ); - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus(_queryId); + Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( + Witnet.QueryId.wrap(_queryId) + ); if (_status == Witnet.QueryResponseStatus.Ready) { - Witnet.QueryResponse memory _queryResponse = __witOracle.getQueryResponse(_queryId); + Witnet.QueryResponse memory _queryResponse = __witOracle.getQueryResponse( + Witnet.QueryId.wrap(_queryId) + ); _resultTimestamp = _queryResponse.resultTimestamp; _resultDrTxHash = _queryResponse.resultDrTxHash; - _resultFinalityBlock = _queryResponse.finality; _resultRandomness = _queryResponse.resultCborBytes.toWitnetResult().asBytes32(); } else if (_status == Witnet.QueryResponseStatus.Error) { @@ -299,7 +301,9 @@ contract WitRandomnessV21 return Witnet.QueryResponseStatus.Void; } else { - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus(_queryId); + Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( + Witnet.QueryId.wrap(_queryId) + ); if (_status == Witnet.QueryResponseStatus.Error) { uint256 _nextRandomizeBlock = __storage().randomize_[_blockNumber].nextBlock; if (_nextRandomizeBlock != 0) { @@ -363,7 +367,7 @@ contract WitRandomnessV21 /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. /// @dev Reverts if given SLA security parameters are below witOracleDefaultQuerySLA(). /// @return Funds actually paid as randomize fee. - function randomize(Witnet.RadonSLA calldata _querySLA) + function randomize(Witnet.QuerySLA calldata _querySLA) external payable virtual override returns (uint256) @@ -382,7 +386,7 @@ contract WitRandomnessV21 function witOracleDefaultQuerySLA() virtual override (UsingWitOracle, IWitRandomness) public view - returns (Witnet.RadonSLA memory) + returns (Witnet.QuerySLA memory) { return __witOracleDefaultQuerySLA; } @@ -438,7 +442,7 @@ contract WitRandomnessV21 __witOracleBaseFeeOverheadPercentage = _baseFeeOverheadPercentage; } - function settleDefaultQuerySLA(Witnet.RadonSLA calldata _querySLA) + function settleDefaultQuerySLA(Witnet.QuerySLA calldata _querySLA) virtual override external onlyOwner @@ -454,17 +458,17 @@ contract WitRandomnessV21 // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- - function __postRandomizeQuery(Witnet.RadonSLA memory _querySLA) + function __postRandomizeQuery(Witnet.QuerySLA memory _querySLA) internal returns (uint256 _evmUsedFunds) { - uint256 _queryId; + Witnet.QueryId _queryId; Randomize storage __randomize = __storage().randomize_[block.number]; if (__storage().lastRandomizeBlock < block.number) { _evmUsedFunds = msg.value; // Post the Witnet Randomness request: - _queryId = __witOracle.postQuery{ + _queryId = __witOracle.pullData{ value: msg.value }( witOracleQueryRadHash, @@ -472,13 +476,13 @@ contract WitRandomnessV21 ); // Save Randomize metadata in storage: - __randomize.queryId = _queryId; + __randomize.queryId = Witnet.QueryId.unwrap(_queryId); uint256 _prevBlock = __storage().lastRandomizeBlock; __randomize.prevBlock = _prevBlock; __storage().randomize_[_prevBlock].nextBlock = block.number; __storage().lastRandomizeBlock = block.number; } else { - _queryId = __storage().randomize_[block.number].queryId; + _queryId = Witnet.QueryId.wrap(__storage().randomize_[block.number].queryId); } // Transfer back unused funds: @@ -488,7 +492,7 @@ contract WitRandomnessV21 // Emit event upon every randomize call, even if multiple within same block: // solhint-disable-next-line avoid-tx-origin - emit Randomizing(tx.origin, _msgSender(), _queryId); + emit Randomizing(tx.origin, _msgSender(), Witnet.QueryId.unwrap(_queryId)); } /// @dev Recursively searches for the number of the first block after the given one in which a Witnet diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index c439bf46..1996ecdb 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -18,11 +18,12 @@ abstract contract WitOracleBase Payable, WitOracle { - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; + using WitOracleDataLib for WitOracleDataLib.Committee; using WitOracleDataLib for WitOracleDataLib.Storage; function channel() virtual override public view returns (bytes4) { - return WitOracleDataLib.channel(); + return Witnet.channel(address(this)); } // WitOracleRequestFactory public immutable override factory; @@ -45,7 +46,7 @@ abstract contract WitOracleBase ); _; } - modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual { + modifier checkQueryReward(uint256 _msgValue, uint256 _baseFee) virtual { _require( _msgValue >= _baseFee, "insufficient reward" @@ -56,7 +57,7 @@ abstract contract WitOracleBase ); _; } - modifier checkSLA(Witnet.RadonSLA memory sla) virtual { + modifier checkQuerySLA(Witnet.QuerySLA memory sla) virtual { _require( sla.isValid(), "invalid SLA" @@ -64,7 +65,7 @@ abstract contract WitOracleBase } /// Asserts the given query is currently in the given status. - modifier inStatus(uint256 _queryId, Witnet.QueryStatus _status) { + modifier inStatus(Witnet.QueryId _queryId, Witnet.QueryStatus _status) { if (getQueryStatus(_queryId) != _status) { _revert(WitOracleDataLib.notInStatusRevertMessage(_status)); @@ -74,7 +75,7 @@ abstract contract WitOracleBase } /// Asserts the caller actually posted the referred query. - modifier onlyRequester(uint256 _queryId) { + modifier onlyRequester(Witnet.QueryId _queryId) { _require( msg.sender == WitOracleDataLib.seekQueryRequest(_queryId).requester, "not the requester" @@ -111,8 +112,8 @@ abstract contract WitOracleBase __sstoreFromZeroGas = _immutables.sstoreFromZeroGas; } - function getQueryStatus(uint256) virtual public view returns (Witnet.QueryStatus); - function getQueryResponseStatus(uint256) virtual public view returns (Witnet.QueryResponseStatus); + function getQueryStatus(Witnet.QueryId) virtual public view returns (Witnet.QueryStatus); + function getQueryResponseStatus(Witnet.QueryId) virtual public view returns (Witnet.QueryResponseStatus); // ================================================================================================================ @@ -198,23 +199,23 @@ abstract contract WitOracleBase function estimateExtraFee( uint256 _evmGasPrice, uint256 _evmWitPrice, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) public view virtual override returns (uint256) { return ( - _evmWitPrice * ((3 + _querySLA.witNumWitnesses) * _querySLA.witUnitaryReward) - + (_querySLA.maxTallyResultSize > 32 - ? _evmGasPrice * __sstoreFromZeroGas * ((_querySLA.maxTallyResultSize - 32) / 32) + _evmWitPrice * ((3 + _querySLA.witCommitteeCapacity) * _querySLA.witCommitteeUnitaryReward) + + (_querySLA.witResultMaxSize > 32 + ? _evmGasPrice * __sstoreFromZeroGas * ((_querySLA.witResultMaxSize - 32) / 32) : 0 ) ); } /// Gets the whole Query data contents, if any, no matter its current status. - function getQuery(uint256 _queryId) + function getQuery(Witnet.QueryId _queryId) public view virtual override returns (Witnet.Query memory) @@ -223,17 +224,17 @@ abstract contract WitOracleBase } /// @notice Gets the current EVM reward the report can claim, if not done yet. - function getQueryEvmReward(uint256 _queryId) + function getQueryEvmReward(Witnet.QueryId _queryId) external view virtual override - returns (uint256) + returns (Witnet.QueryReward) { - return __storage().queries[_queryId].request.evmReward; + return __storage().queries[_queryId].reward; } /// @notice Retrieves the RAD hash and SLA parameters of the given query. /// @param _queryId The unique query identifier. - function getQueryRequest(uint256 _queryId) + function getQueryRequest(Witnet.QueryId _queryId) external view override returns (Witnet.QueryRequest memory) @@ -244,7 +245,7 @@ abstract contract WitOracleBase /// Retrieves the Witnet-provable result, and metadata, to a previously posted request. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier - function getQueryResponse(uint256 _queryId) + function getQueryResponse(Witnet.QueryId _queryId) public view virtual override returns (Witnet.QueryResponse memory) @@ -252,7 +253,7 @@ abstract contract WitOracleBase return WitOracleDataLib.seekQueryResponse(_queryId); } - function getQueryResponseStatusTag(uint256 _queryId) + function getQueryResponseStatusTag(Witnet.QueryId _queryId) virtual override external view returns (string memory) @@ -264,7 +265,7 @@ abstract contract WitOracleBase /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. /// @param _queryId The unique query identifier. - function getQueryResultCborBytes(uint256 _queryId) + function getQueryResultCborBytes(Witnet.QueryId _queryId) external view virtual override returns (bytes memory) @@ -274,7 +275,7 @@ abstract contract WitOracleBase /// @notice Gets error code identifying some possible failure on the resolution of the given query. /// @param _queryId The unique query identifier. - function getQueryResultError(uint256 _queryId) + function getQueryResultError(Witnet.QueryId _queryId) virtual override public view returns (Witnet.ResultError memory) @@ -299,7 +300,7 @@ abstract contract WitOracleBase } } - function getQueryStatusTag(uint256 _queryId) + function getQueryStatusTag(Witnet.QueryId _queryId) virtual override external view returns (string memory) @@ -309,7 +310,7 @@ abstract contract WitOracleBase ); } - function getQueryStatusBatch(uint256[] calldata _queryIds) + function getQueryStatusBatch(Witnet.QueryId[] calldata _queryIds) virtual override external view returns (Witnet.QueryStatus[] memory _status) @@ -324,22 +325,10 @@ abstract contract WitOracleBase function getNextQueryId() external view override - returns (uint256) + returns (Witnet.QueryId) { - return __storage().nonce + 1; + return Witnet.QueryId.wrap(__storage().nonce + 1); } - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and - /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be - /// @notice transferred to the reporter who relays back the Witnet-provable result to this request. - /// @dev Reasons to fail: - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @return _queryId Unique query identifier. - function postQuery( bytes32 _queryRAD, Witnet.RadonSLA memory _querySLA ) @@ -500,23 +489,43 @@ abstract contract WitOracleBase _queryUnverifiedBytecode, _querySLA ); + + /// @notice Enables data requesters to settle the actual validators in the Wit/oracle + /// @notice sidechain that will be entitled whatsover to solve + /// @notice data requests, as presumed to be capable of supporting some given `Wit2.Capability`. + function settleMyOwnCapableCommittee( + Witnet.QueryCapability _capability, + Witnet.QueryCapabilityMember[] calldata _members + ) + virtual override external + { + __storage().committees[msg.sender][_capability].settle(_members); + emit WitOracleCommittee( + msg.sender, + _capability, + _members + ); } /// Increments the reward of a previously posted request by adding the transaction value to it. /// @dev Fails if the `_queryId` is not in 'Posted' status. /// @param _queryId The unique query identifier. - function upgradeQueryEvmReward(uint256 _queryId) + function upgradeQueryEvmReward(Witnet.QueryId _queryId) external payable virtual override inStatus(_queryId, Witnet.QueryStatus.Posted) { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); - __request.evmReward += uint72(_getMsgValue()); + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + uint256 _newReward = ( + Witnet.QueryReward.unwrap(__query.reward) + + _getMsgValue() + ); + __query.reward = Witnet.QueryReward.wrap(uint72(_newReward)); emit WitOracleQueryUpgrade( - _queryId, + Witnet.QueryId.unwrap(_queryId), _getMsgSender(), _getGasPrice(), - __request.evmReward + _newReward ); } @@ -526,22 +535,57 @@ abstract contract WitOracleBase function __postQuery( address _requester, - uint24 _evmCallbackGasLimit, - uint72 _evmReward, - bytes32 _radHash, - Witnet.RadonSLA memory _sla + uint24 _callbackGas, + uint72 _evmReward, + bytes32 _radonRadHash, + Witnet.QuerySLA memory _querySLA ) virtual internal - returns (uint256 _queryId) + returns (Witnet.QueryId _queryId) + { + _queryId = Witnet.QueryId.wrap(++ __storage().nonce); + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number)); + __query.hash = Witnet.hashify( + _queryId, + _radonRadHash, + WitOracleDataLib.hashify(_querySLA, _requester) + ); + __query.reward = Witnet.QueryReward.wrap(_evmReward); + __query.request = Witnet.QueryRequest({ + requester: _requester, + callbackGas: _callbackGas, + radonBytecode: new bytes(0), _0: 0, + radonRadHash: _radonRadHash + }); + __query.slaParams = _querySLA; + } + + function __postQuery( + address _requester, + uint24 _callbackGas, + uint72 _evmReward, + bytes calldata _radonBytecode, + Witnet.QuerySLA memory _querySLA + ) + virtual internal + returns (Witnet.QueryId _queryId) { - _queryId = ++ __storage().nonce; - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryId); - _require(__request.requester == address(0), "already posted"); - __request.requester = _requester; - __request.gasCallback = _evmCallbackGasLimit; - __request.evmReward = _evmReward; - __request.radonRadHash = _radHash; - __request.radonSLA = _sla; + _queryId = Witnet.QueryId.wrap(++ __storage().nonce); + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + __query.hash = Witnet.hashify( + _queryId, + Witnet.radHash(_radonBytecode), + WitOracleDataLib.hashify(_querySLA, _requester) + ); + __query.reward = Witnet.QueryReward.wrap(_evmReward); + __query.request = Witnet.QueryRequest({ + requester: _requester, + callbackGas: _callbackGas, + radonBytecode: _radonBytecode, + radonRadHash: bytes32(0), _0: 0 + }); + __query.slaParams = _querySLA; } /// Returns storage pointer to contents of 'WitOracleDataLib.Storage' struct. diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 5ef3c6f7..1f381037 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -59,7 +59,7 @@ abstract contract WitOracleBaseTrustable /// @dev the one that actually posted the given request. /// @dev If in 'Expired' status, query reward is transfer back to the requester. /// @param _queryId The unique query identifier. - function fetchQueryResponse(uint256 _queryId) + function fetchQueryResponse(Witnet.QueryId _queryId) virtual override external returns (Witnet.QueryResponse memory) { @@ -67,9 +67,10 @@ abstract contract WitOracleBaseTrustable _queryId ) returns ( - Witnet.QueryResponse memory _queryResponse, - uint72 _queryEvmExpiredReward + Witnet.QueryResponse memory queryResponse, + Witnet.QueryReward queryEvmExpiredReward ) { + uint256 _queryEvmExpiredReward = Witnet.QueryReward.unwrap(queryEvmExpiredReward); if (_queryEvmExpiredReward > 0) { // transfer unused reward to requester, only if the query expired: __safeTransferTo( @@ -77,7 +78,7 @@ abstract contract WitOracleBaseTrustable _queryEvmExpiredReward ); } - return _queryResponse; + return queryResponse; } catch Error(string memory _reason) { _revert(_reason); @@ -88,7 +89,7 @@ abstract contract WitOracleBaseTrustable } /// Gets current status of given query. - function getQueryStatus(uint256 _queryId) + function getQueryStatus(Witnet.QueryId _queryId) virtual override public view returns (Witnet.QueryStatus) @@ -102,7 +103,7 @@ abstract contract WitOracleBaseTrustable /// @notice - 2 => Ready: the query has been succesfully solved; /// @notice - 3 => Error: the query couldn't get solved due to some issue. /// @param _queryId The unique query identifier. - function getQueryResponseStatus(uint256 _queryId) + function getQueryResponseStatus(Witnet.QueryId _queryId) virtual override public view returns (Witnet.QueryResponseStatus) { @@ -186,44 +187,63 @@ abstract contract WitOracleBaseTrustable external payable returns (uint256) { - return postQuery( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 + function __postQuery( + address _requester, + uint24 _callbackGas, + uint72 _evmReward, + bytes32 _radonRadHash, + Witnet.QuerySLA memory _querySLA + ) + virtual override + internal + returns (Witnet.QueryId _queryId) + { + _queryId = super.__postQuery( + _requester, + _callbackGas, + _evmReward, + _radonRadHash, + _querySLA + ); + emit IWitOracleLegacy.WitnetQuery( + Witnet.QueryId.unwrap(_queryId), + msg.value, + IWitOracleLegacy.RadonSLA({ + witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward }) ); } function __postQuery( address _requester, - uint24 _evmCallbackGasLimit, - uint72 _evmReward, - bytes32 _radHash, - Witnet.RadonSLA memory _sla + uint24 _callbackGas, + uint72 _evmReward, + bytes calldata _radonRadBytecode, + Witnet.QuerySLA memory _querySLA ) virtual override internal - returns (uint256 _queryId) + returns (Witnet.QueryId _queryId) { _queryId = super.__postQuery( _requester, - _evmCallbackGasLimit, + _callbackGas, _evmReward, - _radHash, - _sla + _radonRadBytecode, + _querySLA ); emit IWitOracleLegacy.WitnetQuery( - _queryId, + Witnet.QueryId.unwrap(_queryId), msg.value, IWitOracleLegacy.RadonSLA({ - witNumWitnesses: _sla.witNumWitnesses, - witUnitaryReward: _sla.witUnitaryReward + witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward }) ); } + function postRequestWithCallback( bytes32 _queryRadHash, IWitOracleLegacy.RadonSLA calldata _querySLA, @@ -282,35 +302,31 @@ abstract contract WitOracleBaseTrustable returns (uint256 _revenues, uint256 _expenses) { for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + Witnet.QueryId _queryId = Witnet.QueryId.wrap(_queryIds[_ix]); if ( - getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + getQueryStatus(_queryId) == Witnet.QueryStatus.Posted ) { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); - if (__request.gasCallback > 0) { + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + if (__query.request.callbackGas > 0) { _expenses += ( - estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - Witnet.RadonSLA({ - witNumWitnesses: __request.radonSLA.witNumWitnesses, - witUnitaryReward: __request.radonSLA.witUnitaryReward, - maxTallyResultSize: uint16(0) + estimateBaseFeeWithCallback(_evmGasPrice, __query.request.callbackGas) + + estimateExtraFee(_evmGasPrice, _evmWitPrice, + Witnet.QuerySLA({ + witCommitteeCapacity: __query.slaParams.witCommitteeCapacity, + witCommitteeUnitaryReward: __query.slaParams.witCommitteeUnitaryReward, + witResultMaxSize: uint16(0), + witCapability: Witnet.QueryCapability.wrap(0) }) ) ); } else { _expenses += ( estimateBaseFee(_evmGasPrice) - + estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - __request.radonSLA - ) + + estimateExtraFee(_evmGasPrice, _evmWitPrice, __query.slaParams) ); } - _expenses += _evmWitPrice * __request.radonSLA.witUnitaryReward; - _revenues += __request.evmReward; + _expenses += _evmWitPrice * __query.slaParams.witCommitteeUnitaryReward; + _revenues += Witnet.QueryReward.unwrap(__query.reward); } } } @@ -407,14 +423,15 @@ abstract contract WitOracleBaseTrustable /// - timestamp of the solving tally txs in Witnet. If zero is provided, EVM-timestamp will be used instead; /// - hash of the corresponding data request tx at the Witnet side-chain level; /// - data request result in raw bytes. - function reportResultBatch(IWitOracleReporter.BatchResult[] calldata _batchResults) + function reportResultBatch(IWitOracleTrustableReporter.BatchResult[] calldata _batchResults) external override onlyReporters returns (uint256 _batchReward) { for (uint _i = 0; _i < _batchResults.length; _i ++) { + Witnet.QueryId _queryId = Witnet.QueryId.wrap(_batchResults[_i].queryId); if ( - getQueryStatus(_batchResults[_i].queryId) + getQueryStatus(_queryId) != Witnet.QueryStatus.Posted ) { emit BatchReportError( @@ -465,7 +482,7 @@ abstract contract WitOracleBaseTrustable returns (uint256) { _require( - WitOracleDataLib.getQueryStatus(_queryId) == Witnet.QueryStatus.Posted, + WitOracleDataLib.getQueryStatus(Witnet.QueryId.wrap(_queryId)) == Witnet.QueryStatus.Posted, "not in Posted status" ); return WitOracleDataLib.reportResult( diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index d88c5ed6..78ac801d 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -142,7 +142,7 @@ abstract contract WitOracleBaseTrustless // ================================================================================================================ // --- Overrides IWitOracle (trustlessly) ------------------------------------------------------------------------- - function fetchQueryResponse(uint256 _queryId) + function fetchQueryResponse(Witnet.QueryId _queryId) virtual override external returns (Witnet.QueryResponse memory) @@ -165,7 +165,7 @@ abstract contract WitOracleBaseTrustless } } - function getQueryStatus(uint256 _queryId) + function getQueryStatus(Witnet.QueryId _queryId) virtual override public view returns (Witnet.QueryStatus) @@ -179,7 +179,7 @@ abstract contract WitOracleBaseTrustless /// @notice - 2 => Ready: the query has been succesfully solved; /// @notice - 3 => Error: the query couldn't get solved due to some issue. /// @param _queryId The unique query identifier. - function getQueryResponseStatus(uint256 _queryId) + function getQueryResponseStatus(Witnet.QueryId _queryId) virtual override public view returns (Witnet.QueryResponseStatus) @@ -274,7 +274,7 @@ abstract contract WitOracleBaseTrustless // ================================================================================================================ // --- IWitOracleReporterTrustless -------------------------------------------------------------------------------- - function claimQueryReward(uint256 _queryId) + function claimQueryReward(Witnet.QueryId _queryId) virtual override external returns (uint256) { @@ -296,7 +296,7 @@ abstract contract WitOracleBaseTrustless } } - function claimQueryRewardBatch(uint256[] calldata _queryIds) + function claimQueryRewardBatch(Witnet.QueryId[] calldata _queryIds) virtual override external returns (uint256 _evmTotalReward) { @@ -348,7 +348,7 @@ abstract contract WitOracleBaseTrustless } } - function disputeQueryResponse(uint256 _queryId) + function disputeQueryResponse(Witnet.QueryId _queryId) virtual override external returns (uint256) { @@ -367,7 +367,7 @@ abstract contract WitOracleBaseTrustless } } - function reportQueryResponse(Witnet.QueryResponseReport calldata _responseReport) + function reportQueryResponse(Witnet.DataPullReport calldata _responseReport) virtual override public returns (uint256) { @@ -387,12 +387,12 @@ abstract contract WitOracleBaseTrustless } } - function reportQueryResponseBatch(Witnet.QueryResponseReport[] calldata _responseReports) + function reportQueryResponseBatch(Witnet.DataPullReport[] calldata _responseReports) virtual override external returns (uint256 _evmTotalReward) { for (uint _ix = 0; _ix < _responseReports.length; _ix ++) { - Witnet.QueryResponseReport calldata _responseReport = _responseReports[_ix]; + Witnet.DataPullReport calldata _responseReport = _responseReports[_ix]; try WitOracleDataLib.reportQueryResponseTrustlessly( _responseReport, QUERY_AWAITING_BLOCKS, @@ -418,7 +418,7 @@ abstract contract WitOracleBaseTrustless function rollupQueryResponseProof( Witnet.FastForward[] calldata _witOracleRollup, - Witnet.QueryResponseReport calldata _responseReport, + Witnet.DataPullReport calldata _responseReport, bytes32[] calldata _queryResponseReportMerkleProof ) virtual override external @@ -443,30 +443,4 @@ abstract contract WitOracleBaseTrustless _revertWitOracleDataLibUnhandledException(); } } - - function rollupQueryResultProof( - Witnet.FastForward[] calldata _witOracleRollup, - Witnet.QueryReport calldata _queryReport, - bytes32[] calldata _queryReportMerkleProof - ) - virtual override external - returns (Witnet.Result memory) - { - try WitOracleDataLib.rollupQueryResultProof( - _witOracleRollup, - _queryReport, - _queryReportMerkleProof - - ) returns ( - Witnet.Result memory _queryResult - ) { - return _queryResult; - - } catch Error(string memory _reason) { - _revert(_reason); - - } catch (bytes memory) { - _revertWitOracleDataLibUnhandledException(); - } - } } diff --git a/contracts/core/base/WitOracleRadonRegistryBase.sol b/contracts/core/base/WitOracleRadonRegistryBase.sol index 81f1ea0e..760eb453 100644 --- a/contracts/core/base/WitOracleRadonRegistryBase.sol +++ b/contracts/core/base/WitOracleRadonRegistryBase.sol @@ -20,7 +20,7 @@ abstract contract WitOracleRadonRegistryBase { using Witnet for bytes; using Witnet for string; - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; using WitOracleRadonEncodingLib for Witnet.RadonDataTypes; using WitOracleRadonEncodingLib for Witnet.RadonReducer; @@ -63,7 +63,7 @@ abstract contract WitOracleRadonRegistryBase return __database().radsBytecode[_radHash]; } - function bytecodeOf(bytes32 _radHash, Witnet.RadonSLA calldata _sla) + function bytecodeOf(bytes32 _radHash, Witnet.QuerySLA calldata _sla) override external view returns (bytes memory) { @@ -75,7 +75,7 @@ abstract contract WitOracleRadonRegistryBase ); } - function bytecodeOf(bytes calldata _radBytecode, Witnet.RadonSLA calldata _sla) + function bytecodeOf(bytes calldata _radBytecode, Witnet.QuerySLA calldata _sla) override external pure returns (bytes memory) { diff --git a/contracts/core/trustable/WitOracleTrustableObscuro.sol b/contracts/core/trustable/WitOracleTrustableObscuro.sol index fc9fee61..b325b0f2 100644 --- a/contracts/core/trustable/WitOracleTrustableObscuro.sol +++ b/contracts/core/trustable/WitOracleTrustableObscuro.sol @@ -34,7 +34,7 @@ contract WitOracleTrustableObscuro /// @notice Gets the whole Query data contents, if any, no matter its current status. /// @dev Fails if or if `msg.sender` is not the actual requester. - function getQuery(uint256 _queryId) + function getQuery(Witnet.QueryId _queryId) public view virtual override onlyRequester(_queryId) @@ -46,7 +46,7 @@ contract WitOracleTrustableObscuro /// @notice Retrieves the whole `Witnet.QueryResponse` record referred to a previously posted Witnet Data Request. /// @dev Fails if the `_queryId` is not in 'Reported' status, or if `msg.sender` is not the actual requester. /// @param _queryId The unique query identifier - function getQueryResponse(uint256 _queryId) + function getQueryResponse(Witnet.QueryId _queryId) public view virtual override onlyRequester(_queryId) @@ -57,7 +57,7 @@ contract WitOracleTrustableObscuro /// @notice Gets error code identifying some possible failure on the resolution of the given query. /// @param _queryId The unique query identifier. - function getQueryResultError(uint256 _queryId) + function getQueryResultError(Witnet.QueryId _queryId) public view virtual override onlyRequester(_queryId) diff --git a/contracts/core/trustable/WitOracleTrustableOvm2.sol b/contracts/core/trustable/WitOracleTrustableOvm2.sol index 1995b4fb..136e64d8 100644 --- a/contracts/core/trustable/WitOracleTrustableOvm2.sol +++ b/contracts/core/trustable/WitOracleTrustableOvm2.sol @@ -77,13 +77,13 @@ contract WitOracleTrustableOvm2 /// @notice Estimate the minimum reward required for posting a data request with a callback. /// @param _gasPrice Expected gas price to pay upon posting the data request. - /// @param _callbackGasLimit Maximum gas to be spent when reporting the data request result. - function estimateBaseFeeWithCallback(uint256 _gasPrice, uint24 _callbackGasLimit) + /// @param _callbackGas Maximum gas to be spent when reporting the data request result. + function estimateBaseFeeWithCallback(uint256 _gasPrice, uint24 _callbackGas) public view virtual override returns (uint256) { - return _getCurrentL1Fee(32) + WitOracleBase.estimateBaseFeeWithCallback(_gasPrice, _callbackGasLimit); + return _getCurrentL1Fee(32) + WitOracleBase.estimateBaseFeeWithCallback(_gasPrice, _callbackGas); } /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new @@ -96,14 +96,14 @@ contract WitOracleTrustableOvm2 function estimateExtraFee( uint256 _evmGasPrice, uint256 _evmWitPrice, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) public view virtual override returns (uint256) { return ( - _getCurrentL1Fee(_querySLA.maxTallyResultSize) + _getCurrentL1Fee(_querySLA.witResultMaxSize) + WitOracleBase.estimateExtraFee( _evmGasPrice, _evmWitPrice, @@ -113,7 +113,7 @@ contract WitOracleTrustableOvm2 } // ================================================================================================================ - // --- Overrides 'IWitOracleReporter' -------------------------------------------------------------------------- + // --- Overrides 'IWitOracleTrustableReporter' -------------------------------------------------------------------------- /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on @@ -129,20 +129,21 @@ contract WitOracleTrustableOvm2 returns (uint256 _revenues, uint256 _expenses) { for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { + Witnet.QueryId _queryId = Witnet.QueryId.wrap(_queryIds[_ix]); if ( - getQueryStatus(_queryIds[_ix]) == Witnet.QueryStatus.Posted + getQueryStatus(_queryId) == Witnet.QueryStatus.Posted ) { - Witnet.QueryRequest storage __request = WitOracleDataLib.seekQueryRequest(_queryIds[_ix]); - if (__request.gasCallback > 0) { + Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); + if (__query.request.callbackGas > 0) { _expenses += ( - WitOracleBase.estimateBaseFeeWithCallback(_evmGasPrice, __request.gasCallback) + WitOracleBase.estimateBaseFeeWithCallback(_evmGasPrice, __query.request.callbackGas) + WitOracleBase.estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - Witnet.RadonSLA({ - witNumWitnesses: __request.radonSLA.witNumWitnesses, - witUnitaryReward: __request.radonSLA.witUnitaryReward, - maxTallyResultSize: uint16(0) + _evmGasPrice, _evmWitPrice, + Witnet.QuerySLA({ + witCommitteeCapacity: __query.slaParams.witCommitteeCapacity, + witCommitteeUnitaryReward: __query.slaParams.witCommitteeUnitaryReward, + witResultMaxSize: uint16(0), + witCapability: Witnet.QueryCapability.wrap(0) }) ) ); @@ -150,14 +151,13 @@ contract WitOracleTrustableOvm2 _expenses += ( WitOracleBase.estimateBaseFee(_evmGasPrice) + WitOracleBase.estimateExtraFee( - _evmGasPrice, - _evmWitPrice, - __request.radonSLA + _evmGasPrice, _evmWitPrice, + __query.slaParams ) ); } - _expenses += __request.radonSLA.witUnitaryReward * _evmWitPrice; - _revenues += __request.evmReward; + _expenses += __query.slaParams.witCommitteeUnitaryReward * _evmWitPrice; + _revenues += Witnet.QueryReward.unwrap(__query.reward); } } _expenses += __gasPriceOracleL1.getL1Fee(_evmMsgData); diff --git a/contracts/core/trustable/WitOracleTrustableReef.sol b/contracts/core/trustable/WitOracleTrustableReef.sol index 2a86c841..44ab432c 100644 --- a/contracts/core/trustable/WitOracleTrustableReef.sol +++ b/contracts/core/trustable/WitOracleTrustableReef.sol @@ -58,12 +58,12 @@ contract WitOracleTrustableReef } /// @notice Estimate the minimum reward required for posting a data request with a callback. - /// @param _callbackGasLimit Maximum gas to be spent when reporting the data request result. - function estimateBaseFeeWithCallback(uint256, uint24 _callbackGasLimit) + /// @param _callbackGas Maximum gas to be spent when reporting the data request result. + function estimateBaseFeeWithCallback(uint256, uint24 _callbackGas) public view virtual override returns (uint256) { - return WitOracleBase.estimateBaseFeeWithCallback(1, _callbackGasLimit); + return WitOracleBase.estimateBaseFeeWithCallback(1, _callbackGas); } } diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index da49794e..40e2ecaf 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -18,8 +18,8 @@ library WitOracleDataLib { using Witnet for Witnet.Beacon; using Witnet for Witnet.QueryReport; - using Witnet for Witnet.QueryResponseReport; - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.DataPullReport; + using Witnet for Witnet.QuerySLA; using WitnetCBOR for WitnetCBOR.CBOR; @@ -29,13 +29,19 @@ library WitOracleDataLib { struct Storage { uint256 nonce; - mapping (uint => Witnet.Query) queries; + mapping (Witnet.QueryId => Witnet.Query) queries; mapping (address => bool) reporters; + mapping (address => mapping (Witnet.QueryCapability => Committee)) committees; mapping (address => Escrowable.Escrow) escrows; mapping (uint256 => Witnet.Beacon) beacons; uint256 lastKnownBeaconIndex; } + struct Committee { + bytes32 hash; + Witnet.QueryCapabilityMember[] members; + } + // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- @@ -53,36 +59,44 @@ library WitOracleDataLib { } } - function queryHashOf(Storage storage self, uint256 queryId) - internal view returns (bytes32) - { - Witnet.Query storage __query = self.queries[queryId]; - return keccak256(abi.encode( - channel(), - queryId, - blockhash(__query.block), - __query.request.radonRadHash != bytes32(0) - ? __query.request.radonRadHash - : keccak256(bytes(__query.request.radonBytecode)), - __query.request.radonSLA - )); + function hashify(Witnet.QuerySLA memory querySLA, address evmRequester) internal view returns (bytes32) { + return ( + Witnet.QueryCapability.unwrap(querySLA.witCapability) == 0 + ? querySLA.hashify() + : keccak256(abi.encode( + querySLA.hashify(), + data().committees[evmRequester][querySLA.witCapability].hash + ) + ) + ); } /// Gets query storage by query id. - function seekQuery(uint256 queryId) internal view returns (Witnet.Query storage) { + function seekQuery(Witnet.QueryId queryId) internal view returns (Witnet.Query storage) { return data().queries[queryId]; } /// Gets the Witnet.QueryRequest part of a given query. - function seekQueryRequest(uint256 queryId) internal view returns (Witnet.QueryRequest storage) { + function seekQueryRequest(Witnet.QueryId queryId) internal view returns (Witnet.QueryRequest storage) { return data().queries[queryId].request; } /// Gets the Witnet.Result part of a given query. - function seekQueryResponse(uint256 queryId) internal view returns (Witnet.QueryResponse storage) { + function seekQueryResponse(Witnet.QueryId queryId) internal view returns (Witnet.QueryResponse storage) { return data().queries[queryId].response; } + function settle(Committee storage self, Witnet.QueryCapabilityMember[] calldata members) internal returns (bytes32 hash) { + if (members.length > 0) { + hash = keccak256(abi.encodePacked(members)); + self.hash = hash; + self.members = members; + } else { + delete self.members; + self.hash = bytes32(0); + } + } + /// ======================================================================= /// --- Escrowable -------------------------------------------------------- @@ -169,9 +183,9 @@ library WitOracleDataLib { /// ======================================================================= /// --- IWitOracle -------------------------------------------------------- - function fetchQueryResponse(uint256 queryId) public returns ( + function fetchQueryResponse(Witnet.QueryId queryId) public returns ( Witnet.QueryResponse memory _queryResponse, - uint72 _queryEvmExpiredReward + Witnet.QueryReward _queryEvmExpiredReward ) { Witnet.Query storage __query = seekQuery(queryId); @@ -179,10 +193,8 @@ library WitOracleDataLib { msg.sender == __query.request.requester, "not the requester" ); - - _queryEvmExpiredReward = __query.request.evmReward; - __query.request.evmReward = 0; - + _queryEvmExpiredReward = __query.reward; + __query.reward = Witnet.QueryReward.wrap(0); Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); if ( _queryStatus != Witnet.QueryStatus.Expired @@ -193,13 +205,12 @@ library WitOracleDataLib { toString(_queryStatus) ))); } - _queryResponse = __query.response; delete data().queries[queryId]; } function fetchQueryResponseTrustlessly( - uint256 queryId, + Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake ) @@ -211,12 +222,12 @@ library WitOracleDataLib { "not the requester" ); - uint72 _evmReward = __query.request.evmReward; - __query.request.evmReward = 0; + Witnet.QueryReward _evmReward = __query.reward; + __query.reward = Witnet.QueryReward.wrap(0); Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly(queryId, evmQueryAwaitingBlocks); if (_queryStatus == Witnet.QueryStatus.Expired) { - if (_evmReward > 0) { + if (Witnet.QueryReward.unwrap(_evmReward) > 0) { if (__query.response.disputer != address(0)) { // transfer reporter's stake to the disputer slash( @@ -244,12 +255,12 @@ library WitOracleDataLib { delete data().queries[queryId]; // transfer unused reward to requester: - if (_evmReward > 0) { - deposit(msg.sender, _evmReward); + if (Witnet.QueryReward.unwrap(_evmReward) > 0) { + deposit(msg.sender, Witnet.QueryReward.unwrap(_evmReward)); } } - function getQueryStatus(uint256 queryId) public view returns (Witnet.QueryStatus) { + function getQueryStatus(Witnet.QueryId queryId) public view returns (Witnet.QueryStatus) { Witnet.Query storage __query = seekQuery(queryId); if (__query.response.resultTimestamp != 0) { return Witnet.QueryStatus.Finalized; @@ -263,7 +274,7 @@ library WitOracleDataLib { } function getQueryStatusTrustlessly( - uint256 queryId, + Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks ) public view returns (Witnet.QueryStatus) @@ -271,7 +282,7 @@ library WitOracleDataLib { Witnet.Query storage __query = seekQuery(queryId); if (__query.response.resultTimestamp != 0) { - if (block.number >= __query.response.finality) { + if (block.number >= Witnet.QueryBlock.unwrap(__query.checkpoint)) { if (__query.response.disputer != address(0)) { return Witnet.QueryStatus.Expired; @@ -286,21 +297,24 @@ library WitOracleDataLib { return Witnet.QueryStatus.Reported; } } - } else if (__query.block == 0) { - return Witnet.QueryStatus.Unknown; - - } else if (block.number > __query.block + evmQueryAwaitingBlocks * 2) { - return Witnet.QueryStatus.Expired; - - } else if (block.number > __query.block + evmQueryAwaitingBlocks) { - return Witnet.QueryStatus.Delayed; - } else { - return Witnet.QueryStatus.Posted; + uint256 _checkpoint = Witnet.QueryBlock.unwrap(__query.checkpoint); + if (_checkpoint == 0) { + return Witnet.QueryStatus.Unknown; + + } else if (block.number > _checkpoint + evmQueryAwaitingBlocks * 2) { + return Witnet.QueryStatus.Expired; + + } else if (block.number > _checkpoint + evmQueryAwaitingBlocks) { + return Witnet.QueryStatus.Delayed; + + } else { + return Witnet.QueryStatus.Posted; + } } } - function getQueryResponseStatus(uint256 queryId) public view returns (Witnet.QueryResponseStatus) { + function getQueryResponseStatus(Witnet.QueryId queryId) public view returns (Witnet.QueryResponseStatus) { Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); if (_queryStatus == Witnet.QueryStatus.Finalized) { @@ -329,7 +343,7 @@ library WitOracleDataLib { } function getQueryResponseStatusTrustlessly( - uint256 queryId, + Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks ) public view returns (Witnet.QueryResponseStatus) @@ -433,44 +447,40 @@ library WitOracleDataLib { public returns (uint256 evmReward) { // read requester address and whether a callback was requested: - Witnet.QueryRequest storage __request = seekQueryRequest(queryId); + Witnet.Query storage __query = seekQuery(Witnet.QueryId.wrap(queryId)); // read query EVM reward: - evmReward = __request.evmReward; + evmReward = Witnet.QueryReward.unwrap(__query.reward); // set EVM reward right now as to avoid re-entrancy attacks: - __request.evmReward = 0; + __query.reward = Witnet.QueryReward.wrap(0); // determine whether a callback is required - if (__request.gasCallback > 0) { - ( - uint256 evmCallbackActualGas, - bool evmCallbackSuccess, - string memory evmCallbackRevertMessage - ) = __reportResultCallback( - __request.requester, - __request.gasCallback, + if (__query.request.callbackGas > 0) { + (uint256 _evmCallbackActualGas, bool _evmCallbackSuccess, string memory _evmCallbackRevertMessage) = __reportResultCallback( + __query.request.requester, + __query.request.callbackGas, evmFinalityBlock, queryId, witDrResultTimestamp, witDrTxHash, witDrResultCborBytes ); - if (evmCallbackSuccess) { + if (_evmCallbackSuccess) { // => the callback run successfully emit IWitOracleEvents.WitOracleQueryReponseDelivered( queryId, evmGasPrice, - evmCallbackActualGas + _evmCallbackActualGas ); } else { // => the callback reverted emit IWitOracleEvents.WitOracleQueryResponseDeliveryFailed( queryId, evmGasPrice, - evmCallbackActualGas, - bytes(evmCallbackRevertMessage).length > 0 - ? evmCallbackRevertMessage + _evmCallbackActualGas, + bytes(_evmCallbackRevertMessage).length > 0 + ? _evmCallbackRevertMessage : "WitOracleDataLib: callback exceeded gas limit", witDrResultCborBytes ); @@ -504,7 +514,7 @@ library WitOracleDataLib { } function __reportResultCallback( - address evmRequester, + address requester, uint24 evmCallbackGasLimit, uint64 evmFinalityBlock, uint256 queryId, @@ -523,7 +533,7 @@ library WitOracleDataLib { WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(witDrResultCborBytes).readArray(); if (_errors.length < 2) { // try to report result with unknown error: - try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( + try IWitOracleConsumer(requester).reportWitOracleResultError{gas: evmCallbackGasLimit}( queryId, witDrResultTimestamp, witDrTxHash, @@ -545,7 +555,7 @@ library WitOracleDataLib { } } else { // try to report result with parsable error: - try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( + try IWitOracleConsumer(requester).reportWitOracleResultError{gas: evmCallbackGasLimit}( queryId, witDrResultTimestamp, witDrTxHash, @@ -561,7 +571,7 @@ library WitOracleDataLib { } } else { // try to report result result with no error : - try IWitOracleConsumer(evmRequester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( + try IWitOracleConsumer(requester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( queryId, witDrResultTimestamp, witDrTxHash, @@ -588,19 +598,20 @@ library WitOracleDataLib { bytes memory witDrResultCborBytes ) private { - seekQuery(queryId).response = Witnet.QueryResponse({ + Witnet.Query storage __query = seekQuery(Witnet.QueryId.wrap(queryId)); + __query.checkpoint = Witnet.QueryBlock.wrap(evmFinalityBlock); + __query.response = Witnet.QueryResponse({ reporter: evmReporter, - finality: evmFinalityBlock, resultTimestamp: witDrResultTimestamp, resultDrTxHash: witDrTxHash, resultCborBytes: witDrResultCborBytes, - disputer: address(0) + disputer: address(0), _0: 0 }); } /// ======================================================================= - /// --- IWitOracleReporterTrustless --------------------------------------- + /// --- IWitOracleTrustlessReporter --------------------------------------- function extractQueryRelayData( WitOracleRadonRegistry registry, @@ -624,27 +635,27 @@ library WitOracleDataLib { } function claimQueryReward( - uint256 queryId, + Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake ) - public returns (uint256 evmReward) + public returns (uint256 _evmReward) { Witnet.Query storage __query = seekQuery(queryId); - evmReward = __query.request.evmReward; - __query.request.evmReward = 0; + _evmReward = Witnet.QueryReward.unwrap(__query.reward); + __query.reward = Witnet.QueryReward.wrap(0); // revert if already claimed: require( - evmReward > 0, + _evmReward > 0, "already claimed" ); // deposit query's reward into the caller's balance (if proven to be legitimate): deposit( msg.sender, - evmReward + _evmReward ); Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( @@ -681,7 +692,7 @@ library WitOracleDataLib { msg.sender, evmQueryReportingStake ); - evmReward += evmQueryReportingStake; + _evmReward += evmQueryReportingStake; } else { // only the requester can claim, @@ -700,7 +711,7 @@ library WitOracleDataLib { } function disputeQueryResponse( - uint256 queryId, + Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake ) @@ -717,30 +728,30 @@ library WitOracleDataLib { evmQueryReportingStake ); Witnet.Query storage __query = seekQuery(queryId); + __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number + evmQueryAwaitingBlocks)); __query.response.disputer = msg.sender; - __query.response.finality = uint64(block.number + evmQueryAwaitingBlocks); emit IWitOracleEvents.WitOracleQueryResponseDispute( - queryId, + Witnet.QueryId.unwrap(queryId), msg.sender ); return ( - __query.request.evmReward + Witnet.QueryReward.unwrap(__query.reward) + evmQueryReportingStake ); } function reportQueryResponseTrustlessly( - Witnet.QueryResponseReport calldata responseReport, + Witnet.DataPullReport calldata responseReport, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake ) public returns (uint256) { - (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( + (bool _isValidDataPullReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( responseReport ); require( - _isValidQueryResponseReport, + _isValidDataPullReport, _queryResponseReportInvalidError ); @@ -775,7 +786,7 @@ library WitOracleDataLib { _queryReporter, tx.gasprice, uint64(block.number + evmQueryAwaitingBlocks), - responseReport.queryId, + Witnet.QueryId.unwrap(responseReport.queryId), Witnet.determineTimestampFromEpoch(responseReport.witDrResultEpoch), responseReport.witDrTxHash, responseReport.witDrResultCborBytes @@ -784,7 +795,7 @@ library WitOracleDataLib { function rollupQueryResponseProof( Witnet.FastForward[] calldata witOracleRollup, - Witnet.QueryResponseReport calldata responseReport, + Witnet.DataPullReport calldata responseReport, bytes32[] calldata ddrTalliesMerkleTrie, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake @@ -792,10 +803,10 @@ library WitOracleDataLib { public returns (uint256 evmTotalReward) { // validate query response report - (bool _isValidQueryResponseReport, string memory _queryResponseReportInvalidError) = isValidQueryResponseReport( + (bool _isValidDataPullReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( responseReport ); - require(_isValidQueryResponseReport, _queryResponseReportInvalidError); + require(_isValidDataPullReport, _queryResponseReportInvalidError); // validate rollup proofs Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); @@ -843,7 +854,7 @@ library WitOracleDataLib { ); // transfer query's reward into caller's balance - deposit(msg.sender, __query.request.evmReward); + deposit(msg.sender, Witnet.QueryReward.unwrap(__query.reward)); // update query's response data into storage: __query.response.reporter = msg.sender; @@ -874,7 +885,7 @@ library WitOracleDataLib { ); // transfer query's reward into reporter's balance: - deposit(__query.response.reporter, __query.request.evmReward); + deposit(__query.response.reporter, Witnet.QueryReward.unwrap(__query.reward)); // clear query's disputer __query.response.disputer = address(0); @@ -887,9 +898,9 @@ library WitOracleDataLib { } // finalize query: - evmTotalReward = __query.request.evmReward + evmQueryReportingStake; - __query.request.evmReward = 0; // no claimQueryReward(.) will be required (nor accepted whatsoever) - __query.response.finality = uint64(block.number); // set query status to Finalized + evmTotalReward = Witnet.QueryReward.unwrap(__query.reward) + evmQueryReportingStake; + __query.reward = Witnet.QueryReward.wrap(0); // no claimQueryReward(.) will be required (nor accepted whatsoever) + __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number)); // set query status to Finalized } } @@ -936,12 +947,15 @@ library WitOracleDataLib { /// ======================================================================= /// --- Other public helper methods --------------------------------------- - function isValidQueryResponseReport(Witnet.QueryResponseReport calldata report) + function isValidDataPullReport(Witnet.DataPullReport calldata report) public view // todo: turn into private returns (bool, string memory) { - if (queryHashOf(data(), report.queryId) != report.queryHash) { + if ( + Witnet.QueryHash.unwrap(report.queryHash) + != Witnet.QueryHash.unwrap(seekQuery(report.queryId).hash) + ) { return (false, "invalid query hash"); } else if (report.witDrResultEpoch == 0) { @@ -1008,153 +1022,27 @@ library WitOracleDataLib { /// ======================================================================= /// --- Private library methods ------------------------------------------- - // function __reportQueryResponse( - // address evmReporter, - // uint256 evmGasPrice, - // uint64 evmFinalityBlock, - // Witnet.QueryResponseReport calldata report - // ) - // private returns (uint256 evmReward) - // { - // // read requester address and whether a callback was requested: - // Witnet.QueryRequest storage __request = seekQueryRequest(report.queryId); - - // // read query EVM reward: - // evmReward = __request.evmReward; + function _isValidDataPullReport(Witnet.DataPullReport calldata report) + private view + returns (bool, string memory) + { + if ( + Witnet.QueryHash.unwrap(report.queryHash) + != Witnet.QueryHash.unwrap(seekQuery(report.queryId).hash) + ) { + return (false, "invalid query hash"); - // // set EVM reward right now as to avoid re-entrancy attacks: - // __request.evmReward = 0; - - // // determine whether a callback is required - // if (__request.gasCallback > 0) { - // ( - // uint256 evmCallbackActualGas, - // bool evmCallbackSuccess, - // string memory evmCallbackRevertMessage - // ) = __reportQueryResponseCallback( - // __request.requester, - // __request.gasCallback, - // evmFinalityBlock, - // report - // ); - // if (evmCallbackSuccess) { - // // => the callback run successfully - // emit IWitOracleEvents.WitOracleQueryReponseDelivered( - // report.queryId, - // evmGasPrice, - // evmCallbackActualGas - // ); - // } else { - // // => the callback reverted - // emit IWitOracleEvents.WitOracleQueryResponseDeliveryFailed( - // report.queryId, - // evmGasPrice, - // evmCallbackActualGas, - // bytes(evmCallbackRevertMessage).length > 0 - // ? evmCallbackRevertMessage - // : "WitOracleDataLib: callback exceeded gas limit", - // report.witDrResultCborBytes - // ); - // } - // // upon delivery, successfull or not, the audit trail is saved into storage, - // // but not the actual result which was intended to be passed over to the requester: - // saveQueryResponse( - // evmReporter, - // evmFinalityBlock, - // report.queryId, - // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - // report.witDrTxHash, - // hex"" - // ); - // } else { - // // => no callback is involved - // emit IWitOracleEvents.WitOracleQueryResponse( - // report.queryId, - // evmGasPrice - // ); - // // write query result and audit trail data into storage - // saveQueryResponse( - // evmReporter, - // evmFinalityBlock, - // report.queryId, - // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - // report.witDrTxHash, - // report.witDrResultCborBytes - // ); - // } - // } - - // function __reportQueryResponseCallback( - // address evmRequester, - // uint24 evmCallbackGasLimit, - // uint64 evmFinalityBlock, - // Witnet.QueryResponseReport calldata report - // ) - // private returns ( - // uint256 evmCallbackActualGas, - // bool evmCallbackSuccess, - // string memory evmCallbackRevertMessage - // ) - // { - // evmCallbackActualGas = gasleft(); - // if (report.witDrResultCborBytes[0] == bytes1(0xd8)) { - // WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(report.witDrResultCborBytes).readArray(); - // if (_errors.length < 2) { - // // try to report result with unknown error: - // try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - // report.queryId, - // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - // report.witDrTxHash, - // evmFinalityBlock, - // Witnet.ResultErrorCodes.Unknown, - // WitnetCBOR.CBOR({ - // buffer: WitnetBuffer.Buffer({ data: hex"", cursor: 0}), - // initialByte: 0, - // majorType: 0, - // additionalInformation: 0, - // len: 0, - // tag: 0 - // }) - // ) { - // evmCallbackSuccess = true; - // } catch Error(string memory err) { - // evmCallbackRevertMessage = err; - // } - - // } else { - // // try to report result with parsable error: - // try IWitOracleConsumer(evmRequester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - // report.queryId, - // Witnet.determineEpochFromTimestamp(report.witDrResultEpoch), - // report.witDrTxHash, - // evmFinalityBlock, - // Witnet.ResultErrorCodes(_errors[0].readUint()), - // _errors[0] - // ) { - // evmCallbackSuccess = true; - // } catch Error(string memory err) { - // evmCallbackRevertMessage = err; - // } - // } + } else if (report.witDrResultEpoch == 0) { + return (false, "invalid result epoch"); - // } else { - // // try to report result result with no error : - // try IWitOracleConsumer(evmRequester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( - // report.queryId, - // Witnet.determineTimestampFromEpoch(report.witDrResultEpoch), - // report.witDrTxHash, - // evmFinalityBlock, - // WitnetCBOR.fromBytes(report.witDrResultCborBytes) - // ) { - // evmCallbackSuccess = true; - - // } catch Error(string memory err) { - // evmCallbackRevertMessage = err; - - // } catch (bytes memory) {} - // } - // evmCallbackActualGas -= gasleft(); - // } + } else if (report.witDrResultCborBytes.length == 0) { + return (false, "invalid empty result"); + + } else { + return (true, new string(0)); + + } + } function _verifyFastForwards(Witnet.FastForward[] calldata ff) private pure diff --git a/contracts/data/WitPriceFeedsData.sol b/contracts/data/WitPriceFeedsData.sol index 0d8e2d33..2d8587be 100644 --- a/contracts/data/WitPriceFeedsData.sol +++ b/contracts/data/WitPriceFeedsData.sol @@ -2,6 +2,8 @@ pragma solidity >=0.8.0 <0.9.0; +import "../libs/Witnet.sol"; + /// @title WitFeeds data model. /// @author The Witnet Foundation. abstract contract WitPriceFeedsData { @@ -20,8 +22,8 @@ abstract contract WitPriceFeedsData { string caption; uint8 decimals; uint256 index; - uint256 lastValidQueryId; - uint256 latestUpdateQueryId; + Witnet.QueryId lastValidQueryId; + Witnet.QueryId latestUpdateQueryId; bytes32 radHash; address solver; // logic contract address for reducing values on routed feeds. int256 solverReductor; // as to reduce resulting number of decimals on routed feeds. diff --git a/contracts/interfaces/IWitFeeds.sol b/contracts/interfaces/IWitFeeds.sol index 2b190fa0..4ab1f168 100644 --- a/contracts/interfaces/IWitFeeds.sol +++ b/contracts/interfaces/IWitFeeds.sol @@ -16,7 +16,7 @@ interface IWitFeeds { /// Default SLA data security parameters that will be fulfilled on Witnet upon /// every feed update, if no others are specified by the requester. - function defaultRadonSLA() external view returns (Witnet.RadonSLA memory); + function defaultRadonSLA() external view returns (Witnet.QuerySLA memory); /// Estimates the minimum EVM fee required to be paid upon requesting a data /// update with the given the _evmGasPrice value. @@ -34,14 +34,14 @@ interface IWitFeeds { /// Returns the query id (in the context of the WitOracle addressed by witOracle()) /// that solved the most recently updated value for the given feed. - function lastValidQueryId(bytes4 feedId) external view returns (uint256); + function lastValidQueryId(bytes4 feedId) external view returns (Witnet.QueryId); /// Returns the actual response from the Witnet oracle blockchain to the last /// successful update for the given data feed. function lastValidQueryResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory); /// Returns the Witnet query id of the latest update attempt for the given data feed. - function latestUpdateQueryId(bytes4 feedId) external view returns (uint256); + function latestUpdateQueryId(bytes4 feedId) external view returns (Witnet.QueryId); /// Returns the actual request queried to the the Witnet oracle blockchain on the latest /// update attempt for the given data feed. @@ -78,7 +78,7 @@ interface IWitFeeds { /// Triggers a fresh update for the given data feed, requiring also the SLA data security parameters /// that will have to be fulfilled on Witnet. - function requestUpdate(bytes4 feedId, Witnet.RadonSLA calldata updateSLA) external payable returns (uint256 usedFunds); + function requestUpdate(bytes4 feedId, Witnet.QuerySLA calldata updateSLA) external payable returns (uint256 usedFunds); /// Returns the list of feed ERC-2362 ids, captions and RAD hashes of all currently supported /// data feeds. The RAD hash of a data feed determines in a verifiable way the actual data sources diff --git a/contracts/interfaces/IWitFeedsAdmin.sol b/contracts/interfaces/IWitFeedsAdmin.sol index c0892a30..4f013abe 100644 --- a/contracts/interfaces/IWitFeedsAdmin.sol +++ b/contracts/interfaces/IWitFeedsAdmin.sol @@ -12,7 +12,7 @@ interface IWitFeedsAdmin { event WitnetFeedDeleted(bytes4 feedId); event WitnetFeedSettled(bytes4 feedId, bytes32 radHash); event WitnetFeedSolverSettled(bytes4 feedId, address solver); - event WitnetRadonSLA(Witnet.RadonSLA sla); + event WitnetRadonSLA(Witnet.QuerySLA sla); function acceptOwnership() external; function baseFeeOverheadPercentage() external view returns (uint16); @@ -21,7 +21,7 @@ interface IWitFeedsAdmin { function owner() external view returns (address); function pendingOwner() external returns (address); function settleBaseFeeOverheadPercentage(uint16) external; - function settleDefaultRadonSLA(Witnet.RadonSLA calldata) external; + function settleDefaultRadonSLA(Witnet.QuerySLA calldata) external; function settleFeedRequest(string calldata caption, bytes32 radHash) external; function settleFeedRequest(string calldata caption, WitOracleRequest request) external; function settleFeedRequest(string calldata caption, WitOracleRequestTemplate template, string[][] calldata) external; diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index 97df5216..cae435c8 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -6,8 +6,8 @@ import "../libs/Witnet.sol"; interface IWitFeedsLegacy { struct RadonSLA { - uint8 witNumWitnesses; - uint64 witUnitaryReward; + uint8 witCommitteeCapacity; + uint64 witCommitteeUnitaryReward; } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); function latestUpdateResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory); diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index f1f55030..bcd28438 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -17,8 +17,8 @@ interface IWitOracle { /// @notice Estimate the minimum reward required for posting a data request with a callback. /// @param evmGasPrice Expected gas price to pay upon posting the data request. - /// @param callbackGasLimit Maximum gas to be spent when reporting the data request result. - function estimateBaseFeeWithCallback(uint256 evmGasPrice, uint24 callbackGasLimit) external view returns (uint256); + /// @param callbackGas Maximum gas to be spent when reporting the data request result. + function estimateBaseFeeWithCallback(uint256 evmGasPrice, uint24 callbackGas) external view returns (uint256); /// @notice Estimate the extra reward (i.e. over the base fee) to be paid when posting a new /// @notice data query in order to avoid getting provable "too low incentives" results from @@ -27,7 +27,7 @@ interface IWitOracle { /// @param evmGasPrice Tentative EVM gas price at the moment the query result is ready. /// @param evmWitPrice Tentative nanoWit price in Wei at the moment the query is solved on the Wit/oracle blockchain. /// @param querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. - function estimateExtraFee(uint256 evmGasPrice, uint256 evmWitPrice, Witnet.RadonSLA calldata querySLA) external view returns (uint256); + function estimateExtraFee(uint256 evmGasPrice, uint256 evmWitPrice, Witnet.QuerySLA calldata querySLA) external view returns (uint256); // /// @notice Returns the address of the WitOracleRequestFactory appliance capable of building compliant data request // /// @notice templates verified into the same WitOracleRadonRegistry instance returned by registry(). @@ -38,21 +38,19 @@ interface IWitOracle { /// @dev Fails if the query was not in 'Reported' status, or called from an address different to /// @dev the one that actually posted the given request. /// @param queryId The unique query identifier. - function fetchQueryResponse(uint256 queryId) external returns (Witnet.QueryResponse memory); + function fetchQueryResponse(Witnet.QueryId queryId) external returns (Witnet.QueryResponse memory); /// @notice Gets the whole Query data contents, if any, no matter its current status. - function getQuery(uint256 queryId) external view returns (Witnet.Query memory); + function getQuery(Witnet.QueryId queryId) external view returns (Witnet.Query memory); /// @notice Gets the current EVM reward the report can claim, if not done yet. - function getQueryEvmReward(uint256 queryId) external view returns (uint256); + function getQueryEvmReward(Witnet.QueryId) external view returns (Witnet.QueryReward); /// @notice Retrieves the RAD hash and SLA parameters of the given query. - /// @param queryId The unique query identifier. - function getQueryRequest(uint256 queryId) external view returns (Witnet.QueryRequest memory); + function getQueryRequest(Witnet.QueryId) external view returns (Witnet.QueryRequest memory); /// @notice Retrieves the whole `Witnet.QueryResponse` record referred to a previously posted Witnet Data Request. - /// @param queryId The unique query identifier. - function getQueryResponse(uint256 queryId) external view returns (Witnet.QueryResponse memory); + function getQueryResponse(Witnet.QueryId) external view returns (Witnet.QueryResponse memory); /// @notice Returns query's result current status from a requester's point of view: /// @notice - 0 => Void: the query is either non-existent or deleted; @@ -61,27 +59,24 @@ interface IWitOracle { /// @notice - 3 => Error: the query response was finalized, and contains a result with errors. /// @notice - 4 => Finalizing: some result to the query has been reported, but cannot yet be considered finalized. /// @notice - 5 => Delivered: at least one response, either successful or with errors, was delivered to the requesting contract. - /// @param queryId The unique query identifier. - function getQueryResponseStatus(uint256 queryId) external view returns (Witnet.QueryResponseStatus); - function getQueryResponseStatusTag(uint256 queryId) external view returns (string memory); + function getQueryResponseStatus(Witnet.QueryId) external view returns (Witnet.QueryResponseStatus); + function getQueryResponseStatusTag(Witnet.QueryId) external view returns (string memory); /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. - /// @param queryId The unique query identifier. - function getQueryResultCborBytes(uint256 queryId) external view returns (bytes memory); + function getQueryResultCborBytes(Witnet.QueryId) external view returns (bytes memory); /// @notice Gets error code identifying some possible failure on the resolution of the given query. - /// @param queryId The unique query identifier. - function getQueryResultError(uint256 queryId) external view returns (Witnet.ResultError memory); + function getQueryResultError(Witnet.QueryId) external view returns (Witnet.ResultError memory); /// @notice Gets current status of given query. - function getQueryStatus(uint256 queryId) external view returns (Witnet.QueryStatus); - function getQueryStatusTag(uint256 queryId) external view returns (string memory); + function getQueryStatus(Witnet.QueryId) external view returns (Witnet.QueryStatus); + function getQueryStatusTag(Witnet.QueryId) external view returns (string memory); /// @notice Get current status of all given query ids. - function getQueryStatusBatch(uint256[] calldata queryIds) external view returns (Witnet.QueryStatus[] memory); + function getQueryStatusBatch(Witnet.QueryId[] calldata) external view returns (Witnet.QueryStatus[] memory); /// @notice Returns next query id to be generated by the Witnet Request Board. - function getNextQueryId() external view returns (uint256); + function getNextQueryId() external view returns (Witnet.QueryId); /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be @@ -157,8 +152,11 @@ interface IWitOracle { /// @notice calling postRequest(bytes32,..) methods. function registry() external view returns (WitOracleRadonRegistry); - /// @notice Increments the reward of a previously posted request by adding the transaction value to it. - /// @param queryId The unique query identifier. - function upgradeQueryEvmReward(uint256 queryId) external payable; + /// @notice Enables data requesters to settle the actual validators in the Wit/oracle + /// @notice sidechain that will be entitled to solve data requests requiring to + /// @notice support some given `Wit2.Capability`. + function settleMyOwnCapableCommittee(Witnet.QueryCapability, Witnet.QueryCapabilityMember[] calldata) external; + /// @notice Increments the reward of a previously posted request by adding the transaction value to it. + function upgradeQueryEvmReward(Witnet.QueryId) external payable; } diff --git a/contracts/interfaces/IWitOracleEvents.sol b/contracts/interfaces/IWitOracleEvents.sol index 0800c2a8..354b6fe7 100644 --- a/contracts/interfaces/IWitOracleEvents.sol +++ b/contracts/interfaces/IWitOracleEvents.sol @@ -4,30 +4,36 @@ pragma solidity >=0.7.0 <0.9.0; import "../libs/Witnet.sol"; interface IWitOracleEvents { + + event WitOracleCommittee( + address indexed evmSubscriber, + Witnet.QueryCapability indexed witCapability, + Witnet.QueryCapabilityMember[] witCapabilityMembers + ); /// Emitted every time a new query containing some verified data request is posted to the WitOracle. event WitOracleQuery( - address evmRequester, + address requester, uint256 evmGasPrice, uint256 evmReward, uint256 queryId, bytes32 queryRadHash, - Witnet.RadonSLA querySLA + Witnet.QuerySLA querySLA ); /// Emitted every time a new query containing some unverified data request bytecode is posted to the WRB. event WitOracleQuery( - address evmRequester, + address requester, uint256 evmGasPrice, uint256 evmReward, uint256 queryId, bytes queryBytecode, - Witnet.RadonSLA querySLA + Witnet.QuerySLA querySLA ); event WitOracleQueryResponseDispute( uint256 queryId, - address evmDisputer + address evmResponseDisputer ); /// Emitted when the reward of some not-yet reported query gets upgraded. diff --git a/contracts/interfaces/IWitOracleLegacy.sol b/contracts/interfaces/IWitOracleLegacy.sol index 06b93965..916d5150 100644 --- a/contracts/interfaces/IWitOracleLegacy.sol +++ b/contracts/interfaces/IWitOracleLegacy.sol @@ -18,8 +18,8 @@ interface IWitOracleLegacy { function estimateBaseFee(uint256 gasPrice, bytes32 radHash) external view returns (uint256); struct RadonSLA { - uint8 witNumWitnesses; - uint64 witUnitaryReward; + uint8 witCommitteeCapacity; + uint64 witCommitteeUnitaryReward; } function postRequest(bytes32, RadonSLA calldata) external payable returns (uint256); function postRequestWithCallback(bytes32, RadonSLA calldata, uint24) external payable returns (uint256); diff --git a/contracts/interfaces/IWitOracleRadonRegistry.sol b/contracts/interfaces/IWitOracleRadonRegistry.sol index 0ebbc09a..d8286ab2 100644 --- a/contracts/interfaces/IWitOracleRadonRegistry.sol +++ b/contracts/interfaces/IWitOracleRadonRegistry.sol @@ -13,14 +13,14 @@ interface IWitOracleRadonRegistry { /// made out of the given Radon Request and Radon SLA security parameters. function bytecodeOf( bytes32 radHash, - Witnet.RadonSLA calldata sla + Witnet.QuerySLA calldata sla ) external view returns (bytes memory); /// Returns the Witnet-compliant DRO bytecode for some data request object /// made out of the given RAD bytecode and Radon SLA security parameters. function bytecodeOf( bytes calldata radBytecode, - Witnet.RadonSLA calldata sla + Witnet.QuerySLA calldata sla ) external view returns (bytes memory); /// Returns the hash of the given Witnet-compliant bytecode. Returned value diff --git a/contracts/interfaces/IWitRandomness.sol b/contracts/interfaces/IWitRandomness.sol index 0eebf1c7..6aca2b42 100644 --- a/contracts/interfaces/IWitRandomness.sol +++ b/contracts/interfaces/IWitRandomness.sol @@ -34,12 +34,10 @@ interface IWitRandomness { /// @return witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. /// @return resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. /// @return resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. - /// @return witnetResultFinalityBlock EVM block number from which the provided randomness can be considered to be final. function fetchRandomnessAfterProof(uint256 blockNumber) external view returns ( bytes32 witnetResultRandomness, uint64 resultTimestamp, - bytes32 resultDrTxHash, - uint256 witnetResultFinalityBlock + bytes32 resultDrTxHash ); /// @notice Returns last block number on which a randomize was requested. @@ -100,13 +98,13 @@ interface IWitRandomness { /// @dev Unused funds will be transferred back to the `msg.sender`. /// @dev Passed SLA security parameters must be equal or greater than `witOracleDefaultQuerySLA()`. /// @return Funds actually paid as randomize fee. - function randomize(Witnet.RadonSLA calldata) external payable returns (uint256); + function randomize(Witnet.QuerySLA calldata) external payable returns (uint256); /// @notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill /// @notice when solving randomness requests: /// @notice - number of witnessing nodes contributing to randomness generation /// @notice - reward in $nanoWIT received per witnessing node in the Witnet blockchain - function witOracleDefaultQuerySLA() external view returns (Witnet.RadonSLA memory); + function witOracleDefaultQuerySLA() external view returns (Witnet.QuerySLA memory); /// @notice Returns the unique identifier of the Witnet-compliant data request being used for solving randomness. function witOracleQueryRadHash() external view returns (bytes32); diff --git a/contracts/interfaces/IWitRandomnessAdmin.sol b/contracts/interfaces/IWitRandomnessAdmin.sol index ecfcfa8e..be045eb9 100644 --- a/contracts/interfaces/IWitRandomnessAdmin.sol +++ b/contracts/interfaces/IWitRandomnessAdmin.sol @@ -11,5 +11,5 @@ interface IWitRandomnessAdmin { function pendingOwner() external returns (address); function transferOwnership(address) external; function settleBaseFeeOverheadPercentage(uint16) external; - function settleDefaultQuerySLA(Witnet.RadonSLA calldata) external; + function settleDefaultQuerySLA(Witnet.QuerySLA calldata) external; } \ No newline at end of file diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 34d6caf2..0d9374a2 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -27,6 +27,10 @@ library Witnet { uint32 constant internal WIT_2_SECS_PER_EPOCH = 20; // TBD uint32 constant internal WIT_2_FAST_FORWARD_COMMITTEE_SIZE = 64; // TBD + function channel(address wrb) internal view returns (bytes4) { + return bytes4(keccak256(abi.encode(address(wrb), block.chainid))); + } + struct Beacon { uint32 index; uint32 prevIndex; @@ -35,58 +39,68 @@ library Witnet { bytes16 droTalliesMerkleRoot; uint256[4] nextCommitteeAggPubkey; } - + + struct DataPullReport { + QueryId queryId; + QueryHash queryHash; // KECCAK256(channel | blockhash(block.number - 1) | ...) + bytes witDrRelayerSignature; // ECDSA.signature(queryHash) + uint32 witDrResultEpoch; + bytes witDrResultCborBytes; + bytes32 witDrTxHash; + } struct FastForward { Beacon beacon; uint256[2] committeeAggSignature; uint256[4][] committeeMissingPubkeys; } + type QueryCapability is bytes20; + type QueryCapabilityMember is bytes4; + type QueryBlock is uint64; + type QueryHash is bytes15; + type QueryId is uint256; + type QueryReward is uint72; /// Struct containing both request and response data related to every query posted to the Witnet Request Board struct Query { - QueryRequest request; + QueryRequest request; QueryResponse response; - uint256 block; + QuerySLA slaParams; // Minimum Service-Level parameters to be committed by the Witnet blockchain. + QueryBlock checkpoint; + QueryHash hash; // Unique query hash determined by payload, WRB instance, chain id and EVM's previous block hash. + QueryReward reward; // EVM amount in wei eventually to be paid to the legit result reporter. + } + + /// Possible status of a Witnet query. + enum QueryStatus { + Unknown, + Posted, + Reported, + Finalized, + Delayed, + Expired, + Disputed + } + } /// Data kept in EVM-storage for every Request posted to the Witnet Request Board. struct QueryRequest { address requester; // EVM address from which the request was posted. - uint24 gasCallback; // Max callback gas limit upon response, if a callback is required. - uint72 evmReward; // EVM amount in wei eventually to be paid to the legit result reporter. + uint24 callbackGas; uint72 _0; // Max callback gas limit upon response, if a callback is required. bytes radonBytecode; // Optional: Witnet Data Request bytecode to be solved by the Witnet blockchain. bytes32 radonRadHash; // Optional: Previously verified hash of the Witnet Data Request to be solved. - RadonSLA radonSLA; // Minimum Service-Level parameters to be committed by the Witnet blockchain. } /// QueryResponse metadata and result as resolved by the Witnet blockchain. struct QueryResponse { - address reporter; // EVM address from which the Data Request result was reported. - uint64 finality; // EVM block number at which the reported data will be considered to be finalized. + address reporter; uint64 _0; // EVM address from which the Data Request result was reported. uint32 resultTimestamp; // Unix timestamp (seconds) at which the data request was resolved in the Witnet blockchain. bytes32 resultDrTxHash; // Unique hash of the commit/reveal act in the Witnet blockchain that resolved the data request. bytes resultCborBytes; // CBOR-encode result to the request, as resolved in the Witnet blockchain. address disputer; } - struct QueryResponseReport { - uint256 queryId; - bytes32 queryHash; // KECCAK256(channel | queryId | blockhash(query.block) | ...) - bytes witDrRelayerSignature; // ECDSA.signature(queryHash) - bytes32 witDrTxHash; - uint32 witDrResultEpoch; - bytes witDrResultCborBytes; - } - - struct QueryReport { - bytes32 witDrRadHash; - RadonSLA witDrSLA; - bytes32 witDrTxHash; - uint32 witDrResultEpoch; - bytes witDrResultCborBytes; - } - /// QueryResponse status from a requester's point of view. enum QueryResponseStatus { Void, @@ -98,15 +112,13 @@ library Witnet { Expired } - /// Possible status of a Witnet query. - enum QueryStatus { - Unknown, - Posted, - Reported, - Finalized, - Delayed, - Expired, - Disputed + /// Structure containing all possible SLA security parameters of Wit/2.1 Data Requests + struct QuerySLA { + uint16 witResultMaxSize; // max size permitted to whatever query result may come from the wit/oracle blockchain. + uint16 witCommitteeCapacity; // max number of eligibile witnesses in the wit/oracle blockchain for solving some query. + uint64 witCommitteeUnitaryReward; // unitary reward in nanowits for true witnesses and validators in the wit/oracle blockchain. + QueryCapability witCapability; // optional: identifies some pre-established capability-compliant commitee required for solving the query. + } } /// Data struct containing the Witnet-provided result to a Data Request. @@ -401,18 +413,8 @@ library Witnet { /* 4 */ HttpHead } - struct RadonSLA { - /// Number of witnessing nodes in the Wit/oracle blockchain that will contribute to solve some data request. - uint8 witNumWitnesses; - - /// Reward in $nanoWit ultimately paid to every earnest node in the Wit/oracle blockchain contributing to solve some data request. - uint64 witUnitaryReward; + /// Structure containing all possible SLA security parameters of a Witnet-compliant Data Request. - /// Maximum size accepted for the CBOR-encoded buffer containing successfull result values. - uint16 maxTallyResultSize; - } - - /// Structure containing the SLA security parameters of a Witnet-compliant Data Request. struct RadonSLAv1 { uint8 numWitnesses; uint8 minConsensusPercentage; @@ -467,10 +469,40 @@ library Witnet { /// =============================================================================================================== - /// --- Query*Report helper methods ------------------------------------------------------------------------ + /// --- Query* helper methods ------------------------------------------------------------------------------------- + + function hashify(QueryHash hash) internal pure returns (bytes32) { + return keccak256(abi.encode(QueryHash.unwrap(hash))); + } + + function hashify(QueryId _queryId, bytes32 _radHash, bytes32 _slaHash) internal view returns (Witnet.QueryHash) { + return Witnet.QueryHash.wrap(bytes15( + keccak256(abi.encode( + channel(address(this)), + blockhash(block.number - 1), + _queryId, _radHash, _slaHash + )) + )); + } + + function hashify(QuerySLA memory querySLA) internal pure returns (bytes32) { + return keccak256(abi.encodePacked( + querySLA.witResultMaxSize, + querySLA.witCommitteeCapacity, + querySLA.witCommitteeUnitaryReward, + querySLA.witCapability + )); + } + + + /// =============================================================================================================== + /// --- *Report helper methods ------------------------------------------------------------------------------------ - function queryRelayer(QueryResponseReport calldata self) internal pure returns (address) { - return recoverAddr(self.witDrRelayerSignature, self.queryHash); + function queryRelayer(DataPullReport calldata self) internal pure returns (address) { + return recoverAddr( + self.witDrRelayerSignature, + hashify(self.queryHash) + ); } function tallyHash(QueryResponseReport calldata self) internal pure returns (bytes32) { @@ -686,41 +718,40 @@ library Witnet { ); } - - /// =============================================================================================================== - /// --- 'RadonSLA' helper methods -------------------------------------------------------------------------- - function equalOrGreaterThan(RadonSLA memory a, RadonSLA memory b) - internal pure returns (bool) - { + /// ======================================================================================================== + /// --- 'QuerySLA' helper methods -------------------------------------------------------------------------- + + function equalOrGreaterThan(QuerySLA calldata self, QuerySLA storage stored) internal view returns (bool) { return ( - a.witNumWitnesses >= b.witNumWitnesses - && a.witUnitaryReward >= b.witUnitaryReward - && a.maxTallyResultSize <= b.maxTallyResultSize + QueryCapability.unwrap(self.witCapability) == QueryCapability.unwrap(stored.witCapability) + && self.witCommitteeCapacity >= stored.witCommitteeCapacity + && self.witCommitteeUnitaryReward >= stored.witCommitteeUnitaryReward + && self.witResultMaxSize <= stored.witResultMaxSize ); } - - function isValid(RadonSLA memory sla) internal pure returns (bool) { + + function isValid(QuerySLA memory self) internal pure returns (bool) { return ( - sla.witUnitaryReward > 0 - && sla.witNumWitnesses > 0 && sla.witNumWitnesses <= 127 - && sla.maxTallyResultSize > 0 + self.witResultMaxSize > 0 + && self.witCommitteeUnitaryReward > 0 + && self.witCommitteeCapacity > 0 + && (QueryCapability.unwrap(self.witCapability) != 0 || self.witCommitteeCapacity <= 127) ); } - function toV1(RadonSLA memory self) internal pure returns (RadonSLAv1 memory) { + function toV1(QuerySLA calldata self) internal pure returns (RadonSLAv1 memory) { return RadonSLAv1({ - numWitnesses: self.witNumWitnesses, - minConsensusPercentage: 51, - witnessReward: self.witUnitaryReward, - witnessCollateral: self.witUnitaryReward * 100, - minerCommitRevealFee: self.witUnitaryReward / self.witNumWitnesses + numWitnesses: uint8(self.witCommitteeCapacity), + minConsensusPercentage: 66, + witnessReward: self.witCommitteeUnitaryReward, + witnessCollateral: self.witCommitteeUnitaryReward * 100, + minerCommitRevealFee: self.witCommitteeUnitaryReward / self.witCommitteeCapacity }); } - /// Sum of all rewards in $nanoWit to be paid to nodes in the Wit/oracle blockchain that contribute to solve some data query. - function witTotalReward(RadonSLA storage self) internal view returns (uint64) { - return self.witUnitaryReward / (self.witNumWitnesses + 3); + function witTotalReward(QuerySLA storage self) internal view returns (uint64) { + return self.witCommitteeUnitaryReward / (self.witCommitteeCapacity + 3); } diff --git a/contracts/mockups/UsingWitOracle.sol b/contracts/mockups/UsingWitOracle.sol index 7690799c..c39044ed 100644 --- a/contracts/mockups/UsingWitOracle.sol +++ b/contracts/mockups/UsingWitOracle.sol @@ -26,15 +26,15 @@ abstract contract UsingWitOracle /// @notice Default SLA data security parameters to be fulfilled by the Wit/oracle blockchain /// @notice when solving a data request. - function witOracleDefaultQuerySLA() virtual public view returns (Witnet.RadonSLA memory) { + function witOracleDefaultQuerySLA() virtual public view returns (Witnet.QuerySLA memory) { return __witOracleDefaultQuerySLA; } - Witnet.RadonSLA internal __witOracleDefaultQuerySLA; + Witnet.QuerySLA internal __witOracleDefaultQuerySLA; /// @dev Provides a convenient way for client contracts extending this to block the execution of the main logic of the /// @dev contract until a particular request has been successfully solved and reported from the Wit/oracle blockchain, /// @dev either with an error or successfully. - modifier witOracleQuerySolved(uint256 _queryId) { + modifier witOracleQuerySolved(Witnet.QueryId _queryId) { require(_witOracleCheckQueryResultAvailability(_queryId), "UsingWitOracle: unsolved query"); _; } @@ -48,10 +48,11 @@ abstract contract UsingWitOracle ), "UsingWitOracle: uncompliant WitOracle" ); __witOracle = _witOracle; - __witOracleDefaultQuerySLA = Witnet.RadonSLA({ - witNumWitnesses: 10, // defaults to 10 witnesses - witUnitaryReward: 2 * 10 ** 8, // defaults to 0.2 witcoins - maxTallyResultSize: 32 // defaults to 32 bytes + __witOracleDefaultQuerySLA = Witnet.QuerySLA({ + witCommitteeCapacity: 10, // defaults to 10 witnesses + witCommitteeUnitaryReward: 2 * 10 ** 8, // defaults to 0.2 witcoins + witResultMaxSize: 32, // defaults to 32 bytes + witCapability: Witnet.QueryCapability.wrap(0) }); __witOracleBaseFeeOverheadPercentage = 33; // defaults to 33% @@ -59,7 +60,7 @@ abstract contract UsingWitOracle /// @dev Check if given query was already reported back from the Wit/oracle blockchain. /// @param _id The unique identifier of a previously posted data request. - function _witOracleCheckQueryResultAvailability(uint256 _id) + function _witOracleCheckQueryResultAvailability(Witnet.QueryId _id) internal view returns (bool) { @@ -67,7 +68,7 @@ abstract contract UsingWitOracle } /// @dev Returns a struct describing the resulting error from some given query id. - function _witOracleCheckQueryResultError(uint256 _queryId) + function _witOracleCheckQueryResultError(Witnet.QueryId _queryId) internal view returns (Witnet.ResultError memory) { @@ -75,7 +76,7 @@ abstract contract UsingWitOracle } /// @dev Return current response status to some given gquery id. - function _witOracleCheckQueryResponseStatus(uint256 _queryId) + function _witOracleCheckQueryResponseStatus(Witnet.QueryId _queryId) internal view returns (Witnet.QueryResponseStatus) { diff --git a/contracts/mockups/UsingWitOracleRequest.sol b/contracts/mockups/UsingWitOracleRequest.sol index aa042bfc..99dd4f9a 100644 --- a/contracts/mockups/UsingWitOracleRequest.sol +++ b/contracts/mockups/UsingWitOracleRequest.sol @@ -38,7 +38,7 @@ abstract contract UsingWitOracleRequest function __witOraclePostQuery( uint256 _queryEvmReward ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { return __witOraclePostQuery( _queryEvmReward, @@ -52,11 +52,11 @@ abstract contract UsingWitOracleRequest /// @param _querySLA The required SLA data security params for the Wit/oracle blockchain to accomplish. function __witOraclePostQuery( uint256 _queryEvmReward, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { - return __witOracle.postQuery{ + return __witOracle.pullData{ value: _queryEvmReward }( __witOracleRequestRadHash, diff --git a/contracts/mockups/UsingWitOracleRequestTemplate.sol b/contracts/mockups/UsingWitOracleRequestTemplate.sol index 8188c8d2..716bfe23 100644 --- a/contracts/mockups/UsingWitOracleRequestTemplate.sol +++ b/contracts/mockups/UsingWitOracleRequestTemplate.sol @@ -49,7 +49,7 @@ abstract contract UsingWitOracleRequestTemplate uint256 _queryEvmReward, bytes32 _queryRadHash ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { return __witOraclePostQuery( _queryEvmReward, @@ -66,11 +66,11 @@ abstract contract UsingWitOracleRequestTemplate function __witOraclePostQuery( uint256 _queryEvmReward, bytes32 _queryRadHash, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { - return __witOracle.postQuery{ + return __witOracle.pullData{ value: _queryEvmReward }( _queryRadHash, @@ -89,7 +89,7 @@ abstract contract UsingWitOracleRequestTemplate string[][] memory _witOracleRequestArgs, uint256 _queryEvmReward ) - virtual internal returns (bytes32, uint256) + virtual internal returns (bytes32, Witnet.QueryId) { return __witOraclePostQuery( _witOracleRequestArgs, @@ -109,11 +109,11 @@ abstract contract UsingWitOracleRequestTemplate function __witOraclePostQuery( string[][] memory _witOracleRequestArgs, uint256 _queryEvmReward, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) virtual internal returns ( bytes32 _queryRadHash, - uint256 _queryId + Witnet.QueryId _queryId ) { _queryRadHash = __witOracleVerifyRadonRequest(_witOracleRequestArgs); diff --git a/contracts/mockups/WitOracleConsumer.sol b/contracts/mockups/WitOracleConsumer.sol index 5b15bcfe..dccad1d8 100644 --- a/contracts/mockups/WitOracleConsumer.sol +++ b/contracts/mockups/WitOracleConsumer.sol @@ -17,9 +17,9 @@ abstract contract WitOracleConsumer _; } - /// @param _callbackGasLimit Maximum gas to be spent by the IWitOracleConsumer's callback methods. - constructor (uint24 _callbackGasLimit) { - __witOracleCallbackGasLimit = _callbackGasLimit; + /// @param _callbackGas Maximum gas to be spent by the IWitOracleConsumer's callback methods. + constructor (uint24 _callbackGas) { + __witOracleCallbackGasLimit = _callbackGas; } diff --git a/contracts/mockups/WitOracleRandomnessConsumer.sol b/contracts/mockups/WitOracleRandomnessConsumer.sol index 0e655780..95057421 100644 --- a/contracts/mockups/WitOracleRandomnessConsumer.sol +++ b/contracts/mockups/WitOracleRandomnessConsumer.sol @@ -12,21 +12,21 @@ abstract contract WitOracleRandomnessConsumer { using Witnet for bytes; using Witnet for bytes32; - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; using WitnetCBOR for WitnetCBOR.CBOR; bytes32 internal immutable __witOracleRandomnessRadHash; /// @param _witOracle Address of the WitOracle contract. /// @param _baseFeeOverheadPercentage Percentage over base fee to pay as on every data request. - /// @param _callbackGasLimit Maximum gas to be spent by the IWitOracleConsumer's callback methods. + /// @param _callbackGas Maximum gas to be spent by the IWitOracleConsumer's callback methods. constructor( WitOracle _witOracle, uint16 _baseFeeOverheadPercentage, - uint24 _callbackGasLimit + uint24 _callbackGas ) UsingWitOracle(_witOracle) - WitOracleConsumer(_callbackGasLimit) + WitOracleConsumer(_callbackGas) { // On-chain building of the Witnet Randomness Request: { @@ -53,7 +53,7 @@ abstract contract WitOracleRandomnessConsumer ); } __witOracleBaseFeeOverheadPercentage = _baseFeeOverheadPercentage; - __witOracleDefaultQuerySLA.maxTallyResultSize = 34; + __witOracleDefaultQuerySLA.witResultMaxSize = 34; } /// @dev Pure P-RNG generator returning uniformly distributed `_range` values based on @@ -85,7 +85,7 @@ abstract contract WitOracleRandomnessConsumer function __witOracleRandomize( uint256 _queryEvmReward ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { return __witOracleRandomize( _queryEvmReward, @@ -98,16 +98,19 @@ abstract contract WitOracleRandomnessConsumer /// @dev on the given `_querySLA` data security parameters. function __witOracleRandomize( uint256 _queryEvmReward, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) - virtual internal returns (uint256) + virtual internal returns (Witnet.QueryId) { - return __witOracle.postQueryWithCallback{ + return __witOracle.pullData{ value: _queryEvmReward }( __witOracleRandomnessRadHash, _querySLA, - __witOracleCallbackGasLimit + Witnet.QueryCallback({ + consumer: address(this), + gasLimit: __witOracleCallbackGasLimit + }) ); } } diff --git a/contracts/mockups/WitOracleRequestConsumer.sol b/contracts/mockups/WitOracleRequestConsumer.sol index 6a71aeee..a5375874 100644 --- a/contracts/mockups/WitOracleRequestConsumer.sol +++ b/contracts/mockups/WitOracleRequestConsumer.sol @@ -14,14 +14,14 @@ abstract contract WitOracleRequestConsumer /// @param _witOracleRequest Address of the WitOracleRequest contract containing the actual data request. /// @param _baseFeeOverheadPercentage Percentage over base fee to pay as on every data request. - /// @param _callbackGasLimit Maximum gas to be spent by the IWitOracleConsumer's callback methods. + /// @param _callbackGas Maximum gas to be spent by the IWitOracleConsumer's callback methods. constructor( WitOracleRequest _witOracleRequest, uint16 _baseFeeOverheadPercentage, - uint24 _callbackGasLimit + uint24 _callbackGas ) UsingWitOracleRequest(_witOracleRequest, _baseFeeOverheadPercentage) - WitOracleConsumer(_callbackGasLimit) + WitOracleConsumer(_callbackGas) {} /// @dev Estimate the minimum reward required for posting a data request (based on given gas price and @@ -41,7 +41,7 @@ abstract contract WitOracleRequestConsumer function __witOraclePostQuery( uint256 _queryEvmReward ) - virtual override internal returns (uint256) + virtual override internal returns (Witnet.QueryId) { return __witOraclePostQuery( _queryEvmReward, @@ -55,16 +55,19 @@ abstract contract WitOracleRequestConsumer /// @param _querySLA The required SLA data security params for the Wit/oracle blockchain to accomplish. function __witOraclePostQuery( uint256 _queryEvmReward, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) - virtual override internal returns (uint256) + virtual override internal returns (Witnet.QueryId) { - return __witOracle.postQueryWithCallback{ + return __witOracle.pullData{ value: _queryEvmReward }( __witOracleRequestRadHash, _querySLA, - __witOracleCallbackGasLimit + Witnet.QueryCallback({ + consumer: address(this), + gasLimit: __witOracleCallbackGasLimit + }) ); } } diff --git a/contracts/mockups/WitOracleRequestTemplateConsumer.sol b/contracts/mockups/WitOracleRequestTemplateConsumer.sol index 39625614..dea4dd2b 100644 --- a/contracts/mockups/WitOracleRequestTemplateConsumer.sol +++ b/contracts/mockups/WitOracleRequestTemplateConsumer.sol @@ -14,14 +14,14 @@ abstract contract WitOracleRequestTemplateConsumer /// @param _witOracleRequestTemplate Address of the WitOracleRequestTemplate from which actual data requests will get built. /// @param _baseFeeOverheadPercentage Percentage over base fee to pay as on every data request. - /// @param _callbackGasLimit Maximum gas to be spent by the IWitOracleConsumer's callback methods. + /// @param _callbackGas Maximum gas to be spent by the IWitOracleConsumer's callback methods. constructor( WitOracleRequestTemplate _witOracleRequestTemplate, uint16 _baseFeeOverheadPercentage, - uint24 _callbackGasLimit + uint24 _callbackGas ) UsingWitOracleRequestTemplate(_witOracleRequestTemplate, _baseFeeOverheadPercentage) - WitOracleConsumer(_callbackGasLimit) + WitOracleConsumer(_callbackGas) {} /// @dev Estimate the minimum reward required for posting a data request (based on given gas price and @@ -46,7 +46,7 @@ abstract contract WitOracleRequestTemplateConsumer string[][] memory _witOracleRequestArgs, uint256 _queryEvmReward ) - virtual override internal returns (bytes32, uint256) + virtual override internal returns (bytes32, Witnet.QueryId) { return __witOraclePostQuery( _witOracleRequestArgs, @@ -67,21 +67,24 @@ abstract contract WitOracleRequestTemplateConsumer function __witOraclePostQuery( string[][] memory _witOracleRequestArgs, uint256 _queryEvmReward, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) virtual override internal returns ( bytes32 _queryRadHash, - uint256 _queryId + Witnet.QueryId _queryId ) { _queryRadHash = __witOracleVerifyRadonRequest(_witOracleRequestArgs); - _queryId = __witOracle.postQueryWithCallback{ + _queryId = __witOracle.pullData{ value: _queryEvmReward }( _queryRadHash, _querySLA, - __witOracleCallbackGasLimit + Witnet.QueryCallback({ + consumer: address(this), + gasLimit: __witOracleCallbackGasLimit + }) ); } } From 7bc5412f0336380d8b6e5a7d2f3ca7c7350e9ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Sat, 26 Oct 2024 22:15:16 +0200 Subject: [PATCH 42/62] feat: IWitOracleTrustable.pushData(..) --- .../core/base/WitOracleBaseTrustable.sol | 16 +++++++++++--- contracts/interfaces/IWitOracleTrustable.sol | 11 ++++++++++ ...er.sol => IWitOracleTrustableReporter.sol} | 2 +- contracts/libs/Witnet.sol | 22 +++++++++++++++---- 4 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 contracts/interfaces/IWitOracleTrustable.sol rename contracts/interfaces/{IWitOracleReporter.sol => IWitOracleTrustableReporter.sol} (98%) diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 1f381037..2705fc8c 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -6,7 +6,8 @@ import "./WitOracleBase.sol"; import "../WitnetUpgradableBase.sol"; import "../../interfaces/IWitOracleAdminACLs.sol"; import "../../interfaces/IWitOracleLegacy.sol"; -import "../../interfaces/IWitOracleReporter.sol"; +import "../../interfaces/IWitOracleTrustable.sol"; +import "../../interfaces/IWitOracleTrustableReporter.sol"; /// @title Witnet Request Board "trustable" implementation contract. /// @notice Contract to bridge requests to Witnet Decentralized Oracle Network. @@ -19,9 +20,10 @@ abstract contract WitOracleBaseTrustable WitnetUpgradableBase, IWitOracleAdminACLs, IWitOracleLegacy, - IWitOracleReporter + IWitOracleTrustable, + IWitOracleTrustableReporter { - using Witnet for Witnet.RadonSLA; + using Witnet for Witnet.QuerySLA; /// Asserts the caller is authorized as a reporter modifier onlyReporters virtual { @@ -31,6 +33,14 @@ abstract contract WitOracleBaseTrustable ); _; } + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ^ type(IWitOracleTrustable).interfaceId + ); + } + constructor(bytes32 _versionTag) Ownable(msg.sender) Payable(address(0)) diff --git a/contracts/interfaces/IWitOracleTrustable.sol b/contracts/interfaces/IWitOracleTrustable.sol new file mode 100644 index 00000000..58fa2ca6 --- /dev/null +++ b/contracts/interfaces/IWitOracleTrustable.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0 <0.9.0; + +import "../libs/Witnet.sol"; + +interface IWitOracleTrustable { + + /// @notice Verify the provided report was actually signed by a trustable reporter, + /// @notice reverting if verification fails, or returning the contained data a Witnet.Result value. + function pushData(Witnet.DataPushReport calldata, bytes calldata signature) external returns (Witnet.DataResult memory); +} diff --git a/contracts/interfaces/IWitOracleReporter.sol b/contracts/interfaces/IWitOracleTrustableReporter.sol similarity index 98% rename from contracts/interfaces/IWitOracleReporter.sol rename to contracts/interfaces/IWitOracleTrustableReporter.sol index e8ac839f..d3c63d68 100644 --- a/contracts/interfaces/IWitOracleReporter.sol +++ b/contracts/interfaces/IWitOracleTrustableReporter.sol @@ -6,7 +6,7 @@ import "../libs/Witnet.sol"; /// @title The Witnet Request Board Reporter interface. /// @author The Witnet Foundation. -interface IWitOracleReporter { +interface IWitOracleTrustableReporter { /// @notice Estimates the actual earnings in WEI, that a reporter would get by reporting result to given query, /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 0d9374a2..6b4bbd48 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -48,6 +48,20 @@ library Witnet { bytes witDrResultCborBytes; bytes32 witDrTxHash; } + + struct DataPushReport { + QuerySLA witDrSLA; + bytes32 witDrRadHash; + uint32 witDrResultEpoch; + bytes witDrResultCborBytes; + bytes32 witDrTxHash; + } + + struct DataResult { + RadonDataTypes dataType; + WitnetCBOR.CBOR value; + } + struct FastForward { Beacon beacon; uint256[2] committeeAggSignature; @@ -119,14 +133,14 @@ library Witnet { uint64 witCommitteeUnitaryReward; // unitary reward in nanowits for true witnesses and validators in the wit/oracle blockchain. QueryCapability witCapability; // optional: identifies some pre-established capability-compliant commitee required for solving the query. } - } /// Data struct containing the Witnet-provided result to a Data Request. + // todo: Result -> DataResult struct Result { bool success; // Flag stating whether the request could get solved successfully, or not. WitnetCBOR.CBOR value; // Resulting value, in CBOR-serialized bytes. } - + /// Final query's result status from a requester's point of view. enum ResultStatus { Void, @@ -505,7 +519,7 @@ library Witnet { ); } - function tallyHash(QueryResponseReport calldata self) internal pure returns (bytes32) { + function tallyHash(DataPullReport calldata self) internal pure returns (bytes32) { return keccak256(abi.encode( self.queryHash, self.witDrRelayerSignature, @@ -515,7 +529,7 @@ library Witnet { )); } - function tallyHash(QueryReport calldata self) internal pure returns (bytes32) { + function tallyHash(DataPushReport calldata self) internal pure returns (bytes32) { return keccak256(abi.encode( self.witDrRadHash, self.witDrSLA, From 27dab5a225cd81316ac5df8549680ae4616d6d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Sat, 26 Oct 2024 22:18:40 +0200 Subject: [PATCH 43/62] feat: IWitOracleTrustless.pushData(..) --- .../core/base/WitOracleBaseTrustless.sol | 66 +++++++++-- contracts/data/WitOracleDataLib.sol | 111 +++++++----------- .../IWitOracleReporterTrustless.sol | 48 -------- contracts/interfaces/IWitOracleTrustless.sol | 16 +++ .../IWitOracleTrustlessReporter.sol | 44 +++++++ 5 files changed, 159 insertions(+), 126 deletions(-) delete mode 100644 contracts/interfaces/IWitOracleReporterTrustless.sol create mode 100644 contracts/interfaces/IWitOracleTrustless.sol create mode 100644 contracts/interfaces/IWitOracleTrustlessReporter.sol diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index 78ac801d..18e5b966 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -5,7 +5,8 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitOracleBase.sol"; import "../../interfaces/IWitOracleBlocks.sol"; -import "../../interfaces/IWitOracleReporterTrustless.sol"; +import "../../interfaces/IWitOracleTrustless.sol"; +import "../../interfaces/IWitOracleTrustlessReporter.sol"; import "../../patterns/Escrowable.sol"; /// @title Witnet Request Board "trustless" implementation contract for regular EVM-compatible chains. @@ -18,9 +19,10 @@ abstract contract WitOracleBaseTrustless Escrowable, WitOracleBase, IWitOracleBlocks, - IWitOracleReporterTrustless + IWitOracleTrustless, + IWitOracleTrustlessReporter { - using Witnet for Witnet.QueryResponseReport; + using Witnet for Witnet.DataPullReport; /// @notice Number of blocks to await for either a dispute or a proven response to some query. uint256 immutable public QUERY_AWAITING_BLOCKS; @@ -28,7 +30,7 @@ abstract contract WitOracleBaseTrustless /// @notice Amount in wei to be staked upon reporting or disputing some query. uint256 immutable public QUERY_REPORTING_STAKE; - modifier checkReward(uint256 _msgValue, uint256 _baseFee) virtual override { + modifier checkQueryReward(uint256 _msgValue, uint256 _baseFee) virtual override { if (_msgValue < _baseFee) { __burn(msg.sender, _baseFee - _msgValue); @@ -38,6 +40,15 @@ abstract contract WitOracleBaseTrustless } _; } + function specs() virtual override external pure returns (bytes4) { + return ( + type(IWitAppliance).interfaceId + ^ type(IWitOracle).interfaceId + ^ type(IWitOracleBlocks).interfaceId + ^ type(IWitOracleTrustless).interfaceId + ); + } + constructor( uint256 _queryAwaitingBlocks, uint256 _queryReportingStake @@ -272,7 +283,38 @@ abstract contract WitOracleBaseTrustless // ================================================================================================================ - // --- IWitOracleReporterTrustless -------------------------------------------------------------------------------- + // --- Overrides IWitOracle (trustlessly) ------------------------------------------------------------------------- + + /// @notice Verify the data report was actually produced by the Wit/oracle sidechain, + /// @notice reverting if the verification fails, or returning the self-contained Witnet.Result value. + function pushData( + Witnet.DataPushReport calldata _report, + Witnet.FastForward[] calldata _rollup, + bytes32[] calldata _droMerkleTrie + ) + external returns (Witnet.DataResult memory) + { + try WitOracleDataLib.rollupDataPushReport( + _report, + _rollup, + _droMerkleTrie + + ) returns ( + Witnet.DataResult memory _queryResult + ) { + return _queryResult; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitOracleDataLibUnhandledException(); + } + } + + + // ================================================================================================================ + // --- IWitOracleTrustlessReporter -------------------------------------------------------------------------------- function claimQueryReward(Witnet.QueryId _queryId) virtual override external @@ -324,27 +366,27 @@ abstract contract WitOracleBaseTrustless } } - function extractQueryRelayData(uint256 _queryId) + function extractDataRequest(Witnet.QueryId _queryId) virtual override public view - returns (QueryRelayData memory _queryRelayData) + returns (DataRequest memory _dr) { Witnet.QueryStatus _queryStatus = getQueryStatus(_queryId); if ( _queryStatus == Witnet.QueryStatus.Posted || _queryStatus == Witnet.QueryStatus.Delayed ) { - _queryRelayData = WitOracleDataLib.extractQueryRelayData(registry, _queryId); + _dr = WitOracleDataLib.extractDataRequest(registry, _queryId); } } - function extractQueryRelayDataBatch(uint256[] calldata _queryIds) + function extractDataRequestBatch(Witnet.QueryId[] calldata _queryIds) virtual override external view - returns (QueryRelayData[] memory _relays) + returns (DataRequest[] memory _drs) { - _relays = new QueryRelayData[](_queryIds.length); + _drs = new DataRequest[](_queryIds.length); for (uint _ix = 0; _ix < _queryIds.length; _ix ++) { - _relays[_ix] = extractQueryRelayData(_queryIds[_ix]); + _drs[_ix] = extractDataRequest(_queryIds[_ix]); } } diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 40e2ecaf..3f0f6055 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -7,8 +7,8 @@ import "../interfaces/IWitOracleAdminACLs.sol"; import "../interfaces/IWitOracleBlocks.sol"; import "../interfaces/IWitOracleConsumer.sol"; import "../interfaces/IWitOracleEvents.sol"; -import "../interfaces/IWitOracleReporter.sol"; -import "../interfaces/IWitOracleReporterTrustless.sol"; +import "../interfaces/IWitOracleTrustableReporter.sol"; +import "../interfaces/IWitOracleTrustlessReporter.sol"; import "../libs/Witnet.sol"; import "../patterns/Escrowable.sol"; @@ -17,7 +17,7 @@ import "../patterns/Escrowable.sol"; library WitOracleDataLib { using Witnet for Witnet.Beacon; - using Witnet for Witnet.QueryReport; + using Witnet for Witnet.DataPushReport; using Witnet for Witnet.DataPullReport; using Witnet for Witnet.QuerySLA; @@ -46,11 +46,6 @@ library WitOracleDataLib { // ================================================================================================================ // --- Internal functions ----------------------------------------------------------------------------------------- - /// Unique relay channel identifying the sidechain and request board instance from where data queries are requested. - function channel() internal view returns (bytes4) { - return bytes4(keccak256(abi.encode(address(this), block.chainid))); - } - /// Returns storage pointer to contents of 'WitnetBoardState' struct. function data() internal pure returns (Storage storage _ptr) { @@ -415,8 +410,8 @@ library WitOracleDataLib { } - /// ======================================================================= - /// --- IWitOracleReporter ------------------------------------------------ + /// ================================================================================ + /// --- IWitOracleTrustableReporter ------------------------------------------------ function extractWitnetDataRequests( WitOracleRadonRegistry registry, @@ -427,10 +422,10 @@ library WitOracleDataLib { { bytecodes = new bytes[](queryIds.length); for (uint _ix = 0; _ix < queryIds.length; _ix ++) { - Witnet.QueryRequest storage __request = seekQueryRequest(queryIds[_ix]); - bytecodes[_ix] = (__request.radonRadHash != bytes32(0) - ? registry.bytecodeOf(__request.radonRadHash, __request.radonSLA) - : registry.bytecodeOf(__request.radonBytecode,__request.radonSLA) + Witnet.Query storage __query = seekQuery(Witnet.QueryId.wrap(queryIds[_ix])); + bytecodes[_ix] = (__query.request.radonRadHash != bytes32(0) + ? registry.bytecodeOf(__query.request.radonRadHash, __query.slaParams) + : registry.bytecodeOf(__query.request.radonBytecode, __query.slaParam.toV1()) ); } } @@ -613,24 +608,30 @@ library WitOracleDataLib { /// ======================================================================= /// --- IWitOracleTrustlessReporter --------------------------------------- - function extractQueryRelayData( + function extractDataRequest( WitOracleRadonRegistry registry, - uint256 queryId + Witnet.QueryId queryId ) public view - returns (IWitOracleReporterTrustless.QueryRelayData memory _queryRelayData) + returns (IWitOracleTrustlessReporter.DataRequest memory) { - Witnet.QueryRequest storage __request = seekQueryRequest(queryId); - return IWitOracleReporterTrustless.QueryRelayData({ + Witnet.Query storage __query = seekQuery(queryId); + return IWitOracleTrustlessReporter.DataRequest({ queryId: queryId, - queryEvmBlock: seekQuery(queryId).block, - queryEvmHash: queryHashOf(data(), queryId), - queryEvmReward: __request.evmReward, - queryWitDrBytecodes: (__request.radonRadHash != bytes32(0) - ? registry.bytecodeOf(__request.radonRadHash, __request.radonSLA) - : registry.bytecodeOf(__request.radonBytecode,__request.radonSLA) + queryHash: __query.hash, + queryReward: __query.reward, + radonBytecode: (__query.request.radonRadHash != bytes32(0) + ? registry.bytecodeOf(__query.request.radonRadHash) + : __query.request.radonBytecode ), - queryWitDrSLA: __request.radonSLA + radonSLA: IWitOracleTrustlessReporter.RadonSLAv21({ + params: __query.slaParams, + members: data() + .committees + [__query.request.requester] + [__query.slaParams.witCapability] + .members + }) }); } @@ -904,72 +905,50 @@ library WitOracleDataLib { } } - function rollupQueryResultProof( - Witnet.FastForward[] calldata witOracleRollup, - Witnet.QueryReport calldata queryReport, - bytes32[] calldata droTalliesMerkleTrie + function rollupDataPushReport( + Witnet.DataPushReport calldata report, + Witnet.FastForward[] calldata rollup, + bytes32[] calldata droMerkleTrie ) - public returns (Witnet.Result memory) + public returns (Witnet.DataResult memory) { // validate query report require( - queryReport.witDrRadHash != bytes32(0) - && queryReport.witDrResultCborBytes.length > 0 - && queryReport.witDrResultEpoch > 0 - && queryReport.witDrTxHash != bytes32(0) - && queryReport.witDrSLA.isValid() + report.witDrRadHash != bytes32(0) + && report.witDrResultCborBytes.length > 0 + && report.witDrResultEpoch > 0 + && report.witDrTxHash != bytes32(0) + && report.witDrSLA.isValid() , "invalid query report" ); // validate rollup proofs - Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); + Witnet.Beacon memory _witOracleHead = rollupBeacons(rollup); require( _witOracleHead.index == Witnet.determineBeaconIndexFromEpoch( - queryReport.witDrResultEpoch + report.witDrResultEpoch ) + 1, "misleading head beacon" ); // validate merkle proof require( _witOracleHead.droTalliesMerkleRoot == Witnet.merkleRoot( - droTalliesMerkleTrie, - queryReport.tallyHash() + droMerkleTrie, + report.tallyHash() ), "invalid merkle proof" ); // deserialize result cbor bytes into Witnet.Result - return Witnet.toWitnetResult( - queryReport.witDrResultCborBytes - ); + // todo!!! return Witnet.DataResult instead + // return Witnet.toWitnetResult( + // report.witDrResultCborBytes + // ); } /// ======================================================================= /// --- Other public helper methods --------------------------------------- - function isValidDataPullReport(Witnet.DataPullReport calldata report) - public view - // todo: turn into private - returns (bool, string memory) - { - if ( - Witnet.QueryHash.unwrap(report.queryHash) - != Witnet.QueryHash.unwrap(seekQuery(report.queryId).hash) - ) { - return (false, "invalid query hash"); - - } else if (report.witDrResultEpoch == 0) { - return (false, "invalid result epoch"); - - } else if (report.witDrResultCborBytes.length == 0) { - return (false, "invalid empty result"); - - } else { - return (true, new string(0)); - - } - } - function notInStatusRevertMessage(Witnet.QueryStatus self) public pure returns (string memory) { if (self == Witnet.QueryStatus.Posted) { return "query not in Posted status"; diff --git a/contracts/interfaces/IWitOracleReporterTrustless.sol b/contracts/interfaces/IWitOracleReporterTrustless.sol deleted file mode 100644 index 2a47ea69..00000000 --- a/contracts/interfaces/IWitOracleReporterTrustless.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; - -import "../libs/Witnet.sol"; - -/// @title The Witnet Request Board Reporter trustless interface. -/// @author The Witnet Foundation. -interface IWitOracleReporterTrustless { - - event BatchQueryError(uint256 queryId, string reason); - - function extractQueryRelayData(uint256 queryId) external view returns (QueryRelayData memory); - function extractQueryRelayDataBatch(uint256[] calldata queryIds) external view returns (QueryRelayData[] memory); - struct QueryRelayData { - uint256 queryId; - uint256 queryEvmBlock; - bytes32 queryEvmHash; - uint256 queryEvmReward; - bytes queryWitDrBytecodes; - Witnet.RadonSLA queryWitDrSLA; - } - - function claimQueryReward(uint256 queryId) external returns (uint256); - function claimQueryRewardBatch(uint256[] calldata queryIds) external returns (uint256); - - - function disputeQueryResponse (uint256 queryId) external returns (uint256); - - function reportQueryResponse(Witnet.QueryResponseReport calldata report) external returns (uint256); - function reportQueryResponseBatch(Witnet.QueryResponseReport[] calldata reports) external returns (uint256); - - function rollupQueryResponseProof( - Witnet.FastForward[] calldata witOracleRollup, - Witnet.QueryResponseReport calldata queryResponseReport, - bytes32[] calldata witOracleDdrTalliesProof - ) external returns ( - uint256 evmTotalReward - ); - - function rollupQueryResultProof( - Witnet.FastForward[] calldata witOracleRollup, - Witnet.QueryReport calldata queryReport, - bytes32[] calldata witOracleDroTalliesTrie - ) external returns ( - Witnet.Result memory queryResult - ); -} diff --git a/contracts/interfaces/IWitOracleTrustless.sol b/contracts/interfaces/IWitOracleTrustless.sol new file mode 100644 index 00000000..79bcd881 --- /dev/null +++ b/contracts/interfaces/IWitOracleTrustless.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0 <0.9.0; + +import "../libs/Witnet.sol"; + +interface IWitOracleTrustless { + + /// @notice Verify the data report was actually produced by the Wit/oracle sidechain, + /// @notice reverting if the verification fails, or returning the self-contained Witnet.Result value. + function pushData( + Witnet.DataPushReport calldata report, + Witnet.FastForward[] calldata rollup, + bytes32[] calldata droTalliesTrie + ) + external returns (Witnet.DataResult memory); +} diff --git a/contracts/interfaces/IWitOracleTrustlessReporter.sol b/contracts/interfaces/IWitOracleTrustlessReporter.sol new file mode 100644 index 00000000..5997f7e3 --- /dev/null +++ b/contracts/interfaces/IWitOracleTrustlessReporter.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.7.0 <0.9.0; + +import "../libs/Witnet.sol"; + +/// @title The Witnet Request Board Reporter trustless interface. +/// @author The Witnet Foundation. +interface IWitOracleTrustlessReporter { + + event BatchQueryError(Witnet.QueryId queryId, string reason); + + function extractDataRequest(Witnet.QueryId queryId) external view returns (DataRequest memory); + function extractDataRequestBatch(Witnet.QueryId[] calldata queryIds) external view returns (DataRequest[] memory); + + struct DataRequest { + Witnet.QueryId queryId; + Witnet.QueryHash queryHash; + Witnet.QueryReward queryReward; + bytes radonBytecode; + RadonSLAv21 radonSLA; + } + + struct RadonSLAv21 { + Witnet.QuerySLA params; + Witnet.QueryCapabilityMember[] members; + } + + function claimQueryReward(Witnet.QueryId queryId) external returns (uint256); + function claimQueryRewardBatch(Witnet.QueryId[] calldata queryIds) external returns (uint256); + + function disputeQueryResponse (Witnet.QueryId queryId) external returns (uint256); + + function reportQueryResponse(Witnet.DataPullReport calldata report) external returns (uint256); + function reportQueryResponseBatch(Witnet.DataPullReport[] calldata reports) external returns (uint256); + + function rollupQueryResponseProof( + Witnet.FastForward[] calldata witOracleRollup, + Witnet.DataPullReport calldata queryResponseReport, + bytes32[] calldata witOracleDdrTalliesProof + ) external returns ( + uint256 evmTotalReward + ); +} From 5936855d62875f31e018359410872b26c5e891d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Sat, 26 Oct 2024 22:29:40 +0200 Subject: [PATCH 44/62] refactor: IWitOracle.postQuery* --- contracts/apps/WitPriceFeedsUpgradable.sol | 2 +- contracts/apps/WitRandomnessV21.sol | 2 +- contracts/core/base/WitOracleBase.sol | 154 ++++++------------ .../core/base/WitOracleBaseTrustable.sol | 73 +++++++-- ...cleRequestFactoryUpgradableConfluxCore.sol | 3 - ...tOracleRequestFactoryUpgradableDefault.sol | 3 - .../WitOracleTrustlessUpgradableDefault.sol | 3 +- contracts/data/WitOracleDataLib.sol | 10 +- contracts/interfaces/IWitOracle.sol | 101 ++++-------- contracts/libs/Witnet.sol | 3 + contracts/mockups/UsingWitOracleRequest.sol | 2 +- .../mockups/UsingWitOracleRequestTemplate.sol | 2 +- .../mockups/WitOracleRandomnessConsumer.sol | 2 +- .../mockups/WitOracleRequestConsumer.sol | 2 +- .../WitOracleRequestTemplateConsumer.sol | 2 +- 15 files changed, 153 insertions(+), 211 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 3d4cff03..a26e7596 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -793,7 +793,7 @@ contract WitPriceFeedsUpgradable try witOracle.fetchQueryResponse(_latestId) {} catch {} } // Post update request to the WRB: - _latestId = witOracle.pullData{value: _usedFunds}( + _latestId = witOracle.postQuery{value: _usedFunds}( __feed.radHash, querySLA ); diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index 0064b067..4204376c 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -468,7 +468,7 @@ contract WitRandomnessV21 _evmUsedFunds = msg.value; // Post the Witnet Randomness request: - _queryId = __witOracle.pullData{ + _queryId = __witOracle.postQuery{ value: msg.value }( witOracleQueryRadHash, diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 1996ecdb..2aae87fd 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -34,14 +34,11 @@ abstract contract WitOracleBase uint256 internal immutable __reportResultWithCallbackRevertGasBase; uint256 internal immutable __sstoreFromZeroGas; - modifier checkCallbackRecipient( - IWitOracleConsumer _consumer, - uint24 _evmCallbackGasLimit - ) virtual { + modifier checkQueryCallback(Witnet.QueryCallback memory callback) virtual { _require( - address(_consumer).code.length > 0 - && _consumer.reportableFrom(address(this)) - && _evmCallbackGasLimit > 0, + address(callback.consumer).code.length > 0 + && IWitOracleConsumer(callback.consumer).reportableFrom(address(this)) + && callback.gasLimit > 0, "invalid callback" ); _; } @@ -329,23 +326,24 @@ abstract contract WitOracleBase { return Witnet.QueryId.wrap(__storage().nonce + 1); } + + function postQuery( bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA + Witnet.QuerySLA memory _querySLA ) virtual override public payable - checkReward( + checkQueryReward( _getMsgValue(), estimateBaseFee(_getGasPrice()) ) - checkSLA(_querySLA) - returns (uint256 _queryId) + checkQuerySLA(_querySLA) + returns (Witnet.QueryId _queryId) { _queryId = __postQuery( - _getMsgSender(), - 0, + _getMsgSender(), 0, uint72(_getMsgValue()), - _queryRAD, + _queryRAD, _querySLA ); @@ -354,63 +352,33 @@ abstract contract WitOracleBase _getMsgSender(), _getGasPrice(), _getMsgValue(), - _queryId, - _queryRAD, + Witnet.QueryId.unwrap(_queryId), + _queryRAD, _querySLA ); } - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, an `WitOracleQueryResponseDeliveryFailed` - /// @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; - /// @dev - zero callback gas limit is provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryRAD The RAD hash of the data request to be solved by Witnet. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postQueryWithCallback( + function postQuery( bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit + Witnet.QuerySLA memory _querySLA, + Witnet.QueryCallback memory _queryCallback ) - virtual override public payable - returns (uint256) - { - return postQueryWithCallback( - IWitOracleConsumer(_getMsgSender()), - _queryRAD, - _querySLA, - _queryCallbackGasLimit - ); - } - - function postQueryWithCallback( - IWitOracleConsumer _consumer, - bytes32 _queryRAD, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward( + virtual override + public payable + checkQueryReward( _getMsgValue(), estimateBaseFeeWithCallback( _getGasPrice(), - _queryCallbackGasLimit + _queryCallback.gasLimit ) ) - checkSLA(_querySLA) - returns (uint256 _queryId) + checkQuerySLA(_querySLA) + checkQueryCallback(_queryCallback) + returns (Witnet.QueryId _queryId) { _queryId = __postQuery( - address(_consumer), - _queryCallbackGasLimit, + _queryCallback.consumer, + _queryCallback.gasLimit, uint72(_getMsgValue()), _queryRAD, _querySLA @@ -419,76 +387,46 @@ abstract contract WitOracleBase _getMsgSender(), _getGasPrice(), _getMsgValue(), - _queryId, - _queryRAD, + Witnet.QueryId.unwrap(_queryId), + _queryRAD, _querySLA ); } - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, a `WitOracleQueryResponseDeliveryFailed` - /// @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the provided bytecode is empty; - /// @dev - invalid SLA parameters were provided; - /// @dev - zero callback gas limit is provided; - /// @dev - insufficient value is paid as reward. - /// @param _queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain. - /// @param _querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param _queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - function postQueryWithCallback( - bytes calldata _queryUnverifiedBytecode, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit - ) - virtual override public payable - returns (uint256) - { - return postQueryWithCallback( - IWitOracleConsumer(_getMsgSender()), - _queryUnverifiedBytecode, - _querySLA, - _queryCallbackGasLimit - ); - } - - function postQueryWithCallback( - IWitOracleConsumer _consumer, - bytes calldata _queryUnverifiedBytecode, - Witnet.RadonSLA memory _querySLA, - uint24 _queryCallbackGasLimit + function postQuery( + bytes calldata _queryRAD, + Witnet.QuerySLA memory _querySLA, + Witnet.QueryCallback memory _queryCallback ) - virtual override public payable - checkCallbackRecipient(_consumer, _queryCallbackGasLimit) - checkReward( + virtual override + public payable + checkQueryReward( _getMsgValue(), estimateBaseFeeWithCallback( - _getGasPrice(), - _queryCallbackGasLimit + _getGasPrice(), + _queryCallback.gasLimit ) ) - checkSLA(_querySLA) - returns (uint256 _queryId) + checkQuerySLA(_querySLA) + checkQueryCallback(_queryCallback) + returns (Witnet.QueryId _queryId) { _queryId = __postQuery( - address(_consumer), - _queryCallbackGasLimit, + _queryCallback.consumer, + _queryCallback.gasLimit, uint72(_getMsgValue()), - bytes32(0), + _queryRAD, _querySLA ); - WitOracleDataLib.seekQueryRequest(_queryId).radonBytecode = _queryUnverifiedBytecode; emit WitOracleQuery( _getMsgSender(), _getGasPrice(), _getMsgValue(), - _queryId, - _queryUnverifiedBytecode, + Witnet.QueryId.unwrap(_queryId), + _queryRAD, _querySLA ); + } /// @notice Enables data requesters to settle the actual validators in the Wit/oracle /// @notice sidechain that will be entitled whatsover to solve diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 2705fc8c..dacc4902 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -197,6 +197,19 @@ abstract contract WitOracleBaseTrustable external payable returns (uint256) { + return Witnet.QueryId.unwrap( + postQuery( + _queryRadHash, + Witnet.QuerySLA({ + witCommitteeCapacity: _querySLA.witCommitteeCapacity, + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward, + witResultMaxSize: 32, + witCapability: Witnet.QueryCapability.wrap(0) + }) + ) + ); + } + function __postQuery( address _requester, uint24 _callbackGas, @@ -263,14 +276,20 @@ abstract contract WitOracleBaseTrustable external payable returns (uint256) { - return postQueryWithCallback( - _queryRadHash, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas + return Witnet.QueryId.unwrap( + postQuery( + _queryRadHash, + Witnet.QuerySLA({ + witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward, + witResultMaxSize: 32, + witCapability: Witnet.QueryCapability.wrap(0) + }), + Witnet.QueryCallback({ + consumer: msg.sender, + gasLimit: _queryCallbackGas + }) + ) ); } @@ -283,20 +302,38 @@ abstract contract WitOracleBaseTrustable external payable returns (uint256) { - return postQueryWithCallback( - _queryRadBytecode, - Witnet.RadonSLA({ - witNumWitnesses: _querySLA.witNumWitnesses, - witUnitaryReward: _querySLA.witUnitaryReward, - maxTallyResultSize: 32 - }), - _queryCallbackGas + return Witnet.QueryId.unwrap( + postQuery( + _queryRadBytecode, + Witnet.QuerySLA({ + witCommitteeCapacity: _querySLA.witCommitteeCapacity, + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward, + witResultMaxSize: 32, + witCapability: Witnet.QueryCapability.wrap(0) + }), + Witnet.QueryCallback({ + consumer: msg.sender, + gasLimit: _queryCallbackGas + }) + ) ); } - // ================================================================================================================ - // --- Implements IWitOracleReporter ------------------------------------------------------------------------------ + // ========================================================================================================================= + // --- Implements IWitOracleTrustable -------------------------------------------------------------------------------------- + + function pushData(Witnet.DataPushReport calldata _report, bytes calldata _signature) + virtual override + external + returns (Witnet.DataResult memory) + { + _revert("todo"); + } + + + // ========================================================================================================================= + // --- Implements IWitOracleTrustableReporter ------------------------------------------------------------------------------ /// @notice Estimates the actual earnings (or loss), in WEI, that a reporter would get by reporting result to given query, /// @notice based on the gas price of the calling transaction. Data requesters should consider upgrading the reward on diff --git a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol index 5d34804a..e912a3c9 100644 --- a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol +++ b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableConfluxCore.sol @@ -1,8 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - pragma solidity >=0.8.0 <0.9.0; import "./WitOracleRequestFactoryUpgradableDefault.sol"; diff --git a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol index 9a7ef6c1..7d29b3a9 100644 --- a/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol +++ b/contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol @@ -1,8 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - pragma solidity >=0.8.0 <0.9.0; import "../base/WitOracleRequestFactoryBaseUpgradable.sol"; diff --git a/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol index 3e1f4850..41dd5ea9 100644 --- a/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol +++ b/contracts/core/upgradable/WitOracleTrustlessUpgradableDefault.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../base/WitOracleBaseUpgradable.sol"; diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 3f0f6055..0072e65b 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -425,7 +425,7 @@ library WitOracleDataLib { Witnet.Query storage __query = seekQuery(Witnet.QueryId.wrap(queryIds[_ix])); bytecodes[_ix] = (__query.request.radonRadHash != bytes32(0) ? registry.bytecodeOf(__query.request.radonRadHash, __query.slaParams) - : registry.bytecodeOf(__query.request.radonBytecode, __query.slaParam.toV1()) + : registry.bytecodeOf(__query.request.radonBytecode, __query.slaParams) ); } } @@ -748,11 +748,11 @@ library WitOracleDataLib { ) public returns (uint256) { - (bool _isValidDataPullReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( + (bool _isValidReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( responseReport ); require( - _isValidDataPullReport, + _isValidReport, _queryResponseReportInvalidError ); @@ -804,10 +804,10 @@ library WitOracleDataLib { public returns (uint256 evmTotalReward) { // validate query response report - (bool _isValidDataPullReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( + (bool _isValidReport, string memory _queryResponseReportInvalidError) = _isValidDataPullReport( responseReport ); - require(_isValidDataPullReport, _queryResponseReportInvalidError); + require(_isValidReport, _queryResponseReportInvalidError); // validate rollup proofs Witnet.Beacon memory _witOracleHead = rollupBeacons(witOracleRollup); diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index bcd28438..6431bda1 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -78,74 +78,45 @@ interface IWitOracle { /// @notice Returns next query id to be generated by the Witnet Request Board. function getNextQueryId() external view returns (Witnet.QueryId); - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and - /// @notice solved by the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be - /// @notice transferred to the reporter who relays back the Witnet-provable result to this request. - /// @dev Reasons to fail: - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; + /// @notice Request real world data from the Wit/oracle sidechain. + /// @notice The paid fee is escrowed as a reward for the reporter that eventually relays back + /// @notice a valid query result from the Wit/oracle sidechain. + /// @notice Query results are CBOR-encoded, and can contain either some data, or an error. + /// @dev Reasons to revert: + /// @dev - the data request's RAD hash was not previously verified into the WitOracleRadonRegistry contract; + /// @dev - invalid query SLA parameters were provided; /// @dev - insufficient value is paid as reward. - /// @param queryRadHash The RAD hash of the data request to be solved by Witnet. - /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @return queryId Unique query identifier. - function postQuery( - bytes32 queryRadHash, - Witnet.RadonSLA calldata querySLA - ) external payable returns (uint256 queryId); - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, an `WitOracleQueryResponseDeliveryFailed` - /// @notice will be triggered, and the Witnet audit trail will be saved in storage, but not so the actual CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the RAD hash was not previously verified by the WitOracleRadonRegistry registry; - /// @dev - invalid SLA parameters were provided; + /// @param drRadHash The RAD hash of the data request to be solved by Wit/oracle sidechain. + function postQuery(bytes32 drRadHash, Witnet.QuerySLA calldata) + external payable returns (Witnet.QueryId); + + /// @notice Request real world data from the Wit/oracle sidechain. + /// @notice The paid fee is escrowed as a reward for the reporter that eventually relays back + /// @notice a valid query result from the Wit/oracle sidechain. + /// @notice The Witnet-provable result will be reported directly to the requesting contract. + /// @notice Query results are CBOR-encoded, and can contain either some data, or an error. + /// @dev Reasons to revert: + /// @dev - the data request's RAD hash was not previously verified into the Radon Registry; + /// @dev - invalid query SLA parameters were provided; /// @dev - insufficient value is paid as reward. - /// @param queryRadHash The RAD hash of the data request to be solved by Witnet. - /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - /// @return queryId Unique query identifier. - function postQueryWithCallback( - bytes32 queryRadHash, - Witnet.RadonSLA calldata querySLA, - uint24 queryCallbackGasLimit - ) external payable returns (uint256 queryId); - - function postQueryWithCallback( - IWitOracleConsumer consumer, - bytes32 queryRadHash, - Witnet.RadonSLA calldata querySLA, - uint24 queryCallbackGasLimit - ) external payable returns (uint256 queryId); - - /// @notice Requests the execution of the given Witnet Data Request, in expectation that it will be relayed and solved by - /// @notice the Witnet blockchain. A reward amount is escrowed by the Witnet Request Board that will be transferred to the - /// @notice reporter who relays back the Witnet-provable result to this request. The Witnet-provable result will be reported - /// @notice directly to the requesting contract. If the report callback fails for any reason, a `WitOracleQueryResponseDeliveryFailed` - /// @notice event will be triggered, and the Witnet audit trail will be saved in storage, but not so the CBOR-encoded result. - /// @dev Reasons to fail: - /// @dev - the caller is not a contract implementing the IWitOracleConsumer interface; - /// @dev - the provided bytecode is empty; - /// @dev - invalid SLA parameters were provided; + /// @dev - passed `consumer` is not a contract implementing the IWitOracleConsumer interface; + /// @param drRadHash The RAD hash of the data request to be solved by Wit/oracle sidechain. + function postQuery(bytes32 drRadHash, Witnet.QuerySLA calldata, Witnet.QueryCallback calldata) + external payable returns (Witnet.QueryId); + + /// @notice Request real world data from the Wit/oracle sidechain. + /// @notice The paid fee is escrowed as a reward for the reporter that eventually relays back + /// @notice a valid query result from the Wit/oracle sidechain. + /// @notice The Witnet-provable result will be reported directly to the requesting contract. + /// @notice Query results are CBOR-encoded, and can contain either some data, or an error. + /// @dev Reasons to revert: + /// @dev - the data request's RAD hash was not previously verified into the Radon Registry; + /// @dev - invalid query SLA parameters were provided; /// @dev - insufficient value is paid as reward. - /// @param queryUnverifiedBytecode The (unverified) bytecode containing the actual data request to be solved by the Witnet blockchain. - /// @param querySLA The data query SLA to be fulfilled on the Witnet blockchain. - /// @param queryCallbackGasLimit Maximum gas to be spent when reporting the data request result. - /// @return queryId Unique query identifier. - function postQueryWithCallback( - bytes calldata queryUnverifiedBytecode, - Witnet.RadonSLA calldata querySLA, - uint24 queryCallbackGasLimit - ) external payable returns (uint256 queryId); - - function postQueryWithCallback( - IWitOracleConsumer consumer, - bytes calldata queryUnverifiedBytecode, - Witnet.RadonSLA calldata querySLA, - uint24 queryCallbackGasLimit - ) external payable returns (uint256 queryId); + /// @dev - passed `consumer` is not a contract implementing the IWitOracleConsumer interface; + /// @param drBytecode Encoded witnet-compliant script describing how and where to retrieve data from. + function postQuery(bytes calldata drBytecode, Witnet.QuerySLA calldata, Witnet.QueryCallback calldata) + external payable returns (Witnet.QueryId); /// @notice Returns the singleton WitOracleRadonRegistry in which all Witnet-compliant data requests /// @notice and templates must be previously verified so they can be passed as reference when diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 6b4bbd48..29ae2ac1 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -96,6 +96,9 @@ library Witnet { Disputed } + struct QueryCallback { + address consumer; // consumer contract address to which the query result will be reported + uint24 gasLimit; // expected max amount of gas required by the callback method in the consumer contract } /// Data kept in EVM-storage for every Request posted to the Witnet Request Board. diff --git a/contracts/mockups/UsingWitOracleRequest.sol b/contracts/mockups/UsingWitOracleRequest.sol index 99dd4f9a..945c3343 100644 --- a/contracts/mockups/UsingWitOracleRequest.sol +++ b/contracts/mockups/UsingWitOracleRequest.sol @@ -56,7 +56,7 @@ abstract contract UsingWitOracleRequest ) virtual internal returns (Witnet.QueryId) { - return __witOracle.pullData{ + return __witOracle.postQuery{ value: _queryEvmReward }( __witOracleRequestRadHash, diff --git a/contracts/mockups/UsingWitOracleRequestTemplate.sol b/contracts/mockups/UsingWitOracleRequestTemplate.sol index 716bfe23..915e45a7 100644 --- a/contracts/mockups/UsingWitOracleRequestTemplate.sol +++ b/contracts/mockups/UsingWitOracleRequestTemplate.sol @@ -70,7 +70,7 @@ abstract contract UsingWitOracleRequestTemplate ) virtual internal returns (Witnet.QueryId) { - return __witOracle.pullData{ + return __witOracle.postQuery{ value: _queryEvmReward }( _queryRadHash, diff --git a/contracts/mockups/WitOracleRandomnessConsumer.sol b/contracts/mockups/WitOracleRandomnessConsumer.sol index 95057421..fd0728b0 100644 --- a/contracts/mockups/WitOracleRandomnessConsumer.sol +++ b/contracts/mockups/WitOracleRandomnessConsumer.sol @@ -102,7 +102,7 @@ abstract contract WitOracleRandomnessConsumer ) virtual internal returns (Witnet.QueryId) { - return __witOracle.pullData{ + return __witOracle.postQuery{ value: _queryEvmReward }( __witOracleRandomnessRadHash, diff --git a/contracts/mockups/WitOracleRequestConsumer.sol b/contracts/mockups/WitOracleRequestConsumer.sol index a5375874..1632b96c 100644 --- a/contracts/mockups/WitOracleRequestConsumer.sol +++ b/contracts/mockups/WitOracleRequestConsumer.sol @@ -59,7 +59,7 @@ abstract contract WitOracleRequestConsumer ) virtual override internal returns (Witnet.QueryId) { - return __witOracle.pullData{ + return __witOracle.postQuery{ value: _queryEvmReward }( __witOracleRequestRadHash, diff --git a/contracts/mockups/WitOracleRequestTemplateConsumer.sol b/contracts/mockups/WitOracleRequestTemplateConsumer.sol index dea4dd2b..f30c8373 100644 --- a/contracts/mockups/WitOracleRequestTemplateConsumer.sol +++ b/contracts/mockups/WitOracleRequestTemplateConsumer.sol @@ -76,7 +76,7 @@ abstract contract WitOracleRequestTemplateConsumer ) { _queryRadHash = __witOracleVerifyRadonRequest(_witOracleRequestArgs); - _queryId = __witOracle.pullData{ + _queryId = __witOracle.postQuery{ value: _queryEvmReward }( _queryRadHash, From 027af81c21af80f1f1a46c9cef4377b76802b9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 14:50:21 +0100 Subject: [PATCH 45/62] chore: revisit solidity pragmas --- contracts/WitFeeds.sol | 2 +- contracts/WitOracle.sol | 2 +- contracts/WitOracleRadonRegistry.sol | 3 +-- contracts/WitOracleRequest.sol | 3 +-- contracts/WitOracleRequestFactory.sol | 3 +-- contracts/WitOracleRequestTemplate.sol | 3 +-- contracts/WitPriceFeeds.sol | 4 ++-- contracts/apps/WitPriceFeedsUpgradable.sol | 4 +--- contracts/core/WitnetDeployer.sol | 1 - contracts/core/base/WitOracleBaseTrustless.sol | 1 - contracts/data/WitOracleDataLib.sol | 2 +- contracts/data/WitOracleRequestFactoryData.sol | 3 +-- contracts/interfaces/IWitAppliance.sol | 1 + contracts/interfaces/IWitFeedsAdmin.sol | 2 +- contracts/interfaces/IWitFeedsEvents.sol | 1 - contracts/interfaces/IWitOracle.sol | 4 ++-- contracts/interfaces/IWitOracleAdmin.sol | 2 +- contracts/interfaces/IWitOracleAdminACLs.sol | 2 +- contracts/interfaces/IWitOracleAppliance.sol | 1 + contracts/interfaces/IWitOracleBlocks.sol | 3 +-- contracts/interfaces/IWitOracleConsumer.sol | 1 + contracts/interfaces/IWitOracleEvents.sol | 3 ++- contracts/interfaces/IWitOracleLegacy.sol | 3 ++- contracts/interfaces/IWitOracleRadonRegistry.sol | 1 + contracts/interfaces/IWitOracleRadonRegistryEvents.sol | 2 +- contracts/interfaces/IWitOracleRadonRegistryLegacy.sol | 1 + contracts/interfaces/IWitOracleRequest.sol | 2 +- contracts/interfaces/IWitOracleRequestFactory.sol | 2 +- contracts/interfaces/IWitOracleRequestFactoryEvents.sol | 2 +- contracts/interfaces/IWitOracleRequestTemplate.sol | 2 +- contracts/interfaces/IWitRandomness.sol | 3 +-- contracts/interfaces/IWitRandomnessEvents.sol | 3 +-- contracts/libs/WitPriceFeedsLib.sol | 3 +-- contracts/mockups/UsingWitOracle.sol | 3 +-- contracts/mockups/UsingWitOracleRequest.sol | 1 + contracts/mockups/UsingWitOracleRequestTemplate.sol | 1 + contracts/mockups/UsingWitPriceFeeds.sol | 3 +-- contracts/mockups/UsingWitRandomness.sol | 3 +-- contracts/mockups/WitOracleConsumer.sol | 1 + contracts/mockups/WitOracleRandomnessConsumer.sol | 3 +-- contracts/mockups/WitOracleRequestConsumer.sol | 1 + contracts/mockups/WitOracleRequestTemplateConsumer.sol | 1 + contracts/patterns/Ownable2Step.sol | 1 + contracts/patterns/Payable.sol | 1 + 44 files changed, 45 insertions(+), 49 deletions(-) diff --git a/contracts/WitFeeds.sol b/contracts/WitFeeds.sol index 4039f470..8b2d7adc 100644 --- a/contracts/WitFeeds.sol +++ b/contracts/WitFeeds.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "./interfaces/IWitFeeds.sol"; import "./interfaces/IWitFeedsEvents.sol"; diff --git a/contracts/WitOracle.sol b/contracts/WitOracle.sol index 6b5f64b5..0bcdce0f 100644 --- a/contracts/WitOracle.sol +++ b/contracts/WitOracle.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "./WitOracleRadonRegistry.sol"; import "./WitOracleRequestFactory.sol"; diff --git a/contracts/WitOracleRadonRegistry.sol b/contracts/WitOracleRadonRegistry.sol index b5eb41e3..7fdf4518 100644 --- a/contracts/WitOracleRadonRegistry.sol +++ b/contracts/WitOracleRadonRegistry.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./interfaces/IWitAppliance.sol"; import "./interfaces/IWitOracleRadonRegistry.sol"; diff --git a/contracts/WitOracleRequest.sol b/contracts/WitOracleRequest.sol index 86b97390..70e69e60 100644 --- a/contracts/WitOracleRequest.sol +++ b/contracts/WitOracleRequest.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./interfaces/IWitOracleAppliance.sol"; import "./interfaces/IWitOracleRequest.sol"; diff --git a/contracts/WitOracleRequestFactory.sol b/contracts/WitOracleRequestFactory.sol index 9193089b..9165e83c 100644 --- a/contracts/WitOracleRequestFactory.sol +++ b/contracts/WitOracleRequestFactory.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./interfaces/IWitOracleAppliance.sol"; import "./interfaces/IWitOracleRadonRegistryEvents.sol"; diff --git a/contracts/WitOracleRequestTemplate.sol b/contracts/WitOracleRequestTemplate.sol index e61c034a..6232d0a0 100644 --- a/contracts/WitOracleRequestTemplate.sol +++ b/contracts/WitOracleRequestTemplate.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./interfaces/IWitOracleAppliance.sol"; import "./interfaces/IWitOracleRadonRegistryEvents.sol"; diff --git a/contracts/WitPriceFeeds.sol b/contracts/WitPriceFeeds.sol index a4796d9a..f8124f13 100644 --- a/contracts/WitPriceFeeds.sol +++ b/contracts/WitPriceFeeds.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "./WitFeeds.sol"; import "./interfaces/IWitPriceFeeds.sol"; -/// @title WitPriceFeeds: Price Feeds live repository reliant on the Witnet Oracle blockchain. +/// @title WitPriceFeeds: Price Feeds live repository reliant on the Wit/oracle blockchain. /// @author The Witnet Foundation. abstract contract WitPriceFeeds is diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index a26e7596..2b24f150 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -1,7 +1,5 @@ // SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitPriceFeeds.sol"; import "../core/WitnetUpgradableBase.sol"; diff --git a/contracts/core/WitnetDeployer.sol b/contracts/core/WitnetDeployer.sol index b4fd312f..827298ce 100644 --- a/contracts/core/WitnetDeployer.sol +++ b/contracts/core/WitnetDeployer.sol @@ -3,7 +3,6 @@ pragma solidity >=0.8.0 <0.9.0; import "./WitnetProxy.sol"; - import "../libs/Create3.sol"; /// @notice WitnetDeployer contract used both as CREATE2 (EIP-1014) factory for Witnet artifacts, diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index 18e5b966..b516f574 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -1,4 +1,3 @@ - // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 0072e65b..6243bcfc 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "../WitOracleRadonRegistry.sol"; import "../interfaces/IWitOracleAdminACLs.sol"; diff --git a/contracts/data/WitOracleRequestFactoryData.sol b/contracts/data/WitOracleRequestFactoryData.sol index e34d59d3..07073418 100644 --- a/contracts/data/WitOracleRequestFactoryData.sol +++ b/contracts/data/WitOracleRequestFactoryData.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitOracleRequest.sol"; import "../WitOracleRequestTemplate.sol"; diff --git a/contracts/interfaces/IWitAppliance.sol b/contracts/interfaces/IWitAppliance.sol index 94858c40..333beff7 100644 --- a/contracts/interfaces/IWitAppliance.sol +++ b/contracts/interfaces/IWitAppliance.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; abstract contract IWitAppliance { diff --git a/contracts/interfaces/IWitFeedsAdmin.sol b/contracts/interfaces/IWitFeedsAdmin.sol index 4f013abe..3b292834 100644 --- a/contracts/interfaces/IWitFeedsAdmin.sol +++ b/contracts/interfaces/IWitFeedsAdmin.sol @@ -27,4 +27,4 @@ interface IWitFeedsAdmin { function settleFeedRequest(string calldata caption, WitOracleRequestTemplate template, string[][] calldata) external; function settleFeedSolver (string calldata caption, address solver, string[] calldata deps) external; function transferOwnership(address) external; -} \ No newline at end of file +} diff --git a/contracts/interfaces/IWitFeedsEvents.sol b/contracts/interfaces/IWitFeedsEvents.sol index 5fe7e672..ee98537c 100644 --- a/contracts/interfaces/IWitFeedsEvents.sol +++ b/contracts/interfaces/IWitFeedsEvents.sol @@ -13,5 +13,4 @@ interface IWitFeedsEvents { bytes4 erc2362Id4, uint256 witOracleQueryId ); - } diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index 6431bda1..4e763753 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; + +pragma solidity >=0.8.0 <0.9.0; import "./IWitOracleConsumer.sol"; import "../WitOracleRadonRegistry.sol"; -import "../WitOracleRequestFactory.sol"; interface IWitOracle { diff --git a/contracts/interfaces/IWitOracleAdmin.sol b/contracts/interfaces/IWitOracleAdmin.sol index 0be66a38..6300b099 100644 --- a/contracts/interfaces/IWitOracleAdmin.sol +++ b/contracts/interfaces/IWitOracleAdmin.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; /// @title Witnet Request Board basic administration interface. /// @author The Witnet Foundation. diff --git a/contracts/interfaces/IWitOracleAdminACLs.sol b/contracts/interfaces/IWitOracleAdminACLs.sol index 7c275b3a..d12e4e7a 100644 --- a/contracts/interfaces/IWitOracleAdminACLs.sol +++ b/contracts/interfaces/IWitOracleAdminACLs.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; /// @title Witnet Request Board ACLs administration interface. /// @author The Witnet Foundation. diff --git a/contracts/interfaces/IWitOracleAppliance.sol b/contracts/interfaces/IWitOracleAppliance.sol index 72133bcb..fb9fc174 100644 --- a/contracts/interfaces/IWitOracleAppliance.sol +++ b/contracts/interfaces/IWitOracleAppliance.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "../WitOracle.sol"; diff --git a/contracts/interfaces/IWitOracleBlocks.sol b/contracts/interfaces/IWitOracleBlocks.sol index 5cc5eabb..c5d58c06 100644 --- a/contracts/interfaces/IWitOracleBlocks.sol +++ b/contracts/interfaces/IWitOracleBlocks.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleConsumer.sol b/contracts/interfaces/IWitOracleConsumer.sol index 51b718bd..5fb9d959 100644 --- a/contracts/interfaces/IWitOracleConsumer.sol +++ b/contracts/interfaces/IWitOracleConsumer.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleEvents.sol b/contracts/interfaces/IWitOracleEvents.sol index 354b6fe7..45387ca3 100644 --- a/contracts/interfaces/IWitOracleEvents.sol +++ b/contracts/interfaces/IWitOracleEvents.sol @@ -1,5 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; + +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleLegacy.sol b/contracts/interfaces/IWitOracleLegacy.sol index 916d5150..a7cfdbe6 100644 --- a/contracts/interfaces/IWitOracleLegacy.sol +++ b/contracts/interfaces/IWitOracleLegacy.sol @@ -1,5 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; + +pragma solidity >=0.8.0 <0.9.0; interface IWitOracleLegacy { diff --git a/contracts/interfaces/IWitOracleRadonRegistry.sol b/contracts/interfaces/IWitOracleRadonRegistry.sol index d8286ab2..aab57eaf 100644 --- a/contracts/interfaces/IWitOracleRadonRegistry.sol +++ b/contracts/interfaces/IWitOracleRadonRegistry.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleRadonRegistryEvents.sol b/contracts/interfaces/IWitOracleRadonRegistryEvents.sol index ba8b79ca..856fcb54 100644 --- a/contracts/interfaces/IWitOracleRadonRegistryEvents.sol +++ b/contracts/interfaces/IWitOracleRadonRegistryEvents.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleRadonRegistryLegacy.sol b/contracts/interfaces/IWitOracleRadonRegistryLegacy.sol index ad728faa..4d509fe0 100644 --- a/contracts/interfaces/IWitOracleRadonRegistryLegacy.sol +++ b/contracts/interfaces/IWitOracleRadonRegistryLegacy.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleRequest.sol b/contracts/interfaces/IWitOracleRequest.sol index ef4af9ee..7c4295c5 100644 --- a/contracts/interfaces/IWitOracleRequest.sol +++ b/contracts/interfaces/IWitOracleRequest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleRequestFactory.sol b/contracts/interfaces/IWitOracleRequestFactory.sol index bc4a9d74..5105d3ac 100644 --- a/contracts/interfaces/IWitOracleRequestFactory.sol +++ b/contracts/interfaces/IWitOracleRequestFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "./IWitOracleRequestTemplate.sol"; diff --git a/contracts/interfaces/IWitOracleRequestFactoryEvents.sol b/contracts/interfaces/IWitOracleRequestFactoryEvents.sol index 293882aa..60fc3466 100644 --- a/contracts/interfaces/IWitOracleRequestFactoryEvents.sol +++ b/contracts/interfaces/IWitOracleRequestFactoryEvents.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; interface IWitOracleRequestFactoryEvents { diff --git a/contracts/interfaces/IWitOracleRequestTemplate.sol b/contracts/interfaces/IWitOracleRequestTemplate.sol index 80dc2ff8..4eba1ce4 100644 --- a/contracts/interfaces/IWitOracleRequestTemplate.sol +++ b/contracts/interfaces/IWitOracleRequestTemplate.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "./IWitOracleRequest.sol"; diff --git a/contracts/interfaces/IWitRandomness.sol b/contracts/interfaces/IWitRandomness.sol index 6aca2b42..0a03f598 100644 --- a/contracts/interfaces/IWitRandomness.sol +++ b/contracts/interfaces/IWitRandomness.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitOracle.sol"; diff --git a/contracts/interfaces/IWitRandomnessEvents.sol b/contracts/interfaces/IWitRandomnessEvents.sol index 0e646531..80085da1 100644 --- a/contracts/interfaces/IWitRandomnessEvents.sol +++ b/contracts/interfaces/IWitRandomnessEvents.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/libs/WitPriceFeedsLib.sol b/contracts/libs/WitPriceFeedsLib.sol index 79c7f5c9..59878429 100644 --- a/contracts/libs/WitPriceFeedsLib.sol +++ b/contracts/libs/WitPriceFeedsLib.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../interfaces/IWitPriceFeedsSolver.sol"; import "../interfaces/IWitPriceFeedsSolverFactory.sol"; diff --git a/contracts/mockups/UsingWitOracle.sol b/contracts/mockups/UsingWitOracle.sol index c39044ed..785d5656 100644 --- a/contracts/mockups/UsingWitOracle.sol +++ b/contracts/mockups/UsingWitOracle.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitOracle.sol"; diff --git a/contracts/mockups/UsingWitOracleRequest.sol b/contracts/mockups/UsingWitOracleRequest.sol index 945c3343..5e94e7cb 100644 --- a/contracts/mockups/UsingWitOracleRequest.sol +++ b/contracts/mockups/UsingWitOracleRequest.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./UsingWitOracle.sol"; diff --git a/contracts/mockups/UsingWitOracleRequestTemplate.sol b/contracts/mockups/UsingWitOracleRequestTemplate.sol index 915e45a7..da5ca8d6 100644 --- a/contracts/mockups/UsingWitOracleRequestTemplate.sol +++ b/contracts/mockups/UsingWitOracleRequestTemplate.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./UsingWitOracle.sol"; diff --git a/contracts/mockups/UsingWitPriceFeeds.sol b/contracts/mockups/UsingWitPriceFeeds.sol index d8c6b0ae..1e288847 100644 --- a/contracts/mockups/UsingWitPriceFeeds.sol +++ b/contracts/mockups/UsingWitPriceFeeds.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitPriceFeeds.sol"; diff --git a/contracts/mockups/UsingWitRandomness.sol b/contracts/mockups/UsingWitRandomness.sol index fede0b78..67caa347 100644 --- a/contracts/mockups/UsingWitRandomness.sol +++ b/contracts/mockups/UsingWitRandomness.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "../WitRandomness.sol"; diff --git a/contracts/mockups/WitOracleConsumer.sol b/contracts/mockups/WitOracleConsumer.sol index dccad1d8..f52827dc 100644 --- a/contracts/mockups/WitOracleConsumer.sol +++ b/contracts/mockups/WitOracleConsumer.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./UsingWitOracle.sol"; diff --git a/contracts/mockups/WitOracleRandomnessConsumer.sol b/contracts/mockups/WitOracleRandomnessConsumer.sol index fd0728b0..2134feca 100644 --- a/contracts/mockups/WitOracleRandomnessConsumer.sol +++ b/contracts/mockups/WitOracleRandomnessConsumer.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; +pragma solidity >=0.8.0 <0.9.0; import "./WitOracleConsumer.sol"; import "../WitOracleRequest.sol"; diff --git a/contracts/mockups/WitOracleRequestConsumer.sol b/contracts/mockups/WitOracleRequestConsumer.sol index 1632b96c..62eb0d1f 100644 --- a/contracts/mockups/WitOracleRequestConsumer.sol +++ b/contracts/mockups/WitOracleRequestConsumer.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./UsingWitOracleRequest.sol"; diff --git a/contracts/mockups/WitOracleRequestTemplateConsumer.sol b/contracts/mockups/WitOracleRequestTemplateConsumer.sol index f30c8373..280405fc 100644 --- a/contracts/mockups/WitOracleRequestTemplateConsumer.sol +++ b/contracts/mockups/WitOracleRequestTemplateConsumer.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./UsingWitOracleRequestTemplate.sol"; diff --git a/contracts/patterns/Ownable2Step.sol b/contracts/patterns/Ownable2Step.sol index 9f668154..e208a583 100644 --- a/contracts/patterns/Ownable2Step.sol +++ b/contracts/patterns/Ownable2Step.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity ^0.8.0; import "./Ownable.sol"; diff --git a/contracts/patterns/Payable.sol b/contracts/patterns/Payable.sol index 888418a1..a331b1e5 100644 --- a/contracts/patterns/Payable.sol +++ b/contracts/patterns/Payable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT + pragma solidity >=0.6.0 <0.9.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; From f66d5dbbe75361489a01d0fb396dc0a787833240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 15:14:06 +0100 Subject: [PATCH 46/62] refactor: Witnet.Result* --- contracts/apps/WitPriceFeedsUpgradable.sol | 134 +++--- contracts/apps/WitRandomnessV21.sol | 104 +++-- contracts/core/base/WitOracleBase.sol | 64 +-- .../core/base/WitOracleBaseTrustable.sol | 27 +- .../core/base/WitOracleBaseTrustless.sol | 14 - .../trustable/WitOracleTrustableObscuro.sol | 28 +- contracts/data/WitOracleDataLib.sol | 295 ++++++++----- contracts/interfaces/IWitFeeds.sol | 6 +- contracts/interfaces/IWitFeedsLegacy.sol | 5 +- contracts/interfaces/IWitOracle.sol | 22 +- contracts/interfaces/IWitOracleLegacy.sol | 40 +- contracts/interfaces/IWitPriceFeedsSolver.sol | 8 +- contracts/interfaces/IWitRandomness.sol | 24 +- contracts/libs/Witnet.sol | 404 ++++++++++-------- contracts/libs/WitnetCBOR.sol | 16 +- contracts/mockups/UsingWitOracle.sol | 37 +- 16 files changed, 709 insertions(+), 519 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 2b24f150..abd72b67 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -25,9 +25,11 @@ contract WitPriceFeedsUpgradable IWitPriceFeedsSolverFactory { using Witnet for bytes; + using Witnet for Witnet.DataResult; using Witnet for Witnet.QueryResponse; using Witnet for Witnet.QuerySLA; - using Witnet for Witnet.Result; + using Witnet for Witnet.ResultStatus; + function class() virtual override public view returns (string memory) { return type(WitPriceFeedsUpgradable).name; @@ -258,39 +260,27 @@ contract WitPriceFeedsUpgradable return witOracle.getQueryRequest(latestUpdateQueryId(feedId)); } - function latestUpdateQueryResponse(bytes4 feedId) + function latestUpdateQueryResult(bytes4 feedId) override external view - returns (Witnet.QueryResponse memory) - { - return witOracle.getQueryResponse(latestUpdateQueryId(feedId)); - } - - function latestUpdateResponse(bytes4 feedId) - override external view - returns (Witnet.QueryResponse memory) + returns (Witnet.DataResult memory) { - return witOracle.getQueryResponse(latestUpdateQueryId(feedId)); + return witOracle.getQueryResult(latestUpdateQueryId(feedId)); } - function latestUpdateResultError(bytes4 feedId) - override external view - returns (Witnet.ResultError memory) - { - return witOracle.getQueryResultError(latestUpdateQueryId(feedId)); - } - - function latestUpdateQueryResponseStatus(bytes4 feedId) + function latestUpdateQueryResultStatus(bytes4 feedId) override public view - returns (Witnet.QueryResponseStatus) + returns (Witnet.ResultStatus) { - return _checkQueryResponseStatus(latestUpdateQueryId(feedId)); + return _coalesceQueryResultStatus(latestUpdateQueryId(feedId)); } - function latestUpdateResponseStatus(bytes4 feedId) - override public view - returns (Witnet.QueryResponseStatus) + function latestUpdateQueryResultStatusDescription(bytes4 feedId) + override external view + returns (string memory) { - return latestUpdateQueryResponseStatus(feedId); + return witOracle.getQueryResultStatusDescription( + latestUpdateQueryId(feedId) + ); } function lookupWitOracleRequestBytecode(bytes4 feedId) @@ -305,13 +295,6 @@ contract WitPriceFeedsUpgradable return _registry().bytecodeOf(__record.radHash); } - function lookupWitnetBytecode(bytes4 feedId) - override external view - returns (bytes memory) - { - return lookupWitOracleRequestBytecode(feedId); - } - function lookupWitOracleRequestRadHash(bytes4 feedId) override public view returns (bytes32) @@ -347,7 +330,41 @@ contract WitPriceFeedsUpgradable ); return __requestUpdate(feedId, updateSLA); } + + + /// =============================================================================================================== + /// --- IWitFeedsLegacy ------------------------------------------------------------------------------------------- + + function latestUpdateResponse(bytes4 feedId) + override external view + returns (Witnet.QueryResponse memory) + { + return witOracle.getQueryResponse(latestUpdateQueryId(feedId)); + } + + function latestUpdateResponseStatus(bytes4 feedId) + override public view + returns (IWitOracleLegacy.QueryResponseStatus) + { + return IWitOracleLegacy(address(witOracle)).getQueryResponseStatus( + Witnet.QueryId.unwrap(latestUpdateQueryId(feedId)) + ); + } + + function latestUpdateResultError(bytes4 feedId) + override external view + returns (IWitOracleLegacy.ResultError memory) + { + return IWitOracleLegacy(address(witOracle)).getQueryResultError(Witnet.QueryId.unwrap(latestUpdateQueryId(feedId))); + } + function lookupWitnetBytecode(bytes4 feedId) + override external view + returns (bytes memory) + { + return lookupWitOracleRequestBytecode(feedId); + } + function requestUpdate(bytes4 feedId, IWitFeedsLegacy.RadonSLA calldata updateSLA) external payable virtual override @@ -600,13 +617,12 @@ contract WitPriceFeedsUpgradable { Witnet.QueryId _queryId = _lastValidQueryId(feedId); if (Witnet.QueryId.unwrap(_queryId) > 0) { - Witnet.QueryResponse memory _lastValidQueryResponse = lastValidQueryResponse(feedId); - Witnet.Result memory _latestResult = _lastValidQueryResponse.resultCborBytes.toWitnetResult(); + Witnet.DataResult memory _lastValidResult = witOracle.getQueryResult(_queryId); return IWitPriceFeedsSolver.Price({ - value: _latestResult.asUint(), - timestamp: _lastValidQueryResponse.resultTimestamp, - drTxHash: _lastValidQueryResponse.resultDrTxHash, - status: latestUpdateQueryResponseStatus(feedId) + value: _lastValidResult.fetchUint(), + timestamp: _lastValidResult.timestamp, + drTxHash: _lastValidResult.drTxHash, + status: latestUpdateQueryResultStatus(feedId) }); } else { address _solver = __records_(feedId).solver; @@ -630,9 +646,9 @@ contract WitPriceFeedsUpgradable } else { return IWitPriceFeedsSolver.Price({ value: 0, - timestamp: 0, - drTxHash: 0, - status: latestUpdateQueryResponseStatus(feedId) + timestamp: Witnet.ResultTimestamp.wrap(0), + drTxHash: Witnet.TransactionHash.wrap(0), + status: latestUpdateQueryResultStatus(feedId) }); } } @@ -686,14 +702,11 @@ contract WitPriceFeedsUpgradable { IWitPriceFeedsSolver.Price memory _latestPrice = latestPrice(bytes4(feedId)); return ( - int(_latestPrice.value), - _latestPrice.timestamp, - _latestPrice.status == Witnet.QueryResponseStatus.Ready + int(uint(_latestPrice.value)), + Witnet.ResultTimestamp.unwrap(_latestPrice.timestamp), + _latestPrice.status == Witnet.ResultStatus.NoErrors ? 200 - : ( - _latestPrice.status == Witnet.QueryResponseStatus.Awaiting - || _latestPrice.status == Witnet.QueryResponseStatus.Finalizing - ) ? 404 : 400 + : (_latestPrice.status.keepWaiting() ? 404 : 400) ); } @@ -701,14 +714,14 @@ contract WitPriceFeedsUpgradable // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- - function _checkQueryResponseStatus(Witnet.QueryId _queryId) + function _coalesceQueryResultStatus(Witnet.QueryId _queryId) internal view - returns (Witnet.QueryResponseStatus) + returns (Witnet.ResultStatus) { if (Witnet.QueryId.unwrap(_queryId) > 0) { - return witOracle.getQueryResponseStatus(_queryId); + return witOracle.getQueryResultStatus(_queryId); } else { - return Witnet.QueryResponseStatus.Ready; + return Witnet.ResultStatus.NoErrors; } } @@ -722,16 +735,14 @@ contract WitPriceFeedsUpgradable function _lastValidQueryId(bytes4 feedId) virtual internal view - returns (Witnet.QueryId) + returns (Witnet.QueryId _queryId) { - Witnet.QueryId _latestUpdateQueryId = latestUpdateQueryId(feedId); + _queryId = latestUpdateQueryId(feedId); if ( - Witnet.QueryId.unwrap(_latestUpdateQueryId) > 0 - && witOracle.getQueryResponseStatus(_latestUpdateQueryId) == Witnet.QueryResponseStatus.Ready + Witnet.QueryId.unwrap(_queryId) == 0 + || witOracle.getQueryResultStatus(_queryId) != Witnet.ResultStatus.NoErrors ) { - return _latestUpdateQueryId; - } else { - return __records_(feedId).lastValidQueryId; + _queryId = __records_(feedId).lastValidQueryId; } } @@ -765,8 +776,8 @@ contract WitPriceFeedsUpgradable _usedFunds = estimateUpdateRequestFee(tx.gasprice); _require(msg.value >= _usedFunds, "insufficient reward"); Witnet.QueryId _latestId = __feed.latestUpdateQueryId; - Witnet.QueryResponseStatus _latestStatus = _checkQueryResponseStatus(_latestId); - if (_latestStatus == Witnet.QueryResponseStatus.Awaiting) { + Witnet.ResultStatus _latestStatus = _coalesceQueryResultStatus(_latestId); + if (_latestStatus.keepWaiting()) { // latest update is still pending, so just increase the reward // accordingly to current tx gasprice: uint72 _evmReward = Witnet.QueryReward.unwrap(witOracle.getQueryEvmReward(_latestId)); @@ -818,5 +829,4 @@ contract WitPriceFeedsUpgradable payable(msg.sender).transfer(msg.value - _usedFunds); } } - } diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index 4204376c..731fe0a2 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -17,8 +17,10 @@ contract WitRandomnessV21 IWitRandomnessAdmin { using Witnet for bytes; - using Witnet for Witnet.Result; + using Witnet for uint64; + using Witnet for Witnet.DataResult; using Witnet for Witnet.QuerySLA; + using Witnet for Witnet.ResultStatus; struct Randomize { uint256 queryId; @@ -282,37 +284,89 @@ contract WitRandomnessV21 } /// @notice Returns status of the first non-errored randomize request posted on or after the given block number. - /// @dev Possible values: - /// @dev - 0 -> Void: no randomize request was actually posted on or after the given block number. - /// @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain. - /// @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read. - /// @dev - 3 -> Error: all randomize requests after the given block were solved with errors. - /// @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. - function getRandomizeStatus(uint256 _blockNumber) + /// @dev - 0 -> Unknown: no randomize request was actually posted on or after the given block number. + /// @dev - 1 -> Posted: a randomize request was found but it's not yet solved by the Witnet blockchain. + /// @dev - 2 -> Reported: a randomize result was reported but cannot yet be considered to be final + /// @dev - 3 -> Ready: a successfull randomize value was reported and it'sready to be read. + /// @dev - 4 -> Error: all randomize requests after the given block were solved with errors. + function getRandomizeStatus(Witnet.BlockNumber _blockNumber) virtual override public view - returns (Witnet.QueryResponseStatus) + returns (RandomizeStatus) { - if (__storage().randomize_[_blockNumber].queryId == 0) { + if (__storage().randomize_[_blockNumber].queryId.isZero()) { _blockNumber = getRandomizeNextBlock(_blockNumber); } - uint256 _queryId = __storage().randomize_[_blockNumber].queryId; - if (_queryId == 0) { - return Witnet.QueryResponseStatus.Void; + Witnet.QueryId _queryId = __storage().randomize_[_blockNumber].queryId; + if (_queryId.isZero()) { + return RandomizeStatus.Void; + } + Witnet.ResultStatus _status = __witOracle.getQueryResultStatus(_queryId); + if (_status == Witnet.ResultStatus.BoardAwaitingResult) { + return RandomizeStatus.Posted; + + } else if (_status == Witnet.ResultStatus.BoardFinalizingResult) { + return RandomizeStatus.Finalizing; + + } else if (_status != Witnet.ResultStatus.NoErrors) { + return RandomizeStatus.Ready; } else { - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( - Witnet.QueryId.wrap(_queryId) - ); - if (_status == Witnet.QueryResponseStatus.Error) { - uint256 _nextRandomizeBlock = __storage().randomize_[_blockNumber].nextBlock; - if (_nextRandomizeBlock != 0) { - return getRandomizeStatus(_nextRandomizeBlock); - } else { - return Witnet.QueryResponseStatus.Error; - } + Witnet.BlockNumber _nextRandomizeBlock = __storage().randomize_[_blockNumber].nextBlock; + if (!_nextRandomizeBlock.isZero()) { + return getRandomizeStatus(_nextRandomizeBlock); + } else { + return RandomizeStatus.Error; + } + } + } + + function getRandomizeStatusDescription(Witnet.BlockNumber _blockNumber) + virtual override + public view + returns (string memory) + { + if (__storage().randomize_[_blockNumber].queryId.isZero()) { + _blockNumber = getRandomizeNextBlock(_blockNumber); + } + Witnet.QueryId _queryId = __storage().randomize_[_blockNumber].queryId; + if (_queryId.isZero()) { + return string(abi.encodePacked( + "No randomize after block #", + Witnet.BlockNumber.unwrap(_blockNumber).toString() + )); + } + Witnet.ResultStatus _status = __witOracle.getQueryResultStatus(_queryId); + if (_status == Witnet.ResultStatus.BoardAwaitingResult) { + return string(abi.encodePacked( + "Randomize posted as for block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)) + )); + + } else if (_status == Witnet.ResultStatus.BoardFinalizingResult) { + return string(abi.encodePacked( + "Finalizing randomize as for block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)) + )); + + } else if (_status != Witnet.ResultStatus.NoErrors) { + return string(abi.encodePacked( + "Randomize result ready as for block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)) + )); + + } else { + Witnet.BlockNumber _nextRandomizeBlock = __storage().randomize_[_blockNumber].nextBlock; + if (!_nextRandomizeBlock.isZero()) { + return getRandomizeStatusDescription(_nextRandomizeBlock); + } else { - return _status; + return string(abi.encodePacked( + "Randomize failed as for block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)), + ": ", + __witOracle.getQueryResultStatusDescription(_queryId) + )); } } } @@ -325,7 +379,7 @@ contract WitRandomnessV21 returns (bool) { return ( - getRandomizeStatus(_blockNumber) == Witnet.QueryResponseStatus.Ready + getRandomizeStatus(_blockNumber) == RandomizeStatus.Ready ); } diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 2aae87fd..43ae6984 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -110,7 +110,6 @@ abstract contract WitOracleBase } function getQueryStatus(Witnet.QueryId) virtual public view returns (Witnet.QueryStatus); - function getQueryResponseStatus(Witnet.QueryId) virtual public view returns (Witnet.QueryResponseStatus); // ================================================================================================================ @@ -232,8 +231,7 @@ abstract contract WitOracleBase /// @notice Retrieves the RAD hash and SLA parameters of the given query. /// @param _queryId The unique query identifier. function getQueryRequest(Witnet.QueryId _queryId) - external view - override + external view override returns (Witnet.QueryRequest memory) { return WitOracleDataLib.seekQueryRequest(_queryId); @@ -243,63 +241,37 @@ abstract contract WitOracleBase /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier function getQueryResponse(Witnet.QueryId _queryId) - public view - virtual override + virtual override public view returns (Witnet.QueryResponse memory) { return WitOracleDataLib.seekQueryResponse(_queryId); } - function getQueryResponseStatusTag(Witnet.QueryId _queryId) - virtual override - external view - returns (string memory) + function getQueryResult(Witnet.QueryId _queryId) + virtual override public view + returns (Witnet.DataResult memory) { - return WitOracleDataLib.toString( - getQueryResponseStatus(_queryId) - ); + return WitOracleDataLib.getQueryResult(_queryId); } - /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. - /// @param _queryId The unique query identifier. - function getQueryResultCborBytes(Witnet.QueryId _queryId) - external view - virtual override - returns (bytes memory) + function getQueryResultStatus(Witnet.QueryId _queryId) + virtual override public view + returns (Witnet.ResultStatus) { - return WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes; + return WitOracleDataLib.getQueryResultStatus(_queryId); } - /// @notice Gets error code identifying some possible failure on the resolution of the given query. - /// @param _queryId The unique query identifier. - function getQueryResultError(Witnet.QueryId _queryId) - virtual override - public view - returns (Witnet.ResultError memory) + function getQueryResultStatusDescription(Witnet.QueryId _queryId) + virtual override public view + returns (string memory) { - Witnet.QueryResponseStatus _status = getQueryResponseStatus(_queryId); - try WitOracleResultErrorsLib.asResultError(_status, WitOracleDataLib.seekQueryResponse(_queryId).resultCborBytes) - returns (Witnet.ResultError memory _resultError) - { - return _resultError; - } - catch Error(string memory _reason) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: string(abi.encodePacked("WitOracleResultErrorsLib: ", _reason)) - }); - } - catch (bytes memory) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "WitOracleResultErrorsLib: assertion failed" - }); - } + return WitOracleResultStatusLib.toString( + WitOracleDataLib.getQueryResult(_queryId) + ); } - function getQueryStatusTag(Witnet.QueryId _queryId) - virtual override - external view + function getQueryStatusString(Witnet.QueryId _queryId) + virtual override external view returns (string memory) { return WitOracleDataLib.toString( diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index dacc4902..28f7f5b4 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -107,19 +107,6 @@ abstract contract WitOracleBaseTrustable return WitOracleDataLib.getQueryStatus(_queryId); } - /// @notice Returns query's result current status from a requester's point of view: - /// @notice - 0 => Void: the query is either non-existent or deleted; - /// @notice - 1 => Awaiting: the query has not yet been reported; - /// @notice - 2 => Ready: the query has been succesfully solved; - /// @notice - 3 => Error: the query couldn't get solved due to some issue. - /// @param _queryId The unique query identifier. - function getQueryResponseStatus(Witnet.QueryId _queryId) - virtual override public view - returns (Witnet.QueryResponseStatus) - { - return WitOracleDataLib.getQueryResponseStatus(_queryId); - } - // ================================================================================================================ // --- Implements IWitOracleAdminACLs ----------------------------------------------------------------------------- @@ -154,7 +141,7 @@ abstract contract WitOracleBaseTrustable /// =============================================================================================================== - /// --- IWitOracleLegacy --------------------------------------------------------------------------------------- + /// --- IWitOracleLegacy ------------------------------------------------------------------------------------------ /// @notice Estimate the minimum reward required for posting a data request. /// @dev Underestimates if the size of returned data is greater than `_resultMaxSize`. @@ -189,6 +176,18 @@ abstract contract WitOracleBaseTrustable return estimateBaseFee(gasPrice); } + function getQueryResponseStatus(uint256 queryId) virtual override external view returns (IWitOracleLegacy.QueryResponseStatus) { + // todo + } + + function getQueryResultCborBytes(uint256 queryId) virtual override external view returns (bytes memory) { + // todo + } + + function getQueryResultError(uint256 queryId) virtual override external view returns (IWitOracleLegacy.ResultError memory) { + // todo + } + function postRequest( bytes32 _queryRadHash, IWitOracleLegacy.RadonSLA calldata _querySLA diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index b516f574..5e21b55d 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -183,20 +183,6 @@ abstract contract WitOracleBaseTrustless return WitOracleDataLib.getQueryStatusTrustlessly(_queryId, QUERY_AWAITING_BLOCKS); } - /// @notice Returns query's result current status from a requester's point of view: - /// @notice - 0 => Void: the query is either non-existent or deleted; - /// @notice - 1 => Awaiting: the query has not yet been reported; - /// @notice - 2 => Ready: the query has been succesfully solved; - /// @notice - 3 => Error: the query couldn't get solved due to some issue. - /// @param _queryId The unique query identifier. - function getQueryResponseStatus(Witnet.QueryId _queryId) - virtual override - public view - returns (Witnet.QueryResponseStatus) - { - return WitOracleDataLib.getQueryResponseStatusTrustlessly(_queryId, QUERY_AWAITING_BLOCKS); - } - // ================================================================================================================ // --- IWitOracleBlocks ------------------------------------------------------------------------------------------- diff --git a/contracts/core/trustable/WitOracleTrustableObscuro.sol b/contracts/core/trustable/WitOracleTrustableObscuro.sol index b325b0f2..5dd2eba9 100644 --- a/contracts/core/trustable/WitOracleTrustableObscuro.sol +++ b/contracts/core/trustable/WitOracleTrustableObscuro.sol @@ -55,14 +55,30 @@ contract WitOracleTrustableObscuro return super.getQueryResponse(_queryId); } - /// @notice Gets error code identifying some possible failure on the resolution of the given query. - /// @param _queryId The unique query identifier. - function getQueryResultError(Witnet.QueryId _queryId) + function getQueryResult(Witnet.QueryId _queryId) + virtual override public view + onlyRequester(_queryId) + returns (Witnet.DataResult memory) + { + return WitOracleBase.getQueryResult(_queryId); + } + + function getQueryResultStatus(Witnet.QueryId _queryId) virtual override + public view onlyRequester(_queryId) - returns (Witnet.ResultError memory) + returns (Witnet.ResultStatus) { - return super.getQueryResultError(_queryId); - } + return super.getQueryResultStatus(_queryId); + } + + function getQueryResultStatusDescription(Witnet.QueryId _queryId) + virtual override + public view + onlyRequester(_queryId) + returns (string memory) + { + return WitOracleBase.getQueryResultStatusDescription(_queryId); + } } diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 6243bcfc..79a6e674 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -264,7 +264,7 @@ library WitOracleDataLib { return Witnet.QueryStatus.Posted; } else { - return Witnet.QueryStatus.Posted; + return Witnet.QueryStatus.Unknown; } } @@ -275,25 +275,19 @@ library WitOracleDataLib { public view returns (Witnet.QueryStatus) { Witnet.Query storage __query = seekQuery(queryId); - if (__query.response.resultTimestamp != 0) { - if (block.number >= Witnet.QueryBlock.unwrap(__query.checkpoint)) { + if (block.number >= Witnet.BlockNumber.unwrap(__query.checkpoint)) { if (__query.response.disputer != address(0)) { - return Witnet.QueryStatus.Expired; + return Witnet.QueryStatus.Disputed; } else { return Witnet.QueryStatus.Finalized; } } else { - if (__query.response.disputer != address(0)) { - return Witnet.QueryStatus.Disputed; - - } else { - return Witnet.QueryStatus.Reported; - } + return Witnet.QueryStatus.Reported; } } else { - uint256 _checkpoint = Witnet.QueryBlock.unwrap(__query.checkpoint); + uint256 _checkpoint = Witnet.BlockNumber.unwrap(__query.checkpoint); if (_checkpoint == 0) { return Witnet.QueryStatus.Unknown; @@ -309,7 +303,134 @@ library WitOracleDataLib { } } - function getQueryResponseStatus(Witnet.QueryId queryId) public view returns (Witnet.QueryResponseStatus) { + function getQueryResult(Witnet.QueryId queryId) public view returns (Witnet.DataResult memory _result) { + Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); + return _getQueryResult(queryId, _queryStatus); + } + + function getQueryResultTrustlessly( + Witnet.QueryId queryId, + uint256 evmQueryAwaitingBlocks + ) + public view + returns (Witnet.DataResult memory _result) + { + Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( + queryId, + evmQueryAwaitingBlocks + ); + return _getQueryResult(queryId, _queryStatus); + } + + function _getQueryResult(Witnet.QueryId queryId, Witnet.QueryStatus queryStatus) + private view + returns (Witnet.DataResult memory) + { + return intoDataResult(seekQueryResponse(queryId), queryStatus); + } + + function intoDataResult(Witnet.QueryResponse memory queryResponse, Witnet.QueryStatus queryStatus) + public pure + returns (Witnet.DataResult memory _result) + { + _result.drTxHash = Witnet.TransactionHash.wrap(queryResponse.resultDrTxHash); + _result.timestamp = Witnet.ResultTimestamp.wrap(queryResponse.resultTimestamp); + if (queryResponse.resultCborBytes.length > 0) { + _result.value = WitnetCBOR.fromBytes(queryResponse.resultCborBytes); + _result.dataType = Witnet.peekRadonDataType(_result.value); + } + if (queryStatus == Witnet.QueryStatus.Finalized) { + if (queryResponse.resultCborBytes.length > 0) { + // determine whether stored result is an error by peeking the first byte + if (queryResponse.resultCborBytes[0] == bytes1(0xd8)) { + if ( + _result.dataType == Witnet.RadonDataTypes.Array + && WitnetCBOR.readLength(_result.value.buffer, _result.value.additionalInformation) >= 1 + ) { + if (Witnet.peekRadonDataType(_result.value) != Witnet.RadonDataTypes.Integer) { + _result.status = Witnet.ResultStatus(_result.value.readInt()); + _result.dataType = Witnet.peekRadonDataType(_result.value); + + } else { + _result.status = Witnet.ResultStatus.UnhandledIntercept; + } + } else { + _result.status = Witnet.ResultStatus.UnhandledIntercept; + } + } else { + _result.status = Witnet.ResultStatus.NoErrors; + } + } else { + // the result is final but was delivered to some consuming contract: + _result.status = Witnet.ResultStatus.BoardAlreadyDelivered; + } + + } else if (queryStatus == Witnet.QueryStatus.Reported) { + _result.status = Witnet.ResultStatus.BoardFinalizingResult; + + } else if ( + queryStatus == Witnet.QueryStatus.Posted + || queryStatus == Witnet.QueryStatus.Delayed + ) { + _result.status = Witnet.ResultStatus.BoardAwaitingResult; + + } else if ( + queryStatus == Witnet.QueryStatus.Expired + || queryStatus == Witnet.QueryStatus.Disputed + ) { + _result.status = Witnet.ResultStatus.BoardResolutionTimeout; + + } else { + _result.status = Witnet.ResultStatus.UnhandledIntercept; + } + } + + function getQueryResultStatus(Witnet.QueryId queryId) public view returns (Witnet.ResultStatus) { + Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); + Witnet.QueryResponse storage __response = seekQueryResponse(queryId); + if (_queryStatus == Witnet.QueryStatus.Finalized) { + if (__response.resultCborBytes.length > 0) { + // determine whether stored result is an error by peeking the first byte + if (__response.resultCborBytes[0] == bytes1(0xd8)) { + WitnetCBOR.CBOR[] memory _error = WitnetCBOR.fromBytes(__response.resultCborBytes).readArray(); + if (_error.length < 2) { + return Witnet.ResultStatus.UnhandledIntercept; + } else { + return Witnet.ResultStatus(_error[0].readUint()); + } + } else { + return Witnet.ResultStatus.NoErrors; + } + + } else { + // the result is final but was delivered to some consuming contract: + return Witnet.ResultStatus.BoardAlreadyDelivered; + } + + } else if (_queryStatus == Witnet.QueryStatus.Reported) { + return Witnet.ResultStatus.BoardFinalizingResult; + + } else if ( + _queryStatus == Witnet.QueryStatus.Posted + || _queryStatus == Witnet.QueryStatus.Delayed + ) { + return Witnet.ResultStatus.BoardAwaitingResult; + + } else if ( + _queryStatus == Witnet.QueryStatus.Expired + || _queryStatus == Witnet.QueryStatus.Disputed + ) { + return Witnet.ResultStatus.BoardResolutionTimeout; + + } else { + return Witnet.ResultStatus.UnhandledIntercept; + } + } + + function getQueryResponseStatus(Witnet.QueryId queryId) + public view + returns (IWitOracleLegacy.QueryResponseStatus) + { Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); if (_queryStatus == Witnet.QueryStatus.Finalized) { @@ -317,23 +438,23 @@ library WitOracleDataLib { if (__cborValues.length > 0) { // determine whether stored result is an error by peeking the first byte return (__cborValues[0] == bytes1(0xd8) - ? Witnet.QueryResponseStatus.Error - : Witnet.QueryResponseStatus.Ready + ? IWitOracleLegacy.QueryResponseStatus.Error + : IWitOracleLegacy.QueryResponseStatus.Ready ); } else { // the result is final but delivered to the requesting address - return Witnet.QueryResponseStatus.Delivered; + return IWitOracleLegacy.QueryResponseStatus.Delivered; } } else if (_queryStatus == Witnet.QueryStatus.Posted) { - return Witnet.QueryResponseStatus.Awaiting; + return IWitOracleLegacy.QueryResponseStatus.Awaiting; } else if (_queryStatus == Witnet.QueryStatus.Expired) { - return Witnet.QueryResponseStatus.Expired; + return IWitOracleLegacy.QueryResponseStatus.Expired; } else { - return Witnet.QueryResponseStatus.Void; + return IWitOracleLegacy.QueryResponseStatus.Void; } } @@ -341,7 +462,7 @@ library WitOracleDataLib { Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks ) - public view returns (Witnet.QueryResponseStatus) + public view returns (IWitOracleLegacy.QueryResponseStatus) { Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly( queryId, @@ -352,31 +473,31 @@ library WitOracleDataLib { if (__cborValues.length > 0) { // determine whether stored result is an error by peeking the first byte return (__cborValues[0] == bytes1(0xd8) - ? Witnet.QueryResponseStatus.Error - : Witnet.QueryResponseStatus.Ready + ? IWitOracleLegacy.QueryResponseStatus.Error + : IWitOracleLegacy.QueryResponseStatus.Ready ); } else { // the result is final but delivered to the requesting address - return Witnet.QueryResponseStatus.Delivered; + return IWitOracleLegacy.QueryResponseStatus.Delivered; } + } else if (_queryStatus == Witnet.QueryStatus.Reported) { + return IWitOracleLegacy.QueryResponseStatus.Finalizing; + } else if ( _queryStatus == Witnet.QueryStatus.Posted || _queryStatus == Witnet.QueryStatus.Delayed ) { - return Witnet.QueryResponseStatus.Awaiting; + return IWitOracleLegacy.QueryResponseStatus.Awaiting; } else if ( - _queryStatus == Witnet.QueryStatus.Reported + _queryStatus == Witnet.QueryStatus.Expired || _queryStatus == Witnet.QueryStatus.Disputed ) { - return Witnet.QueryResponseStatus.Finalizing; - - } else if (_queryStatus == Witnet.QueryStatus.Expired) { - return Witnet.QueryResponseStatus.Expired; + return IWitOracleLegacy.QueryResponseStatus.Expired; } else { - return Witnet.QueryResponseStatus.Void; + return IWitOracleLegacy.QueryResponseStatus.Void; } } @@ -524,61 +645,29 @@ library WitOracleDataLib { ) { evmCallbackActualGas = gasleft(); - if (witDrResultCborBytes[0] == bytes1(0xd8)) { - WitnetCBOR.CBOR[] memory _errors = WitnetCBOR.fromBytes(witDrResultCborBytes).readArray(); - if (_errors.length < 2) { - // try to report result with unknown error: - try IWitOracleConsumer(requester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - queryId, - witDrResultTimestamp, - witDrTxHash, - evmFinalityBlock, - Witnet.ResultErrorCodes.Unknown, - WitnetCBOR.CBOR({ - buffer: WitnetBuffer.Buffer({ data: hex"", cursor: 0}), - initialByte: 0, - majorType: 0, - additionalInformation: 0, - len: 0, - tag: 0 - }) - ) { - evmCallbackSuccess = true; - - } catch Error(string memory err) { - evmCallbackRevertMessage = err; - } - } else { - // try to report result with parsable error: - try IWitOracleConsumer(requester).reportWitOracleResultError{gas: evmCallbackGasLimit}( - queryId, - witDrResultTimestamp, - witDrTxHash, - evmFinalityBlock, - Witnet.ResultErrorCodes(_errors[0].readUint()), - _errors[0] - ) { - evmCallbackSuccess = true; - - } catch Error(string memory err) { - evmCallbackRevertMessage = err; - } - } - } else { - // try to report result result with no error : - try IWitOracleConsumer(requester).reportWitOracleResultValue{gas: evmCallbackGasLimit}( - queryId, - witDrResultTimestamp, - witDrTxHash, - evmFinalityBlock, - WitnetCBOR.fromBytes(witDrResultCborBytes) - ) { - evmCallbackSuccess = true; - - } catch Error(string memory err) { - evmCallbackRevertMessage = err; - - } catch (bytes memory) {} + Witnet.DataResult memory _result = intoDataResult( + Witnet.QueryResponse({ + reporter: address(0), + resultTimestamp: witDrResultTimestamp, + resultDrTxHash: witDrTxHash, + resultCborBytes: witDrResultCborBytes, + disputer: address(0), _0: 0 + }), + evmFinalityBlock == block.number ? Witnet.QueryStatus.Finalized : Witnet.QueryStatus.Reported + ); + try IWitOracleConsumer(requester).reportWitOracleQueryResult{ + gas: evmCallbackGasLimit + } ( + Witnet.QueryId.wrap(queryId), + _result + ) { + evmCallbackSuccess = true; + + } catch Error(string memory err) { + evmCallbackRevertMessage = err; + + } catch (bytes memory) { + evmCallbackRevertMessage = "callback revert"; } evmCallbackActualGas -= gasleft(); } @@ -938,11 +1027,15 @@ library WitOracleDataLib { ), "invalid merkle proof" ); - // deserialize result cbor bytes into Witnet.Result - // todo!!! return Witnet.DataResult instead - // return Witnet.toWitnetResult( - // report.witDrResultCborBytes - // ); + return intoDataResult( + Witnet.QueryResponse({ + reporter: address(0), disputer: address(0), _0: 0, + resultCborBytes: report.witDrResultCborBytes, + resultDrTxHash: report.witDrTxHash, + resultTimestamp: Witnet.determineTimestampFromEpoch(report.witDrResultEpoch) + }), + Witnet.QueryStatus.Finalized + ); } @@ -951,11 +1044,11 @@ library WitOracleDataLib { function notInStatusRevertMessage(Witnet.QueryStatus self) public pure returns (string memory) { if (self == Witnet.QueryStatus.Posted) { - return "query not in Posted status"; + return "not in Posted status"; } else if (self == Witnet.QueryStatus.Reported) { - return "query not in Reported status"; + return "not in Reported status"; } else if (self == Witnet.QueryStatus.Finalized) { - return "query not in Finalized status"; + return "not in Finalized status"; } else { return "bad mood"; } @@ -979,24 +1072,6 @@ library WitOracleDataLib { } } - function toString(Witnet.QueryResponseStatus _status) external pure returns (string memory) { - if (_status == Witnet.QueryResponseStatus.Awaiting) { - return "Awaiting"; - } else if (_status == Witnet.QueryResponseStatus.Ready) { - return "Ready"; - } else if (_status == Witnet.QueryResponseStatus.Error) { - return "Reverted"; - } else if (_status == Witnet.QueryResponseStatus.Finalizing) { - return "Finalizing"; - } else if (_status == Witnet.QueryResponseStatus.Delivered) { - return "Delivered"; - } else if (_status == Witnet.QueryResponseStatus.Expired) { - return "Expired"; - } else { - return "Unknown"; - } - } - /// ======================================================================= /// --- Private library methods ------------------------------------------- diff --git a/contracts/interfaces/IWitFeeds.sol b/contracts/interfaces/IWitFeeds.sol index 4ab1f168..1defc477 100644 --- a/contracts/interfaces/IWitFeeds.sol +++ b/contracts/interfaces/IWitFeeds.sol @@ -49,14 +49,14 @@ interface IWitFeeds { /// Returns the response from the Witnet oracle blockchain to the latest update attempt /// for the given data feed. - function latestUpdateQueryResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory); + function latestUpdateQueryResult(bytes4 feedId) external view returns (Witnet.DataResult memory); /// Tells the current response status of the latest update attempt for the given data feed. - function latestUpdateQueryResponseStatus(bytes4 feedId) external view returns (Witnet.QueryResponseStatus); + function latestUpdateQueryResultStatus(bytes4 feedId) external view returns (Witnet.ResultStatus); /// Describes the error returned from the Witnet oracle blockchain in response to the latest /// update attempt for the given data feed, if any. - function latestUpdateResultError(bytes4 feedId) external view returns (Witnet.ResultError memory); + function latestUpdateQueryResultStatusDescription(bytes4 feedId) external view returns (string memory); /// Returns the ERC-2362 caption of the given feed identifier, if known. function lookupCaption(bytes4) external view returns (string memory); diff --git a/contracts/interfaces/IWitFeedsLegacy.sol b/contracts/interfaces/IWitFeedsLegacy.sol index cae435c8..73d2a0ba 100644 --- a/contracts/interfaces/IWitFeedsLegacy.sol +++ b/contracts/interfaces/IWitFeedsLegacy.sol @@ -2,6 +2,7 @@ pragma solidity >=0.8.0 <0.9.0; +import "./IWitOracleLegacy.sol"; import "../libs/Witnet.sol"; interface IWitFeedsLegacy { @@ -11,9 +12,9 @@ interface IWitFeedsLegacy { } function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint); function latestUpdateResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory); - function latestUpdateResponseStatus(bytes4 feedId) external view returns (Witnet.QueryResponseStatus); + function latestUpdateResponseStatus(bytes4 feedId) external view returns (IWitOracleLegacy.QueryResponseStatus); + function latestUpdateResultError(bytes4 feedId) external view returns (IWitOracleLegacy.ResultError memory); function lookupWitnetBytecode(bytes4) external view returns (bytes memory); - function requestUpdate(bytes4, RadonSLA calldata) external payable returns (uint256 usedFunds); function witnet() external view returns (address); } diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index 4e763753..667e8c7a 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -52,25 +52,13 @@ interface IWitOracle { /// @notice Retrieves the whole `Witnet.QueryResponse` record referred to a previously posted Witnet Data Request. function getQueryResponse(Witnet.QueryId) external view returns (Witnet.QueryResponse memory); - /// @notice Returns query's result current status from a requester's point of view: - /// @notice - 0 => Void: the query is either non-existent or deleted; - /// @notice - 1 => Awaiting: the query has not yet been reported; - /// @notice - 2 => Ready: the query response was finalized, and contains a result with no erros. - /// @notice - 3 => Error: the query response was finalized, and contains a result with errors. - /// @notice - 4 => Finalizing: some result to the query has been reported, but cannot yet be considered finalized. - /// @notice - 5 => Delivered: at least one response, either successful or with errors, was delivered to the requesting contract. - function getQueryResponseStatus(Witnet.QueryId) external view returns (Witnet.QueryResponseStatus); - function getQueryResponseStatusTag(Witnet.QueryId) external view returns (string memory); - - /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. - function getQueryResultCborBytes(Witnet.QueryId) external view returns (bytes memory); - - /// @notice Gets error code identifying some possible failure on the resolution of the given query. - function getQueryResultError(Witnet.QueryId) external view returns (Witnet.ResultError memory); + function getQueryResult(Witnet.QueryId) external view returns (Witnet.DataResult memory); + function getQueryResultStatus(Witnet.QueryId) external view returns (Witnet.ResultStatus); + function getQueryResultStatusDescription(Witnet.QueryId) external view returns (string memory); /// @notice Gets current status of given query. function getQueryStatus(Witnet.QueryId) external view returns (Witnet.QueryStatus); - function getQueryStatusTag(Witnet.QueryId) external view returns (string memory); + function getQueryStatusString(Witnet.QueryId) external view returns (string memory); /// @notice Get current status of all given query ids. function getQueryStatusBatch(Witnet.QueryId[] calldata) external view returns (Witnet.QueryStatus[] memory); @@ -125,7 +113,7 @@ interface IWitOracle { /// @notice Enables data requesters to settle the actual validators in the Wit/oracle /// @notice sidechain that will be entitled to solve data requests requiring to - /// @notice support some given `Wit2.Capability`. + /// @notice support the specified `Wit2.Capability`. function settleMyOwnCapableCommittee(Witnet.QueryCapability, Witnet.QueryCapabilityMember[] calldata) external; /// @notice Increments the reward of a previously posted request by adding the transaction value to it. diff --git a/contracts/interfaces/IWitOracleLegacy.sol b/contracts/interfaces/IWitOracleLegacy.sol index a7cfdbe6..c4a83c6e 100644 --- a/contracts/interfaces/IWitOracleLegacy.sol +++ b/contracts/interfaces/IWitOracleLegacy.sol @@ -4,6 +4,11 @@ pragma solidity >=0.8.0 <0.9.0; interface IWitOracleLegacy { + struct RadonSLA { + uint8 witCommitteeCapacity; + uint64 witCommitteeUnitaryReward; + } + event WitnetQuery(uint256 id, uint256 evmReward, RadonSLA witnetSLA); /// @notice Estimate the minimum reward required for posting a data request. @@ -18,10 +23,37 @@ interface IWitOracleLegacy { /// @param radHash The RAD hash of the data request to be solved by Witnet. function estimateBaseFee(uint256 gasPrice, bytes32 radHash) external view returns (uint256); - struct RadonSLA { - uint8 witCommitteeCapacity; - uint64 witCommitteeUnitaryReward; - } + /// @notice Returns query's result current status from a requester's point of view: + /// @notice - 0 => Void: the query is either non-existent or deleted; + /// @notice - 1 => Awaiting: the query has not yet been reported; + /// @notice - 2 => Ready: the query response was finalized, and contains a result with no erros. + /// @notice - 3 => Error: the query response was finalized, and contains a result with errors. + /// @notice - 4 => Finalizing: some result to the query has been reported, but cannot yet be considered finalized. + /// @notice - 5 => Delivered: at least one response, either successful or with errors, was delivered to the requesting contract. + function getQueryResponseStatus(uint256) external view returns (QueryResponseStatus); + + /// QueryResponse status from a requester's point of view. + enum QueryResponseStatus { + Void, + Awaiting, + Ready, + Error, + Finalizing, + Delivered, + Expired + } + + /// @notice Retrieves the CBOR-encoded buffer containing the Witnet-provided result to the given query. + function getQueryResultCborBytes(uint256) external view returns (bytes memory); + + /// @notice Gets error code identifying some possible failure on the resolution of the given query. + function getQueryResultError(uint256) external view returns (ResultError memory); + + /// Data struct describing an error when trying to fetch a Witnet-provided result to a Data Request. + struct ResultError { + uint8 code; + string reason; + } function postRequest(bytes32, RadonSLA calldata) external payable returns (uint256); function postRequestWithCallback(bytes32, RadonSLA calldata, uint24) external payable returns (uint256); function postRequestWithCallback(bytes calldata, RadonSLA calldata, uint24) external payable returns (uint256); diff --git a/contracts/interfaces/IWitPriceFeedsSolver.sol b/contracts/interfaces/IWitPriceFeedsSolver.sol index ccf69ba8..e71d6ef7 100644 --- a/contracts/interfaces/IWitPriceFeedsSolver.sol +++ b/contracts/interfaces/IWitPriceFeedsSolver.sol @@ -6,10 +6,10 @@ import "../libs/Witnet.sol"; interface IWitPriceFeedsSolver { struct Price { - uint value; - uint timestamp; - bytes32 drTxHash; - Witnet.QueryResponseStatus status; + uint64 value; + Witnet.ResultTimestamp timestamp; + Witnet.TransactionHash drTxHash; + Witnet.ResultStatus status; } function class() external pure returns (string memory); function delegator() external view returns (address); diff --git a/contracts/interfaces/IWitRandomness.sol b/contracts/interfaces/IWitRandomness.sol index 0a03f598..ecf426ba 100644 --- a/contracts/interfaces/IWitRandomness.sol +++ b/contracts/interfaces/IWitRandomness.sol @@ -64,14 +64,22 @@ interface IWitRandomness { /// @return First block found before the given one, or `0` otherwise. function getRandomizePrevBlock(uint256 blockNumber) external view returns (uint256); - /// @notice Gets current status of the first non-failing randomize request posted on or after the given block number. - /// @dev Possible values: - /// @dev - 0 -> Void: no randomize request was actually posted on or after the given block number. - /// @dev - 1 -> Awaiting: a randomize request was found but it's not yet solved by the Witnet blockchain. - /// @dev - 2 -> Ready: a successfull randomize value was reported and ready to be read. - /// @dev - 3 -> Error: all randomize resolutions after the given block were solved with errors. - /// @dev - 4 -> Finalizing: a randomize resolution has been reported from the Witnet blockchain, but it's not yet final. - function getRandomizeStatus(uint256 blockNumber) external view returns (Witnet.QueryResponseStatus); + /// @notice Returns status of the first non-errored randomize request posted on or after the given block number. + /// @dev - 0 -> Unknown: no randomize request was actually posted on or after the given block number. + /// @dev - 1 -> Posted: a randomize request was found but it's not yet solved by the Witnet blockchain. + /// @dev - 2 -> Reported: a randomize result was reported but cannot yet be considered to be final + /// @dev - 3 -> Ready: a successfull randomize value was reported and ready to be read. + /// @dev - 4 -> Error: all randomize requests after the given block were solved with errors. + function getRandomizeStatus(Witnet.BlockNumber blockNumber) external view returns (RandomizeStatus); + enum RandomizeStatus { + Void, + Posted, + Finalizing, + Ready, + Error + } + function getRandomizeStatusDescription(Witnet.BlockNumber blockNumber) external view returns (string memory); + /// @notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first /// @notice non-failing randomize request posted on or after the given block number. diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 29ae2ac1..04061ae0 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -9,6 +9,9 @@ library Witnet { using WitnetBuffer for WitnetBuffer.Buffer; using WitnetCBOR for WitnetCBOR.CBOR; using WitnetCBOR for WitnetCBOR.CBOR[]; + type ResultTimestamp is uint32; + type TransactionHash is bytes32; + uint32 constant internal WIT_1_GENESIS_TIMESTAMP = 0; // TBD uint32 constant internal WIT_1_SECS_PER_EPOCH = 45; @@ -57,9 +60,13 @@ library Witnet { bytes32 witDrTxHash; } + /// Data struct containing the Witnet-provided result to a Data Request. struct DataResult { - RadonDataTypes dataType; - WitnetCBOR.CBOR value; + ResultStatus status; + RadonDataTypes dataType; + TransactionHash drTxHash; + ResultTimestamp timestamp; + WitnetCBOR.CBOR value; } struct FastForward { @@ -118,17 +125,6 @@ library Witnet { address disputer; } - /// QueryResponse status from a requester's point of view. - enum QueryResponseStatus { - Void, - Awaiting, - Ready, - Error, - Finalizing, - Delivered, - Expired - } - /// Structure containing all possible SLA security parameters of Wit/2.1 Data Requests struct QuerySLA { uint16 witResultMaxSize; // max size permitted to whatever query result may come from the wit/oracle blockchain. @@ -137,168 +133,207 @@ library Witnet { QueryCapability witCapability; // optional: identifies some pre-established capability-compliant commitee required for solving the query. } - /// Data struct containing the Witnet-provided result to a Data Request. - // todo: Result -> DataResult - struct Result { - bool success; // Flag stating whether the request could get solved successfully, or not. - WitnetCBOR.CBOR value; // Resulting value, in CBOR-serialized bytes. - } - - /// Final query's result status from a requester's point of view. enum ResultStatus { - Void, - Awaiting, - Ready, - Error - } - - /// Data struct describing an error when trying to fetch a Witnet-provided result to a Data Request. - struct ResultError { - ResultErrorCodes code; - string reason; - } - - enum ResultErrorCodes { - /// 0x00: Unknown error. Something went really bad! - Unknown, + /// 0x00: No errors. + NoErrors, /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Source-specific format error sub-codes ============================================================================ + /// 0x01: At least one of the source scripts is not a valid CBOR-encoded value. SourceScriptNotCBOR, + /// 0x02: The CBOR value decoded from a source script is not an Array. SourceScriptNotArray, + /// 0x03: The Array value decoded form a source script is not a valid Data Request. SourceScriptNotRADON, + /// 0x04: The request body of at least one data source was not properly formated. SourceRequestBody, + /// 0x05: The request headers of at least one data source was not properly formated. SourceRequestHeaders, + /// 0x06: The request URL of at least one data source was not properly formated. SourceRequestURL, + /// Unallocated SourceFormat0x07, SourceFormat0x08, SourceFormat0x09, SourceFormat0x0A, SourceFormat0x0B, SourceFormat0x0C, SourceFormat0x0D, SourceFormat0x0E, SourceFormat0x0F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Complexity error sub-codes ======================================================================================== + /// 0x10: The request contains too many sources. RequestTooManySources, + /// 0x11: The script contains too many calls. ScriptTooManyCalls, + /// Unallocated Complexity0x12, Complexity0x13, Complexity0x14, Complexity0x15, Complexity0x16, Complexity0x17, Complexity0x18, Complexity0x19, Complexity0x1A, Complexity0x1B, Complexity0x1C, Complexity0x1D, Complexity0x1E, Complexity0x1F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Lack of support error sub-codes =================================================================================== + /// 0x20: Some Radon operator code was found that is not supported (1+ args). UnsupportedOperator, + /// 0x21: Some Radon filter opcode is not currently supported (1+ args). UnsupportedFilter, + /// 0x22: Some Radon request type is not currently supported (1+ args). UnsupportedHashFunction, + /// 0x23: Some Radon reducer opcode is not currently supported (1+ args) UnsupportedReducer, + /// 0x24: Some Radon hash function is not currently supported (1+ args). UnsupportedRequestType, + /// 0x25: Some Radon encoding function is not currently supported (1+ args). UnsupportedEncodingFunction, + /// Unallocated Operator0x26, Operator0x27, + /// 0x28: Wrong number (or type) of arguments were passed to some Radon operator. WrongArguments, + /// Unallocated Operator0x29, Operator0x2A, Operator0x2B, Operator0x2C, Operator0x2D, Operator0x2E, Operator0x2F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Retrieve-specific circumstantial error sub-codes ================================================================================ /// 0x30: A majority of data sources returned an HTTP status code other than 200 (1+ args): HttpErrors, + /// 0x31: A majority of data sources timed out: RetrievalsTimeout, + /// Unallocated RetrieveCircumstance0x32, RetrieveCircumstance0x33, RetrieveCircumstance0x34, RetrieveCircumstance0x35, RetrieveCircumstance0x36, RetrieveCircumstance0x37, RetrieveCircumstance0x38, RetrieveCircumstance0x39, RetrieveCircumstance0x3A, RetrieveCircumstance0x3B, RetrieveCircumstance0x3C, RetrieveCircumstance0x3D, RetrieveCircumstance0x3E, RetrieveCircumstance0x3F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Scripting-specific runtime error sub-code ========================================================================= /// 0x40: Math operator caused an underflow. MathUnderflow, + /// 0x41: Math operator caused an overflow. MathOverflow, + /// 0x42: Math operator tried to divide by zero. MathDivisionByZero, + /// 0x43:Wrong input to subscript call. WrongSubscriptInput, + /// 0x44: Value cannot be extracted from input binary buffer. BufferIsNotValue, + /// 0x45: Value cannot be decoded from expected type. Decode, + /// 0x46: Unexpected empty array. EmptyArray, + /// 0x47: Value cannot be encoded to expected type. Encode, + /// 0x48: Failed to filter input values (1+ args). Filter, + /// 0x49: Failed to hash input value. Hash, + /// 0x4A: Mismatching array ranks. MismatchingArrays, + /// 0x4B: Failed to process non-homogenous array. NonHomegeneousArray, + /// 0x4C: Failed to parse syntax of some input value, or argument. Parse, + /// 0x4E: Parsing logic limits were exceeded. ParseOverflow, + /// 0x4F: Unallocated ScriptError0x4F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Actual first-order result error codes ============================================================================= + /// 0x50: Not enough reveals were received in due time: InsufficientReveals, + /// 0x51: No actual reveal majority was reached on tally stage: InsufficientMajority, + /// 0x52: Not enough commits were received before tally stage: InsufficientCommits, + /// 0x53: Generic error during tally execution (to be deprecated after WIP #0028) TallyExecution, + /// 0x54: A majority of data sources could either be temporarily unresponsive or failing to report the requested data: CircumstantialFailure, + /// 0x55: At least one data source is inconsistent when queried through multiple transports at once: InconsistentSources, + /// 0x56: Any one of the (multiple) Retrieve, Aggregate or Tally scripts were badly formated: MalformedDataRequest, + /// 0x57: Values returned from a majority of data sources don't match the expected schema: MalformedQueryResponses, + /// Unallocated: OtherError0x58, OtherError0x59, OtherError0x5A, OtherError0x5B, OtherError0x5C, OtherError0x5D, OtherError0x5E, + /// 0x5F: Size of serialized tally result exceeds allowance: OversizedTallyResult, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Inter-stage runtime error sub-codes =============================================================================== + /// 0x60: Data aggregation reveals could not get decoded on the tally stage: MalformedReveals, + /// 0x61: The result to data aggregation could not get encoded: EncodeReveals, + /// 0x62: A mode tie ocurred when calculating some mode value on the aggregation or the tally stage: ModeTie, + /// Unallocated: OtherError0x63, OtherError0x64, OtherError0x65, OtherError0x66, OtherError0x67, OtherError0x68, OtherError0x69, OtherError0x6A, OtherError0x6B, OtherError0x6C, OtherError0x6D, OtherError0x6E, OtherError0x6F, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Runtime access error sub-codes ==================================================================================== + /// 0x70: Tried to access a value from an array using an index that is out of bounds (1+ args): ArrayIndexOutOfBounds, + /// 0x71: Tried to access a value from a map using a key that does not exist (1+ args): MapKeyNotFound, + /// 0X72: Tried to extract value from a map using a JSON Path that returns no values (+1 args): JsonPathNotFound, + /// Unallocated: OtherError0x73, OtherError0x74, OtherError0x75, OtherError0x76, OtherError0x77, OtherError0x78, OtherError0x79, OtherError0x7A, OtherError0x7B, OtherError0x7C, OtherError0x7D, OtherError0x7E, OtherError0x7F, @@ -317,24 +352,55 @@ library Witnet { OtherError0xD4, OtherError0xD5, OtherError0xD6, OtherError0xD7, OtherError0xD8, OtherError0xD9, OtherError0xDA, OtherError0xDB, OtherError0xDC, OtherError0xDD, OtherError0xDE, OtherError0xDF, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Inter-client generic error codes ================================================================================== /// Data requests that cannot be relayed into the Witnet blockchain should be reported /// with one of these errors. + /// 0xE0: Requests that cannot be parsed must always get this error as their result. BridgeMalformedDataRequest, + /// 0xE1: Witnesses exceeds 100 BridgePoorIncentives, + /// 0xE2: The request is rejected on the grounds that it may cause the submitter to spend or stake an /// amount of value that is unjustifiably high when compared with the reward they will be getting BridgeOversizedTallyResult, - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// Unallocated ======================================================================================================= + /// Unallocated: OtherError0xE3, OtherError0xE4, OtherError0xE5, OtherError0xE6, OtherError0xE7, OtherError0xE8, OtherError0xE9, - OtherError0xEA, OtherError0xEB, OtherError0xEC, OtherError0xED, OtherError0xEE, OtherError0xEF, OtherError0xF0, - OtherError0xF1, OtherError0xF2, OtherError0xF3, OtherError0xF4, OtherError0xF5, OtherError0xF6, OtherError0xF7, - OtherError0xF8, OtherError0xF9, OtherError0xFA, OtherError0xFB, OtherError0xFC, OtherError0xFD, OtherError0xFE, + OtherError0xEA, OtherError0xEB, OtherError0xEC, OtherError0xED, OtherError0xEE, OtherError0xEF, + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// Transient errors as determined by the Request Board contract ====================================================== + + /// 0xF0: + BoardAwaitingResult, + + /// 0xF1: + BoardFinalizingResult, + + /// 0xF2: + BoardBeingDisputed, + + /// Unallocated + OtherError0xF3, OtherError0xF4, OtherError0xF5, OtherError0xF6, OtherError0xF7, + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// Final errors as determined by the Request Board contract ========================================================== + + /// 0xF8: + BoardAlreadyDelivered, + + /// 0xF9: + BoardResolutionTimeout, + + /// Unallocated: + OtherError0xFA, OtherError0xFB, OtherError0xFC, OtherError0xFD, OtherError0xFE, + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// 0xFF: Some tally error is not intercepted but it should (0+ args) @@ -542,175 +608,184 @@ library Witnet { )); } + + /// ======================================================================================================== + /// --- 'DataResult' helper methods ------------------------------------------------------------------------ - /// =============================================================================================================== - /// --- 'Result' helper methods ---------------------------------------------------------------------------- + function noErrors(DataResult memory self) internal pure returns (bool) { + return self.status == ResultStatus.NoErrors; + } - modifier _isReady(Result memory result) { - require(result.success, "Witnet: tried to decode value from errored result."); - _; + function keepWaiting(DataResult memory self) internal pure returns (bool) { + return keepWaiting(self.status); } - /// @dev Decode an address from the Result's CBOR value. - function asAddress(Result memory result) - internal pure - _isReady(result) - returns (address) + function hasErrors(DataResult memory self) internal pure returns (bool) { + return hasErrors(self.status); + } + + modifier _checkDataType(DataResult memory self, RadonDataTypes expectedDataType) { + require( + !keepWaiting(self) + && self.dataType == expectedDataType + , "cbor: cannot fetch data" + ); _; + self.dataType = peekRadonDataType(self.value); + } + + function fetchAddress(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Bytes) + returns (address _res) { - if (result.value.majorType == uint8(WitnetCBOR.MAJOR_TYPE_BYTES)) { - return toAddress(result.value.readBytes()); - } else { - revert("WitnetLib: reading address from string not yet supported."); - } + return toAddress(self.value.readBytes()); } - /// @dev Decode a `bool` value from the Result's CBOR value. - function asBool(Result memory result) - internal pure - _isReady(result) + function fetchBool(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Bool) returns (bool) { - return result.value.readBool(); + return self.value.readBool(); } - /// @dev Decode a `bytes` value from the Result's CBOR value. - function asBytes(Result memory result) - internal pure - _isReady(result) - returns(bytes memory) + function fetchBytes(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Bytes) + returns (bytes memory) { - return result.value.readBytes(); + return self.value.readBytes(); } - /// @dev Decode a `bytes4` value from the Result's CBOR value. - function asBytes4(Result memory result) - internal pure - _isReady(result) + function fetchBytes4(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Bytes) returns (bytes4) { - return toBytes4(asBytes(result)); + return toBytes4(self.value.readBytes()); } - /// @dev Decode a `bytes32` value from the Result's CBOR value. - function asBytes32(Result memory result) - internal pure - _isReady(result) + function fetchBytes32(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Bytes) returns (bytes32) { - return toBytes32(asBytes(result)); - } - - /// @notice Returns the Result's unread CBOR value. - function asCborValue(Result memory result) - internal pure - _isReady(result) - returns (WitnetCBOR.CBOR memory) - { - return result.value; + return toBytes32(self.value.readBytes()); } - /// @notice Decode array of CBOR values from the Result's CBOR value. - function asCborArray(Result memory result) - internal pure - _isReady(result) + function fetchCborArray(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Array) returns (WitnetCBOR.CBOR[] memory) { - return result.value.readArray(); + return self.value.readArray(); } /// @dev Decode a fixed16 (half-precision) numeric value from the Result's CBOR value. /// @dev Due to the lack of support for floating or fixed point arithmetic in the EVM, this method offsets all values. /// by 5 decimal orders so as to get a fixed precision of 5 decimal positions, which should be OK for most `fixed16`. /// use cases. In other words, the output of this method is 10,000 times the actual value, encoded into an `int32`. - function asFixed16(Result memory result) - internal pure - _isReady(result) + function fetchFloatFixed16(DataResult memory self) + internal pure + _checkDataType(self, RadonDataTypes.Float) returns (int32) { - return result.value.readFloat16(); + return self.value.readFloat16(); } /// @dev Decode an array of fixed16 values from the Result's CBOR value. - function asFixed16Array(Result memory result) + function fetchFloatFixed16Array(DataResult memory self) internal pure - _isReady(result) + _checkDataType(self, RadonDataTypes.Array) returns (int32[] memory) { - return result.value.readFloat16Array(); + return self.value.readFloat16Array(); } - /// @dev Decode an `int64` value from the Result's CBOR value. - function asInt(Result memory result) + /// @dev Decode a `int64` value from the DataResult's CBOR value. + function fetchInt(DataResult memory self) internal pure - _isReady(result) - returns (int) + _checkDataType(self, RadonDataTypes.Integer) + returns (int64) { - return result.value.readInt(); + return self.value.readInt(); } - /// @dev Decode an array of integer numeric values from a Result as an `int[]` array. - /// @param result An instance of Result. - /// @return The `int[]` decoded from the Result. - function asIntArray(Result memory result) + function fetchInt64Array(DataResult memory self) internal pure - _isReady(result) - returns (int[] memory) + _checkDataType(self, RadonDataTypes.Array) + returns (int64[] memory) { - return result.value.readIntArray(); + return self.value.readIntArray(); } - /// @dev Decode a `string` value from the Result's CBOR value. - /// @param result An instance of Result. - /// @return The `string` decoded from the Result. - function asText(Result memory result) + function fetchString(DataResult memory self) internal pure - _isReady(result) - returns(string memory) + _checkDataType(self, RadonDataTypes.String) + returns (string memory) { - return result.value.readString(); + return self.value.readString(); } - /// @dev Decode an array of strings from the Result's CBOR value. - /// @param result An instance of Result. - /// @return The `string[]` decoded from the Result. - function asTextArray(Result memory result) + function fetchStringArray(DataResult memory self) internal pure - _isReady(result) + _checkDataType(self, RadonDataTypes.Array) returns (string[] memory) { - return result.value.readStringArray(); + return self.value.readStringArray(); } - /// @dev Decode a `uint64` value from the Result's CBOR value. - /// @param result An instance of Result. - /// @return The `uint` decoded from the Result. - function asUint(Result memory result) + /// @dev Decode a `uint64` value from the DataResult's CBOR value. + function fetchUint(DataResult memory self) internal pure - _isReady(result) - returns (uint) + _checkDataType(self, RadonDataTypes.Integer) + returns (uint64) { - return result.value.readUint(); + return self.value.readUint(); } - /// @dev Decode an array of `uint64` values from the Result's CBOR value. - /// @param result An instance of Result. - /// @return The `uint[]` decoded from the Result. - function asUintArray(Result memory result) + function fetchUint64Array(DataResult memory self) internal pure - returns (uint[] memory) + _checkDataType(self, RadonDataTypes.Array) + returns (uint64[] memory) { - return result.value.readUintArray(); + return self.value.readUintArray(); + } + + bytes7 private constant _CBOR_MAJOR_TYPE_TO_RADON_DATA_TYPES_MAP = 0x04040307010600; + function peekRadonDataType(WitnetCBOR.CBOR memory cbor) internal pure returns (RadonDataTypes _type) { + _type = RadonDataTypes.Any; + if (!cbor.eof()) { + if (cbor.majorType <= 6) { + return RadonDataTypes(uint8(bytes1(_CBOR_MAJOR_TYPE_TO_RADON_DATA_TYPES_MAP[cbor.majorType]))); + + } else if (cbor.majorType == 7) { + if (cbor.additionalInformation == 20 || cbor.additionalInformation == 21) { + return RadonDataTypes.Bool; + + } else if (cbor.additionalInformation >= 25 && cbor.additionalInformation <= 27) { + return RadonDataTypes.Float; + } + } + } } /// =============================================================================================================== - /// --- ResultErrorCodes helper methods -------------------------------------------------------------------- + /// --- ResultStatus helper methods -------------------------------------------------------------------- - function isCircumstantial(ResultErrorCodes self) internal pure returns (bool) { - return (self == ResultErrorCodes.CircumstantialFailure); + function hasErrors(ResultStatus self) internal pure returns (bool) { + return ( + self != ResultStatus.NoErrors + && !keepWaiting(self) + ); } - function isRetriable(ResultErrorCodes self) internal pure returns (bool) { + function isCircumstantial(ResultStatus self) internal pure returns (bool) { + return (self == ResultStatus.CircumstantialFailure); + } + + function isRetriable(ResultStatus self) internal pure returns (bool) { return ( lackOfConsensus(self) || isCircumstantial(self) @@ -718,23 +793,31 @@ library Witnet { ); } - function lackOfConsensus(ResultErrorCodes self) internal pure returns (bool) { + function keepWaiting(ResultStatus self) internal pure returns (bool) { return ( - self == ResultErrorCodes.InsufficientCommits - || self == ResultErrorCodes.InsufficientMajority - || self == ResultErrorCodes.InsufficientReveals + self == ResultStatus.BoardAwaitingResult + || self == ResultStatus.BoardFinalizingResult ); } - function poorIncentives(ResultErrorCodes self) internal pure returns (bool) { + function lackOfConsensus(ResultStatus self) internal pure returns (bool) { return ( - self == ResultErrorCodes.OversizedTallyResult - || self == ResultErrorCodes.InsufficientCommits - || self == ResultErrorCodes.BridgePoorIncentives - || self == ResultErrorCodes.BridgeOversizedTallyResult + self == ResultStatus.InsufficientCommits + || self == ResultStatus.InsufficientMajority + || self == ResultStatus.InsufficientReveals ); } + function poorIncentives(ResultStatus self) internal pure returns (bool) { + return ( + self == ResultStatus.OversizedTallyResult + || self == ResultStatus.InsufficientCommits + || self == ResultStatus.BridgePoorIncentives + || self == ResultStatus.BridgeOversizedTallyResult + ); + } + } + /// ======================================================================================================== /// --- 'QuerySLA' helper methods -------------------------------------------------------------------------- @@ -817,18 +900,6 @@ library Witnet { return ecrecover(hash_, v, r, s); } - - /// @dev Transform given bytes into a Result instance. - /// @param cborBytes Raw bytes representing a CBOR-encoded value. - /// @return A `Result` instance. - function toWitnetResult(bytes memory cborBytes) - internal pure - returns (Result memory) - { - WitnetCBOR.CBOR memory cborValue = WitnetCBOR.fromBytes(cborBytes); - return _resultFromCborValue(cborValue); - } - function toAddress(bytes memory _value) internal pure returns (address) { return address(toBytes20(_value)); } @@ -1080,17 +1151,6 @@ library Witnet { } } - /// @dev Decode a CBOR value into a Result instance. - function _resultFromCborValue(WitnetCBOR.CBOR memory cbor) - private pure - returns (Result memory) - { - // Witnet uses CBOR tag 39 to represent RADON error code identifiers. - // [CBOR tag 39] Identifiers for CBOR: https://github.com/lucas-clemente/cbor-specs/blob/master/id.md - bool success = cbor.tag != 39; - return Result(success, cbor); - } - /// @dev Calculate length of string-equivalent to given bytes32. function _toStringLength(bytes32 _bytes32) private pure diff --git a/contracts/libs/WitnetCBOR.sol b/contracts/libs/WitnetCBOR.sol index fa0249ff..02fd34a0 100644 --- a/contracts/libs/WitnetCBOR.sol +++ b/contracts/libs/WitnetCBOR.sol @@ -425,18 +425,18 @@ library WitnetCBOR { /// @return The value represented by the input, as an `int128` value. function readInt(CBOR memory cbor) internal pure - returns (int) + returns (int64) { if (cbor.majorType == 1) { uint64 _value = readLength( cbor.buffer, cbor.additionalInformation ); - return int(-1) - int(uint(_value)); + return int64(-1) - int64(uint64(_value)); } else if (cbor.majorType == 0) { // Any `uint64` can be safely casted to `int128`, so this method supports majorType 1 as well so as to have offer // a uniform API for positive and negative numbers - return int(readUint(cbor)); + return int64(readUint(cbor)); } else { revert UnexpectedMajorType(cbor.majorType, 1); @@ -449,11 +449,11 @@ library WitnetCBOR { function readIntArray(CBOR memory cbor) internal pure isMajorType(cbor, MAJOR_TYPE_ARRAY) - returns (int[] memory array) + returns (int64[] memory array) { uint64 length = readLength(cbor.buffer, cbor.additionalInformation); if (length < UINT64_MAX) { - array = new int[](length); + array = new int64[](length); for (uint i = 0; i < length; ) { CBOR memory item = fromBuffer(cbor.buffer); array[i] = readInt(item); @@ -525,7 +525,7 @@ library WitnetCBOR { function readUint(CBOR memory cbor) internal pure isMajorType(cbor, MAJOR_TYPE_INT) - returns (uint) + returns (uint64) { return readLength( cbor.buffer, @@ -539,11 +539,11 @@ library WitnetCBOR { function readUintArray(CBOR memory cbor) internal pure isMajorType(cbor, MAJOR_TYPE_ARRAY) - returns (uint[] memory values) + returns (uint64[] memory values) { uint64 length = readLength(cbor.buffer, cbor.additionalInformation); if (length < UINT64_MAX) { - values = new uint[](length); + values = new uint64[](length); for (uint ix = 0; ix < length; ) { CBOR memory item = fromBuffer(cbor.buffer); values[ix] = readUint(item); diff --git a/contracts/mockups/UsingWitOracle.sol b/contracts/mockups/UsingWitOracle.sol index 785d5656..b208375d 100644 --- a/contracts/mockups/UsingWitOracle.sol +++ b/contracts/mockups/UsingWitOracle.sol @@ -34,8 +34,13 @@ abstract contract UsingWitOracle /// @dev contract until a particular request has been successfully solved and reported from the Wit/oracle blockchain, /// @dev either with an error or successfully. modifier witOracleQuerySolved(Witnet.QueryId _queryId) { - require(_witOracleCheckQueryResultAvailability(_queryId), "UsingWitOracle: unsolved query"); - _; + Witnet.QueryStatus _queryStatus = _witOracleCheckQueryStatus(_queryId); + require( + _queryStatus == Witnet.QueryStatus.Finalized + || _queryStatus == Witnet.QueryStatus.Expired + || _queryStatus == Witnet.QueryStatus.Disputed + , "UsingWitOracle: unsolved query" + ); _; } /// @param _witOracle Address of the WitOracle bridging contract. @@ -48,9 +53,9 @@ abstract contract UsingWitOracle ); __witOracle = _witOracle; __witOracleDefaultQuerySLA = Witnet.QuerySLA({ - witCommitteeCapacity: 10, // defaults to 10 witnesses - witCommitteeUnitaryReward: 2 * 10 ** 8, // defaults to 0.2 witcoins - witResultMaxSize: 32, // defaults to 32 bytes + witResultMaxSize: 32, // defaults to 32 bytes + witCommitteeCapacity: 10, // defaults to 10 witnesses + witCommitteeUnitaryReward: 2 * 10 ** 8, // defaults to 0.2 witcoins witCapability: Witnet.QueryCapability.wrap(0) }); @@ -59,27 +64,11 @@ abstract contract UsingWitOracle /// @dev Check if given query was already reported back from the Wit/oracle blockchain. /// @param _id The unique identifier of a previously posted data request. - function _witOracleCheckQueryResultAvailability(Witnet.QueryId _id) - internal view - returns (bool) - { - return __witOracle.getQueryStatus(_id) == Witnet.QueryStatus.Reported; - } - - /// @dev Returns a struct describing the resulting error from some given query id. - function _witOracleCheckQueryResultError(Witnet.QueryId _queryId) - internal view - returns (Witnet.ResultError memory) - { - return __witOracle.getQueryResultError(_queryId); - } - - /// @dev Return current response status to some given gquery id. - function _witOracleCheckQueryResponseStatus(Witnet.QueryId _queryId) + function _witOracleCheckQueryStatus(Witnet.QueryId _id) internal view - returns (Witnet.QueryResponseStatus) + returns (Witnet.QueryStatus) { - return __witOracle.getQueryResponseStatus(_queryId); + return __witOracle.getQueryStatus(_id); } /// @dev Estimate the minimum reward required for posting a data request (based on `tx.gasprice`). From 4bafc581465e57e26dc7f54750aaecd61c462451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:13:51 +0100 Subject: [PATCH 47/62] feat: IWitOracleTrustable.pushData(..) --- .../core/base/WitOracleBaseTrustable.sol | 153 +++++++++++------- contracts/interfaces/IWitOracleTrustable.sol | 11 +- .../IWitOracleTrustableReporter.sol | 2 +- 3 files changed, 102 insertions(+), 64 deletions(-) diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 28f7f5b4..8672e811 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -23,6 +23,7 @@ abstract contract WitOracleBaseTrustable IWitOracleTrustable, IWitOracleTrustableReporter { + using Witnet for Witnet.DataPushReport; using Witnet for Witnet.QuerySLA; /// Asserts the caller is authorized as a reporter @@ -209,63 +210,6 @@ abstract contract WitOracleBaseTrustable ); } - function __postQuery( - address _requester, - uint24 _callbackGas, - uint72 _evmReward, - bytes32 _radonRadHash, - Witnet.QuerySLA memory _querySLA - ) - virtual override - internal - returns (Witnet.QueryId _queryId) - { - _queryId = super.__postQuery( - _requester, - _callbackGas, - _evmReward, - _radonRadHash, - _querySLA - ); - emit IWitOracleLegacy.WitnetQuery( - Witnet.QueryId.unwrap(_queryId), - msg.value, - IWitOracleLegacy.RadonSLA({ - witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), - witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward - }) - ); - } - - function __postQuery( - address _requester, - uint24 _callbackGas, - uint72 _evmReward, - bytes calldata _radonRadBytecode, - Witnet.QuerySLA memory _querySLA - ) - virtual override - internal - returns (Witnet.QueryId _queryId) - { - _queryId = super.__postQuery( - _requester, - _callbackGas, - _evmReward, - _radonRadBytecode, - _querySLA - ); - emit IWitOracleLegacy.WitnetQuery( - Witnet.QueryId.unwrap(_queryId), - msg.value, - IWitOracleLegacy.RadonSLA({ - witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), - witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward - }) - ); - } - - function postRequestWithCallback( bytes32 _queryRadHash, IWitOracleLegacy.RadonSLA calldata _querySLA, @@ -322,12 +266,45 @@ abstract contract WitOracleBaseTrustable // ========================================================================================================================= // --- Implements IWitOracleTrustable -------------------------------------------------------------------------------------- + /// @notice Verify the push data report is valid and was actually signed by a trustable reporter, + /// @notice reverting if verification fails, or returning a Witnet.DataResult struct otherwise. function pushData(Witnet.DataPushReport calldata _report, bytes calldata _signature) - virtual override - external + virtual override external + checkQuerySLA(_report.witDrSLA) + returns (Witnet.DataResult memory) + { + _require( + __storage().reporters[Witnet.recoverAddr(_signature, _report.tallyHash())], + "unauthorized reporter" + ); + return WitOracleDataLib.intoDataResult( + Witnet.QueryResponse({ + reporter: address(0), disputer: address(0), _0: 0, + resultCborBytes: _report.witDrResultCborBytes, + resultDrTxHash: _report.witDrTxHash, + resultTimestamp: Witnet.determineTimestampFromEpoch(_report.witDrResultEpoch) + }), + Witnet.QueryStatus.Finalized + ); + } + + /// @notice Verify the push data report is valid, reverting if not valid or not reported from an authorized + /// @notice reporter, or returning a Witnet.DataResult struct otherwise. + function pushData(Witnet.DataPushReport calldata _report) + virtual override external + checkQuerySLA(_report.witDrSLA) + onlyReporters returns (Witnet.DataResult memory) { - _revert("todo"); + return WitOracleDataLib.intoDataResult( + Witnet.QueryResponse({ + reporter: address(0), disputer: address(0), _0: 0, + resultCborBytes: _report.witDrResultCborBytes, + resultDrTxHash: _report.witDrTxHash, + resultTimestamp: Witnet.determineTimestampFromEpoch(_report.witDrResultEpoch) + }), + Witnet.QueryStatus.Finalized + ); } @@ -518,6 +495,62 @@ abstract contract WitOracleBaseTrustable /// ================================================================================================================ /// --- Internal methods ------------------------------------------------------------------------------------------- + function __postQuery( + address _requester, + uint24 _callbackGas, + uint72 _evmReward, + bytes32 _radonRadHash, + Witnet.QuerySLA memory _querySLA + ) + virtual override + internal + returns (Witnet.QueryId _queryId) + { + _queryId = super.__postQuery( + _requester, + _callbackGas, + _evmReward, + _radonRadHash, + _querySLA + ); + emit IWitOracleLegacy.WitnetQuery( + Witnet.QueryId.unwrap(_queryId), + msg.value, + IWitOracleLegacy.RadonSLA({ + witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward + }) + ); + } + + function __postQuery( + address _requester, + uint24 _callbackGas, + uint72 _evmReward, + bytes calldata _radonRadBytecode, + Witnet.QuerySLA memory _querySLA + ) + virtual override + internal + returns (Witnet.QueryId _queryId) + { + _queryId = super.__postQuery( + _requester, + _callbackGas, + _evmReward, + _radonRadBytecode, + _querySLA + ); + emit IWitOracleLegacy.WitnetQuery( + Witnet.QueryId.unwrap(_queryId), + msg.value, + IWitOracleLegacy.RadonSLA({ + witCommitteeCapacity: uint8(_querySLA.witCommitteeCapacity), + witCommitteeUnitaryReward: _querySLA.witCommitteeUnitaryReward + }) + ); + } + function __reportResult( uint256 _queryId, uint32 _resultTimestamp, diff --git a/contracts/interfaces/IWitOracleTrustable.sol b/contracts/interfaces/IWitOracleTrustable.sol index 58fa2ca6..7deffd1d 100644 --- a/contracts/interfaces/IWitOracleTrustable.sol +++ b/contracts/interfaces/IWitOracleTrustable.sol @@ -1,11 +1,16 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; + +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; interface IWitOracleTrustable { - /// @notice Verify the provided report was actually signed by a trustable reporter, - /// @notice reverting if verification fails, or returning the contained data a Witnet.Result value. + /// @notice Verify the push data report is valid and was actually signed by a trustable reporter, + /// @notice reverting if verification fails, or returning a Witnet.DataResult struct otherwise. function pushData(Witnet.DataPushReport calldata, bytes calldata signature) external returns (Witnet.DataResult memory); + + /// @notice Verify the push data report is valid, reverting if not valid or not reported from an authorized + /// @notice reporter, or returning a Witnet.DataResult struct otherwise. + function pushData(Witnet.DataPushReport calldata) external returns (Witnet.DataResult memory); } diff --git a/contracts/interfaces/IWitOracleTrustableReporter.sol b/contracts/interfaces/IWitOracleTrustableReporter.sol index d3c63d68..916a22d6 100644 --- a/contracts/interfaces/IWitOracleTrustableReporter.sol +++ b/contracts/interfaces/IWitOracleTrustableReporter.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; From e71594823bdfb91b3f871d135fb7823ac258314b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:14:54 +0100 Subject: [PATCH 48/62] feat: IWitOracleTrustless.pushData(..) --- contracts/interfaces/IWitOracleTrustless.sol | 3 ++- contracts/interfaces/IWitOracleTrustlessReporter.sol | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/interfaces/IWitOracleTrustless.sol b/contracts/interfaces/IWitOracleTrustless.sol index 79bcd881..b22cb611 100644 --- a/contracts/interfaces/IWitOracleTrustless.sol +++ b/contracts/interfaces/IWitOracleTrustless.sol @@ -1,5 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; + +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; diff --git a/contracts/interfaces/IWitOracleTrustlessReporter.sol b/contracts/interfaces/IWitOracleTrustlessReporter.sol index 5997f7e3..4bb5e256 100644 --- a/contracts/interfaces/IWitOracleTrustlessReporter.sol +++ b/contracts/interfaces/IWitOracleTrustlessReporter.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; From 5cf7c8b8bcbc55335a09bc7aeaf20e65fa3ec13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:19:53 +0100 Subject: [PATCH 49/62] refactor: IWitOracle.fetchQueryResponse -> IWitOracle.deleteQuery --- contracts/apps/WitPriceFeedsUpgradable.sol | 13 +++++--- .../core/base/WitOracleBaseTrustable.sol | 31 +++++++++--------- .../core/base/WitOracleBaseTrustless.sol | 23 +++++++++---- contracts/data/WitOracleDataLib.sol | 32 ++++++------------- contracts/interfaces/IWitOracle.sol | 24 ++++++-------- contracts/interfaces/IWitOracleLegacy.sol | 2 ++ 6 files changed, 62 insertions(+), 63 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index abd72b67..8b59e3f4 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -11,7 +11,7 @@ import "../interfaces/IWitOracleLegacy.sol"; import "../libs/WitPriceFeedsLib.sol"; import "../patterns/Ownable2Step.sol"; -/// @title WitPriceFeeds: Price Feeds live repository reliant on the Witnet Oracle blockchain. +/// @title WitPriceFeeds: Price Feeds live repository reliant on the Wit/oracle blockchain. /// @author Guillermo Díaz contract WitPriceFeedsUpgradable @@ -790,16 +790,21 @@ contract WitPriceFeedsUpgradable } } else { // Check if latest update ended successfully: - if (_latestStatus == Witnet.QueryResponseStatus.Ready) { + if (_latestStatus == Witnet.ResultStatus.NoErrors) { // If so, remove previous last valid query from the WRB: if (Witnet.QueryId.unwrap(__feed.lastValidQueryId) > 0) { - witOracle.fetchQueryResponse(__feed.lastValidQueryId); + _usedFunds += Witnet.QueryReward.unwrap( + witOracle.deleteQuery(__feed.lastValidQueryId) + ); } __feed.lastValidQueryId = _latestId; } else { // Otherwise, try to delete latest query, as it was faulty // and we are about to post a new update request: - try witOracle.fetchQueryResponse(_latestId) {} catch {} + try witOracle.deleteQuery(_latestId) + returns (Witnet.QueryReward _unsedReward) { + _usedFunds += Witnet.QueryReward.unwrap(_unsedReward); + } catch {} } // Post update request to the WRB: _latestId = witOracle.postQuery{value: _usedFunds}( diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 8672e811..034c11ca 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -65,31 +65,27 @@ abstract contract WitOracleBaseTrustable // ================================================================================================================ // --- IWitOracle ------------------------------------------------------------------------------------------------- - /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. - /// @dev Fails if the `_queryId` is not in 'Finalized' or 'Expired' status, or called from an address different to - /// @dev the one that actually posted the given request. - /// @dev If in 'Expired' status, query reward is transfer back to the requester. - /// @param _queryId The unique query identifier. - function fetchQueryResponse(Witnet.QueryId _queryId) - virtual override external - returns (Witnet.QueryResponse memory) + /// @notice Removes all query data from storage. Pays back reward on expired queries. + /// @dev Fails if the query is not in a final status, or not called from the actual requester. + function deleteQuery(Witnet.QueryId _queryId) + virtual override public + returns (Witnet.QueryReward) { - try WitOracleDataLib.fetchQueryResponse( + try WitOracleDataLib.deleteQuery( _queryId ) returns ( - Witnet.QueryResponse memory queryResponse, - Witnet.QueryReward queryEvmExpiredReward + Witnet.QueryReward _queryReward ) { - uint256 _queryEvmExpiredReward = Witnet.QueryReward.unwrap(queryEvmExpiredReward); - if (_queryEvmExpiredReward > 0) { + uint256 _evmPayback = Witnet.QueryReward.unwrap(_queryReward); + if (_evmPayback > 0) { // transfer unused reward to requester, only if the query expired: __safeTransferTo( payable(msg.sender), - _queryEvmExpiredReward + _evmPayback ); } - return queryResponse; + return _queryReward; } catch Error(string memory _reason) { _revert(_reason); @@ -177,6 +173,11 @@ abstract contract WitOracleBaseTrustable return estimateBaseFee(gasPrice); } + function fetchQueryResponse(uint256 queryId) virtual override external returns (bytes memory) { + deleteQuery(Witnet.QueryId.wrap(queryId)); + return hex""; + } + function getQueryResponseStatus(uint256 queryId) virtual override external view returns (IWitOracleLegacy.QueryResponseStatus) { // todo } diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index 5e21b55d..63f8b43d 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -152,20 +152,29 @@ abstract contract WitOracleBaseTrustless // ================================================================================================================ // --- Overrides IWitOracle (trustlessly) ------------------------------------------------------------------------- - function fetchQueryResponse(Witnet.QueryId _queryId) - virtual override - external - returns (Witnet.QueryResponse memory) + /// @notice Removes all query data from storage. Pays back reward on expired queries. + /// @dev Fails if the query is not in a final status, or not called from the actual requester. + function deleteQuery(Witnet.QueryId _queryId) + virtual override external + returns (Witnet.QueryReward) { - try WitOracleDataLib.fetchQueryResponseTrustlessly( + try WitOracleDataLib.deleteQueryTrustlessly( _queryId, QUERY_AWAITING_BLOCKS, QUERY_REPORTING_STAKE ) returns ( - Witnet.QueryResponse memory _queryResponse + Witnet.QueryReward _queryReward ) { - return _queryResponse; + uint256 _evmPayback = Witnet.QueryReward.unwrap(_queryReward); + if (_evmPayback > 0) { + // transfer unused reward to requester, only if the query expired: + __safeTransferTo( + payable(msg.sender), + _evmPayback + ); + } + return _queryReward; } catch Error(string memory _reason) { _revert(_reason); diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 79a6e674..63abf4e1 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -7,6 +7,7 @@ import "../interfaces/IWitOracleAdminACLs.sol"; import "../interfaces/IWitOracleBlocks.sol"; import "../interfaces/IWitOracleConsumer.sol"; import "../interfaces/IWitOracleEvents.sol"; +import "../interfaces/IWitOracleLegacy.sol"; import "../interfaces/IWitOracleTrustableReporter.sol"; import "../interfaces/IWitOracleTrustlessReporter.sol"; import "../libs/Witnet.sol"; @@ -178,18 +179,12 @@ library WitOracleDataLib { /// ======================================================================= /// --- IWitOracle -------------------------------------------------------- - function fetchQueryResponse(Witnet.QueryId queryId) public returns ( - Witnet.QueryResponse memory _queryResponse, - Witnet.QueryReward _queryEvmExpiredReward - ) - { + function deleteQuery(Witnet.QueryId queryId) public returns (Witnet.QueryReward _evmPayback) { Witnet.Query storage __query = seekQuery(queryId); require( msg.sender == __query.request.requester, "not the requester" ); - _queryEvmExpiredReward = __query.reward; - __query.reward = Witnet.QueryReward.wrap(0); Witnet.QueryStatus _queryStatus = getQueryStatus(queryId); if ( _queryStatus != Witnet.QueryStatus.Expired @@ -200,29 +195,28 @@ library WitOracleDataLib { toString(_queryStatus) ))); } - _queryResponse = __query.response; + _evmPayback = __query.reward; delete data().queries[queryId]; - } + } - function fetchQueryResponseTrustlessly( + function deleteQueryTrustlessly( Witnet.QueryId queryId, uint256 evmQueryAwaitingBlocks, uint256 evmQueryReportingStake ) - public returns (Witnet.QueryResponse memory _queryResponse) + public returns (Witnet.QueryReward _evmPayback) { Witnet.Query storage __query = seekQuery(queryId); require( msg.sender == __query.request.requester, "not the requester" ); - - Witnet.QueryReward _evmReward = __query.reward; - __query.reward = Witnet.QueryReward.wrap(0); - + _evmPayback = __query.reward; Witnet.QueryStatus _queryStatus = getQueryStatusTrustlessly(queryId, evmQueryAwaitingBlocks); + // TODO: properly handle QueryStatus.Disputed ..... + // TODO: should pending reward be transferred to requester ?? if (_queryStatus == Witnet.QueryStatus.Expired) { - if (Witnet.QueryReward.unwrap(_evmReward) > 0) { + if (Witnet.QueryReward.unwrap(_evmPayback) > 0) { if (__query.response.disputer != address(0)) { // transfer reporter's stake to the disputer slash( @@ -246,13 +240,7 @@ library WitOracleDataLib { } // completely delete query metadata from storage: - _queryResponse = __query.response; delete data().queries[queryId]; - - // transfer unused reward to requester: - if (Witnet.QueryReward.unwrap(_evmReward) > 0) { - deposit(msg.sender, Witnet.QueryReward.unwrap(_evmReward)); - } } function getQueryStatus(Witnet.QueryId queryId) public view returns (Witnet.QueryStatus) { diff --git a/contracts/interfaces/IWitOracle.sol b/contracts/interfaces/IWitOracle.sol index 667e8c7a..0b3160e1 100644 --- a/contracts/interfaces/IWitOracle.sol +++ b/contracts/interfaces/IWitOracle.sol @@ -11,6 +11,11 @@ interface IWitOracle { /// @notice Uniquely identifies the WitOracle addrees and the chain on which it's deployed. function channel() external view returns (bytes4); + /// @notice Removes all query data from storage. Pays back reward on expired queries. + /// @dev Fails if the query is not in a final status, or not called from the actual requester. + /// @param queryId The unique query identifier. + function deleteQuery(Witnet.QueryId queryId) external returns (Witnet.QueryReward); + /// @notice Estimate the minimum reward required for posting a data request. /// @param evmGasPrice Expected gas price to pay upon posting the data request. function estimateBaseFee(uint256 evmGasPrice) external view returns (uint256); @@ -28,18 +33,10 @@ interface IWitOracle { /// @param evmWitPrice Tentative nanoWit price in Wei at the moment the query is solved on the Wit/oracle blockchain. /// @param querySLA The query SLA data security parameters as required for the Wit/oracle blockchain. function estimateExtraFee(uint256 evmGasPrice, uint256 evmWitPrice, Witnet.QuerySLA calldata querySLA) external view returns (uint256); - - // /// @notice Returns the address of the WitOracleRequestFactory appliance capable of building compliant data request - // /// @notice templates verified into the same WitOracleRadonRegistry instance returned by registry(). - // function factory() external view returns (WitOracleRequestFactory); - - /// @notice Retrieves a copy of all Witnet-provable data related to a previously posted request, - /// removing the whole query from the WRB storage. - /// @dev Fails if the query was not in 'Reported' status, or called from an address different to - /// @dev the one that actually posted the given request. - /// @param queryId The unique query identifier. - function fetchQueryResponse(Witnet.QueryId queryId) external returns (Witnet.QueryResponse memory); - + + /// @notice Returns next query id to be generated by the Witnet Request Board. + function getNextQueryId() external view returns (Witnet.QueryId); + /// @notice Gets the whole Query data contents, if any, no matter its current status. function getQuery(Witnet.QueryId queryId) external view returns (Witnet.Query memory); @@ -63,9 +60,6 @@ interface IWitOracle { /// @notice Get current status of all given query ids. function getQueryStatusBatch(Witnet.QueryId[] calldata) external view returns (Witnet.QueryStatus[] memory); - /// @notice Returns next query id to be generated by the Witnet Request Board. - function getNextQueryId() external view returns (Witnet.QueryId); - /// @notice Request real world data from the Wit/oracle sidechain. /// @notice The paid fee is escrowed as a reward for the reporter that eventually relays back /// @notice a valid query result from the Wit/oracle sidechain. diff --git a/contracts/interfaces/IWitOracleLegacy.sol b/contracts/interfaces/IWitOracleLegacy.sol index c4a83c6e..dbc66f76 100644 --- a/contracts/interfaces/IWitOracleLegacy.sol +++ b/contracts/interfaces/IWitOracleLegacy.sol @@ -54,6 +54,8 @@ interface IWitOracleLegacy { uint8 code; string reason; } + + function fetchQueryResponse(uint256 queryId) external returns (bytes memory); function postRequest(bytes32, RadonSLA calldata) external payable returns (uint256); function postRequestWithCallback(bytes32, RadonSLA calldata, uint24) external payable returns (uint256); function postRequestWithCallback(bytes calldata, RadonSLA calldata, uint24) external payable returns (uint256); From 3ab1c81fda7d871cf489a8993adeec7b52675336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:24:27 +0100 Subject: [PATCH 50/62] refactor: IWitOracleConsumer.* --- contracts/interfaces/IWitOracleConsumer.sol | 33 ++----------- .../interfaces/IWitOracleConsumerLegacy.sol | 49 +++++++++++++++++++ 2 files changed, 53 insertions(+), 29 deletions(-) create mode 100644 contracts/interfaces/IWitOracleConsumerLegacy.sol diff --git a/contracts/interfaces/IWitOracleConsumer.sol b/contracts/interfaces/IWitOracleConsumer.sol index 5fb9d959..24468802 100644 --- a/contracts/interfaces/IWitOracleConsumer.sol +++ b/contracts/interfaces/IWitOracleConsumer.sol @@ -11,35 +11,10 @@ interface IWitOracleConsumer { /// @dev It should revert if called from any other address different to the WitOracle being used /// @dev by the WitOracleConsumer contract. /// @param queryId The unique identifier of the Witnet query being reported. - /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. - /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. - /// @param witnetResultCborValue The CBOR-encoded resulting value of the Witnet query being reported. - function reportWitOracleResultValue( - uint256 queryId, - uint64 resultTimestamp, - bytes32 resultDrTxHash, - uint256 resultEvmFinalityBlock, - WitnetCBOR.CBOR calldata witnetResultCborValue - ) external; - - /// @notice Method to be called from the WitOracle contract as soon as the given Witnet `queryId` - /// @notice gets reported, if reported WITH errors. - /// @dev It should revert if called from any other address different to the WitOracle being used - /// @dev by the WitOracleConsumer contract. - /// @param queryId The unique identifier of the Witnet query being reported. - /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. - /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. - /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. - /// @param errorCode The error code enum identifying the error produced during resolution on the Witnet blockchain. - /// @param errorArgs Error arguments, if any. An empty buffer is to be passed if no error arguments apply. - function reportWitOracleResultError( - uint256 queryId, - uint64 resultTimestamp, - bytes32 resultDrTxHash, - uint256 resultEvmFinalityBlock, - Witnet.ResultErrorCodes errorCode, - WitnetCBOR.CBOR calldata errorArgs + /// @param queryResult Struct contaning a Witnet.DataResult metadata and value. + function reportWitOracleQueryResult( + Witnet.QueryId queryId, + Witnet.DataResult memory queryResult ) external; /// @notice Determines if Witnet queries can be reported from given address. diff --git a/contracts/interfaces/IWitOracleConsumerLegacy.sol b/contracts/interfaces/IWitOracleConsumerLegacy.sol new file mode 100644 index 00000000..1f5eb94e --- /dev/null +++ b/contracts/interfaces/IWitOracleConsumerLegacy.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../libs/Witnet.sol"; + +interface IWitOracleConsumerLegacy { + + /// @notice Method to be called from the WitOracle contract as soon as the given Witnet `queryId` + /// @notice gets reported, if reported with no errors. + /// @dev It should revert if called from any other address different to the WitOracle being used + /// @dev by the WitOracleConsumer contract. + /// @param queryId The unique identifier of the Witnet query being reported. + /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. + /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. + /// @param witnetResultCborValue The CBOR-encoded resulting value of the Witnet query being reported. + function reportWitOracleResultValue( + uint256 queryId, + uint64 resultTimestamp, + bytes32 resultDrTxHash, + uint256 resultEvmFinalityBlock, + WitnetCBOR.CBOR calldata witnetResultCborValue + ) external; + + /// @notice Method to be called from the WitOracle contract as soon as the given Witnet `queryId` + /// @notice gets reported, if reported WITH errors. + /// @dev It should revert if called from any other address different to the WitOracle being used + /// @dev by the WitOracleConsumer contract. + /// @param queryId The unique identifier of the Witnet query being reported. + /// @param resultDrTxHash Hash of the commit/reveal witnessing act that took place in the Witnet blockahin. + /// @param resultTimestamp Timestamp at which the reported value was captured by the Witnet blockchain. + /// @param resultEvmFinalityBlock EVM block at which the provided data can be considered to be final. + /// @param errorCode The error code enum identifying the error produced during resolution on the Witnet blockchain. + /// @param errorArgs Error arguments, if any. An empty buffer is to be passed if no error arguments apply. + function reportWitOracleResultError( + uint256 queryId, + uint64 resultTimestamp, + bytes32 resultDrTxHash, + uint256 resultEvmFinalityBlock, + Witnet.ResultStatus errorCode, + WitnetCBOR.CBOR calldata errorArgs + ) external; + + /// @notice Determines if Witnet queries can be reported from given address. + /// @dev In practice, must only be true on the WitOracle address that's being used by + /// @dev the WitOracleConsumer to post queries. + function reportableFrom(address) external view returns (bool); +} \ No newline at end of file From fbaaa3fb657fbb1357c4497d36c726a81cd66c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:26:26 +0100 Subject: [PATCH 51/62] refactor: WitOracleResultErrorsLib -> WitOracleResultStatusLib --- contracts/core/base/WitOracleBase.sol | 2 +- contracts/libs/WitOracleResultErrorsLib.sol | 290 -------------------- contracts/libs/WitOracleResultStatusLib.sol | 208 ++++++++++++++ settings/artifacts.js | 2 +- 4 files changed, 210 insertions(+), 292 deletions(-) delete mode 100644 contracts/libs/WitOracleResultErrorsLib.sol create mode 100644 contracts/libs/WitOracleResultStatusLib.sol diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 43ae6984..41fe3392 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -5,7 +5,7 @@ pragma solidity >=0.8.0 <0.9.0; import "../../WitOracle.sol"; import "../../data/WitOracleDataLib.sol"; import "../../interfaces/IWitOracleConsumer.sol"; -import "../../libs/WitOracleResultErrorsLib.sol"; +import "../../libs/WitOracleResultStatusLib.sol"; import "../../patterns/Payable.sol"; /// @title Witnet Request Board "trustless" base implementation contract. diff --git a/contracts/libs/WitOracleResultErrorsLib.sol b/contracts/libs/WitOracleResultErrorsLib.sol deleted file mode 100644 index c6d28137..00000000 --- a/contracts/libs/WitOracleResultErrorsLib.sol +++ /dev/null @@ -1,290 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "./Witnet.sol"; - -/// @title A library for interpreting Witnet resolution errors -/// @author The Witnet Foundation. -library WitOracleResultErrorsLib { - - using Witnet for bytes; - using Witnet for uint8; - using Witnet for uint256; - using Witnet for Witnet.ResultErrorCodes; - using WitnetCBOR for WitnetCBOR.CBOR; - - - // ================================================================================================================ - // --- Library public methods ------------------------------------------------------------------------------------- - - /// @notice Extract error code and description string from given Witnet.Result. - /// @dev Client contracts should wrap this function into a try-catch foreseeing potential parsing errors. - /// @return _error Witnet.ResultError data struct containing error code and description. - function asError(Witnet.Result memory result) - public pure - returns (Witnet.ResultError memory _error) - { - return _fromErrorArray( - _errorsFromResult(result) - ); - } - - function asResultError(Witnet.QueryResponseStatus _status, bytes memory _cborBytes) - public pure - returns (Witnet.ResultError memory) - { - if ( - _status == Witnet.QueryResponseStatus.Error - || _status == Witnet.QueryResponseStatus.Ready - ) { - return resultErrorFromCborBytes(_cborBytes); - } else if (_status == Witnet.QueryResponseStatus.Finalizing) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "WitOracleResultErrorsLib: not yet finalized" - }); - } if (_status == Witnet.QueryResponseStatus.Awaiting) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "WitOracleResultErrorsLib: not yet reported" - }); - } else { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "WitOracleResultErrorsLib: unknown query" - }); - } - } - - function resultErrorCodesFromCborBytes(bytes memory cborBytes) - public pure - returns ( - Witnet.ResultErrorCodes _code, - Witnet.ResultErrorCodes _subcode - ) - { - WitnetCBOR.CBOR[] memory _errors = _errorsFromResult(cborBytes.toWitnetResult()); - if (_errors.length > 1) { - _code = Witnet.ResultErrorCodes(_errors[0].readUint()); - if (_errors.length > 2) { - _subcode = Witnet.ResultErrorCodes(_errors[1].readUint()); - } - } - } - - /// @notice Extract error code and description string from given CBOR-encoded value. - /// @dev Client contracts should wrap this function into a try-catch foreseeing potential parsing errors. - /// @return _error Witnet.ResultError data struct containing error code and description. - function resultErrorFromCborBytes(bytes memory cborBytes) - public pure - returns (Witnet.ResultError memory _error) - { - WitnetCBOR.CBOR[] memory errors = _errorsFromCborBytes(cborBytes); - return _fromErrorArray(errors); - } - - - // ================================================================================================================ - // --- Library private methods ------------------------------------------------------------------------------------ - - /// @dev Extract error codes from a CBOR-encoded `bytes` value. - /// @param cborBytes CBOR-encode `bytes` value. - /// @return The `uint[]` error parameters as decoded from the `Witnet.Result`. - function _errorsFromCborBytes(bytes memory cborBytes) - private pure - returns(WitnetCBOR.CBOR[] memory) - { - return _errorsFromResult(cborBytes.toWitnetResult()); - } - - /// @dev Extract error codes from a Witnet.Result value. - /// @param result An instance of `Witnet.Result`. - /// @return The `uint[]` error parameters as decoded from the `Witnet.Result`. - function _errorsFromResult(Witnet.Result memory result) - private pure - returns (WitnetCBOR.CBOR[] memory) - { - require(!result.success, "no errors"); - return result.value.readArray(); - } - - /// @dev Extract Witnet.ResultErrorCodes and error description from given array of CBOR values. - function _fromErrorArray(WitnetCBOR.CBOR[] memory errors) - private pure - returns (Witnet.ResultError memory _error) - { - if (errors.length < 2) { - return Witnet.ResultError({ - code: Witnet.ResultErrorCodes.Unknown, - reason: "Critical: no error code was found." - }); - } else { - _error.code = Witnet.ResultErrorCodes(errors[0].readUint()); - } - string memory _prefix; - if (_error.code.isCircumstantial()) { - _prefix = "Circumstantial: "; - } else if (_error.code.poorIncentives()) { - _prefix = "Poor incentives: "; - } else if (_error.code.lackOfConsensus()) { - _prefix = "Consensual: "; - } else { - _prefix = "Critical: "; - } - _error.reason = string(abi.encodePacked(_prefix, _stringify(_error.code, errors))); - } - - function _stringify(Witnet.ResultErrorCodes code, WitnetCBOR.CBOR[] memory args) - private pure - returns (string memory) - { - if (code == Witnet.ResultErrorCodes.InsufficientCommits) { - return "insufficient commits."; - - } else if ( - code == Witnet.ResultErrorCodes.CircumstantialFailure - && args.length > 2 - ) { - return _stringify(args[1].readUint(), args); - - } else if (code == Witnet.ResultErrorCodes.InsufficientMajority) { - return "insufficient majority."; - - } else if (code == Witnet.ResultErrorCodes.InsufficientReveals) { - return "insufficient reveals."; - - } else if (code == Witnet.ResultErrorCodes.BridgePoorIncentives) { - return "as for the bridge."; - - } else if ( - code == Witnet.ResultErrorCodes.OversizedTallyResult - || code == Witnet.ResultErrorCodes.BridgeOversizedTallyResult - ) { - return "oversized result."; - - } else if (code == Witnet.ResultErrorCodes.InconsistentSources) { - return "inconsistent sources."; - - } else if ( - code == Witnet.ResultErrorCodes.MalformedQueryResponses - && args.length > 2 - ) { - return string(abi.encodePacked( - "malformed response: ", - _stringify(args[1].readUint(), args) - )); - - } else if ( - code == Witnet.ResultErrorCodes.MalformedDataRequest - || code == Witnet.ResultErrorCodes.BridgeMalformedDataRequest - - ) { - if (args.length > 2) { - return string(abi.encodePacked( - "malformed request: ", - _stringify(args[1].readUint(), args) - )); - } else { - return "malformed request."; - } - - } else if (code == Witnet.ResultErrorCodes.UnhandledIntercept) { - if (args.length > 2) { - return string(abi.encodePacked( - "unhandled intercept on tally (+", - (args.length - 2).toString(), - " args)." - )); - } else { - return "unhandled intercept on tally."; - } - - } else { - return string(abi.encodePacked( - "0x", - uint8(code).toHexString() - )); - } - } - - function _stringify(uint subcode, WitnetCBOR.CBOR[] memory args) - private pure - returns (string memory) - { - Witnet.ResultErrorCodes _code = Witnet.ResultErrorCodes(subcode); - - // circumstantial subcodes: - if (_code == Witnet.ResultErrorCodes.HttpErrors) { - if (args.length > 3) { - return string(abi.encodePacked( - "http/", - args[2].readUint().toString() - )); - } else { - return "unspecific http status code."; - } - - } else if (_code == Witnet.ResultErrorCodes.RetrievalsTimeout) { - return "response timeout."; - - } else if (_code == Witnet.ResultErrorCodes.ArrayIndexOutOfBounds) { - if (args.length > 3) { - return string(abi.encodePacked( - "array index out of bounds: ", - args[2].readUint().toString() - )); - } else { - return "array index out of bounds."; - } - - } else if (_code == Witnet.ResultErrorCodes.MapKeyNotFound) { - if (args.length > 3) { - return string(abi.encodePacked( - "map key not found: ", - args[2].readString() - )); - } else { - return "map key not found."; - } - - } else if (_code == Witnet.ResultErrorCodes.JsonPathNotFound) { - if (args.length > 3) { - return string(abi.encodePacked( - "json path returned no values: ", - args[2].readString() - )); - } else { - return "json path returned no values."; - } - - } else { - return string(abi.encodePacked( - "0x", - Witnet.toHexString(uint8(_code)), - args.length > 3 - ? string(abi.encodePacked(" (+", uint(args.length - 3).toString(), " args)")) - : "" - )); - } - } - - /// @notice Convert a stage index number into the name of the matching Witnet request stage. - /// @param stageIndex A `uint64` identifying the index of one of the Witnet request stages. - /// @return The name of the matching stage. - function _stageName(uint64 stageIndex) - private pure - returns (string memory) - { - if (stageIndex == 0) { - return "Retrieval"; - } else if (stageIndex == 1) { - return "Aggregation"; - } else if (stageIndex == 2) { - return "Tally"; - } else { - return "(unknown)"; - } - } -} \ No newline at end of file diff --git a/contracts/libs/WitOracleResultStatusLib.sol b/contracts/libs/WitOracleResultStatusLib.sol new file mode 100644 index 00000000..44ec34a1 --- /dev/null +++ b/contracts/libs/WitOracleResultStatusLib.sol @@ -0,0 +1,208 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "./Witnet.sol"; + +/// @title A library for interpreting Witnet resolution errors +/// @author The Witnet Foundation. +library WitOracleResultStatusLib { + + using Witnet for bytes; + using Witnet for uint8; + using Witnet for uint64; + using Witnet for Witnet.DataResult; + using Witnet for Witnet.ResultStatus; + using WitnetCBOR for WitnetCBOR.CBOR; + + // ================================================================================================================ + // --- Library public methods ------------------------------------------------------------------------------------- + + function toString(Witnet.DataResult memory result) public pure returns (string memory) { + if (result.status == Witnet.ResultStatus.NoErrors) { + return "No errors."; + + } else if (result.status == Witnet.ResultStatus.BoardAwaitingResult) { + return "Awaiting result."; + + } else if (result.status == Witnet.ResultStatus.BoardFinalizingResult) { + return "Finalizing result."; + + } else if (result.status == Witnet.ResultStatus.BoardBeingDisputed) { + return "Being disputed."; + + } else if (result.status == Witnet.ResultStatus.BoardAlreadyDelivered) { + return "Already delivered."; + + } else if (result.status == Witnet.ResultStatus.BoardResolutionTimeout) { + return "Error: resolution timeout."; + + } else if (result.status == Witnet.ResultStatus.BridgeMalformedDataRequest) { + return "Bridge: malformed data request."; + + } else if (result.status == Witnet.ResultStatus.BridgePoorIncentives) { + return "Bridge: poor incentives."; + + } else if (result.status == Witnet.ResultStatus.BridgeOversizedTallyResult) { + return "Bridge: oversized tally result."; + + } else { + return _parseError(result); + } + } + + function _parseError(Witnet.DataResult memory result) private pure returns (string memory) { + string memory _prefix; + if (result.status.isCircumstantial()) { + _prefix = "Circumstantial: "; + + } else if (result.status.poorIncentives()) { + _prefix = "Poor incentives: "; + + } else if (result.status.lackOfConsensus()) { + _prefix = "Consensus: "; + + } else { + _prefix = "Critical: "; + } + return string(abi.encodePacked( + _prefix, + _parseErrorCode(result) + )); + } + + function _parseErrorCode(Witnet.DataResult memory result) + private pure + returns (string memory) + { + if (result.status == Witnet.ResultStatus.InsufficientCommits) { + return "insufficient commits."; + + } else if (result.status == Witnet.ResultStatus.CircumstantialFailure) { + return _parseErrorDetails(result); + + } else if (result.status == Witnet.ResultStatus.InsufficientMajority) { + return "insufficient majority."; + + } else if (result.status == Witnet.ResultStatus.InsufficientReveals) { + return "insufficient reveals."; + + } else if ( + result.status == Witnet.ResultStatus.OversizedTallyResult + || result.status == Witnet.ResultStatus.BridgeOversizedTallyResult + ) { + return "oversized result."; + + } else if (result.status == Witnet.ResultStatus.InconsistentSources) { + return "inconsistent data sources."; + + } else if (result.status == Witnet.ResultStatus.MalformedQueryResponses) { + return string(abi.encodePacked( + "malformed response: ", + _parseErrorDetails(result) + )); + + } else if ( + result.status == Witnet.ResultStatus.MalformedDataRequest + || result.status == Witnet.ResultStatus.BridgeMalformedDataRequest + + ) { + return string(abi.encodePacked( + "malformed request: ", + _parseErrorDetails(result) + )); + + } else if (result.status == Witnet.ResultStatus.UnhandledIntercept) { + if (result.dataType != Witnet.RadonDataTypes.Any) { + return string(abi.encodePacked( + "unhanled intercept: ", + _parseErrorDetails(result) + )); + } else { + return "unhandled intercept."; + } + + } else { + return string(abi.encodePacked( + "0x", + uint8(result.status).toHexString() + )); + } + } + + function _parseErrorDetails(Witnet.DataResult memory result) private pure returns (string memory) { + if (result.dataType == Witnet.RadonDataTypes.Integer) { + result.status = Witnet.ResultStatus(uint8(result.fetchUint())); + } else { + return "(unparsable error details)"; + } + if (result.status == Witnet.ResultStatus.HttpErrors) { + if (result.dataType == Witnet.RadonDataTypes.Integer) { + return string(abi.encodePacked( + "http/", + result.fetchUint().toString() + )); + } else { + return "unspecific http status code."; + } + + } else if (result.status == Witnet.ResultStatus.RetrievalsTimeout) { + return "response timeout."; + + } else if (result.status == Witnet.ResultStatus.ArrayIndexOutOfBounds) { + if (result.dataType == Witnet.RadonDataTypes.Integer) { + return string(abi.encodePacked( + "array index out of bounds: ", + result.fetchUint().toString() + )); + } else { + return "array index out of bounds."; + } + + } else if (result.status == Witnet.ResultStatus.MapKeyNotFound) { + if (result.dataType == Witnet.RadonDataTypes.String) { + return string(abi.encodePacked( + "map key not found: ", + result.fetchString() + )); + } else { + return "map key not found."; + } + + } else if (result.status == Witnet.ResultStatus.JsonPathNotFound) { + if (result.dataType == Witnet.RadonDataTypes.String) { + return string(abi.encodePacked( + "json path returned no values: ", + result.fetchString() + )); + } else { + return "json path returned no values."; + } + + } else { + return string(abi.encodePacked( + "0x", + Witnet.toHexString(uint8(result.status)), + result.dataType != Witnet.RadonDataTypes.Any + ? string(abi.encodePacked(" (", _parseErrorArgs(result), ")")) + : "" + )); + } + } + + function _parseErrorArgs(Witnet.DataResult memory result) private pure returns (string memory _str) { + if (result.dataType == Witnet.RadonDataTypes.Any) { + return ""; + + } else if (result.dataType == Witnet.RadonDataTypes.String) { + _str = string(abi.encodePacked("'", result.fetchString(), "', ")); + + } else if (result.dataType == Witnet.RadonDataTypes.Integer) { + _str = string(abi.encodePacked(result.fetchUint().toString(), ", ")); + + } else { + _str = "?, "; + } + return string(abi.encodePacked(_str, _parseErrorArgs(result))); + } +} diff --git a/settings/artifacts.js b/settings/artifacts.js index eaac101d..a21184ea 100644 --- a/settings/artifacts.js +++ b/settings/artifacts.js @@ -13,7 +13,7 @@ module.exports = { libs: { WitOracleDataLib: "WitOracleDataLib", WitOracleRadonEncodingLib: "WitOracleRadonEncodingLib", - WitOracleResultErrorsLib: "WitOracleResultErrorsLib", + WitOracleResultStatusLib: "WitOracleResultStatusLib", WitPriceFeedsLib: "WitPriceFeedsLib", }, }, From a69e49356b2b184d9a512991a2e80eaad1591901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:41:11 +0100 Subject: [PATCH 52/62] refactor: Witnet global type defs --- contracts/apps/WitRandomnessV21.sol | 221 ++++++++---------- contracts/core/base/WitOracleBase.sol | 2 +- contracts/data/WitOracleDataLib.sol | 8 +- .../interfaces/IWitOracleRadonRegistry.sol | 22 +- contracts/interfaces/IWitRandomness.sol | 42 ++-- contracts/interfaces/IWitRandomnessEvents.sol | 2 +- contracts/libs/Witnet.sol | 47 +++- 7 files changed, 177 insertions(+), 167 deletions(-) diff --git a/contracts/apps/WitRandomnessV21.sol b/contracts/apps/WitRandomnessV21.sol index 731fe0a2..9215ff4d 100644 --- a/contracts/apps/WitRandomnessV21.sol +++ b/contracts/apps/WitRandomnessV21.sol @@ -7,7 +7,7 @@ import "../interfaces/IWitRandomnessAdmin.sol"; import "../mockups/UsingWitOracle.sol"; import "../patterns/Ownable2Step.sol"; -/// @title WitRandomnessV21: Unmalleable and provably-fair randomness generation based on the Witnet Oracle v2.*. +/// @title WitRandomnessV21: Unmalleable and provably-fair randomness generation based on the Wit/oracle v2.*. /// @author The Witnet Foundation. contract WitRandomnessV21 is @@ -18,23 +18,25 @@ contract WitRandomnessV21 { using Witnet for bytes; using Witnet for uint64; + using Witnet for Witnet.BlockNumber; using Witnet for Witnet.DataResult; + using Witnet for Witnet.QueryId; using Witnet for Witnet.QuerySLA; using Witnet for Witnet.ResultStatus; struct Randomize { - uint256 queryId; - uint256 prevBlock; - uint256 nextBlock; + Witnet.QueryId queryId; + Witnet.BlockNumber prevBlock; + Witnet.BlockNumber nextBlock; } struct Storage { - uint256 lastRandomizeBlock; - mapping (uint256 => Randomize) randomize_; + Witnet.BlockNumber lastRandomizeBlock; + mapping (Witnet.BlockNumber => Randomize) randomize_; } - /// @notice Unique identifier of the RNG data request used on the Witnet Oracle blockchain for solving randomness. - /// @dev Can be used to track all randomness requests solved so far on the Witnet Oracle blockchain. + /// @notice Unique identifier of the RNG data request used on the Wit/oracle blockchain for solving randomness. + /// @dev Can be used to track all randomness requests solved so far on the Wit/oracle blockchain. bytes32 immutable public override witOracleQueryRadHash; constructor( @@ -110,14 +112,14 @@ contract WitRandomnessV21 } /// @notice Retrieves the result of keccak256-hashing the given block number with the randomness value - /// @notice generated by the Witnet Oracle blockchain in response to the first non-errored randomize request solved + /// @notice generated by the Wit/oracle blockchain in response to the first non-errored randomize request solved /// @notice after such block number. /// @dev Reverts if: /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards. /// @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet. /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors. /// @param _blockNumber Block number from which the search will start - function fetchRandomnessAfter(uint256 _blockNumber) + function fetchRandomnessAfter(Witnet.BlockNumber _blockNumber) public view virtual override returns (bytes32) @@ -130,119 +132,55 @@ contract WitRandomnessV21 ); } - function _fetchRandomnessAfter(uint256 _blockNumber) - virtual internal view - returns (bytes32) - { - if (__storage().randomize_[_blockNumber].queryId == 0) { - _blockNumber = getRandomizeNextBlock(_blockNumber); - } - Randomize storage __randomize = __storage().randomize_[_blockNumber]; - uint256 _queryId = __randomize.queryId; - _require( - _queryId != 0, - "not randomized" - ); - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( - Witnet.QueryId.wrap(_queryId) - ); - if (_status == Witnet.QueryResponseStatus.Ready) { - return ( - __witOracle.getQueryResultCborBytes(Witnet.QueryId.wrap(_queryId)) - .toWitnetResult() - .asBytes32() - ); - - } else if (_status == Witnet.QueryResponseStatus.Error) { - uint256 _nextRandomizeBlock = __randomize.nextBlock; - _require( - _nextRandomizeBlock != 0, - "faulty randomize" - ); - return _fetchRandomnessAfter(_nextRandomizeBlock); - - } else { - _revert("pending randomize"); - } - } - - /// @notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took - /// @notice place in the Witnet Oracle blockchain in response to the first non-errored randomize request + /// @notice Retrieves the actual unique hash and timestamp of the witnessing commit/reveal act that took + /// @notice place in the Wit/oracle sidechain in response to the first non-errored randomize request /// @notice solved after the given block number. /// @dev Reverts if: /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards. /// @dev ii. the first non-errored `randomize()` request found on or after the given block is not solved yet. /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors. /// @param _blockNumber Block number from which the search will start. - /// @return _resultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. - /// @return _resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. /// @return _resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. - function fetchRandomnessAfterProof(uint256 _blockNumber) + /// @return _resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. + function fetchRandomnessAfterProof(Witnet.BlockNumber _blockNumber) virtual override public view returns ( - bytes32 _resultRandomness, - uint64 _resultTimestamp, - bytes32 _resultDrTxHash + Witnet.TransactionHash _resultDrTxHash, + Witnet.ResultTimestamp _resultTimestamp ) { - if (__storage().randomize_[_blockNumber].queryId == 0) { - _blockNumber = getRandomizeNextBlock(_blockNumber); - } - - Randomize storage __randomize = __storage().randomize_[_blockNumber]; - uint256 _queryId = __randomize.queryId; - _require( - _queryId != 0, - "not randomized" + Witnet.QueryResponse memory _response = __witOracle.getQueryResponse( + _fetchRandomizeValidResultQueryId(_blockNumber) ); - - Witnet.QueryResponseStatus _status = __witOracle.getQueryResponseStatus( - Witnet.QueryId.wrap(_queryId) + return ( + Witnet.TransactionHash.wrap(_response.resultDrTxHash), + Witnet.ResultTimestamp.wrap(_response.resultTimestamp) ); - if (_status == Witnet.QueryResponseStatus.Ready) { - Witnet.QueryResponse memory _queryResponse = __witOracle.getQueryResponse( - Witnet.QueryId.wrap(_queryId) - ); - _resultTimestamp = _queryResponse.resultTimestamp; - _resultDrTxHash = _queryResponse.resultDrTxHash; - _resultRandomness = _queryResponse.resultCborBytes.toWitnetResult().asBytes32(); - - } else if (_status == Witnet.QueryResponseStatus.Error) { - uint256 _nextRandomizeBlock = __randomize.nextBlock; - _require( - _nextRandomizeBlock != 0, - "faulty randomize" - ); - return fetchRandomnessAfterProof(_nextRandomizeBlock); - - } else { - _revert("pending randomize"); - } } /// @notice Returns last block number on which a randomize was requested. function getLastRandomizeBlock() virtual override external view - returns (uint256) + returns (Witnet.BlockNumber) { return __storage().lastRandomizeBlock; } /// @notice Retrieves metadata related to the randomize request that got posted to the - /// @notice Witnet Oracle contract on the given block number. + /// @notice Wit/oracle contract on the given block number. /// @dev Returns zero values if no randomize request was actually posted on the given block. /// @return _queryId Identifier of the underlying Witnet query created on the given block number. /// @return _prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none. /// @return _nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none. - function getRandomizeData(uint256 _blockNumber) + function getRandomizeData(Witnet.BlockNumber _blockNumber) external view virtual override returns ( - uint256 _queryId, - uint256 _prevRandomizeBlock, - uint256 _nextRandomizeBlock + Witnet.QueryId _queryId, + Witnet.BlockNumber _prevRandomizeBlock, + Witnet.BlockNumber _nextRandomizeBlock ) { Randomize storage __randomize = __storage().randomize_[_blockNumber]; @@ -254,29 +192,27 @@ contract WitRandomnessV21 /// @notice Returns the number of the next block in which a randomize request was posted after the given one. /// @param _blockNumber Block number from which the search will start. /// @return Number of the first block found after the given one, or `0` otherwise. - function getRandomizeNextBlock(uint256 _blockNumber) + function getRandomizeNextBlock(Witnet.BlockNumber _blockNumber) public view virtual override - returns (uint256) + returns (Witnet.BlockNumber) { - return ((__storage().randomize_[_blockNumber].queryId != 0) - ? __storage().randomize_[_blockNumber].nextBlock - // start search from the latest block - : _searchNextBlock(_blockNumber, __storage().lastRandomizeBlock) + return (__storage().randomize_[_blockNumber].queryId.isZero() + ? _searchNextBlock(_blockNumber, __storage().lastRandomizeBlock) + : __storage().randomize_[_blockNumber].nextBlock ); } /// @notice Returns the number of the previous block in which a randomize request was posted before the given one. /// @param _blockNumber Block number from which the search will start. Cannot be zero. /// @return First block found before the given one, or `0` otherwise. - function getRandomizePrevBlock(uint256 _blockNumber) + function getRandomizePrevBlock(Witnet.BlockNumber _blockNumber) public view virtual override - returns (uint256) + returns (Witnet.BlockNumber) { - assert(_blockNumber > 0); - uint256 _latest = __storage().lastRandomizeBlock; - return ((_blockNumber > _latest) + Witnet.BlockNumber _latest = __storage().lastRandomizeBlock; + return (_blockNumber.gt(_latest) ? _latest // start search from the latest block : _searchPrevBlock(_blockNumber, __storage().randomize_[_latest].prevBlock) @@ -373,7 +309,7 @@ contract WitRandomnessV21 /// @notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first /// @notice non-errored randomize request posted on or after the given block number. - function isRandomized(uint256 _blockNumber) + function isRandomized(Witnet.BlockNumber _blockNumber) public view virtual override returns (bool) @@ -389,7 +325,7 @@ contract WitRandomnessV21 /// @param _range Range within which the uniformly-distributed random number will be generated. /// @param _nonce Nonce value enabling multiple random numbers from the same randomness value. /// @param _blockNumber Block number from which the search for the first randomize request solved aftewards will start. - function random(uint32 _range, uint256 _nonce, uint256 _blockNumber) + function random(uint32 _range, uint256 _nonce, Witnet.BlockNumber _blockNumber) external view virtual override returns (uint32) @@ -407,7 +343,7 @@ contract WitRandomnessV21 } /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. - /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. + /// @dev Only one randomness request per block will be actually posted to the Wit/oracle. /// @return Funds actually paid as randomize fee. function randomize() external payable @@ -418,7 +354,7 @@ contract WitRandomnessV21 } /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. - /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. + /// @dev Only one randomness request per block will be actually posted to the Wit/oracle. /// @dev Reverts if given SLA security parameters are below witOracleDefaultQuerySLA(). /// @return Funds actually paid as randomize fee. function randomize(Witnet.QuerySLA calldata _querySLA) @@ -433,7 +369,7 @@ contract WitRandomnessV21 return __postRandomizeQuery(_querySLA); } - /// @notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill + /// @notice Returns the SLA parameters required for the Wit/oracle blockchain to fulfill /// @notice when solving randomness requests: /// @notice - number of witnessing nodes contributing to randomness generation /// @notice - reward in $nanoWIT received by every contributing node in the Witnet blockchain @@ -512,13 +448,55 @@ contract WitRandomnessV21 // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- + function _fetchRandomnessAfter(Witnet.BlockNumber _blockNumber) + virtual internal view + returns (bytes32) + { + return __witOracle.getQueryResult( + _fetchRandomizeValidResultQueryId(_blockNumber) + ).fetchBytes32(); + } + + function _fetchRandomizeValidResultQueryId(Witnet.BlockNumber _blockNumber) + virtual internal view + returns (Witnet.QueryId _queryId) + { + if (__storage().randomize_[_blockNumber].queryId.isZero()) { + _blockNumber = getRandomizeNextBlock(_blockNumber); + } + Randomize storage __data = __storage().randomize_[_blockNumber]; + _queryId = __data.queryId; + if (_queryId.isZero()) { + _revert("not randomized"); + } + Witnet.ResultStatus _status = __witOracle.getQueryResultStatus(_queryId); + if (_status.keepWaiting()) { + _revert(string(abi.encodePacked( + "pending randomize on block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)) + ))); + + } else if (_status.hasErrors()) { + Witnet.BlockNumber _nextRandomizeBlock = __data.nextBlock; + _require( + !_nextRandomizeBlock.isZero(), + string(abi.encodePacked( + "faulty randomize on block #", + Witnet.toString(Witnet.BlockNumber.unwrap(_blockNumber)) + )) + ); + return _fetchRandomizeValidResultQueryId(_nextRandomizeBlock); + } + } + function __postRandomizeQuery(Witnet.QuerySLA memory _querySLA) internal returns (uint256 _evmUsedFunds) { Witnet.QueryId _queryId; - Randomize storage __randomize = __storage().randomize_[block.number]; - if (__storage().lastRandomizeBlock < block.number) { + Witnet.BlockNumber _blockNumber = Witnet.BlockNumber.wrap(uint64(block.number)); + Randomize storage __randomize = __storage().randomize_[_blockNumber]; + if (__storage().lastRandomizeBlock.lt(_blockNumber)) { _evmUsedFunds = msg.value; // Post the Witnet Randomness request: @@ -530,13 +508,14 @@ contract WitRandomnessV21 ); // Save Randomize metadata in storage: - __randomize.queryId = Witnet.QueryId.unwrap(_queryId); - uint256 _prevBlock = __storage().lastRandomizeBlock; + __randomize.queryId = _queryId; + Witnet.BlockNumber _prevBlock = __storage().lastRandomizeBlock; __randomize.prevBlock = _prevBlock; - __storage().randomize_[_prevBlock].nextBlock = block.number; - __storage().lastRandomizeBlock = block.number; + __storage().randomize_[_prevBlock].nextBlock = _blockNumber; + __storage().lastRandomizeBlock = _blockNumber; + } else { - _queryId = Witnet.QueryId.wrap(__storage().randomize_[block.number].queryId); + _queryId = __storage().randomize_[_blockNumber].queryId; } // Transfer back unused funds: @@ -546,13 +525,13 @@ contract WitRandomnessV21 // Emit event upon every randomize call, even if multiple within same block: // solhint-disable-next-line avoid-tx-origin - emit Randomizing(tx.origin, _msgSender(), Witnet.QueryId.unwrap(_queryId)); + emit Randomizing(tx.origin, _msgSender(), _queryId); } /// @dev Recursively searches for the number of the first block after the given one in which a Witnet /// @dev randomness request was posted. Returns 0 if none found. - function _searchNextBlock(uint256 _target, uint256 _latest) internal view returns (uint256) { - return ((_target >= _latest) + function _searchNextBlock(Witnet.BlockNumber _target, Witnet.BlockNumber _latest) internal view returns (Witnet.BlockNumber) { + return ((_target.egt(_latest)) ? __storage().randomize_[_latest].nextBlock : _searchNextBlock(_target, __storage().randomize_[_latest].prevBlock) ); @@ -560,16 +539,16 @@ contract WitRandomnessV21 /// @dev Recursively searches for the number of the first block before the given one in which a Witnet /// @dev randomness request was posted. Returns 0 if none found. - function _searchPrevBlock(uint256 _target, uint256 _latest) internal view returns (uint256) { - return ((_target > _latest) + function _searchPrevBlock(Witnet.BlockNumber _target, Witnet.BlockNumber _latest) internal view returns (Witnet.BlockNumber) { + return ((_target.gt(_latest)) ? _latest : _searchPrevBlock(_target, __storage().randomize_[_latest].prevBlock) ); } bytes32 private constant _STORAGE_SLOT = - // keccak256("io.witnet.apps.randomness.v20") - 0x643778935c57df947f6944f6a5242a3e91445f6337f4b2ec670c8642153b614f; + // keccak256("io.witnet.apps.randomness.v21") + 0xad347e0aa7977751e064b632bb66fc0bf1ba5efb89904260ebcdf6f008718e67; function __storage() internal pure returns (Storage storage _ptr) { assembly { diff --git a/contracts/core/base/WitOracleBase.sol b/contracts/core/base/WitOracleBase.sol index 41fe3392..083b15be 100644 --- a/contracts/core/base/WitOracleBase.sol +++ b/contracts/core/base/WitOracleBase.sol @@ -455,7 +455,7 @@ abstract contract WitOracleBase { _queryId = Witnet.QueryId.wrap(++ __storage().nonce); Witnet.Query storage __query = WitOracleDataLib.seekQuery(_queryId); - __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number)); + __query.checkpoint = Witnet.BlockNumber.wrap(uint64(block.number)); __query.hash = Witnet.hashify( _queryId, _radonRadHash, diff --git a/contracts/data/WitOracleDataLib.sol b/contracts/data/WitOracleDataLib.sol index 63abf4e1..c32a5f25 100644 --- a/contracts/data/WitOracleDataLib.sol +++ b/contracts/data/WitOracleDataLib.sol @@ -671,7 +671,7 @@ library WitOracleDataLib { ) private { Witnet.Query storage __query = seekQuery(Witnet.QueryId.wrap(queryId)); - __query.checkpoint = Witnet.QueryBlock.wrap(evmFinalityBlock); + __query.checkpoint = Witnet.BlockNumber.wrap(evmFinalityBlock); __query.response = Witnet.QueryResponse({ reporter: evmReporter, resultTimestamp: witDrResultTimestamp, @@ -752,6 +752,7 @@ library WitOracleDataLib { evmQueryReportingStake ); + // TODO: properly handle QueryStatus.Disputed .... } else if (_queryStatus == Witnet.QueryStatus.Expired) { if (__query.response.disputer != address(0)) { // only the disputer can claim, @@ -770,6 +771,7 @@ library WitOracleDataLib { msg.sender, evmQueryReportingStake ); + // TODO: should reward be transferred back to requester ?? _evmReward += evmQueryReportingStake; } else { @@ -806,7 +808,7 @@ library WitOracleDataLib { evmQueryReportingStake ); Witnet.Query storage __query = seekQuery(queryId); - __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number + evmQueryAwaitingBlocks)); + __query.checkpoint = Witnet.BlockNumber.wrap(uint64(block.number + evmQueryAwaitingBlocks)); __query.response.disputer = msg.sender; emit IWitOracleEvents.WitOracleQueryResponseDispute( Witnet.QueryId.unwrap(queryId), @@ -978,7 +980,7 @@ library WitOracleDataLib { // finalize query: evmTotalReward = Witnet.QueryReward.unwrap(__query.reward) + evmQueryReportingStake; __query.reward = Witnet.QueryReward.wrap(0); // no claimQueryReward(.) will be required (nor accepted whatsoever) - __query.checkpoint = Witnet.QueryBlock.wrap(uint64(block.number)); // set query status to Finalized + __query.checkpoint = Witnet.BlockNumber.wrap(uint64(block.number)); // set query status to Finalized } } diff --git a/contracts/interfaces/IWitOracleRadonRegistry.sol b/contracts/interfaces/IWitOracleRadonRegistry.sol index aab57eaf..bcf0c054 100644 --- a/contracts/interfaces/IWitOracleRadonRegistry.sol +++ b/contracts/interfaces/IWitOracleRadonRegistry.sol @@ -90,11 +90,11 @@ interface IWitOracleRadonRegistry { Witnet.RadonReducer calldata tally ) external returns (bytes32 radHash); - function verifyRadonRequest( - bytes32[] calldata retrieveHashes, - bytes32 aggregateReducerHash, - bytes32 tallyReducerHash - ) external returns (bytes32 radHash); + function verifyRadonRequest( + bytes32[] calldata retrieveHashes, + bytes32 aggregateReducerHash, + bytes32 tallyReducerHash + ) external returns (bytes32 radHash); /// Verifies and registers the specified Radon Request out of the given data sources (i.e. retrievals), /// data sources parameters (if required), and the aggregate and tally Radon Reducers. Returns a unique @@ -111,12 +111,12 @@ interface IWitOracleRadonRegistry { Witnet.RadonReducer calldata tally ) external returns (bytes32 radHash); - function verifyRadonRequest( - bytes32[] calldata retrieveHashes, - string[][] calldata retrieveArgsValues, - bytes32 aggregateReducerHash, - bytes32 tallyReducerHash - ) external returns (bytes32 radHash); + function verifyRadonRequest( + bytes32[] calldata retrieveHashes, + string[][] calldata retrieveArgsValues, + bytes32 aggregateReducerHash, + bytes32 tallyReducerHash + ) external returns (bytes32 radHash); /// Verifies and registers the specified Radon Retrieval (i.e. public data source) into this registry contract. /// Returns a unique retrieval hash that identifies the verified Radon Retrieval. diff --git a/contracts/interfaces/IWitRandomness.sol b/contracts/interfaces/IWitRandomness.sol index ecf426ba..56c4e4df 100644 --- a/contracts/interfaces/IWitRandomness.sol +++ b/contracts/interfaces/IWitRandomness.sol @@ -13,56 +13,54 @@ interface IWitRandomness { function estimateRandomizeFee(uint256 evmGasPrice) external view returns (uint256); /// @notice Retrieves the result of keccak256-hashing the given block number with the randomness value - /// @notice generated by the Witnet Oracle blockchain in response to the first non-failing randomize request solved + /// @notice generated by the Wit/oracle blockchain in response to the first non-failing randomize request solved /// @notice after such block number. /// @dev Reverts if: /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards. /// @dev ii. the first non-failing `randomize()` request found on or after the given block is not solved yet. /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors. /// @param blockNumber Block number from which the search will start. - function fetchRandomnessAfter(uint256 blockNumber) external view returns (bytes32); + function fetchRandomnessAfter(Witnet.BlockNumber blockNumber) external view returns (bytes32); /// @notice Retrieves the actual random value, unique hash and timestamp of the witnessing commit/reveal act that took - /// @notice place in the Witnet Oracle blockchain in response to the first non-failing randomize request + /// @notice place in the Wit/oracle blockchain in response to the first non-failing randomize request /// @notice solved after the given block number. /// @dev Reverts if: /// @dev i. no `randomize()` was requested on neither the given block, nor afterwards. /// @dev ii. the first non-failing `randomize()` request found on or after the given block is not solved yet. /// @dev iii. all `randomize()` requests that took place on or after the given block were solved with errors. /// @param blockNumber Block number from which the search will start. - /// @return witnetResultRandomness Random value provided by the Witnet blockchain and used for solving randomness after given block. - /// @return resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. /// @return resultDrTxHash Hash of the witnessing commit/reveal act that took place on the Witnet blockchain. - function fetchRandomnessAfterProof(uint256 blockNumber) external view returns ( - bytes32 witnetResultRandomness, - uint64 resultTimestamp, - bytes32 resultDrTxHash + /// @return resultTimestamp Timestamp at which the randomness value was generated by the Witnet blockchain. + function fetchRandomnessAfterProof(Witnet.BlockNumber blockNumber) external view returns ( + Witnet.TransactionHash resultDrTxHash, + Witnet.ResultTimestamp resultTimestamp ); /// @notice Returns last block number on which a randomize was requested. - function getLastRandomizeBlock() external view returns (uint256); + function getLastRandomizeBlock() external view returns (Witnet.BlockNumber); /// @notice Retrieves metadata related to the randomize request that got posted to the - /// @notice Witnet Oracle contract on the given block number. + /// @notice Wit/oracle contract on the given block number. /// @dev Returns zero values if no randomize request was actually posted on the given block. /// @return queryId Identifier of the underlying Witnet query created on the given block number. /// @return prevRandomizeBlock Block number in which a randomize request got posted just before this one. 0 if none. /// @return nextRandomizeBlock Block number in which a randomize request got posted just after this one, 0 if none. - function getRandomizeData(uint256 blockNumber) external view returns ( - uint256 queryId, - uint256 prevRandomizeBlock, - uint256 nextRandomizeBlock + function getRandomizeData(Witnet.BlockNumber blockNumber) external view returns ( + Witnet.QueryId queryId, + Witnet.BlockNumber prevRandomizeBlock, + Witnet.BlockNumber nextRandomizeBlock ); /// @notice Returns the number of the next block in which a randomize request was posted after the given one. /// @param blockNumber Block number from which the search will start. /// @return Number of the first block found after the given one, or `0` otherwise. - function getRandomizeNextBlock(uint256 blockNumber) external view returns (uint256); + function getRandomizeNextBlock(Witnet.BlockNumber blockNumber) external view returns (Witnet.BlockNumber); /// @notice Returns the number of the previous block in which a randomize request was posted before the given one. /// @param blockNumber Block number from which the search will start. /// @return First block found before the given one, or `0` otherwise. - function getRandomizePrevBlock(uint256 blockNumber) external view returns (uint256); + function getRandomizePrevBlock(Witnet.BlockNumber blockNumber) external view returns (Witnet.BlockNumber); /// @notice Returns status of the first non-errored randomize request posted on or after the given block number. /// @dev - 0 -> Unknown: no randomize request was actually posted on or after the given block number. @@ -83,7 +81,7 @@ interface IWitRandomness { /// @notice Returns `true` only if a successfull resolution from the Witnet blockchain is found for the first /// @notice non-failing randomize request posted on or after the given block number. - function isRandomized(uint256 blockNumber) external view returns (bool); + function isRandomized(Witnet.BlockNumber blockNumber) external view returns (bool); /// @notice Generates a pseudo-random number uniformly distributed within the range [0 .. _range), by using /// @notice the given `nonce` and the randomness returned by `fetchRandomnessAfter(blockNumber)`. @@ -91,23 +89,23 @@ interface IWitRandomness { /// @param range Range within which the uniformly-distributed random number will be generated. /// @param nonce Nonce value enabling multiple random numbers from the same randomness value. /// @param blockNumber Block number from which the search for the first randomize request solved aftewards will start. - function random(uint32 range, uint256 nonce, uint256 blockNumber) external view returns (uint32); + function random(uint32 range, uint256 nonce, Witnet.BlockNumber blockNumber) external view returns (uint32); /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness. - /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. + /// @dev Only one randomness request per block will be actually posted to the Wit/oracle. /// @dev Unused funds will be transferred back to the `msg.sender`. /// @return Funds actually paid as randomize fee. function randomize() external payable returns (uint256); /// @notice Requests the Witnet oracle to generate an EVM-agnostic and trustless source of randomness, /// @notice while fulfilling the given SLA data security parameters. - /// @dev Only one randomness request per block will be actually posted to the Witnet Oracle. + /// @dev Only one randomness request per block will be actually posted to the Wit/oracle. /// @dev Unused funds will be transferred back to the `msg.sender`. /// @dev Passed SLA security parameters must be equal or greater than `witOracleDefaultQuerySLA()`. /// @return Funds actually paid as randomize fee. function randomize(Witnet.QuerySLA calldata) external payable returns (uint256); - /// @notice Returns the SLA parameters required for the Witnet Oracle blockchain to fulfill + /// @notice Returns the SLA parameters required for the Wit/oracle blockchain to fulfill /// @notice when solving randomness requests: /// @notice - number of witnessing nodes contributing to randomness generation /// @notice - reward in $nanoWIT received per witnessing node in the Witnet blockchain diff --git a/contracts/interfaces/IWitRandomnessEvents.sol b/contracts/interfaces/IWitRandomnessEvents.sol index 80085da1..61013ab2 100644 --- a/contracts/interfaces/IWitRandomnessEvents.sol +++ b/contracts/interfaces/IWitRandomnessEvents.sol @@ -12,6 +12,6 @@ interface IWitRandomnessEvents { event Randomizing( address evmOrigin, address evmSender, - uint256 witOracleQueryId + Witnet.QueryId witOracleQueryId ); } diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 04061ae0..2c2bab7b 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -9,9 +9,16 @@ library Witnet { using WitnetBuffer for WitnetBuffer.Buffer; using WitnetCBOR for WitnetCBOR.CBOR; using WitnetCBOR for WitnetCBOR.CBOR[]; + + type BlockNumber is uint64; type ResultTimestamp is uint32; type TransactionHash is bytes32; + type QueryCapability is bytes20; + type QueryCapabilityMember is bytes4; + type QueryHash is bytes15; + type QueryId is uint256; + type QueryReward is uint72; uint32 constant internal WIT_1_GENESIS_TIMESTAMP = 0; // TBD uint32 constant internal WIT_1_SECS_PER_EPOCH = 45; @@ -75,21 +82,14 @@ library Witnet { uint256[4][] committeeMissingPubkeys; } - type QueryCapability is bytes20; - type QueryCapabilityMember is bytes4; - type QueryBlock is uint64; - type QueryHash is bytes15; - type QueryId is uint256; - type QueryReward is uint72; - /// Struct containing both request and response data related to every query posted to the Witnet Request Board struct Query { QueryRequest request; QueryResponse response; QuerySLA slaParams; // Minimum Service-Level parameters to be committed by the Witnet blockchain. - QueryBlock checkpoint; QueryHash hash; // Unique query hash determined by payload, WRB instance, chain id and EVM's previous block hash. QueryReward reward; // EVM amount in wei eventually to be paid to the legit result reporter. + BlockNumber checkpoint; } /// Possible status of a Witnet query. @@ -540,6 +540,30 @@ library Witnet { ))); } + + /// ======================================================================= + /// --- BlockNumber helper functions -------------------------------------- + + function egt(BlockNumber a, BlockNumber b) internal pure returns (bool) { + return BlockNumber.unwrap(a) >= BlockNumber.unwrap(b); + } + + function elt(BlockNumber a, BlockNumber b) internal pure returns (bool) { + return BlockNumber.unwrap(a) <= BlockNumber.unwrap(b); + } + + function gt(BlockNumber a, BlockNumber b) internal pure returns (bool) { + return BlockNumber.unwrap(a) > BlockNumber.unwrap(b); + } + + function lt(BlockNumber a, BlockNumber b) internal pure returns (bool) { + return BlockNumber.unwrap(a) < BlockNumber.unwrap(b); + } + + function isZero(BlockNumber b) internal pure returns (bool) { + return (BlockNumber.unwrap(b) == 0); + } + /// ======================================================================= /// --- FastForward helper functions ------------------------------- @@ -816,6 +840,13 @@ library Witnet { || self == ResultStatus.BridgeOversizedTallyResult ); } + + + /// ======================================================================================================== + /// --- 'QueryId' helper methods --------------------------------------------------------------------------- + + function isZero(QueryId a) internal pure returns (bool) { + return (QueryId.unwrap(a) == 0); } From 14a1a8d6b9a1e79637e00f4f788b825c41b46fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 16:42:25 +0100 Subject: [PATCH 53/62] chore: remove test/mocks/MyDapp.sol --- test/mocks/MyDapp.sol | 89 ------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 test/mocks/MyDapp.sol diff --git a/test/mocks/MyDapp.sol b/test/mocks/MyDapp.sol deleted file mode 100644 index 589fcc84..00000000 --- a/test/mocks/MyDapp.sol +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.7.0 <0.9.0; -pragma experimental ABIEncoderV2; - -import "../../contracts/mockups/WitOracleRandomnessConsumer.sol"; - -contract MyDapp - is - WitOracleRandomnessConsumer -{ - using WitnetCBOR for WitnetCBOR.CBOR; - - event Randomizing(uint256 queryId); - event Randomized(uint256 queryId, bytes32 randomness); - event Error(uint256 queryId, Witnet.ResultErrorCodes errorCode); - - bytes32 public randomness; - bytes32 public witnetRandomnessRadHash; - uint64 public immutable callbackGasLimit; - bytes public witnetRandomnessBytecode; - struct Rubbish { - bytes32 slot1; - bytes32 slot2; - bytes32 slot3; - } - Rubbish public rubbish; - - uint256 private immutable __randomizeValue; - - constructor(WitOracle _witOracle, uint16 _baseFeeOverheadPercentage, uint24 _callbackGasLimit) - WitOracleRandomnessConsumer( - _witOracle, - _baseFeeOverheadPercentage, - _callbackGasLimit - ) - { - callbackGasLimit = _callbackGasLimit; - rubbish.slot1 = blockhash(block.number - 1); - rubbish.slot2 = blockhash(block.number - 2); - rubbish.slot3 = blockhash(block.number - 3); - witnetRandomnessRadHash = __witOracleRandomnessRadHash; - witnetRandomnessBytecode = witOracle().registry().bytecodeOf(__witOracleRandomnessRadHash); - __randomizeValue = _witOracleEstimateBaseFee(); - } - - function getRandomizeValue() external view returns (uint256) { - return __randomizeValue; - } - - function randomize() external payable returns (uint256 _randomizeId) { - _randomizeId = __witOracleRandomize(__randomizeValue); - if (__randomizeValue < msg.value) { - payable(msg.sender).transfer(msg.value - __randomizeValue); - } - } - - /// @notice Method to be called from the WitOracle contract as soon as the given Witnet `queryId` - /// @notice gets reported, if reported with no errors. - /// @dev It should revert if called from any other address different to the WitOracle being used - /// @dev by the WitOracleConsumer contract. Within the implementation of this method, the WitOracleConsumer - /// @dev can call to the WRB as to retrieve the Witnet tracking information (i.e. the `witnetDrTxHash` - /// @dev and `witnetDrCommitTxTimestamp`), or the finality status, of the result being reported. - function reportWitOracleResultValue( - uint256 _queryId, uint64, bytes32, uint256, - WitnetCBOR.CBOR calldata witnetResultCborValue - ) - override external - onlyFromWitnet - { - // randomness = _witOracleRandomizeSeedFromResultValue(witnetResultCborValue); - // delete rubbish; - // witOracle.burnQuery(_queryId); - // emit Result(queryId, _witOracleRandomizeSeedFromResultValue(cborValue)); - } - - function reportWitOracleResultError( - uint256 queryId, - uint64, bytes32, uint256, - Witnet.ResultErrorCodes errorCode, WitnetCBOR.CBOR calldata - ) - virtual external - onlyFromWitnet - { - emit Error(queryId, errorCode); - } - - -} From 8917160247addc4f026b701a31b0f27bf03c9156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 18:42:55 +0100 Subject: [PATCH 54/62] fix: libs migration script --- migrations/scripts/2_libs.js | 15 ++++++++------- settings/specs.js | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/migrations/scripts/2_libs.js b/migrations/scripts/2_libs.js index a1ab4d50..17df672f 100644 --- a/migrations/scripts/2_libs.js +++ b/migrations/scripts/2_libs.js @@ -17,11 +17,14 @@ module.exports = async function (_, network, [, from]) { const impl = networkArtifacts.libs[base] let libNetworkAddr = utils.getNetworkLibsArtifactAddress(network, addresses, impl) if ( - process.argv.includes("--artifacts") && !process.argv.includes("--upgrade-all") - && !selection.includes(impl) && !selection.includes(base) + process.argv.includes("--artifacts") + && process.argv.includes("--compile-none") + && !process.argv.includes("--upgrade-all") + && !selection.includes(impl) + && !selection.includes(base) ) { utils.traceHeader(`Skipped '${impl}`) - console.info(" > library address: ", libNetworkAddr) + console.info(` > library address: \x1b[92m${libNetworkAddr}\x1b[0m`) continue; } const libImplArtifact = artifacts.require(impl) @@ -31,10 +34,8 @@ module.exports = async function (_, network, [, from]) { if ( // lib implementation artifact is listed as --artifacts on CLI selection.includes(impl) || selection.includes(base) || - // or, no address found in addresses file but code is already deployed into target address - (utils.isNullAddress(libNetworkAddr) && libTargetCode.length > 3) || - // or, address found in addresses file but no code currently deployed in such - (await web3.eth.getCode(libNetworkAddr)).length < 3 || + // or, no address found in addresses file, or no actual code deployed there + (utils.isNullAddress(libNetworkAddr) || (await web3.eth.getCode(libNetworkAddr)).length < 3) || // or. --libs specified on CLI (libTargetAddr !== libNetworkAddr && process.argv.includes("--upgrade-all")) ) { diff --git a/settings/specs.js b/settings/specs.js index 3d32a8b1..d44bb97a 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -6,7 +6,7 @@ module.exports = { ], baseLibs: [ "WitOracleDataLib", - "WitOracleResultErrorsLib", + "WitOracleResultStatusLib", ], immutables: { types: ["(uint32, uint32, uint32, uint32)"], From 99f120433acbcec95f6d552dabaf133113063b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 28 Oct 2024 21:28:15 +0100 Subject: [PATCH 55/62] fix(wrb): minimum common specs() --- contracts/core/base/WitOracleBaseTrustable.sol | 10 +--------- contracts/core/base/WitOracleBaseTrustless.sol | 9 --------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 034c11ca..3197c5db 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -34,14 +34,6 @@ abstract contract WitOracleBaseTrustable ); _; } - function specs() virtual override external pure returns (bytes4) { - return ( - type(IWitAppliance).interfaceId - ^ type(IWitOracle).interfaceId - ^ type(IWitOracleTrustable).interfaceId - ); - } - constructor(bytes32 _versionTag) Ownable(msg.sender) Payable(address(0)) @@ -551,7 +543,7 @@ abstract contract WitOracleBaseTrustable }) ); } - + function __reportResult( uint256 _queryId, uint32 _resultTimestamp, diff --git a/contracts/core/base/WitOracleBaseTrustless.sol b/contracts/core/base/WitOracleBaseTrustless.sol index 63f8b43d..a64e623d 100644 --- a/contracts/core/base/WitOracleBaseTrustless.sol +++ b/contracts/core/base/WitOracleBaseTrustless.sol @@ -39,15 +39,6 @@ abstract contract WitOracleBaseTrustless } _; } - function specs() virtual override external pure returns (bytes4) { - return ( - type(IWitAppliance).interfaceId - ^ type(IWitOracle).interfaceId - ^ type(IWitOracleBlocks).interfaceId - ^ type(IWitOracleTrustless).interfaceId - ); - } - constructor( uint256 _queryAwaitingBlocks, uint256 _queryReportingStake From b6adfb265a21be312b5e639498c0ea29e1572163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 29 Oct 2024 11:13:52 +0100 Subject: [PATCH 56/62] chore: lighten WitPriceFeedsUpgradable --- contracts/apps/WitPriceFeedsUpgradable.sol | 479 +++++++----------- contracts/data/WitPriceFeedsData.sol | 73 --- contracts/data/WitPriceFeedsDataLib.sol | 442 ++++++++++++++++ contracts/interfaces/IWitFeedsAdmin.sol | 7 +- contracts/interfaces/IWitFeedsEvents.sol | 4 +- contracts/libs/WitPriceFeedsLib.sol | 96 ---- contracts/mockups/WitPriceFeedsSolverBase.sol | 9 +- migrations/scripts/3_framework.js | 2 +- scripts/verify-libs.js | 2 +- settings/artifacts.js | 2 +- settings/specs.js | 2 +- 11 files changed, 645 insertions(+), 473 deletions(-) delete mode 100644 contracts/data/WitPriceFeedsData.sol create mode 100644 contracts/data/WitPriceFeedsDataLib.sol delete mode 100644 contracts/libs/WitPriceFeedsLib.sol diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 8b59e3f4..e2091fde 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -3,12 +3,14 @@ pragma solidity >=0.8.0 <0.9.0; import "../WitPriceFeeds.sol"; import "../core/WitnetUpgradableBase.sol"; -import "../data/WitPriceFeedsData.sol"; + +import "../data/WitPriceFeedsDataLib.sol"; + import "../interfaces/IWitFeedsAdmin.sol"; import "../interfaces/IWitFeedsLegacy.sol"; import "../interfaces/IWitPriceFeedsSolverFactory.sol"; import "../interfaces/IWitOracleLegacy.sol"; -import "../libs/WitPriceFeedsLib.sol"; + import "../patterns/Ownable2Step.sol"; /// @title WitPriceFeeds: Price Feeds live repository reliant on the Wit/oracle blockchain. @@ -18,7 +20,6 @@ contract WitPriceFeedsUpgradable is Ownable2Step, WitPriceFeeds, - WitPriceFeedsData, WitnetUpgradableBase, IWitFeedsAdmin, IWitFeedsLegacy, @@ -76,7 +77,7 @@ contract WitPriceFeedsUpgradable msg.sig == IWitPriceFeedsSolver.solve.selector && msg.sender == address(this) ) { - address _solver = __records_(bytes4(bytes8(msg.data) << 32)).solver; + address _solver = WitPriceFeedsDataLib.seekRecord(bytes4(bytes8(msg.data) << 32)).solver; _require( _solver != address(0), "unsettled solver" @@ -111,6 +112,7 @@ contract WitPriceFeedsUpgradable }); // settle default base fee overhead percentage __baseFeeOverheadPercentage = 10; + } else { // otherwise, store beacon read from _initData, if any if (_initData.length > 0) { @@ -139,8 +141,30 @@ contract WitPriceFeedsUpgradable // ================================================================================================================ - // --- Implements 'IFeeds' ---------------------------------------------------------------------------------------- + // --- Implements 'IWitFeeds' ------------------------------------------------------------------------------------- + + function defaultRadonSLA() + override + public view + returns (Witnet.QuerySLA memory) + { + return __defaultRadonSLA; + } + function estimateUpdateBaseFee(uint256 _evmGasPrice) virtual override public view returns (uint256) { + return estimateUpdateRequestFee(_evmGasPrice); + } + + function estimateUpdateRequestFee(uint256 _evmGasPrice) + virtual override + public view + returns (uint) + { + return (IWitOracleLegacy(address(witOracle)).estimateBaseFee(_evmGasPrice, 32) + * (100 + __baseFeeOverheadPercentage) + ) / 100; + } + /// @notice Returns unique hash determined by the combination of data sources being used /// @notice on non-routed price feeds, and dependencies of routed price feeds. /// @dev Ergo, `footprint()` changes if any data source is modified, or the dependecy tree @@ -163,7 +187,7 @@ contract WitPriceFeedsUpgradable public pure returns (bytes4) { - return bytes4(keccak256(bytes(caption))); + return WitPriceFeedsDataLib.hash(caption); } function lookupCaption(bytes4 feedId) @@ -171,7 +195,7 @@ contract WitPriceFeedsUpgradable public view returns (string memory) { - return __records_(feedId).caption; + return WitPriceFeedsDataLib.seekRecord(feedId).caption; } function supportedFeeds() @@ -179,14 +203,7 @@ contract WitPriceFeedsUpgradable external view returns (bytes4[] memory _ids, string[] memory _captions, bytes32[] memory _solvers) { - _ids = __storage().ids; - _captions = new string[](_ids.length); - _solvers = new bytes32[](_ids.length); - for (uint _ix = 0; _ix < _ids.length; _ix ++) { - Record storage __record = __records_(_ids[_ix]); - _captions[_ix] = __record.caption; - _solvers[_ix] = address(__record.solver) == address(0) ? __record.radHash : bytes32(bytes20(__record.solver)); - } + return WitPriceFeedsDataLib.supportedFeeds(); } function supportsCaption(string calldata caption) @@ -195,7 +212,7 @@ contract WitPriceFeedsUpgradable returns (bool) { bytes4 feedId = hash(caption); - return hash(__records_(feedId).caption) == feedId; + return hash(WitPriceFeedsDataLib.seekRecord(feedId).caption) == feedId; } function totalFeeds() @@ -206,51 +223,27 @@ contract WitPriceFeedsUpgradable return __storage().ids.length; } - - // ================================================================================================================ - // --- Implements 'IWitFeeds' ---------------------------------------------------------------------------------- - - function defaultRadonSLA() - override - public view - returns (Witnet.QuerySLA memory) - { - return __defaultRadonSLA; - } - - function estimateUpdateBaseFee(uint256 _evmGasPrice) virtual override public view returns (uint256) { - return estimateUpdateRequestFee(_evmGasPrice); - } - - function estimateUpdateRequestFee(uint256 _evmGasPrice) - virtual override - public view - returns (uint) - { - return (IWitOracleLegacy(address(witOracle)).estimateBaseFee(_evmGasPrice, 32) - * (100 + __baseFeeOverheadPercentage) - ) / 100; - } - function lastValidQueryId(bytes4 feedId) override public view returns (Witnet.QueryId) { - return _lastValidQueryId(feedId); + return WitPriceFeedsDataLib.lastValidQueryId(witOracle, feedId); } function lastValidQueryResponse(bytes4 feedId) override public view returns (Witnet.QueryResponse memory) { - return witOracle.getQueryResponse(_lastValidQueryId(feedId)); + return witOracle.getQueryResponse( + WitPriceFeedsDataLib.lastValidQueryId(witOracle, feedId) + ); } function latestUpdateQueryId(bytes4 feedId) override public view returns (Witnet.QueryId) { - return __records_(feedId).latestUpdateQueryId; + return WitPriceFeedsDataLib.seekRecord(feedId).latestUpdateQueryId; } function latestUpdateQueryRequest(bytes4 feedId) @@ -271,7 +264,7 @@ contract WitPriceFeedsUpgradable override public view returns (Witnet.ResultStatus) { - return _coalesceQueryResultStatus(latestUpdateQueryId(feedId)); + return WitPriceFeedsDataLib.latestUpdateQueryResultStatus(witOracle, feedId); } function latestUpdateQueryResultStatusDescription(bytes4 feedId) @@ -287,7 +280,7 @@ contract WitPriceFeedsUpgradable override public view returns (bytes memory) { - Record storage __record = __records_(feedId); + WitPriceFeedsDataLib.Record storage __record = WitPriceFeedsDataLib.seekRecord(feedId); _require( __record.radHash != 0, "no RAD hash" @@ -299,7 +292,7 @@ contract WitPriceFeedsUpgradable override public view returns (bytes32) { - return __records_(feedId).radHash; + return WitPriceFeedsDataLib.seekRecord(feedId).radHash; } function lookupWitOracleRadonRetrievals(bytes4 feedId) @@ -322,12 +315,8 @@ contract WitPriceFeedsUpgradable function requestUpdate(bytes4 feedId, Witnet.QuerySLA calldata updateSLA) public payable virtual override - returns (uint256 _usedFunds) + returns (uint256) { - _require( - updateSLA.equalOrGreaterThan(__defaultRadonSLA), - "unsecure update" - ); return __requestUpdate(feedId, updateSLA); } @@ -428,36 +417,25 @@ contract WitPriceFeedsUpgradable Ownable.transferOwnership(_newOwner); } - function deleteFeed(string calldata caption) - virtual override - external - onlyOwner - { - bytes4 feedId = hash(caption); - bytes4[] storage __ids = __storage().ids; - Record storage __record = __records_(feedId); - uint _index = __record.index; - _require(_index != 0, "unknown feed"); - { - bytes4 _lastFeedId = __ids[__ids.length - 1]; - __ids[_index - 1] = _lastFeedId; - __ids.pop(); - __records_(_lastFeedId).index = _index; - delete __storage().records[feedId]; + function deleteFeed(string calldata caption) virtual override external onlyOwner { + try WitPriceFeedsDataLib.deleteFeed(caption) { + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } - emit WitnetFeedDeleted(feedId); } - function deleteFeeds() - virtual override - external - onlyOwner - { - bytes4[] storage __ids = __storage().ids; - for (uint _ix = __ids.length; _ix > 0; _ix --) { - bytes4 _feedId = __ids[_ix - 1]; - delete __storage().records[_feedId]; __ids.pop(); - emit WitnetFeedDeleted(_feedId); + function deleteFeeds() virtual override external onlyOwner { + try WitPriceFeedsDataLib.deleteFeeds() { + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } } @@ -475,7 +453,6 @@ contract WitPriceFeedsUpgradable { _require(defaultSLA.isValid(), "invalid SLA"); __defaultRadonSLA = defaultSLA; - emit WitnetRadonSLA(defaultSLA); } function settleFeedRequest(string calldata caption, bytes32 radHash) @@ -486,21 +463,14 @@ contract WitPriceFeedsUpgradable _registry().lookupRadonRequestResultDataType(radHash) == dataType, "bad result data type" ); - bytes4 feedId = hash(caption); - Record storage __record = __records_(feedId); - if (__record.index == 0) { - // settle new feed: - __record.caption = caption; - __record.decimals = _validateCaption(caption); - __record.index = __storage().ids.length + 1; - __record.radHash = radHash; - __storage().ids.push(feedId); - } else if (__record.radHash != radHash) { - // update radHash on existing feed: - __record.radHash = radHash; - __record.solver = address(0); + try WitPriceFeedsDataLib.settleFeedRequest(caption, radHash) { + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } - emit WitnetFeedSettled(feedId, radHash); } function settleFeedRequest(string calldata caption, WitOracleRequest request) @@ -529,60 +499,22 @@ contract WitPriceFeedsUpgradable override external onlyOwner { + _require( + bytes6(bytes(caption)) == bytes6(__prefix), + "bad caption prefix" + ); _require( solver != address(0), "no solver address" ); - bytes4 feedId = hash(caption); - Record storage __record = __records_(feedId); - if (__record.index == 0) { - // settle new feed: - __record.caption = caption; - __record.decimals = _validateCaption(caption); - __record.index = __storage().ids.length + 1; - __record.solver = solver; - __storage().ids.push(feedId); - } else if (__record.solver != solver) { - // update radHash on existing feed: - __record.radHash = 0; - __record.solver = solver; - } - // validate solver first-level dependencies - { - // solhint-disable-next-line avoid-low-level-calls - (bool _success, bytes memory _reason) = solver.delegatecall(abi.encodeWithSelector( - IWitPriceFeedsSolver.validate.selector, - feedId, - deps - )); - if (!_success) { - assembly { - _reason := add(_reason, 4) - } - _revert(string(abi.encodePacked( - "solver validation failed: ", - string(abi.decode(_reason,(string))) - ))); - } - } - // smoke-test the solver - { - // solhint-disable-next-line avoid-low-level-calls - (bool _success, bytes memory _reason) = address(this).staticcall(abi.encodeWithSelector( - IWitPriceFeedsSolver.solve.selector, - feedId - )); - if (!_success) { - assembly { - _reason := add(_reason, 4) - } - _revert(string(abi.encodePacked( - "smoke-test failed: ", - string(abi.decode(_reason,(string))) - ))); - } + try WitPriceFeedsDataLib.settleFeedSolver(caption, solver, deps) { + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } - emit WitnetFeedSolverSettled(feedId, solver); } @@ -594,7 +526,7 @@ contract WitPriceFeedsUpgradable external view returns (uint8) { - return __records_(feedId).decimals; + return WitPriceFeedsDataLib.seekRecord(feedId).decimals; } function lookupPriceSolver(bytes4 feedId) @@ -602,12 +534,7 @@ contract WitPriceFeedsUpgradable external view returns (IWitPriceFeedsSolver _solverAddress, string[] memory _solverDeps) { - _solverAddress = IWitPriceFeedsSolver(__records_(feedId).solver); - bytes4[] memory _deps = _depsOf(feedId); - _solverDeps = new string[](_deps.length); - for (uint _ix = 0; _ix < _deps.length; _ix ++) { - _solverDeps[_ix] = lookupCaption(_deps[_ix]); - } + return WitPriceFeedsDataLib.seekPriceSolver(feedId); } function latestPrice(bytes4 feedId) @@ -615,42 +542,17 @@ contract WitPriceFeedsUpgradable public view returns (IWitPriceFeedsSolver.Price memory) { - Witnet.QueryId _queryId = _lastValidQueryId(feedId); - if (Witnet.QueryId.unwrap(_queryId) > 0) { - Witnet.DataResult memory _lastValidResult = witOracle.getQueryResult(_queryId); - return IWitPriceFeedsSolver.Price({ - value: _lastValidResult.fetchUint(), - timestamp: _lastValidResult.timestamp, - drTxHash: _lastValidResult.drTxHash, - status: latestUpdateQueryResultStatus(feedId) - }); - } else { - address _solver = __records_(feedId).solver; - if (_solver != address(0)) { - // solhint-disable-next-line avoid-low-level-calls - (bool _success, bytes memory _result) = address(this).staticcall(abi.encodeWithSelector( - IWitPriceFeedsSolver.solve.selector, - feedId - )); - if (!_success) { - assembly { - _result := add(_result, 4) - } - revert(string(abi.encodePacked( - "WitPriceFeeds: ", - string(abi.decode(_result, (string))) - ))); - } else { - return abi.decode(_result, (IWitPriceFeedsSolver.Price)); - } - } else { - return IWitPriceFeedsSolver.Price({ - value: 0, - timestamp: Witnet.ResultTimestamp.wrap(0), - drTxHash: Witnet.TransactionHash.wrap(0), - status: latestUpdateQueryResultStatus(feedId) - }); - } + try WitPriceFeedsDataLib.latestPrice( + witOracle, + feedId + ) returns (IWitPriceFeedsSolver.Price memory _latestPrice) { + return _latestPrice; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } } @@ -670,25 +572,36 @@ contract WitPriceFeedsUpgradable // --- Implements 'IWitPriceFeedsSolverFactory' --------------------------------------------------------------------- function deployPriceSolver(bytes calldata initcode, bytes calldata constructorParams) - virtual override - external + virtual override external onlyOwner - returns (address _solver) + returns (address) { - _solver = WitPriceFeedsLib.deployPriceSolver(initcode, constructorParams); - emit NewPriceFeedsSolver( - _solver, - _solver.codehash, + try WitPriceFeedsDataLib.deployPriceSolver( + initcode, constructorParams - ); + ) returns ( + address _solver + ) { + emit NewPriceFeedsSolver( + _solver, + _solver.codehash, + constructorParams + ); + return _solver; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); + } } function determinePriceSolverAddress(bytes calldata initcode, bytes calldata constructorParams) - virtual override - public view + virtual override public view returns (address _address) { - return WitPriceFeedsLib.determinePriceSolverAddress(initcode, constructorParams); + return WitPriceFeedsDataLib.determinePriceSolverAddress(initcode, constructorParams); } @@ -714,124 +627,110 @@ contract WitPriceFeedsUpgradable // ================================================================================================================ // --- Internal methods ------------------------------------------------------------------------------------------- - function _coalesceQueryResultStatus(Witnet.QueryId _queryId) - internal view - returns (Witnet.ResultStatus) - { - if (Witnet.QueryId.unwrap(_queryId) > 0) { - return witOracle.getQueryResultStatus(_queryId); - } else { - return Witnet.ResultStatus.NoErrors; - } - } - function _footprintOf(bytes4 _id4) virtual internal view returns (bytes4) { - if (__records_(_id4).radHash != bytes32(0)) { - return bytes4(keccak256(abi.encode(_id4, __records_(_id4).radHash))); + if (WitPriceFeedsDataLib.seekRecord(_id4).radHash != bytes32(0)) { + return bytes4(keccak256(abi.encode(_id4, WitPriceFeedsDataLib.seekRecord(_id4).radHash))); } else { - return bytes4(keccak256(abi.encode(_id4, __records_(_id4).solverDepsFlag))); - } - } - - function _lastValidQueryId(bytes4 feedId) - virtual internal view - returns (Witnet.QueryId _queryId) - { - _queryId = latestUpdateQueryId(feedId); - if ( - Witnet.QueryId.unwrap(_queryId) == 0 - || witOracle.getQueryResultStatus(_queryId) != Witnet.ResultStatus.NoErrors - ) { - _queryId = __records_(feedId).lastValidQueryId; + return bytes4(keccak256(abi.encode(_id4, WitPriceFeedsDataLib.seekRecord(_id4).solverDepsFlag))); } } function _validateCaption(string calldata caption) internal view returns (uint8) { - try WitPriceFeedsLib.validateCaption(__prefix, caption) returns (uint8 _decimals) { + _require( + bytes6(bytes(caption)) == bytes6(__prefix), + "bad caption prefix" + ); + try WitPriceFeedsDataLib.validateCaption(caption) returns (uint8 _decimals) { return _decimals; - } catch Error(string memory reason) { - _revert(reason); + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); } } + function _revertWitPriceFeedsDataLibUnhandledException() internal view { + _revert(_revertWitPriceFeedsDataLibUnhandledExceptionReason()); + } + + function _revertWitPriceFeedsDataLibUnhandledExceptionReason() internal pure returns (string memory) { + return string(abi.encodePacked( + type(WitPriceFeedsDataLib).name, + ": unhandled assertion" + )); + } + function __requestUpdate(bytes4[] memory _deps, Witnet.QuerySLA memory sla) virtual internal - returns (uint256 _usedFunds) + returns (uint256 _evmUsedFunds) { - uint _partial = msg.value / _deps.length; + uint _evmUnitaryUpdateRequestFee = msg.value / _deps.length; for (uint _ix = 0; _ix < _deps.length; _ix ++) { - _usedFunds += this.requestUpdate{value: _partial}(_deps[_ix], sla); + _evmUsedFunds += this.requestUpdate{ + value: _evmUnitaryUpdateRequestFee + }( + _deps[_ix], + sla + ); } } - function __requestUpdate(bytes4 feedId, Witnet.QuerySLA memory querySLA) + function __requestUpdate( + bytes4 feedId, + Witnet.QuerySLA memory querySLA + ) virtual internal - returns (uint256 _usedFunds) - { - // TODO: let requester settle the reward (see WRV2.randomize(..)) - Record storage __feed = __records_(feedId); - if (__feed.radHash != 0) { - _usedFunds = estimateUpdateRequestFee(tx.gasprice); - _require(msg.value >= _usedFunds, "insufficient reward"); - Witnet.QueryId _latestId = __feed.latestUpdateQueryId; - Witnet.ResultStatus _latestStatus = _coalesceQueryResultStatus(_latestId); - if (_latestStatus.keepWaiting()) { - // latest update is still pending, so just increase the reward - // accordingly to current tx gasprice: - uint72 _evmReward = Witnet.QueryReward.unwrap(witOracle.getQueryEvmReward(_latestId)); - int _deltaReward = int(int72(_evmReward)) - int(_usedFunds); - if (_deltaReward > 0) { - _usedFunds = uint(_deltaReward); - witOracle.upgradeQueryEvmReward{value: _usedFunds}(_latestId); - } else { - _usedFunds = 0; - } - } else { - // Check if latest update ended successfully: - if (_latestStatus == Witnet.ResultStatus.NoErrors) { - // If so, remove previous last valid query from the WRB: - if (Witnet.QueryId.unwrap(__feed.lastValidQueryId) > 0) { - _usedFunds += Witnet.QueryReward.unwrap( - witOracle.deleteQuery(__feed.lastValidQueryId) - ); - } - __feed.lastValidQueryId = _latestId; - } else { - // Otherwise, try to delete latest query, as it was faulty - // and we are about to post a new update request: - try witOracle.deleteQuery(_latestId) - returns (Witnet.QueryReward _unsedReward) { - _usedFunds += Witnet.QueryReward.unwrap(_unsedReward); - } catch {} + returns (uint256) + { + if (WitPriceFeedsDataLib.seekRecord(feedId).radHash != 0) { + // TODO: let requester settle the reward (see WRV2.randomize(..)) + uint256 _evmUpdateRequestFee = estimateUpdateRequestFee(tx.gasprice); + _require( + msg.value >= _evmUpdateRequestFee, + "insufficient update fee" + ); + try WitPriceFeedsDataLib.requestUpdate( + witOracle, + feedId, + querySLA, + _evmUpdateRequestFee + + ) returns ( + Witnet.QueryId _latestQueryId, + uint256 _evmUsedFunds + + ) { + if (_evmUsedFunds < msg.value) { + // transfer back unused funds: + payable(msg.sender).transfer(msg.value - _evmUsedFunds); } - // Post update request to the WRB: - _latestId = witOracle.postQuery{value: _usedFunds}( - __feed.radHash, - querySLA - ); - // Update latest query id: - __feed.latestUpdateQueryId = _latestId; // solhint-disable avoid-tx-origin: - emit PullingUpdate( - tx.origin, - _msgSender(), - feedId, - Witnet.QueryId.unwrap(_latestId) - ); - } - } else if (__feed.solver != address(0)) { - _usedFunds = __requestUpdate( - _depsOf(feedId), + emit PullingUpdate(tx.origin, _msgSender(), feedId, _latestQueryId); + return _evmUsedFunds; + + } catch Error(string memory _reason) { + _revert(_reason); + + } catch (bytes memory) { + _revertWitPriceFeedsDataLibUnhandledException(); + } + + } else if (WitPriceFeedsDataLib.seekRecord(feedId).solver != address(0)) { + return __requestUpdate( + WitPriceFeedsDataLib.depsOf(feedId), querySLA ); + } else { _revert("unknown feed"); } - if (_usedFunds < msg.value) { - // transfer back unused funds: - payable(msg.sender).transfer(msg.value - _usedFunds); - } + } + + function __storage() internal pure returns (WitPriceFeedsDataLib.Storage storage) { + return WitPriceFeedsDataLib.data(); } } diff --git a/contracts/data/WitPriceFeedsData.sol b/contracts/data/WitPriceFeedsData.sol deleted file mode 100644 index 2d8587be..00000000 --- a/contracts/data/WitPriceFeedsData.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "../libs/Witnet.sol"; - -/// @title WitFeeds data model. -/// @author The Witnet Foundation. -abstract contract WitPriceFeedsData { - - bytes32 private constant _WIT_FEEDS_DATA_SLOTHASH = - /* keccak256("io.witnet.feeds.data") */ - 0xe36ea87c48340f2c23c9e1c9f72f5c5165184e75683a4d2a19148e5964c1d1ff; - - struct Storage { - bytes32 reserved; - bytes4[] ids; - mapping (bytes4 => Record) records; - } - - struct Record { - string caption; - uint8 decimals; - uint256 index; - Witnet.QueryId lastValidQueryId; - Witnet.QueryId latestUpdateQueryId; - bytes32 radHash; - address solver; // logic contract address for reducing values on routed feeds. - int256 solverReductor; // as to reduce resulting number of decimals on routed feeds. - bytes32 solverDepsFlag; // as to store ids of up to 8 depending feeds. - } - - // ================================================================================================ - // --- Internal functions ------------------------------------------------------------------------- - - /// @notice Returns storage pointer to where Storage data is located. - function __storage() - internal pure - returns (Storage storage _ptr) - { - assembly { - _ptr.slot := _WIT_FEEDS_DATA_SLOTHASH - } - } - - /// @notice Returns storage pointer to where Record for given feedId is located. - function __records_(bytes4 feedId) internal view returns (Record storage) { - return __storage().records[feedId]; - } - - /// @notice Returns array of feed ids from which given feed's value depends. - /// @dev Returns empty array on either unsupported or not-routed feeds. - /// @dev The maximum number of dependencies is hard-limited to 8, as to limit number - /// @dev of SSTORE operations (`__storage().records[feedId].solverDepsFlag`), - /// @dev no matter the actual number of depending feeds involved. - function _depsOf(bytes4 feedId) internal view returns (bytes4[] memory _deps) { - bytes32 _solverDepsFlag = __storage().records[feedId].solverDepsFlag; - _deps = new bytes4[](8); - uint _len; - for (_len = 0; _len < 8; _len ++) { - _deps[_len] = bytes4(_solverDepsFlag); - if (_deps[_len] == 0) { - break; - } else { - _solverDepsFlag <<= 32; - } - } - assembly { - // reset length to actual number of dependencies: - mstore(_deps, _len) - } - } -} \ No newline at end of file diff --git a/contracts/data/WitPriceFeedsDataLib.sol b/contracts/data/WitPriceFeedsDataLib.sol new file mode 100644 index 00000000..852006ad --- /dev/null +++ b/contracts/data/WitPriceFeedsDataLib.sol @@ -0,0 +1,442 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + +import "../interfaces/IWitFeedsAdmin.sol"; +import "../interfaces/IWitPriceFeedsSolver.sol"; + +import "../libs/Slices.sol"; +import "../libs/Witnet.sol"; + +/// @title WitFeeds data model. +/// @author The Witnet Foundation. +library WitPriceFeedsDataLib { + + using Slices for string; + using Slices for Slices.Slice; + + using Witnet for Witnet.DataResult; + using Witnet for Witnet.QueryId; + using Witnet for Witnet.ResultStatus; + + bytes32 private constant _WIT_FEEDS_DATA_SLOTHASH = + /* keccak256("io.witnet.feeds.data") */ + 0xe36ea87c48340f2c23c9e1c9f72f5c5165184e75683a4d2a19148e5964c1d1ff; + + struct Storage { + bytes32 reserved; + bytes4[] ids; + mapping (bytes4 => Record) records; + } + + struct Record { + string caption; + uint8 decimals; + uint256 index; + Witnet.QueryId lastValidQueryId; + Witnet.QueryId latestUpdateQueryId; + bytes32 radHash; + address solver; // logic contract address for reducing values on routed feeds. + int256 solverReductor; // as to reduce resulting number of decimals on routed feeds. + bytes32 solverDepsFlag; // as to store ids of up to 8 depending feeds. + } + + + // ================================================================================================ + // --- Internal functions ------------------------------------------------------------------------- + + /// @notice Returns array of feed ids from which given feed's value depends. + /// @dev Returns empty array on either unsupported or not-routed feeds. + /// @dev The maximum number of dependencies is hard-limited to 8, as to limit number + /// @dev of SSTORE operations (`__storage().records[feedId].solverDepsFlag`), + /// @dev no matter the actual number of depending feeds involved. + function depsOf(bytes4 feedId) public view returns (bytes4[] memory _deps) { + bytes32 _solverDepsFlag = data().records[feedId].solverDepsFlag; + _deps = new bytes4[](8); + uint _len; + for (_len = 0; _len < 8; _len ++) { + _deps[_len] = bytes4(_solverDepsFlag); + if (_deps[_len] == 0) { + break; + } else { + _solverDepsFlag <<= 32; + } + } + assembly { + // reset length to actual number of dependencies: + mstore(_deps, _len) + } + } + + /// @notice Returns storage pointer to where Storage data is located. + function data() + internal pure + returns (Storage storage _ptr) + { + assembly { + _ptr.slot := _WIT_FEEDS_DATA_SLOTHASH + } + } + + function hash(string memory caption) internal pure returns (bytes4) { + return bytes4(keccak256(bytes(caption))); + } + + function lastValidQueryId(WitOracle witOracle, bytes4 feedId) + internal view + returns (Witnet.QueryId _queryId) + { + _queryId = seekRecord(feedId).latestUpdateQueryId; + if ( + _queryId.isZero() + || witOracle.getQueryResultStatus(_queryId) != Witnet.ResultStatus.NoErrors + ) { + _queryId = seekRecord(feedId).lastValidQueryId; + } + } + + function latestUpdateQueryResultStatus(WitOracle witOracle, bytes4 feedId) + internal view + returns (Witnet.ResultStatus) + { + Witnet.QueryId _queryId = seekRecord(feedId).latestUpdateQueryId; + if (!_queryId.isZero()) { + return witOracle.getQueryResultStatus(_queryId); + } else { + return Witnet.ResultStatus.NoErrors; + } + } + + /// @notice Returns storage pointer to where Record for given feedId is located. + function seekRecord(bytes4 feedId) internal view returns (Record storage) { + return data().records[feedId]; + } + + function seekPriceSolver(bytes4 feedId) internal view returns ( + IWitPriceFeedsSolver _solverAddress, + string[] memory _solverDeps + ) + { + _solverAddress = IWitPriceFeedsSolver(seekRecord(feedId).solver); + bytes4[] memory _deps = depsOf(feedId); + _solverDeps = new string[](_deps.length); + for (uint _ix = 0; _ix < _deps.length; _ix ++) { + _solverDeps[_ix] = seekRecord(_deps[_ix]).caption; + } + } + + + // ================================================================================================ + // --- Public functions --------------------------------------------------------------------------- + + function deleteFeed(string calldata caption) public { + bytes4 feedId = hash(caption); + bytes4[] storage __ids = data().ids; + Record storage __record = seekRecord(feedId); + uint _index = __record.index; + require(_index != 0, "unknown feed"); + bytes4 _lastFeedId = __ids[__ids.length - 1]; + __ids[_index - 1] = _lastFeedId; + __ids.pop(); + seekRecord(_lastFeedId).index = _index; + delete data().records[feedId]; + emit IWitFeedsAdmin.WitFeedDeleted(caption, feedId); + } + + function deleteFeeds() public { + bytes4[] storage __ids = data().ids; + for (uint _ix = __ids.length; _ix > 0; _ix --) { + bytes4 _feedId = __ids[_ix - 1]; + string memory _caption = data().records[_feedId].caption; + delete data().records[_feedId]; __ids.pop(); + emit IWitFeedsAdmin.WitFeedDeleted(_caption, _feedId); + } + } + + function latestPrice( + WitOracle witOracle, + bytes4 feedId + ) + public view + returns (IWitPriceFeedsSolver.Price memory) + { + Witnet.QueryId _queryId = lastValidQueryId(witOracle, feedId); + if (!_queryId.isZero()) { + Witnet.DataResult memory _lastValidResult = witOracle.getQueryResult(_queryId); + return IWitPriceFeedsSolver.Price({ + value: _lastValidResult.fetchUint(), + timestamp: _lastValidResult.timestamp, + drTxHash: _lastValidResult.drTxHash, + status: latestUpdateQueryResultStatus(witOracle, feedId) + }); + + } else { + address _solver = seekRecord(feedId).solver; + if (_solver != address(0)) { + // solhint-disable-next-line avoid-low-level-calls + (bool _success, bytes memory _result) = address(this).staticcall(abi.encodeWithSelector( + IWitPriceFeedsSolver.solve.selector, + feedId + )); + if (!_success) { + assembly { + _result := add(_result, 4) + } + revert(string(abi.decode(_result, (string)))); + } else { + return abi.decode(_result, (IWitPriceFeedsSolver.Price)); + } + } else { + return IWitPriceFeedsSolver.Price({ + value: 0, + timestamp: Witnet.ResultTimestamp.wrap(0), + drTxHash: Witnet.TransactionHash.wrap(0), + status: latestUpdateQueryResultStatus(witOracle, feedId) + }); + } + } + } + + function requestUpdate( + WitOracle witOracle, + bytes4 feedId, + Witnet.QuerySLA memory querySLA, + uint256 evmUpdateRequestFee + ) + public + returns ( + Witnet.QueryId _latestQueryId, + uint256 _evmUsedFunds + ) + { + Record storage __feed = seekRecord(feedId); + _latestQueryId = __feed.latestUpdateQueryId; + + Witnet.ResultStatus _latestStatus = latestUpdateQueryResultStatus(witOracle, feedId); + if (_latestStatus.keepWaiting()) { + uint72 _evmUpdateRequestCurrentFee = Witnet.QueryReward.unwrap( + witOracle.getQueryEvmReward(_latestQueryId) + ); + if (evmUpdateRequestFee > _evmUpdateRequestCurrentFee) { + // latest update is still pending, so just increase the reward + // accordingly to current tx gasprice: + _evmUsedFunds = (evmUpdateRequestFee - _evmUpdateRequestCurrentFee); + witOracle.upgradeQueryEvmReward{ + value: _evmUsedFunds + }( + _latestQueryId + ); + + } else { + _evmUsedFunds = 0; + } + + } else { + // Check if latest update ended successfully: + if (_latestStatus == Witnet.ResultStatus.NoErrors) { + // If so, remove previous last valid query from the WRB: + if (!__feed.lastValidQueryId.isZero()) { + evmUpdateRequestFee += Witnet.QueryReward.unwrap( + witOracle.deleteQuery(__feed.lastValidQueryId) + ); + } + __feed.lastValidQueryId = _latestQueryId; + } else { + // Otherwise, try to delete latest query, as it was faulty + // and we are about to post a new update request: + try witOracle.deleteQuery(_latestQueryId) returns (Witnet.QueryReward _unsedReward) { + evmUpdateRequestFee += Witnet.QueryReward.unwrap(_unsedReward); + + } catch {} + } + // Post update request to the WRB: + _evmUsedFunds = evmUpdateRequestFee; + _latestQueryId = witOracle.postQuery{ + value: _evmUsedFunds + }( + __feed.radHash, + querySLA + ); + // Update latest query id: + __feed.latestUpdateQueryId = _latestQueryId; + } + } + + function settleFeedRequest( + string calldata caption, + bytes32 radHash + ) + public + { + bytes4 feedId = hash(caption); + Record storage __record = seekRecord(feedId); + if (__record.index == 0) { + // settle new feed: + __record.caption = caption; + __record.decimals = validateCaption(caption); + __record.index = data().ids.length + 1; + __record.radHash = radHash; + data().ids.push(feedId); + } else if (__record.radHash != radHash) { + // update radHash on existing feed: + __record.radHash = radHash; + __record.solver = address(0); + } + emit IWitFeedsAdmin.WitFeedSettled(caption, feedId, radHash); + } + + function settleFeedSolver( + string calldata caption, + address solver, + string[] calldata deps + ) + public + { + bytes4 feedId = hash(caption); + Record storage __record = seekRecord(feedId); + if (__record.index == 0) { + // settle new feed: + __record.caption = caption; + __record.decimals = validateCaption(caption); + __record.index = data().ids.length + 1; + __record.solver = solver; + data().ids.push(feedId); + + } else if (__record.solver != solver) { + // update radHash on existing feed: + __record.radHash = 0; + __record.solver = solver; + } + // validate solver first-level dependencies + { + // solhint-disable-next-line avoid-low-level-calls + (bool _success, bytes memory _reason) = solver.delegatecall(abi.encodeWithSelector( + IWitPriceFeedsSolver.validate.selector, + feedId, + deps + )); + if (!_success) { + assembly { + _reason := add(_reason, 4) + } + revert(string(abi.encodePacked( + "solver validation failed: ", + string(abi.decode(_reason,(string))) + ))); + } + } + // smoke-test the solver + { + // solhint-disable-next-line avoid-low-level-calls + (bool _success, bytes memory _reason) = address(this).staticcall(abi.encodeWithSelector( + IWitPriceFeedsSolver.solve.selector, + feedId + )); + if (!_success) { + assembly { + _reason := add(_reason, 4) + } + revert(string(abi.encodePacked( + "smoke-test failed: ", + string(abi.decode(_reason,(string))) + ))); + } + } + emit IWitFeedsAdmin.WitFeedSolverSettled(caption, feedId, solver); + } + + function supportedFeeds() public view returns ( + bytes4[] memory _ids, + string[] memory _captions, + bytes32[] memory _solvers + ) + { + _ids = data().ids; + _captions = new string[](_ids.length); + _solvers = new bytes32[](_ids.length); + for (uint _ix = 0; _ix < _ids.length; _ix ++) { + Record storage __record = seekRecord(_ids[_ix]); + _captions[_ix] = __record.caption; + _solvers[_ix] = ( + address(__record.solver) == address(0) + ? __record.radHash + : bytes32(bytes20(__record.solver)) + ); + } + } + + // --- IWitPriceFeedsSolver public functions ------------------------------------------------------------- + + function deployPriceSolver( + bytes calldata initcode, + bytes calldata constructorParams + ) + external + returns (address _solver) + { + _solver = determinePriceSolverAddress(initcode, constructorParams); + if (_solver.code.length == 0) { + bytes memory _bytecode = _completeInitCode(initcode, constructorParams); + address _createdContract; + assembly { + _createdContract := create2( + 0, + add(_bytecode, 0x20), + mload(_bytecode), + 0 + ) + } + // assert(_solver == _createdContract); // fails on TEN chains + _solver = _createdContract; + require( + IWitPriceFeedsSolver(_solver).specs() == type(IWitPriceFeedsSolver).interfaceId, + "uncompliant solver implementation" + ); + } + } + + function determinePriceSolverAddress( + bytes calldata initcode, + bytes calldata constructorParams + ) + public view + returns (address) + { + return address( + uint160(uint(keccak256( + abi.encodePacked( + bytes1(0xff), + address(this), + bytes32(0), + keccak256(_completeInitCode(initcode, constructorParams)) + ) + ))) + ); + } + + function validateCaption(string calldata caption) public pure returns (uint8) { + Slices.Slice memory _caption = caption.toSlice(); + Slices.Slice memory _delim = string("-").toSlice(); + string[] memory _parts = new string[](_caption.count(_delim) + 1); + for (uint _ix = 0; _ix < _parts.length; _ix ++) { + _parts[_ix] = _caption.split(_delim).toString(); + } + (uint _decimals, bool _success) = Witnet.tryUint(_parts[_parts.length - 1]); + require(_success, "bad decimals"); + return uint8(_decimals); + } + + + // ================================================================================================ + // --- Private functions -------------------------------------------------------------------------- + + function _completeInitCode(bytes calldata initcode, bytes calldata constructorParams) + private pure + returns (bytes memory) + { + return abi.encodePacked( + initcode, + constructorParams + ); + } +} diff --git a/contracts/interfaces/IWitFeedsAdmin.sol b/contracts/interfaces/IWitFeedsAdmin.sol index 3b292834..4867f63d 100644 --- a/contracts/interfaces/IWitFeedsAdmin.sol +++ b/contracts/interfaces/IWitFeedsAdmin.sol @@ -9,10 +9,9 @@ import "../WitOracleRequestTemplate.sol"; interface IWitFeedsAdmin { - event WitnetFeedDeleted(bytes4 feedId); - event WitnetFeedSettled(bytes4 feedId, bytes32 radHash); - event WitnetFeedSolverSettled(bytes4 feedId, address solver); - event WitnetRadonSLA(Witnet.QuerySLA sla); + event WitFeedDeleted(string caption, bytes4 feedId); + event WitFeedSettled(string caption, bytes4 feedId, bytes32 radHash); + event WitFeedSolverSettled(string caption, bytes4 feedId, address solver); function acceptOwnership() external; function baseFeeOverheadPercentage() external view returns (uint16); diff --git a/contracts/interfaces/IWitFeedsEvents.sol b/contracts/interfaces/IWitFeedsEvents.sol index ee98537c..58d82df9 100644 --- a/contracts/interfaces/IWitFeedsEvents.sol +++ b/contracts/interfaces/IWitFeedsEvents.sol @@ -2,6 +2,8 @@ pragma solidity >=0.8.0 <0.9.0; +import "../libs/Witnet.sol"; + interface IWitFeedsEvents { /// A fresh update on the data feed identified as `erc2364Id4` has just been @@ -11,6 +13,6 @@ interface IWitFeedsEvents { address evmOrigin, address evmSender, bytes4 erc2362Id4, - uint256 witOracleQueryId + Witnet.QueryId witOracleQueryId ); } diff --git a/contracts/libs/WitPriceFeedsLib.sol b/contracts/libs/WitPriceFeedsLib.sol deleted file mode 100644 index 59878429..00000000 --- a/contracts/libs/WitPriceFeedsLib.sol +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - -import "../interfaces/IWitPriceFeedsSolver.sol"; -import "../interfaces/IWitPriceFeedsSolverFactory.sol"; - -import "../libs/Slices.sol"; - -/// @title Ancillary deployable library for WitPriceFeeds. -/// @dev Features: -/// @dev - deployment of counter-factual IWitPriceFeedsSolver instances. -/// @dev - validation of feed caption strings. -/// @author The Witnet Foundation. -library WitPriceFeedsLib { - - using Slices for string; - using Slices for Slices.Slice; - - function deployPriceSolver( - bytes calldata initcode, - bytes calldata constructorParams - ) - external - returns (address _solver) - { - _solver = determinePriceSolverAddress(initcode, constructorParams); - if (_solver.code.length == 0) { - bytes memory _bytecode = _completeInitCode(initcode, constructorParams); - address _createdContract; - assembly { - _createdContract := create2( - 0, - add(_bytecode, 0x20), - mload(_bytecode), - 0 - ) - } - // assert(_solver == _createdContract); // fails on TEN chains - _solver = _createdContract; - require( - IWitPriceFeedsSolver(_solver).specs() == type(IWitPriceFeedsSolver).interfaceId, - "WitPriceFeedsLib: uncompliant solver implementation" - ); - } - } - - function determinePriceSolverAddress( - bytes calldata initcode, - bytes calldata constructorParams - ) - public view - returns (address) - { - return address( - uint160(uint(keccak256( - abi.encodePacked( - bytes1(0xff), - address(this), - bytes32(0), - keccak256(_completeInitCode(initcode, constructorParams)) - ) - ))) - ); - } - - function validateCaption(bytes32 prefix, string calldata caption) - external pure - returns (uint8) - { - require( - bytes6(bytes(caption)) == bytes6(prefix), - "WitPriceFeedsLib: bad caption prefix" - ); - Slices.Slice memory _caption = caption.toSlice(); - Slices.Slice memory _delim = string("-").toSlice(); - string[] memory _parts = new string[](_caption.count(_delim) + 1); - for (uint _ix = 0; _ix < _parts.length; _ix ++) { - _parts[_ix] = _caption.split(_delim).toString(); - } - (uint _decimals, bool _success) = Witnet.tryUint(_parts[_parts.length - 1]); - require(_success, "WitPriceFeedsLib: bad decimals"); - return uint8(_decimals); - } - - function _completeInitCode(bytes calldata initcode, bytes calldata constructorParams) - private pure - returns (bytes memory) - { - return abi.encodePacked( - initcode, - constructorParams - ); - } - -} diff --git a/contracts/mockups/WitPriceFeedsSolverBase.sol b/contracts/mockups/WitPriceFeedsSolverBase.sol index 0ce11048..26f62330 100644 --- a/contracts/mockups/WitPriceFeedsSolverBase.sol +++ b/contracts/mockups/WitPriceFeedsSolverBase.sol @@ -2,13 +2,12 @@ pragma solidity >=0.8.0 <0.9.0; -import "../data/WitPriceFeedsData.sol"; +import "../data/WitPriceFeedsDataLib.sol"; import "../interfaces/IWitPriceFeeds.sol"; abstract contract WitPriceFeedsSolverBase is - IWitPriceFeedsSolver, - WitPriceFeedsData + IWitPriceFeedsSolver { address public immutable override delegator; @@ -37,7 +36,7 @@ abstract contract WitPriceFeedsSolverBase ); for (uint _ix = 0; _ix < deps.length; _ix ++) { bytes4 _depsId4 = bytes4(keccak256(bytes(deps[_ix]))); - Record storage __depsFeed = __records_(_depsId4); + WitPriceFeedsDataLib.Record storage __depsFeed = WitPriceFeedsDataLib.seekRecord(_depsId4); require( __depsFeed.index > 0, string(abi.encodePacked( @@ -55,7 +54,7 @@ abstract contract WitPriceFeedsSolverBase _depsFlag |= (bytes32(_depsId4) >> (32 * _ix)); _innerDecimals += __depsFeed.decimals; } - Record storage __feed = __records_(feedId); + WitPriceFeedsDataLib.Record storage __feed = WitPriceFeedsDataLib.seekRecord(feedId); __feed.solverReductor = int(uint(__feed.decimals)) - int(_innerDecimals); __feed.solverDepsFlag = _depsFlag; } diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index f394f5da..22da5507 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -408,7 +408,7 @@ async function deployTarget (network, target, targetSpecs, networkArtifacts, leg try { utils.traceTx(await deployer.deploy(targetInitCode, targetSalt, { from: targetSpecs.from })) } catch (ex) { - panic("Deployment failed", `Expected address: ${targetAddr}`, ex) + panic("Deployment failed", `Expected address: ${targetAddr}`) } if (!constructorArgs[network]) constructorArgs[network] = {} constructorArgs[network][target] = targetConstructorArgs diff --git a/scripts/verify-libs.js b/scripts/verify-libs.js index 06829182..93bf24c5 100644 --- a/scripts/verify-libs.js +++ b/scripts/verify-libs.js @@ -22,7 +22,7 @@ const libs = [ artifacts.WitOracleRadonEncodingLib, artifacts.WitOracleResultErrorsLib, artifacts.WitOracleDataLib, - artifacts.WitPriceFeedsLib, + artifacts.WitPriceFeedsDataLib, ] for (const index in libs) { utils.traceVerify(network, `${libs[index]}@${addresses[network][libs[index]]}`) diff --git a/settings/artifacts.js b/settings/artifacts.js index a21184ea..4998fdf8 100644 --- a/settings/artifacts.js +++ b/settings/artifacts.js @@ -14,7 +14,7 @@ module.exports = { WitOracleDataLib: "WitOracleDataLib", WitOracleRadonEncodingLib: "WitOracleRadonEncodingLib", WitOracleResultStatusLib: "WitOracleResultStatusLib", - WitPriceFeedsLib: "WitPriceFeedsLib", + WitPriceFeedsDataLib: "WitPriceFeedsDataLib", }, }, "polygon:amoy": { diff --git a/settings/specs.js b/settings/specs.js index d44bb97a..7589a2de 100644 --- a/settings/specs.js +++ b/settings/specs.js @@ -44,7 +44,7 @@ module.exports = { }, WitPriceFeeds: { baseLibs: [ - "WitPriceFeedsLib", + "WitPriceFeedsDataLib", ], from: "0xF121b71715E71DDeD592F1125a06D4ED06F0694D", vanity: 1865150170, // 0x1111AbA2164AcdC6D291b08DfB374280035E1111 From 673508624376b198e4fc91c7912c54497d8ebe8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 30 Oct 2024 12:34:46 +0100 Subject: [PATCH 57/62] fix(libs): Witnet.ResultStatus missing enum value --- contracts/libs/Witnet.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 2c2bab7b..5fc26fc8 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -234,7 +234,7 @@ library Witnet { /// 0x42: Math operator tried to divide by zero. MathDivisionByZero, - /// 0x43:Wrong input to subscript call. + /// 0x43: Wrong input to subscript call. WrongSubscriptInput, /// 0x44: Value cannot be extracted from input binary buffer. @@ -264,11 +264,11 @@ library Witnet { /// 0x4C: Failed to parse syntax of some input value, or argument. Parse, - /// 0x4E: Parsing logic limits were exceeded. + /// 0x4D: Parsing logic limits were exceeded. ParseOverflow, - /// 0x4F: Unallocated - ScriptError0x4F, + /// Unallocated + ScriptError0x4E, ScriptError0x4F, /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// From 4e0470a2ac65982e86b2abe347e67d4a3de07470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 30 Oct 2024 14:32:51 +0100 Subject: [PATCH 58/62] fix(pfs): initialization upon major upgrade --- contracts/apps/WitPriceFeedsUpgradable.sol | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index e2091fde..013bc5a2 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -121,9 +121,14 @@ contract WitPriceFeedsUpgradable ); __baseFeeOverheadPercentage = _baseFeeOverheadPercentage; __defaultRadonSLA = _defaultRadonSLA; - } else if (__defaultRadonSLA.witResultMaxSize < 16) { + } else if (!__defaultRadonSLA.isValid()) { // possibly, an upgrade from a previous branch took place: - __defaultRadonSLA.witResultMaxSize = 16; + __defaultRadonSLA = Witnet.QuerySLA({ + witCommitteeCapacity: 10, + witCommitteeUnitaryReward: 2 * 10 ** 8, + witResultMaxSize: 16, + witCapability: Witnet.QueryCapability.wrap(0) + }); } } } @@ -617,9 +622,13 @@ contract WitPriceFeedsUpgradable return ( int(uint(_latestPrice.value)), Witnet.ResultTimestamp.unwrap(_latestPrice.timestamp), - _latestPrice.status == Witnet.ResultStatus.NoErrors + (_latestPrice.latestStatus == IWitPriceFeedsSolver.LatestUpdateStatus.Ready ? 200 - : (_latestPrice.status.keepWaiting() ? 404 : 400) + : (_latestPrice.latestStatus == IWitPriceFeedsSolver.LatestUpdateStatus.Awaiting + ? 404 + : 400 + ) + ) ); } From 852c01a7ce0aaa1a785aca114675624d69fec6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Wed, 30 Oct 2024 14:34:55 +0100 Subject: [PATCH 59/62] fix(pfs): IWitPriceFeedsSolver.Price.latestStatus --- contracts/data/WitPriceFeedsDataLib.sol | 18 ++++++++++++++++-- contracts/interfaces/IWitPriceFeedsSolver.sol | 8 +++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/contracts/data/WitPriceFeedsDataLib.sol b/contracts/data/WitPriceFeedsDataLib.sol index 852006ad..cd53bd49 100644 --- a/contracts/data/WitPriceFeedsDataLib.sol +++ b/contracts/data/WitPriceFeedsDataLib.sol @@ -167,7 +167,7 @@ library WitPriceFeedsDataLib { value: _lastValidResult.fetchUint(), timestamp: _lastValidResult.timestamp, drTxHash: _lastValidResult.drTxHash, - status: latestUpdateQueryResultStatus(witOracle, feedId) + latestStatus: _intoLatestUpdateStatus(latestUpdateQueryResultStatus(witOracle, feedId)) }); } else { @@ -191,7 +191,7 @@ library WitPriceFeedsDataLib { value: 0, timestamp: Witnet.ResultTimestamp.wrap(0), drTxHash: Witnet.TransactionHash.wrap(0), - status: latestUpdateQueryResultStatus(witOracle, feedId) + latestStatus: _intoLatestUpdateStatus(latestUpdateQueryResultStatus(witOracle, feedId)) }); } } @@ -439,4 +439,18 @@ library WitPriceFeedsDataLib { constructorParams ); } + + function _intoLatestUpdateStatus(Witnet.ResultStatus _resultStatus) + private pure + returns (IWitPriceFeedsSolver.LatestUpdateStatus) + { + return (_resultStatus.keepWaiting() + ? IWitPriceFeedsSolver.LatestUpdateStatus.Awaiting + : (_resultStatus.hasErrors() + ? IWitPriceFeedsSolver.LatestUpdateStatus.Error + : IWitPriceFeedsSolver.LatestUpdateStatus.Ready + ) + ); + } + } diff --git a/contracts/interfaces/IWitPriceFeedsSolver.sol b/contracts/interfaces/IWitPriceFeedsSolver.sol index e71d6ef7..d9fa98f5 100644 --- a/contracts/interfaces/IWitPriceFeedsSolver.sol +++ b/contracts/interfaces/IWitPriceFeedsSolver.sol @@ -5,11 +5,17 @@ pragma solidity >=0.8.0 <0.9.0; import "../libs/Witnet.sol"; interface IWitPriceFeedsSolver { + enum LatestUpdateStatus { + Void, + Awaiting, + Ready, + Error + } struct Price { uint64 value; Witnet.ResultTimestamp timestamp; Witnet.TransactionHash drTxHash; - Witnet.ResultStatus status; + LatestUpdateStatus latestStatus; } function class() external pure returns (string memory); function delegator() external view returns (address); From e3d1824ed274f1a8f4e96768995f330a7fbef2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 4 Nov 2024 15:00:53 +0100 Subject: [PATCH 60/62] feat(pfs): let requester settle the reward --- contracts/apps/WitPriceFeedsUpgradable.sol | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contracts/apps/WitPriceFeedsUpgradable.sol b/contracts/apps/WitPriceFeedsUpgradable.sol index 013bc5a2..dee3d06e 100644 --- a/contracts/apps/WitPriceFeedsUpgradable.sol +++ b/contracts/apps/WitPriceFeedsUpgradable.sol @@ -322,6 +322,10 @@ contract WitPriceFeedsUpgradable virtual override returns (uint256) { + _require( + updateSLA.equalOrGreaterThan(__defaultRadonSLA), + "unsecure update request" + ); return __requestUpdate(feedId, updateSLA); } @@ -696,12 +700,7 @@ contract WitPriceFeedsUpgradable returns (uint256) { if (WitPriceFeedsDataLib.seekRecord(feedId).radHash != 0) { - // TODO: let requester settle the reward (see WRV2.randomize(..)) - uint256 _evmUpdateRequestFee = estimateUpdateRequestFee(tx.gasprice); - _require( - msg.value >= _evmUpdateRequestFee, - "insufficient update fee" - ); + uint256 _evmUpdateRequestFee = msg.value; try WitPriceFeedsDataLib.requestUpdate( witOracle, feedId, From 355db94af88a05fb905067860e5f9b5b23dc1e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 4 Nov 2024 16:45:55 +0100 Subject: [PATCH 61/62] chore: implement pending IWitOracleLegacy methods --- contracts/core/base/WitOracleBaseTrustable.sol | 16 ++++++++++++---- contracts/libs/Witnet.sol | 10 +++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/contracts/core/base/WitOracleBaseTrustable.sol b/contracts/core/base/WitOracleBaseTrustable.sol index 3197c5db..e0345fb9 100644 --- a/contracts/core/base/WitOracleBaseTrustable.sol +++ b/contracts/core/base/WitOracleBaseTrustable.sol @@ -170,16 +170,24 @@ abstract contract WitOracleBaseTrustable return hex""; } - function getQueryResponseStatus(uint256 queryId) virtual override external view returns (IWitOracleLegacy.QueryResponseStatus) { - // todo + function getQueryResponseStatus(uint256 queryId) virtual override public view returns (IWitOracleLegacy.QueryResponseStatus) { + return WitOracleDataLib.getQueryResponseStatus( + Witnet.QueryId.wrap(queryId) + ); } function getQueryResultCborBytes(uint256 queryId) virtual override external view returns (bytes memory) { - // todo + return getQueryResponse(Witnet.QueryId.wrap(queryId)).resultCborBytes; } function getQueryResultError(uint256 queryId) virtual override external view returns (IWitOracleLegacy.ResultError memory) { - // todo + Witnet.DataResult memory _result = getQueryResult( + Witnet.QueryId.wrap(queryId) + ); + return IWitOracleLegacy.ResultError({ + code: uint8(_result.status), + reason: WitOracleResultStatusLib.toString(_result) + }); } function postRequest( diff --git a/contracts/libs/Witnet.sol b/contracts/libs/Witnet.sol index 5fc26fc8..e16e7557 100644 --- a/contracts/libs/Witnet.sol +++ b/contracts/libs/Witnet.sol @@ -69,11 +69,11 @@ library Witnet { /// Data struct containing the Witnet-provided result to a Data Request. struct DataResult { - ResultStatus status; - RadonDataTypes dataType; - TransactionHash drTxHash; - ResultTimestamp timestamp; - WitnetCBOR.CBOR value; + ResultStatus status; + RadonDataTypes dataType; + TransactionHash drTxHash; + ResultTimestamp timestamp; + WitnetCBOR.CBOR value; } struct FastForward { From 240acb3c338053e48117d46c921454a3ef0223d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 4 Nov 2024 17:37:00 +0100 Subject: [PATCH 62/62] refactor: verification scripts --- migrations/scripts/3_framework.js | 8 ++++++ scripts/verify-apps.js | 29 --------------------- scripts/verify-core.js | 33 ------------------------ scripts/verify-impls.js | 32 ----------------------- scripts/verify-libs.js | 29 --------------------- scripts/verify.js | 43 +++++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 123 deletions(-) delete mode 100644 scripts/verify-apps.js delete mode 100644 scripts/verify-core.js delete mode 100644 scripts/verify-impls.js delete mode 100644 scripts/verify-libs.js create mode 100644 scripts/verify.js diff --git a/migrations/scripts/3_framework.js b/migrations/scripts/3_framework.js index 22da5507..67275797 100644 --- a/migrations/scripts/3_framework.js +++ b/migrations/scripts/3_framework.js @@ -474,6 +474,14 @@ function linkBaseLibs (bytecode, baseLibs, networkArtifacts) { return bytecode } +async function settleArtifactAddress(addresses, network, domain, artifact, addr) { + if (!addresses[network]) addresses[network] = {} + if (!addresses[network][domain]) addresses[network][domain] = {} + addresses[network][domain][artifact] = addr + await utils.overwriteJsonFile("./migrations/addresses.json", addresses) + return addresses +} + async function unfoldTargetSpecs (domain, target, targetBase, from, network, networkArtifacts, networkSpecs, ancestors) { if (!ancestors) ancestors = [] else if (ancestors.includes(targetBase)) { diff --git a/scripts/verify-apps.js b/scripts/verify-apps.js deleted file mode 100644 index 5b8d07a9..00000000 --- a/scripts/verify-apps.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -const settings = require("../settings") -const utils = require("../src/utils") - -if (process.argv.length < 3) { - console.error("\nUsage:\n\n$ node ./scripts/verify-apps.js : ...OPTIONAL_ARGS\n") - process.exit(0) -} - -const network = process.argv[2].toLowerCase().replaceAll(".", ":") - -const header = network.toUpperCase() + " APPS" -console.info() -console.info(header) -console.info("=".repeat(header.length)) -console.info() - -const artifacts = settings.getArtifacts(network) -const apps = [ - artifacts.WitRandomness, -] -const constructorArgs = require("../migrations/constructorArgs.json") -if (!constructorArgs[network]) constructorArgs[network] = {} -for (const index in apps) { - utils.traceVerify(network, `${apps[index]} --forceConstructorArgs string:${ - constructorArgs[network][apps[index]] || constructorArgs?.default[apps[index]] - }`) -} diff --git a/scripts/verify-core.js b/scripts/verify-core.js deleted file mode 100644 index 88f32d19..00000000 --- a/scripts/verify-core.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -const settings = require("../settings") -const utils = require("../src/utils") - -if (process.argv.length < 3) { - console.error("\nUsage:\n\n$ node ./scripts/verify-core.js : ...OPTIONAL_ARGS\n") - process.exit(0) -} - -const network = process.argv[2].toLowerCase().replaceAll(".", ":") - -const header = network.toUpperCase() + " CORE" -console.info() -console.info(header) -console.info("=".repeat(header.length)) -console.info() - -utils.traceVerify(network, settings.getArtifacts(network).WitnetDeployer) -utils.traceVerify(network, "WitnetProxy") - -const addresses = require("../migrations/addresses.json") -const singletons = [ - "WitOracle", - "WitPriceFeeds", - "WitOracleRadonRegistry", - "WitOracleRequestFactory", -] -for (const index in singletons) { - utils.traceVerify(network, `WitnetProxy@${ - addresses[network][singletons[index]] || addresses.default[singletons[index]] - } --custom-proxy WitnetProxy`) -} diff --git a/scripts/verify-impls.js b/scripts/verify-impls.js deleted file mode 100644 index bd7bc4c1..00000000 --- a/scripts/verify-impls.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node - -const settings = require("../settings") -const utils = require("../src/utils") - -if (process.argv.length < 3) { - console.error("\nUsage:\n\n$ node ./scripts/verify-impls.js : ...OPTIONAL_ARGS\n") - process.exit(0) -} - -const network = process.argv[2].toLowerCase().replaceAll(".", ":") - -const header = network.toUpperCase() -console.info() -console.info(header) -console.info("=".repeat(header.length)) -console.info() - -const artifacts = settings.getArtifacts(network) -const impls = [ - artifacts.WitOracle, - artifacts.WitPriceFeeds, - artifacts.WitOracleRadonRegistry, - artifacts.WitOracleRequestFactory, -] -const constructorArgs = require("../migrations/constructorArgs.json") -if (!constructorArgs[network]) constructorArgs[network] = {} -for (const index in impls) { - utils.traceVerify(network, `${impls[index]} --forceConstructorArgs string:${ - constructorArgs[network][impls[index]] || constructorArgs?.default[impls[index]] - } --verifiers etherscan,sourcify`) -} diff --git a/scripts/verify-libs.js b/scripts/verify-libs.js deleted file mode 100644 index 93bf24c5..00000000 --- a/scripts/verify-libs.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -const settings = require("../settings") -const utils = require("../src/utils") - -if (process.argv.length < 3) { - console.error("\nUsage:\n\n$ node ./scripts/verify-libs.js : ...OPTIONAL_ARGS\n") - process.exit(0) -} - -const network = process.argv[2].toLowerCase().replaceAll(".", ":") - -const header = network.toUpperCase() + " LIBS" -console.info() -console.info(header) -console.info("=".repeat(header.length)) -console.info() - -const addresses = require("../migrations/addresses.json") -const artifacts = settings.getArtifacts(network) -const libs = [ - artifacts.WitOracleRadonEncodingLib, - artifacts.WitOracleResultErrorsLib, - artifacts.WitOracleDataLib, - artifacts.WitPriceFeedsDataLib, -] -for (const index in libs) { - utils.traceVerify(network, `${libs[index]}@${addresses[network][libs[index]]}`) -} diff --git a/scripts/verify.js b/scripts/verify.js new file mode 100644 index 00000000..88e9ef79 --- /dev/null +++ b/scripts/verify.js @@ -0,0 +1,43 @@ +#!/usr/bin/env node + +const addresses = require("../migrations/addresses.json") +const constructorArgs = require("../migrations/constructorArgs.json") +const settings = require("../settings") +const utils = require("../src/utils") + +if (process.argv.length < 3) { + console.error("\nUsage:\n\n$ node ./scripts/verify-core.js : ...OPTIONAL_ARGS\n") + process.exit(0) +} + +const network = process.argv[2].toLowerCase().replaceAll(".", ":") +const networkArtifacts = settings.getArtifacts(network) + +utils.traceVerify(network, networkArtifacts?.WitnetDeployer) + +const framework = { + libs: networkArtifacts.libs, + core: networkArtifacts.core, + apps: networkArtifacts.apps, +} + +for (const domain in framework) { + const header = network.toUpperCase() + " " + domain.toUpperCase() + console.info() + console.info(header) + console.info("=".repeat(header.length)) + console.info() + for (const base in framework[domain]) { + const impl = framework[domain][base] + if (utils.isUpgradableArtifact(impl)) { + const addr = utils.getNetworkArtifactAddress(network, domain, addresses, base) + utils.traceVerify(network, `WitnetProxy@${addr} --custom-proxy WitnetProxy`) + } + const forceConstructorArgs = constructorArgs[network][impl] || constructorArgs?.default[impl] + if (forceConstructorArgs) { + utils.traceVerify(network, `${impl} --forceConstructorArgs string:${forceConstructorArgs} --verifiers etherscan,sourcify`) + } else { + utils.traceVerify(network, `${impl} --verifiers etherscan,sourcify`) + } + } +}