UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

991 lines (990 loc) 67.9 kB
{ "contractName": "IWitOracleRequestTemplate", "abi": [ { "inputs": [ { "internalType": "string[][]", "name": "args", "type": "string[][]" } ], "name": "buildWitOracleRequest", "outputs": [ { "internalType": "contract IWitOracleRequest", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "singleArgValue", "type": "string" } ], "name": "buildWitOracleRequest", "outputs": [ { "internalType": "contract IWitOracleRequest", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getArgsCount", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRadonReducers", "outputs": [ { "components": [ { "internalType": "enum Witnet.RadonReduceOpcodes", "name": "opcode", "type": "uint8" }, { "components": [ { "internalType": "enum Witnet.RadonFilterOpcodes", "name": "opcode", "type": "uint8" }, { "internalType": "bytes", "name": "cborArgs", "type": "bytes" } ], "internalType": "struct Witnet.RadonFilter[]", "name": "filters", "type": "tuple[]" } ], "internalType": "struct Witnet.RadonReducer", "name": "aggregateStage", "type": "tuple" }, { "components": [ { "internalType": "enum Witnet.RadonReduceOpcodes", "name": "opcode", "type": "uint8" }, { "components": [ { "internalType": "enum Witnet.RadonFilterOpcodes", "name": "opcode", "type": "uint8" }, { "internalType": "bytes", "name": "cborArgs", "type": "bytes" } ], "internalType": "struct Witnet.RadonFilter[]", "name": "filters", "type": "tuple[]" } ], "internalType": "struct Witnet.RadonReducer", "name": "tallyStage", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "getRadonRetrievalByIndex", "outputs": [ { "components": [ { "internalType": "uint8", "name": "argsCount", "type": "uint8" }, { "internalType": "enum Witnet.RadonRetrievalMethods", "name": "method", "type": "uint8" }, { "internalType": "enum Witnet.RadonDataTypes", "name": "dataType", "type": "uint8" }, { "internalType": "string", "name": "url", "type": "string" }, { "internalType": "string", "name": "body", "type": "string" }, { "internalType": "string[2][]", "name": "headers", "type": "string[2][]" }, { "internalType": "bytes", "name": "radonScript", "type": "bytes" } ], "internalType": "struct Witnet.RadonRetrieval", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRadonRetrievals", "outputs": [ { "components": [ { "internalType": "uint8", "name": "argsCount", "type": "uint8" }, { "internalType": "enum Witnet.RadonRetrievalMethods", "name": "method", "type": "uint8" }, { "internalType": "enum Witnet.RadonDataTypes", "name": "dataType", "type": "uint8" }, { "internalType": "string", "name": "url", "type": "string" }, { "internalType": "string", "name": "body", "type": "string" }, { "internalType": "string[2][]", "name": "headers", "type": "string[2][]" }, { "internalType": "bytes", "name": "radonScript", "type": "bytes" } ], "internalType": "struct Witnet.RadonRetrieval[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getResultDataType", "outputs": [ { "internalType": "enum Witnet.RadonDataTypes", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "singleArgValue", "type": "string" } ], "name": "verifyRadonRequest", "outputs": [ { "internalType": "Witnet.RadonHash", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string[][]", "name": "args", "type": "string[][]" } ], "name": "verifyRadonRequest", "outputs": [ { "internalType": "Witnet.RadonHash", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string[][]\",\"name\":\"args\",\"type\":\"string[][]\"}],\"name\":\"buildWitOracleRequest\",\"outputs\":[{\"internalType\":\"contract IWitOracleRequest\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"singleArgValue\",\"type\":\"string\"}],\"name\":\"buildWitOracleRequest\",\"outputs\":[{\"internalType\":\"contract IWitOracleRequest\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getArgsCount\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRadonReducers\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Witnet.RadonReduceOpcodes\",\"name\":\"opcode\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"enum Witnet.RadonFilterOpcodes\",\"name\":\"opcode\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"cborArgs\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.RadonFilter[]\",\"name\":\"filters\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Witnet.RadonReducer\",\"name\":\"aggregateStage\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Witnet.RadonReduceOpcodes\",\"name\":\"opcode\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"enum Witnet.RadonFilterOpcodes\",\"name\":\"opcode\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"cborArgs\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.RadonFilter[]\",\"name\":\"filters\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Witnet.RadonReducer\",\"name\":\"tallyStage\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getRadonRetrievalByIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"argsCount\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonRetrievalMethods\",\"name\":\"method\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"dataType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"body\",\"type\":\"string\"},{\"internalType\":\"string[2][]\",\"name\":\"headers\",\"type\":\"string[2][]\"},{\"internalType\":\"bytes\",\"name\":\"radonScript\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.RadonRetrieval\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRadonRetrievals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"argsCount\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonRetrievalMethods\",\"name\":\"method\",\"type\":\"uint8\"},{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"dataType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"body\",\"type\":\"string\"},{\"internalType\":\"string[2][]\",\"name\":\"headers\",\"type\":\"string[2][]\"},{\"internalType\":\"bytes\",\"name\":\"radonScript\",\"type\":\"bytes\"}],\"internalType\":\"struct Witnet.RadonRetrieval[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getResultDataType\",\"outputs\":[{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"singleArgValue\",\"type\":\"string\"}],\"name\":\"verifyRadonRequest\",\"outputs\":[{\"internalType\":\"Witnet.RadonHash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[][]\",\"name\":\"args\",\"type\":\"string[][]\"}],\"name\":\"verifyRadonRequest\",\"outputs\":[{\"internalType\":\"Witnet.RadonHash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"buildWitOracleRequest(string)\":{\"details\":\"Produced addresses are counter-factual to the template address and the given value.\"},\"buildWitOracleRequest(string[][])\":{\"details\":\"Produced addresses are counter-factual to the template address and the given values.\"},\"verifyRadonRequest(string)\":{\"details\":\"This method requires less gas than buildWitOracleRequest(string), and it's usually preferred when data requests built out of this templateare intended to be used just once in lifetime.\"},\"verifyRadonRequest(string[][])\":{\"details\":\"This method requires less gas than buildWitOracleRequest(string[][]), and it's usually preferred when data requests built out of this templateare intended to be used just once in lifetime. \"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"buildWitOracleRequest(string)\":{\"notice\":\"Builds a WitOracleRequest instance by specifying one single parameter value that will be equally applied to all the template's data sources. Reverts if any of the underlying data sources requires more than just one parameter.\"},\"buildWitOracleRequest(string[][])\":{\"notice\":\"Builds a WitOracleRequest instance that will provide the bytecode and RAD hash of some Witnet-compliant Radon Request, provably made out of the data sources, aggregate and tally Radon Reducers that compose this instance. Reverts if the ranks of passed array don't match either the number of this template's data sources, or the number of required parameters by each one of those.\"},\"getArgsCount()\":{\"notice\":\"Returns an array of integers telling the number of parameters required by every single data source (i.e. Radon Retrievals) that compose this WitOracleRequestTemplate. The length of the returned array tells the number of data sources that compose this instance.\"},\"getRadonReducers()\":{\"notice\":\"Returns the filters and reducing functions to be applied by witnessing nodes on the Witnet blockchain both at the: - Aggregate stage: when aggregating data extracted from the public data sources (i.e. Radon Retrievals). - Tally stage: when aggregating values revealed by witnesses.\"},\"getRadonRetrievalByIndex(uint256)\":{\"notice\":\"Returns metadata concerning the data source specified by the given index. \"},\"getRadonRetrievals()\":{\"notice\":\"Returns the array of one or more parameterized data sources that compose this WitOracleRequestTemplate.\"},\"getResultDataType()\":{\"notice\":\"Returns the expected data type produced by successful resolutions of any WitOracleRequest that gets built out of this WitOracleRequestTemplate.\"},\"verifyRadonRequest(string)\":{\"notice\":\"Verifies into the bounded WitOracle's registry the actual bytecode and RAD hash of the Witnet-compliant Radon Request that gets provably made out as a result of applying the given parameter value to the underlying data sources, aggregate and tally reducers that compose this template. While no actual WitOracleRequest instance gets constructed, the returned value will be accepted as a valid RAD hash on the bounded WitOracle contract from now on. Reverts if any of the underlying data sources requires more than just one parameter.\"},\"verifyRadonRequest(string[][])\":{\"notice\":\"Verifies into the bounded WitOracle's registry the actual bytecode and RAD hash of the Witnet-compliant Radon Request that gets provably made out of the data sources, aggregate and tally Radon Reducers that compose this WitOracleRequestTemplate. While no WitOracleRequest instance is actually constructed, the returned value will be accepted as a valid RAD hash on the witOracle() contract from now on. Reverts if: - the ranks of passed array don't match either the number of this template's data sources, or the number of required parameters by each one of those.\"},\"version()\":{\"notice\":\"If built out of an upgradable factory, returns the SemVer tag of the factory implementation at the time when this WitOracleRequestTemplate got built.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/legacy/IWitOracleRequestTemplate.sol\":\"IWitOracleRequestTemplate\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/legacy/IWitOracleRequest.sol\":{\"keccak256\":\"0x0fb3f0ba03f4f7a0214ecb36df26525564cf51a8a2176cba92c185af8a1d419e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://340b7bdb92c3259519fe120eb3061b393e7a5e9c1b576a2fe4eab020af466b64\",\"dweb:/ipfs/QmRt4wMX9WdxFwfdFMUZ3zKMAW1grS7qLk1x1PDMJdEAVU\"]},\"project:/contracts/interfaces/legacy/IWitOracleRequestTemplate.sol\":{\"keccak256\":\"0x9e065ef5880c64eefff5fcfb1347fde6684e0e311f8c2350a6aefdbd1f8b0f22\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://817de760c7cce9d00dcd4312aea6434d88abddf1c0e68ea7e8fb1e6c5165a445\",\"dweb:/ipfs/QmUNmtn85nFXbje2nRJQY2h65KJCVinDMMU6P2jQmo1Nij\"]},\"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 \"./IWitOracleRequest.sol\";\r\n\r\ninterface IWitOracleRequestTemplate {\r\n\r\n /// Builds a WitOracleRequest instance that will provide the bytecode and RAD \r\n /// hash of some Witnet-compliant Radon Request, provably made out of the \r\n /// data sources, aggregate and tally Radon Reducers that compose this instance.\r\n /// Reverts if the ranks of passed array don't match either the number of this template's \r\n /// data sources, or the number of required parameters by each one of those.\r\n /// @dev Produced addresses are counter-factual to the template address and the given values.\r\n function buildWitOracleRequest (string[][] calldata args) external returns (IWitOracleRequest);\r\n\r\n /// Builds a WitOracleRequest instance by specifying one single parameter value\r\n /// that will be equally applied to all the template's data sources.\r\n /// Reverts if any of the underlying data sources requires more than just one parameter.\r\n /// @dev Produced addresses are counter-factual to the template address and the given value.\r\n function buildWitOracleRequest (string calldata singleArgValue) external returns (IWitOracleRequest);\r\n\r\n /// Returns an array of integers telling the number of parameters required \r\n /// by every single data source (i.e. Radon Retrievals) that compose this \r\n /// WitOracleRequestTemplate. The length of the returned array tells the number \r\n /// of data sources that compose this instance.\r\n function getArgsCount() external view returns (uint256[] memory);\r\n\r\n /// Returns the filters and reducing functions to be applied by witnessing nodes \r\n /// on the Witnet blockchain both at the:\r\n /// - Aggregate stage: when aggregating data extracted from the public \r\n /// data sources (i.e. Radon Retrievals).\r\n /// - Tally stage: when aggregating values revealed by witnesses.\r\n function getRadonReducers() external view returns (\r\n Witnet.RadonReducer memory aggregateStage,\r\n Witnet.RadonReducer memory tallyStage\r\n );\r\n\r\n /// Returns metadata concerning the data source specified by the given index. \r\n function getRadonRetrievalByIndex(uint256) external view returns (Witnet.RadonRetrieval memory);\r\n\r\n /// Returns the array of one or more parameterized data sources that compose \r\n /// this WitOracleRequestTemplate.\r\n function getRadonRetrievals() external view returns (Witnet.RadonRetrieval[] memory);\r\n\r\n /// Returns the expected data type produced by successful resolutions of \r\n /// any WitOracleRequest that gets built out of this WitOracleRequestTemplate.\r\n function getResultDataType() external view returns (Witnet.RadonDataTypes); \r\n\r\n /// Verifies into the bounded WitOracle's registry the actual bytecode \r\n /// and RAD hash of the Witnet-compliant Radon Request that gets provably \r\n /// made out of the data sources, aggregate and tally Radon Reducers that \r\n /// compose this WitOracleRequestTemplate. While no WitOracleRequest instance is \r\n /// actually constructed, the returned value will be accepted as a valid\r\n /// RAD hash on the witOracle() contract from now on. \r\n /// Reverts if:\r\n /// - the ranks of passed array don't match either the number of this \r\n /// template's data sources, or the number of required parameters by \r\n /// each one of those.\r\n /// @dev This method requires less gas than buildWitOracleRequest(string[][]), and \r\n /// @dev it's usually preferred when data requests built out of this template\r\n /// @dev are intended to be used just once in lifetime. \r\n function verifyRadonRequest(string[][] calldata args) external returns (Witnet.RadonHash);\r\n\r\n /// Verifies into the bounded WitOracle's registry the actual bytecode\r\n /// and RAD hash of the Witnet-compliant Radon Request that gets provably\r\n /// made out as a result of applying the given parameter value to the underlying\r\n /// data sources, aggregate and tally reducers that compose this template. \r\n /// While no actual WitOracleRequest instance gets constructed, the returned value\r\n /// will be accepted as a valid RAD hash on the bounded WitOracle contract from now on.\r\n /// Reverts if any of the underlying data sources requires more than just one parameter.\r\n /// @dev This method requires less gas than buildWitOracleRequest(string), and \r\n /// @dev it's usually preferred when data requests built out of this template\r\n /// @dev are intended to be used just once in lifetime.\r\n function verifyRadonRequest(string calldata singleArgValue) external returns (Witnet.RadonHash);\r\n\r\n /// If built out of an upgradable factory, returns the SemVer tag of the \r\n /// factory implementation at the time when this WitOracleRequestTemplate got built.\r\n function version() external view returns (string memory);\r\n}\r\n", "sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\interfaces\\legacy\\IWitOracleRequestTemplate.sol", "ast": { "absolutePath": "project:/contracts/interfaces/legacy/IWitOracleRequestTemplate.sol", "exportedSymbols": { "Bech32": [ 31372 ], "IWitOracleRequest": [ 28922 ], "IWitOracleRequestTemplate": [ 29115 ], "Secp256k1": [ 32535 ], "Witnet": [ 40741 ], "WitnetBuffer": [ 42631 ], "WitnetCBOR": [ 44174 ] }, "id": 29116, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 29026, "literals": [ "solidity", ">=", "0.8", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:98" }, { "absolutePath": "project:/contracts/interfaces/legacy/IWitOracleRequest.sol", "file": "./IWitOracleRequest.sol", "id": 29027, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 29116, "sourceUnit": 28923, "src": "70:33:98", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "canonicalName": "IWitOracleRequestTemplate", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 29115, "linearizedBaseContracts": [ 29115 ], "name": "IWitOracleRequestTemplate", "nameLocation": "117:25:98", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 29028, "nodeType": "StructuredDocumentation", "src": "152:521:98", "text": "Builds a WitOracleRequest instance that will provide the bytecode and RAD \n hash of some Witnet-compliant Radon Request, provably made out of the \n data sources, aggregate and tally Radon Reducers that compose this instance.\n Reverts if the ranks of passed array don't match either the number of this template's \n data sources, or the number of required parameters by each one of those.\n @dev Produced addresses are counter-factual to the template address and the given values." }, "functionSelector": "20109613", "id": 29038, "implemented": false, "kind": "function", "modifiers": [], "name": "buildWitOracleRequest", "nameLocation": "688:21:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29033, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29032, "mutability": "mutable", "name": "args", "nameLocation": "731:4:98", "nodeType": "VariableDeclaration", "scope": 29038, "src": "711:24:98", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_array$_t_string_calldata_ptr_$dyn_calldata_ptr_$dyn_calldata_ptr", "typeString": "string[][]" }, "typeName": { "baseType": { "baseType": { "id": 29029, "name": "string", "nodeType": "ElementaryTypeName", "src": "711:6:98", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "id": 29030, "nodeType": "ArrayTypeName", "src": "711:8:98", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", "typeString": "string[]" } }, "id": 29031, "nodeType": "ArrayTypeName", "src": "711:10:98", "typeDescriptions": { "typeIdentifier": "t_array$_t_array$_t_string_storage_$dyn_storage_$dyn_storage_ptr", "typeString": "string[][]" } }, "visibility": "internal" } ], "src": "710:26:98" }, "returnParameters": { "id": 29037, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29036, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29038, "src": "755:17:98", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IWitOracleRequest_$28922", "typeString": "contract IWitOracleRequest" }, "typeName": { "id": 29035, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29034, "name": "IWitOracleRequest", "nameLocations": [ "755:17:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 28922, "src": "755:17:98" }, "referencedDeclaration": 28922, "src": "755:17:98", "typeDescriptions": { "typeIdentifier": "t_contract$_IWitOracleRequest_$28922", "typeString": "contract IWitOracleRequest" } }, "visibility": "internal" } ], "src": "754:19:98" }, "scope": 29115, "src": "679:95:98", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29039, "nodeType": "StructuredDocumentation", "src": "782:345:98", "text": "Builds a WitOracleRequest instance by specifying one single parameter value\n that will be equally applied to all the template's data sources.\n Reverts if any of the underlying data sources requires more than just one parameter.\n @dev Produced addresses are counter-factual to the template address and the given value." }, "functionSelector": "51b8d4b5", "id": 29047, "implemented": false, "kind": "function", "modifiers": [], "name": "buildWitOracleRequest", "nameLocation": "1142:21:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29042, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29041, "mutability": "mutable", "name": "singleArgValue", "nameLocation": "1181:14:98", "nodeType": "VariableDeclaration", "scope": 29047, "src": "1165:30:98", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 29040, "name": "string", "nodeType": "ElementaryTypeName", "src": "1165:6:98", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "1164:32:98" }, "returnParameters": { "id": 29046, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29045, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29047, "src": "1215:17:98", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IWitOracleRequest_$28922", "typeString": "contract IWitOracleRequest" }, "typeName": { "id": 29044, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29043, "name": "IWitOracleRequest", "nameLocations": [ "1215:17:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 28922, "src": "1215:17:98" }, "referencedDeclaration": 28922, "src": "1215:17:98", "typeDescriptions": { "typeIdentifier": "t_contract$_IWitOracleRequest_$28922", "typeString": "contract IWitOracleRequest" } }, "visibility": "internal" } ], "src": "1214:19:98" }, "scope": 29115, "src": "1133:101:98", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29048, "nodeType": "StructuredDocumentation", "src": "1242:294:98", "text": "Returns an array of integers telling the number of parameters required \n by every single data source (i.e. Radon Retrievals) that compose this \n WitOracleRequestTemplate. The length of the returned array tells the number \n of data sources that compose this instance." }, "functionSelector": "13620d8f", "id": 29054, "implemented": false, "kind": "function", "modifiers": [], "name": "getArgsCount", "nameLocation": "1551:12:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29049, "nodeType": "ParameterList", "parameters": [], "src": "1563:2:98" }, "returnParameters": { "id": 29053, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29052, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29054, "src": "1589:16:98", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 29050, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1589:7:98", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 29051, "nodeType": "ArrayTypeName", "src": "1589:9:98", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" } ], "src": "1588:18:98" }, "scope": 29115, "src": "1542:65:98", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29055, "nodeType": "StructuredDocumentation", "src": "1615:342:98", "text": "Returns the filters and reducing functions to be applied by witnessing nodes \n on the Witnet blockchain both at the:\n - Aggregate stage: when aggregating data extracted from the public \n data sources (i.e. Radon Retrievals).\n - Tally stage: when aggregating values revealed by witnesses." }, "functionSelector": "94d6c9bf", "id": 29064, "implemented": false, "kind": "function", "modifiers": [], "name": "getRadonReducers", "nameLocation": "1972:16:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29056, "nodeType": "ParameterList", "parameters": [], "src": "1988:2:98" }, "returnParameters": { "id": 29063, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29059, "mutability": "mutable", "name": "aggregateStage", "nameLocation": "2055:14:98", "nodeType": "VariableDeclaration", "scope": 29064, "src": "2028:41:98", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonReducer_$37748_memory_ptr", "typeString": "struct Witnet.RadonReducer" }, "typeName": { "id": 29058, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29057, "name": "Witnet.RadonReducer", "nameLocations": [ "2028:6:98", "2035:12:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37748, "src": "2028:19:98" }, "referencedDeclaration": 37748, "src": "2028:19:98", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonReducer_$37748_storage_ptr", "typeString": "struct Witnet.RadonReducer" } }, "visibility": "internal" }, { "constant": false, "id": 29062, "mutability": "mutable", "name": "tallyStage", "nameLocation": "2111:10:98", "nodeType": "VariableDeclaration", "scope": 29064, "src": "2084:37:98", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonReducer_$37748_memory_ptr", "typeString": "struct Witnet.RadonReducer" }, "typeName": { "id": 29061, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29060, "name": "Witnet.RadonReducer", "nameLocations": [ "2084:6:98", "2091:12:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37748, "src": "2084:19:98" }, "referencedDeclaration": 37748, "src": "2084:19:98", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonReducer_$37748_storage_ptr", "typeString": "struct Witnet.RadonReducer" } }, "visibility": "internal" } ], "src": "2013:119:98" }, "scope": 29115, "src": "1963:170:98", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29065, "nodeType": "StructuredDocumentation", "src": "2141:78:98", "text": "Returns metadata concerning the data source specified by the given index. " }, "functionSelector": "341e11c8", "id": 29073, "implemented": false, "kind": "function", "modifiers": [], "name": "getRadonRetrievalByIndex", "nameLocation": "2234:24:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29068, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29067, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29073, "src": "2259:7:98", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 29066, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2259:7:98", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "2258:9:98" }, "returnParameters": { "id": 29072, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29071, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29073, "src": "2291:28:98", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonRetrieval_$37795_memory_ptr", "typeString": "struct Witnet.RadonRetrieval" }, "typeName": { "id": 29070, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29069, "name": "Witnet.RadonRetrieval", "nameLocations": [ "2291:6:98", "2298:14:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37795, "src": "2291:21:98" }, "referencedDeclaration": 37795, "src": "2291:21:98", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonRetrieval_$37795_storage_ptr", "typeString": "struct Witnet.RadonRetrieval" } }, "visibility": "internal" } ], "src": "2290:30:98" }, "scope": 29115, "src": "2225:96:98", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29074, "nodeType": "StructuredDocumentation", "src": "2329:117:98", "text": "Returns the array of one or more parameterized data sources that compose \n this WitOracleRequestTemplate." }, "functionSelector": "033ac336", "id": 29081, "implemented": false, "kind": "function", "modifiers": [], "name": "getRadonRetrievals", "nameLocation": "2461:18:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29075, "nodeType": "ParameterList", "parameters": [], "src": "2479:2:98" }, "returnParameters": { "id": 29080, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29079, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29081, "src": "2505:30:98", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_RadonRetrieval_$37795_memory_ptr_$dyn_memory_ptr", "typeString": "struct Witnet.RadonRetrieval[]" }, "typeName": { "baseType": { "id": 29077, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 29076, "name": "Witnet.RadonRetrieval", "nameLocations": [ "2505:6:98", "2512:14:98" ], "nodeType": "IdentifierPath", "referencedDeclaration": 37795, "src": "2505:21:98" }, "referencedDeclaration": 37795, "src": "2505:21:98", "typeDescriptions": { "typeIdentifier": "t_struct$_RadonRetrieval_$37795_storage_ptr", "typeString": "struct Witnet.RadonRetrieval" } }, "id": 29078, "nodeType": "ArrayTypeName", "src": "2505:23:98", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_RadonRetrieval_$37795_storage_$dyn_storage_ptr", "typeString": "struct Witnet.RadonRetrieval[]" } }, "visibility": "internal" } ], "src": "2504:32:98" }, "scope": 29115, "src": "2452:85:98", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 29082, "nodeType": "StructuredDocumentation", "src": "2545:157:98", "text": "Returns the expected data type produced by successful resolutions of \n any WitOracleRequest that gets built out of this WitOracleRequestTemplate." }, "functionSelector": "db705d68", "id": 29088, "implemented": false, "kind": "function", "modifiers": [], "name": "getResultDataType", "nameLocation": "2717:17:98", "nodeType": "FunctionDefinition", "parameters": { "id": 29083, "nodeType": "ParameterList", "parameters": [], "src": "2734:2:98" }, "returnParameters": { "id": 29087, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29086, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 29088, "src": "2760:21:98", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_RadonDataTypes_$37720", "typeString": "enum Witnet.RadonDataTypes" }, "typeName": { "id": 29085,