witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
813 lines (812 loc) • 19.1 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "WitnetOracle",
"sourceName": "contracts/WitnetOracle.sol",
"abi": [
{
"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"
},
{
"inputs": [],
"name": "channel",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "class",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "gasPrice",
"type": "uint256"
},
{
"internalType": "uint16",
"name": "resultMaxSize",
"type": "uint16"
}
],
"name": "estimateBaseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "gasPrice",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "radHash",
"type": "bytes32"
}
],
"name": "estimateBaseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "gasPrice",
"type": "uint256"
},
{
"internalType": "uint24",
"name": "callbackGasLimit",
"type": "uint24"
}
],
"name": "estimateBaseFeeWithCallback",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "contract WitnetRequestFactory",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "fetchQueryResponse",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "reporter",
"type": "address"
},
{
"internalType": "uint64",
"name": "finality",
"type": "uint64"
},
{
"internalType": "uint32",
"name": "resultTimestamp",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "resultTallyHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "resultCborBytes",
"type": "bytes"
}
],
"internalType": "struct WitnetV2.Response",
"name": "",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getNextQueryId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQuery",
"outputs": [
{
"components": [
{
"components": [
{
"internalType": "address",
"name": "requester",
"type": "address"
},
{
"internalType": "uint24",
"name": "gasCallback",
"type": "uint24"
},
{
"internalType": "uint72",
"name": "evmReward",
"type": "uint72"
},
{
"internalType": "bytes",
"name": "witnetBytecode",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "witnetRAD",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint8",
"name": "committeeSize",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessingFeeNanoWit",
"type": "uint64"
}
],
"internalType": "struct WitnetV2.RadonSLA",
"name": "witnetSLA",
"type": "tuple"
}
],
"internalType": "struct WitnetV2.Request",
"name": "request",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "reporter",
"type": "address"
},
{
"internalType": "uint64",
"name": "finality",
"type": "uint64"
},
{
"internalType": "uint32",
"name": "resultTimestamp",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "resultTallyHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "resultCborBytes",
"type": "bytes"
}
],
"internalType": "struct WitnetV2.Response",
"name": "response",
"type": "tuple"
}
],
"internalType": "struct WitnetV2.Query",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryEvmReward",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryRequest",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "requester",
"type": "address"
},
{
"internalType": "uint24",
"name": "gasCallback",
"type": "uint24"
},
{
"internalType": "uint72",
"name": "evmReward",
"type": "uint72"
},
{
"internalType": "bytes",
"name": "witnetBytecode",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "witnetRAD",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint8",
"name": "committeeSize",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessingFeeNanoWit",
"type": "uint64"
}
],
"internalType": "struct WitnetV2.RadonSLA",
"name": "witnetSLA",
"type": "tuple"
}
],
"internalType": "struct WitnetV2.Request",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryResponse",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "reporter",
"type": "address"
},
{
"internalType": "uint64",
"name": "finality",
"type": "uint64"
},
{
"internalType": "uint32",
"name": "resultTimestamp",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "resultTallyHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "resultCborBytes",
"type": "bytes"
}
],
"internalType": "struct WitnetV2.Response",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryResponseStatus",
"outputs": [
{
"internalType": "enum WitnetV2.ResponseStatus",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryResultCborBytes",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryResultError",
"outputs": [
{
"components": [
{
"internalType": "enum Witnet.ResultErrorCodes",
"name": "code",
"type": "uint8"
},
{
"internalType": "string",
"name": "reason",
"type": "string"
}
],
"internalType": "struct Witnet.ResultError",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "getQueryStatus",
"outputs": [
{
"internalType": "enum WitnetV2.QueryStatus",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "queryIds",
"type": "uint256[]"
}
],
"name": "getQueryStatusBatch",
"outputs": [
{
"internalType": "enum WitnetV2.QueryStatus[]",
"name": "",
"type": "uint8[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "queryRAD",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint8",
"name": "committeeSize",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessingFeeNanoWit",
"type": "uint64"
}
],
"internalType": "struct WitnetV2.RadonSLA",
"name": "querySLA",
"type": "tuple"
}
],
"name": "postRequest",
"outputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "queryUnverifiedBytecode",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint8",
"name": "committeeSize",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessingFeeNanoWit",
"type": "uint64"
}
],
"internalType": "struct WitnetV2.RadonSLA",
"name": "querySLA",
"type": "tuple"
},
{
"internalType": "uint24",
"name": "queryCallbackGasLimit",
"type": "uint24"
}
],
"name": "postRequestWithCallback",
"outputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "queryRAD",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint8",
"name": "committeeSize",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessingFeeNanoWit",
"type": "uint64"
}
],
"internalType": "struct WitnetV2.RadonSLA",
"name": "querySLA",
"type": "tuple"
},
{
"internalType": "uint24",
"name": "queryCallbackGasLimit",
"type": "uint24"
}
],
"name": "postRequestWithCallback",
"outputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "registry",
"outputs": [
{
"internalType": "contract WitnetRequestBytecodes",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "specs",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "queryId",
"type": "uint256"
}
],
"name": "upgradeQueryEvmReward",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}