UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,132 lines 54.2 kB
{ "contractName": "IWitOracle", "abi": [ { "inputs": [], "name": "InvalidDataReport", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "evmOrigin", "type": "address" }, { "indexed": true, "internalType": "address", "name": "evmConsumer", "type": "address" }, { "indexed": false, "internalType": "address", "name": "evmReporter", "type": "address" }, { "indexed": false, "internalType": "Witnet.TransactionHash", "name": "witDrTxHash", "type": "bytes32" }, { "indexed": false, "internalType": "Witnet.RadonHash", "name": "queryRadHash", "type": "bytes32" }, { "components": [ { "internalType": "uint16", "name": "witResultMaxSize", "type": "uint16" }, { "internalType": "uint16", "name": "witCommitteeSize", "type": "uint16" }, { "internalType": "uint64", "name": "witUnitaryReward", "type": "uint64" } ], "indexed": false, "internalType": "struct Witnet.QuerySLA", "name": "queryParams", "type": "tuple" }, { "indexed": false, "internalType": "Witnet.Timestamp", "name": "resultTimestamp", "type": "uint64" }, { "indexed": false, "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "name": "WitOracleReport", "type": "event" }, { "inputs": [], "name": "channel", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "Witnet.TransactionHash", "name": "witDrTxHash", "type": "bytes32" }, { "internalType": "Witnet.RadonHash", "name": "queryRadHash", "type": "bytes32" }, { "components": [ { "internalType": "uint16", "name": "witResultMaxSize", "type": "uint16" }, { "internalType": "uint16", "name": "witCommitteeSize", "type": "uint16" }, { "internalType": "uint64", "name": "witUnitaryReward", "type": "uint64" } ], "internalType": "struct Witnet.QuerySLA", "name": "queryParams", "type": "tuple" }, { "internalType": "Witnet.Timestamp", "name": "resultTimestamp", "type": "uint64" }, { "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "internalType": "struct Witnet.DataPushReport", "name": "report", "type": "tuple" }, { "internalType": "bytes", "name": "proof", "type": "bytes" } ], "name": "parseDataReport", "outputs": [ { "components": [ { "internalType": "enum Witnet.ResultStatus", "name": "status", "type": "uint8" }, { "internalType": "enum Witnet.RadonDataTypes", "name": "dataType", "type": "uint8" }, { "internalType": "Witnet.TransactionHash", "name": "drTxHash", "type": "bytes32" }, { "internalType": "uint256", "name": "finality", "type": "uint256" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "components": [ { "components": [ { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "uint256", "name": "cursor", "type": "uint256" } ], "internalType": "struct WitnetBuffer.Buffer", "name": "buffer", "type": "tuple" }, { "internalType": "uint8", "name": "initialByte", "type": "uint8" }, { "internalType": "uint8", "name": "majorType", "type": "uint8" }, { "internalType": "uint8", "name": "additionalInformation", "type": "uint8" }, { "internalType": "uint64", "name": "len", "type": "uint64" }, { "internalType": "uint64", "name": "tag", "type": "uint64" } ], "internalType": "struct WitnetCBOR.CBOR", "name": "value", "type": "tuple" } ], "internalType": "struct Witnet.DataResult", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "Witnet.TransactionHash", "name": "witDrTxHash", "type": "bytes32" }, { "internalType": "Witnet.RadonHash", "name": "queryRadHash", "type": "bytes32" }, { "components": [ { "internalType": "uint16", "name": "witResultMaxSize", "type": "uint16" }, { "internalType": "uint16", "name": "witCommitteeSize", "type": "uint16" }, { "internalType": "uint64", "name": "witUnitaryReward", "type": "uint64" } ], "internalType": "struct Witnet.QuerySLA", "name": "queryParams", "type": "tuple" }, { "internalType": "Witnet.Timestamp", "name": "resultTimestamp", "type": "uint64" }, { "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "internalType": "struct Witnet.DataPushReport", "name": "report", "type": "tuple" }, { "internalType": "bytes", "name": "proof", "type": "bytes" } ], "name": "pushDataReport", "outputs": [ { "components": [ { "internalType": "enum Witnet.ResultStatus", "name": "status", "type": "uint8" }, { "internalType": "enum Witnet.RadonDataTypes", "name": "dataType", "type": "uint8" }, { "internalType": "Witnet.TransactionHash", "name": "drTxHash", "type": "bytes32" }, { "internalType": "uint256", "name": "finality", "type": "uint256" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "components": [ { "components": [ { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "uint256", "name": "cursor", "type": "uint256" } ], "internalType": "struct WitnetBuffer.Buffer", "name": "buffer", "type": "tuple" }, { "internalType": "uint8", "name": "initialByte", "type": "uint8" }, { "internalType": "uint8", "name": "majorType", "type": "uint8" }, { "internalType": "uint8", "name": "additionalInformation", "type": "uint8" }, { "internalType": "uint64", "name": "len", "type": "uint64" }, { "internalType": "uint64", "name": "tag", "type": "uint64" } ], "internalType": "struct WitnetCBOR.CBOR", "name": "value", "type": "tuple" } ], "internalType": "struct Witnet.DataResult", "name": "", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [ { "internalType": "contract IWitOracleRadonRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidDataReport\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"evmOrigin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"evmConsumer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"evmReporter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"Witnet.TransactionHash\",\"name\":\"witDrTxHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"Witnet.RadonHash\",\"name\":\"queryRadHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"witResultMaxSize\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"witCommitteeSize\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"witUnitaryReward\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Witnet.QuerySLA\",\"name\":\"queryParams\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"Witnet.Timestamp\",\"name\":\"resultTimestamp\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"name\":\"WitOracleReport\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"channel\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"witDrTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"Witnet.RadonHash\",\"name\":\"queryRadHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"witResultMaxSize\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"witCommitteeSize\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"witUnitaryReward\",\"type\":\"uint64\"}],\"internalType\":\"struct Witnet.QuerySLA\",\"name\":\"queryParams\",\"type\":\"tuple\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"resultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.DataPushReport\",\"name\":\"report\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"parseDataReport\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Witnet.ResultStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"dataType\",\"type\":\"uint8\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"drTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"finality\",\"type\":\"uint256\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"}],\"internalType\":\"struct WitnetBuffer.Buffer\",\"name\":\"buffer\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"initialByte\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"majorType\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"additionalInformation\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"len\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"tag\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetCBOR.CBOR\",\"name\":\"value\",\"type\":\"tuple\"}],\"internalType\":\"struct Witnet.DataResult\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"witDrTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"Witnet.RadonHash\",\"name\":\"queryRadHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"witResultMaxSize\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"witCommitteeSize\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"witUnitaryReward\",\"type\":\"uint64\"}],\"internalType\":\"struct Witnet.QuerySLA\",\"name\":\"queryParams\",\"type\":\"tuple\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"resultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.DataPushReport\",\"name\":\"report\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"pushDataReport\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Witnet.ResultStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"dataType\",\"type\":\"uint8\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"drTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"finality\",\"type\":\"uint256\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"}],\"internalType\":\"struct WitnetBuffer.Buffer\",\"name\":\"buffer\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"initialByte\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"majorType\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"additionalInformation\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"len\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"tag\",\"type\":\"uint64\"}],\"internalType\":\"struct WitnetCBOR.CBOR\",\"name\":\"value\",\"type\":\"tuple\"}],\"internalType\":\"struct Witnet.DataResult\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IWitOracleRadonRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"channel()\":{\"notice\":\"Uniquely identifies the WitOracle instance and the chain on which it's deployed.\"},\"parseDataReport((bytes32,bytes32,(uint16,uint16,uint64),uint64,bytes),bytes)\":{\"notice\":\"Verify the data report (as provided by Wit/Kermit API) is well-formed and authentic, returning the parsed Witnet.DataResult if so, or reverting otherwise.\"},\"pushDataReport((bytes32,bytes32,(uint16,uint16,uint64),uint64,bytes),bytes)\":{\"notice\":\"Same as `parseDataReport` but on certain implementations it may store roll-up information that will contribute to reduce the cost of verifying and/or rolling-up future data reports. Emits `DataReport` if report is authentic. \"},\"registry()\":{\"notice\":\"Returns the WitOracleRadonRegistry in which Witnet-compliant Radon requestscan be formally verified and forever registered as a away to let smart contracts and users to track actual data sources and offchain computations applied on data updates safely reported from the Wit/Oracle blockchain. \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/IWitOracle.sol\":\"IWitOracle\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/IWitOracle.sol\":{\"keccak256\":\"0x26cbe2074c0b3f545a46d95fad5e2280b67edcd958e4ae0b88f3a018aa11b805\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5324bac61f65e3edb01c88b9b75ca17affd593be88da5753a93b3f5304d3f479\",\"dweb:/ipfs/QmcVmNV6smbFiPaxvuN8ShkqbDZsT1wfjnF7f3qs6ke7QG\"]},\"project:/contracts/interfaces/IWitOracleRadonRegistry.sol\":{\"keccak256\":\"0x437bbb89129311bd1cc8f6becd333df46109ec53b24d3159be942b225614071f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef9bcdf4a73cb126885478c994821b7fe2b87d9221b767b4c9342b89b0d6550a\",\"dweb:/ipfs/QmXzZXPMxjSiFpcEnhg6CjLFNxGCpDZt22xpUh7VHxNTGd\"]},\"project:/contracts/libs/Bech32.sol\":{\"keccak256\":\"0x14618323a0efe7586c20906a2e9cee7ad63baa976ff231c57f7f2d7d3707fb8b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a19f05fe84047a7a6d3d6fc39972b432e6e536aa70472386a9d7a6d9aab64a64\",\"dweb:/ipfs/QmcHwUY66yjiotRH4Q3kbRvSzcHyLQ1yHL3KbtQKiMhtZE\"]},\"project:/contracts/libs/Secp256k1.sol\":{\"keccak256\":\"0xbe686002da5004ff39dd70709f3820eba2afe9323ae9cb894009c161e4b1a666\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18fab91775216de0707cea9ad285b10be09127461a13432fea358bf9cb2a0c2e\",\"dweb:/ipfs/QmeRUGsgstnM4hxM9hpkBf3L6cE5btirEaowcMxmuw3utj\"]},\"project:/contracts/libs/Witnet.sol\":{\"keccak256\":\"0x1d446c3e534e40e676d1763bfb2897fadfac8afed904ab757843d7d6770b0a6c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://338fb1073f17d64e8d31bfe492d9475ce906788ee08e6489ce30413f91dc1328\",\"dweb:/ipfs/QmPe5QX2AGTnQFjse1Xttq4ZYWwYAiXoySb5VUui3PqPhk\"]},\"project:/contracts/libs/WitnetBuffer.sol\":{\"keccak256\":\"0x8e07aebe2954ab3e6f2d8eceedb12db7cf915c1f3e8630f4fa9999cecb1c78ec\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ed6c54cc901183d61546e8fd15bd5ea8ef238ebc915642946071d435dd7481ea\",\"dweb:/ipfs/Qmcaqta7YjUSBbBUGqoh44bsCS6UqqoyHjBuz4qnKBShXM\"]},\"project:/contracts/libs/WitnetCBOR.sol\":{\"keccak256\":\"0xd99308373575cc10fb7f2ceb0f6a8625f3911275c1fa27811fae498d98d03d97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b4909a999d7b660a2dc54ca957b6eccfa523e2765fc4d6a2574dee7d5cd67b43\",\"dweb:/ipfs/QmWGQT4KDcfSFe1hcHVoWx6E4PhYMaod5iLpJCWBEeShzh\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.8.0 <0.9.0;\r\n\r\nimport {IWitOracleRadonRegistry, Witnet} from \"./IWitOracleRadonRegistry.sol\";\r\n\r\ninterface IWitOracle {\r\n\r\n error InvalidDataReport();\r\n \r\n event WitOracleReport(\r\n address indexed evmOrigin, \r\n address indexed evmConsumer, \r\n address evmReporter,\r\n Witnet.TransactionHash witDrTxHash,\r\n Witnet.RadonHash queryRadHash,\r\n Witnet.QuerySLA queryParams,\r\n Witnet.Timestamp resultTimestamp,\r\n bytes resultCborBytes\r\n );\r\n\r\n /// @notice Uniquely identifies the WitOracle instance and the chain on which it's deployed.\r\n function channel() external view returns (bytes4);\r\n\r\n /// @notice Verify the data report (as provided by Wit/Kermit API) is well-formed and authentic,\r\n /// returning the parsed Witnet.DataResult if so, or reverting otherwise.\r\n function parseDataReport(Witnet.DataPushReport calldata report, bytes calldata proof) external view returns (Witnet.DataResult memory);\r\n\r\n /// @notice Same as `parseDataReport` but on certain implementations it may store roll-up information \r\n /// that will contribute to reduce the cost of verifying and/or rolling-up future data reports.\r\n /// Emits `DataReport` if report is authentic. \r\n function pushDataReport(Witnet.DataPushReport calldata report, bytes calldata proof) external returns (Witnet.DataResult memory);\r\n\r\n /// @notice Returns the WitOracleRadonRegistry in which Witnet-compliant Radon requests\r\n /// @notice can be formally verified and forever registered as a away to let smart contracts\r\n /// and users to track actual data sources and offchain computations applied on data updates\r\n /// safely reported from the Wit/Oracle blockchain. \r\n function registry() external view returns (IWitOracleRadonRegistry);\r\n}\r\n", "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\interfaces\\IWitOracle.sol", "ast": { "absolutePath": "project:/contracts/interfaces/IWitOracle.sol", "exportedSymbols": { "IWitOracle": [ 26581 ], "IWitOracleRadonRegistry": [ 27394 ], "Witnet": [ 40741 ] }, "id": 26582, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 26516, "literals": [ "solidity", ">=", "0.8", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:64" }, { "absolutePath": "project:/contracts/interfaces/IWitOracleRadonRegistry.sol", "file": "./IWitOracleRadonRegistry.sol", "id": 26519, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 26582, "sourceUnit": 27395, "src": "70:78:64", "symbolAliases": [ { "foreign": { "id": 26517, "name": "IWitOracleRadonRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27394, "src": "78:23:64", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 26518, "name": "Witnet", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 40741, "src": "103:6:64", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "canonicalName": "IWitOracle", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 26581, "linearizedBaseContracts": [ 26581 ], "name": "IWitOracle", "nameLocation": "162:10:64", "nodeType": "ContractDefinition", "nodes": [ { "errorSelector": "b1c6172a", "id": 26521, "name": "InvalidDataReport", "nameLocation": "188:17:64", "nodeType": "ErrorDefinition", "parameters": { "id": 26520, "nodeType": "ParameterList", "parameters": [], "src": "205:2:64" }, "src": "182:26:64" }, { "anonymous": false, "eventSelector": "7a9001dc4425127400f09e4c0b02908ad0e1f642ee9c92932a222c6866746482", "id": 26543, "name": "WitOracleReport", "nameLocation": "226:15:64", "nodeType": "EventDefinition", "parameters": { "id": 26542, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26523, "indexed": true, "mutability": "mutable", "name": "evmOrigin", "nameLocation": "272:9:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "256:25:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 26522, "name": "address", "nodeType": "ElementaryTypeName", "src": "256:7:64", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 26525, "indexed": true, "mutability": "mutable", "name": "evmConsumer", "nameLocation": "313:11:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "297:27:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 26524, "name": "address", "nodeType": "ElementaryTypeName", "src": "297:7:64", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 26527, "indexed": false, "mutability": "mutable", "name": "evmReporter", "nameLocation": "348:11:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "340:19:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 26526, "name": "address", "nodeType": "ElementaryTypeName", "src": "340:7:64", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 26530, "indexed": false, "mutability": "mutable", "name": "witDrTxHash", "nameLocation": "397:11:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "374:34:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_TransactionHash_$37159", "typeString": "Witnet.TransactionHash" }, "typeName": { "id": 26529, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26528, "name": "Witnet.TransactionHash", "nameLocations": [ "374:6:64", "381:15:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37159, "src": "374:22:64" }, "referencedDeclaration": 37159, "src": "374:22:64", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_TransactionHash_$37159", "typeString": "Witnet.TransactionHash" } }, "visibility": "internal" }, { "constant": false, "id": 26533, "indexed": false, "mutability": "mutable", "name": "queryRadHash", "nameLocation": "440:12:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "423:29:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_RadonHash_$37153", "typeString": "Witnet.RadonHash" }, "typeName": { "id": 26532, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26531, "name": "Witnet.RadonHash", "nameLocations": [ "423:6:64", "430:9:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37153, "src": "423:16:64" }, "referencedDeclaration": 37153, "src": "423:16:64", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_RadonHash_$37153", "typeString": "Witnet.RadonHash" } }, "visibility": "internal" }, { "constant": false, "id": 26536, "indexed": false, "mutability": "mutable", "name": "queryParams", "nameLocation": "484:11:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "467:28:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_QuerySLA_$37373_memory_ptr", "typeString": "struct Witnet.QuerySLA" }, "typeName": { "id": 26535, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26534, "name": "Witnet.QuerySLA", "nameLocations": [ "467:6:64", "474:8:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37373, "src": "467:15:64" }, "referencedDeclaration": 37373, "src": "467:15:64", "typeDescriptions": { "typeIdentifier": "t_struct$_QuerySLA_$37373_storage_ptr", "typeString": "struct Witnet.QuerySLA" } }, "visibility": "internal" }, { "constant": false, "id": 26539, "indexed": false, "mutability": "mutable", "name": "resultTimestamp", "nameLocation": "527:15:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "510:32:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_Timestamp_$37157", "typeString": "Witnet.Timestamp" }, "typeName": { "id": 26538, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26537, "name": "Witnet.Timestamp", "nameLocations": [ "510:6:64", "517:9:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37157, "src": "510:16:64" }, "referencedDeclaration": 37157, "src": "510:16:64", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_Timestamp_$37157", "typeString": "Witnet.Timestamp" } }, "visibility": "internal" }, { "constant": false, "id": 26541, "indexed": false, "mutability": "mutable", "name": "resultCborBytes", "nameLocation": "563:15:64", "nodeType": "VariableDeclaration", "scope": 26543, "src": "557:21:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 26540, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "557:5:64", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "241:348:64" }, "src": "220:370:64" }, { "documentation": { "id": 26544, "nodeType": "StructuredDocumentation", "src": "598:92:64", "text": "@notice Uniquely identifies the WitOracle instance and the chain on which it's deployed." }, "functionSelector": "7bbdb96e", "id": 26549, "implemented": false, "kind": "function", "modifiers": [], "name": "channel", "nameLocation": "705:7:64", "nodeType": "FunctionDefinition", "parameters": { "id": 26545, "nodeType": "ParameterList", "parameters": [], "src": "712:2:64" }, "returnParameters": { "id": 26548, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26547, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 26549, "src": "738:6:64", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 26546, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "738:6:64", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "737:8:64" }, "scope": 26581, "src": "696:50:64", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 26550, "nodeType": "StructuredDocumentation", "src": "754:175:64", "text": "@notice Verify the data report (as provided by Wit/Kermit API) is well-formed and authentic,\n returning the parsed Witnet.DataResult if so, or reverting otherwise." }, "functionSelector": "b783922b", "id": 26561, "implemented": false, "kind": "function", "modifiers": [], "name": "parseDataReport", "nameLocation": "944:15:64", "nodeType": "FunctionDefinition", "parameters": { "id": 26556, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26553, "mutability": "mutable", "name": "report", "nameLocation": "991:6:64", "nodeType": "VariableDeclaration", "scope": 26561, "src": "960:37:64", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_struct$_DataPushReport_$37274_calldata_ptr", "typeString": "struct Witnet.DataPushReport" }, "typeName": { "id": 26552, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26551, "name": "Witnet.DataPushReport", "nameLocations": [ "960:6:64", "967:14:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37274, "src": "960:21:64" }, "referencedDeclaration": 37274, "src": "960:21:64", "typeDescriptions": { "typeIdentifier": "t_struct$_DataPushReport_$37274_storage_ptr", "typeString": "struct Witnet.DataPushReport" } }, "visibility": "internal" }, { "constant": false, "id": 26555, "mutability": "mutable", "name": "proof", "nameLocation": "1014:5:64", "nodeType": "VariableDeclaration", "scope": 26561, "src": "999:20:64", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 26554, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "999:5:64", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "959:61:64" }, "returnParameters": { "id": 26560, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26559, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 26561, "src": "1044:24:64", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_DataResult_$37293_memory_ptr", "typeString": "struct Witnet.DataResult" }, "typeName": { "id": 26558, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26557, "name": "Witnet.DataResult", "nameLocations": [ "1044:6:64", "1051:10:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37293, "src": "1044:17:64" }, "referencedDeclaration": 37293, "src": "1044:17:64", "typeDescriptions": { "typeIdentifier": "t_struct$_DataResult_$37293_storage_ptr", "typeString": "struct Witnet.DataResult" } }, "visibility": "internal" } ], "src": "1043:26:64" }, "scope": 26581, "src": "935:135:64", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 26562, "nodeType": "StructuredDocumentation", "src": "1078:256:64", "text": "@notice Same as `parseDataReport` but on certain implementations it may store roll-up information \n that will contribute to reduce the cost of verifying and/or rolling-up future data reports.\n Emits `DataReport` if report is authentic. " }, "functionSelector": "6d0d6a7e", "id": 26573, "implemented": false, "kind": "function", "modifiers": [], "name": "pushDataReport", "nameLocation": "1349:14:64", "nodeType": "FunctionDefinition", "parameters": { "id": 26568, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26565, "mutability": "mutable", "name": "report", "nameLocation": "1395:6:64", "nodeType": "VariableDeclaration", "scope": 26573, "src": "1364:37:64", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_struct$_DataPushReport_$37274_calldata_ptr", "typeString": "struct Witnet.DataPushReport" }, "typeName": { "id": 26564, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26563, "name": "Witnet.DataPushReport", "nameLocations": [ "1364:6:64", "1371:14:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37274, "src": "1364:21:64" }, "referencedDeclaration": 37274, "src": "1364:21:64", "typeDescriptions": { "typeIdentifier": "t_struct$_DataPushReport_$37274_storage_ptr", "typeString": "struct Witnet.DataPushReport" } }, "visibility": "internal" }, { "constant": false, "id": 26567, "mutability": "mutable", "name": "proof", "nameLocation": "1418:5:64", "nodeType": "VariableDeclaration", "scope": 26573, "src": "1403:20:64", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 26566, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1403:5:64", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1363:61:64" }, "returnParameters": { "id": 26572, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26571, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 26573, "src": "1443:24:64", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_DataResult_$37293_memory_ptr", "typeString": "struct Witnet.DataResult" }, "typeName": { "id": 26570, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 26569, "name": "Witnet.DataResult", "nameLocations": [ "1443:6:64", "1450:10:64" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37293, "src": "1443:17:64" }, "referencedDeclaration": 37293, "src": "1443:17:64", "typeDescriptions": { "typeIdentifier": "t_struct$_DataResult_$37293_storage_ptr", "typeString": "struct Witnet.DataResult" } }, "visibility": "internal" } ], "src": "1442:26:64" }, "scope": 26581, "src": "1340:129:64", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 26574, "nodeType": "StructuredDocumentation", "src": "1477:341:64", "text": "@notice Returns the WitOracleRadonRegistry in which Witnet-compliant Radon requests\n @notice can be formally verified and forever registered as a away to