witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
1,054 lines (1,053 loc) • 147 kB
JSON
{
"contractName": "IWitPriceFeedsLegacy",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "evmOrigin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "evmSender",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes4",
"name": "erc2362Id4",
"type": "bytes4"
},
{
"indexed": false,
"internalType": "uint256",
"name": "witOracleQueryId",
"type": "uint256"
}
],
"name": "PullingUpdate",
"type": "event"
},
{
"inputs": [],
"name": "dataType",
"outputs": [
{
"internalType": "enum Witnet.RadonDataTypes",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "defaultRadonSLA",
"outputs": [
{
"components": [
{
"internalType": "uint8",
"name": "numWitnesses",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "minConsensusPercentage",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "witnessReward",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "witnessCollateral",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "minerCommitRevealFee",
"type": "uint64"
}
],
"internalType": "struct IWitPriceFeedsLegacy.RadonSLAv1",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "evmGasPrice",
"type": "uint256"
}
],
"name": "estimateUpdateBaseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "footprint",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "caption",
"type": "string"
}
],
"name": "hash",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "lastValidQueryId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "lastValidQueryResponse",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "reporter",
"type": "address"
},
{
"internalType": "Witnet.Timestamp",
"name": "resultTimestamp",
"type": "uint64"
},
{
"internalType": "Witnet.TransactionHash",
"name": "resultDrTxHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "resultCborBytes",
"type": "bytes"
},
{
"internalType": "address",
"name": "disputer",
"type": "address"
}
],
"internalType": "struct Witnet.QueryResponse",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestPrice",
"outputs": [
{
"components": [
{
"internalType": "uint64",
"name": "value",
"type": "uint64"
},
{
"internalType": "Witnet.Timestamp",
"name": "timestamp",
"type": "uint64"
},
{
"internalType": "Witnet.TransactionHash",
"name": "drTxHash",
"type": "bytes32"
},
{
"internalType": "enum IWitPriceFeedsLegacySolver.LatestUpdateStatus",
"name": "latestStatus",
"type": "uint8"
}
],
"internalType": "struct IWitPriceFeedsLegacySolver.Price",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4[]",
"name": "feedIds",
"type": "bytes4[]"
}
],
"name": "latestPrices",
"outputs": [
{
"components": [
{
"internalType": "uint64",
"name": "value",
"type": "uint64"
},
{
"internalType": "Witnet.Timestamp",
"name": "timestamp",
"type": "uint64"
},
{
"internalType": "Witnet.TransactionHash",
"name": "drTxHash",
"type": "bytes32"
},
{
"internalType": "enum IWitPriceFeedsLegacySolver.LatestUpdateStatus",
"name": "latestStatus",
"type": "uint8"
}
],
"internalType": "struct IWitPriceFeedsLegacySolver.Price[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestUpdateQueryId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestUpdateQueryRequest",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "requester",
"type": "address"
},
{
"internalType": "uint24",
"name": "callbackGas",
"type": "uint24"
},
{
"internalType": "bytes",
"name": "radonBytecode",
"type": "bytes"
},
{
"internalType": "Witnet.RadonHash",
"name": "radonHash",
"type": "bytes32"
}
],
"internalType": "struct Witnet.QueryRequest",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestUpdateResponse",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "reporter",
"type": "address"
},
{
"internalType": "Witnet.Timestamp",
"name": "resultTimestamp",
"type": "uint64"
},
{
"internalType": "Witnet.TransactionHash",
"name": "resultDrTxHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "resultCborBytes",
"type": "bytes"
},
{
"internalType": "address",
"name": "disputer",
"type": "address"
}
],
"internalType": "struct Witnet.QueryResponse",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestUpdateResponseStatus",
"outputs": [
{
"internalType": "enum IWitOracleLegacy.QueryResponseStatus",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "latestUpdateResultError",
"outputs": [
{
"components": [
{
"internalType": "uint8",
"name": "code",
"type": "uint8"
},
{
"internalType": "string",
"name": "reason",
"type": "string"
}
],
"internalType": "struct IWitOracleLegacy.ResultError",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"name": "lookupCaption",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "lookupDecimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "lookupPriceSolver",
"outputs": [
{
"internalType": "address",
"name": "solverAddress",
"type": "address"
},
{
"internalType": "string[]",
"name": "solverDeps",
"type": "string[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"name": "lookupWitnetBytecode",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"name": "lookupWitnetRadHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"name": "lookupWitnetRetrievals",
"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": "prefix",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "feedId",
"type": "bytes4"
}
],
"name": "requestUpdate",
"outputs": [
{
"internalType": "uint256",
"name": "usedFunds",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
},
{
"components": [
{
"internalType": "uint8",
"name": "numWitnesses",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "unitaryReward",
"type": "uint64"
}
],
"internalType": "struct IWitPriceFeedsLegacy.RadonSLAv2",
"name": "",
"type": "tuple"
}
],
"name": "requestUpdate",
"outputs": [
{
"internalType": "uint256",
"name": "usedFunds",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "supportedFeeds",
"outputs": [
{
"internalType": "bytes4[]",
"name": "",
"type": "bytes4[]"
},
{
"internalType": "string[]",
"name": "",
"type": "string[]"
},
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "supportsCaption",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalFeeds",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "witnet",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"evmOrigin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"evmSender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4\",\"name\":\"erc2362Id4\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"witOracleQueryId\",\"type\":\"uint256\"}],\"name\":\"PullingUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"dataType\",\"outputs\":[{\"internalType\":\"enum Witnet.RadonDataTypes\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultRadonSLA\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"numWitnesses\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"minConsensusPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"witnessReward\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"witnessCollateral\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minerCommitRevealFee\",\"type\":\"uint64\"}],\"internalType\":\"struct IWitPriceFeedsLegacy.RadonSLAv1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"evmGasPrice\",\"type\":\"uint256\"}],\"name\":\"estimateUpdateBaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"footprint\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"caption\",\"type\":\"string\"}],\"name\":\"hash\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"lastValidQueryId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"lastValidQueryResponse\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"reporter\",\"type\":\"address\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"resultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"resultDrTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"disputer\",\"type\":\"address\"}],\"internalType\":\"struct Witnet.QueryResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"value\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"drTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"enum IWitPriceFeedsLegacySolver.LatestUpdateStatus\",\"name\":\"latestStatus\",\"type\":\"uint8\"}],\"internalType\":\"struct IWitPriceFeedsLegacySolver.Price\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4[]\",\"name\":\"feedIds\",\"type\":\"bytes4[]\"}],\"name\":\"latestPrices\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"value\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"drTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"enum IWitPriceFeedsLegacySolver.LatestUpdateStatus\",\"name\":\"latestStatus\",\"type\":\"uint8\"}],\"internalType\":\"struct IWitPriceFeedsLegacySolver.Price[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestUpdateQueryId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestUpdateQueryRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"callbackGas\",\"type\":\"uint24\"},{\"internalType\":\"bytes\",\"name\":\"radonBytecode\",\"type\":\"bytes\"},{\"internalType\":\"Witnet.RadonHash\",\"name\":\"radonHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct Witnet.QueryRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestUpdateResponse\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"reporter\",\"type\":\"address\"},{\"internalType\":\"Witnet.Timestamp\",\"name\":\"resultTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"Witnet.TransactionHash\",\"name\":\"resultDrTxHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"resultCborBytes\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"disputer\",\"type\":\"address\"}],\"internalType\":\"struct Witnet.QueryResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestUpdateResponseStatus\",\"outputs\":[{\"internalType\":\"enum IWitOracleLegacy.QueryResponseStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"latestUpdateResultError\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"code\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"internalType\":\"struct IWitOracleLegacy.ResultError\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"lookupCaption\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"lookupDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"lookupPriceSolver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"solverAddress\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"solverDeps\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"lookupWitnetBytecode\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"lookupWitnetRadHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"lookupWitnetRetrievals\",\"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\":\"prefix\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"feedId\",\"type\":\"bytes4\"}],\"name\":\"requestUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usedFunds\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"numWitnesses\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"unitaryReward\",\"type\":\"uint64\"}],\"internalType\":\"struct IWitPriceFeedsLegacy.RadonSLAv2\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"requestUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usedFunds\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportedFeeds\",\"outputs\":[{\"internalType\":\"bytes4[]\",\"name\":\"\",\"type\":\"bytes4[]\"},{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"supportsCaption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFeeds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"witnet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"events\":{\"PullingUpdate(address,address,bytes4,uint256)\":{\"notice\":\"A fresh update on the data feed identified as `erc2364Id4` has just been requested and paid for by some `evmSender`, under command of the `evmOrigin` externally owned account. \"}},\"kind\":\"user\",\"methods\":{\"dataType()\":{\"notice\":\"Primitive data type produced by successful data updates of all supported feeds (e.g. Witnet.RadonDataTypes.Integer in WitPriceFeeds).\"},\"footprint()\":{\"notice\":\"Returns a unique hash determined by the combination of data sources being used by supported non-routed price feeds, and dependencies of all supported routed price feeds. The footprint changes if any price feed is modified, added, removed or if the dependency tree of any routed price feed is altered.\"},\"hash(string)\":{\"notice\":\"This pure function determines the ERC-2362 identifier of the given data feed caption string, truncated to bytes4.\"},\"lastValidQueryId(bytes4)\":{\"notice\":\"Returns the query id (in the context of the WitOracle addressed by witOracle()) that solved the most recently updated value for the given feed.\"},\"lastValidQueryResponse(bytes4)\":{\"notice\":\"Returns the actual response from the Witnet oracle blockchain to the last successful update for the given data feed.\"},\"latestUpdateQueryId(bytes4)\":{\"notice\":\"Returns the Witnet query id of the latest update attempt for the given data feed.\"},\"latestUpdateQueryRequest(bytes4)\":{\"notice\":\"Returns the actual request queried to the the Witnet oracle blockchain on the latest update attempt for the given data feed.\"},\"lookupCaption(bytes4)\":{\"notice\":\"Returns the ERC-2362 caption of the given feed identifier, if known. \"},\"prefix()\":{\"notice\":\"ERC-2362 caption prefix shared by all supported feeds (e.g. \\\"Price-\\\" in WitPriceFeeds).\"},\"requestUpdate(bytes4)\":{\"notice\":\"Triggers a fresh update on the Witnet oracle blockchain for the given data feed, using the defaultRadonSLA() security parameters.\"},\"supportedFeeds()\":{\"notice\":\"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 and off-chain computations solved by the Witnet oracle blockchain upon every data update. The RAD hash value for a routed feed actually contains the address of the IWitnetPriceSolver logic contract that solves it.\"},\"supportsCaption(string)\":{\"notice\":\"Tells whether the given ERC-2362 feed caption is currently supported.\"},\"totalFeeds()\":{\"notice\":\"Total number of data feeds, routed or not, that are currently supported.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/legacy/IWitPriceFeedsLegacy.sol\":\"IWitPriceFeedsLegacy\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/IWitOracleRadonRegistry.sol\":{\"keccak256\":\"0x437bbb89129311bd1cc8f6becd333df46109ec53b24d3159be942b225614071f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef9bcdf4a73cb126885478c994821b7fe2b87d9221b767b4c9342b89b0d6550a\",\"dweb:/ipfs/QmXzZXPMxjSiFpcEnhg6CjLFNxGCpDZt22xpUh7VHxNTGd\"]},\"project:/contracts/interfaces/legacy/IWitOracleLegacy.sol\":{\"keccak256\":\"0xd2929c9aa5a02d261d6d1a068a6b7231ae58d8f81f081ba89f2d3267a31fbbb5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://956b26323a02cf400c32012586954fc5dbc98b4d5b7a8b0533401cbda8619059\",\"dweb:/ipfs/QmSWdCRwL5t3atFM8osdaohLTqEEmY1FbnR6xrRCmw1GDM\"]},\"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/interfaces/legacy/IWitPriceFeedsLegacy.sol\":{\"keccak256\":\"0x13222d4ec5a538477e792ff63338a12db2c0071d81a61aad7a046ad2880cefd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a8f564e6a69264f7e0679525022978f9833a0f1273ef606e554c2a18ba964d13\",\"dweb:/ipfs/QmaAVfsvnJQvYwdsnYSXAnbJWopp15PR3atXxCwZS3AANC\"]},\"project:/contracts/interfaces/legacy/IWitPriceFeedsLegacySolver.sol\":{\"keccak256\":\"0x9543c5a64bbd38a3d1af6d00badda31c8c1fc90412efc7894023277e1e6b7490\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab133acd1c20af1f676bf17017c77e4918338fdbad764660e42d892a5f412eaf\",\"dweb:/ipfs/QmeQFGuv3jm46R4bux8NaW56SbFWHvvBNCqFzfafgtWi1W\"]},\"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 \"./IWitOracleLegacy.sol\";\r\nimport \"./IWitPriceFeedsLegacySolver.sol\";\r\n\r\ninterface IWitPriceFeedsLegacy { \r\n\r\n /// A fresh update on the data feed identified as `erc2364Id4` has just been \r\n /// requested and paid for by some `evmSender`, under command of the \r\n /// `evmOrigin` externally owned account. \r\n event PullingUpdate(\r\n address evmOrigin,\r\n address evmSender,\r\n bytes4 erc2362Id4,\r\n uint256 witOracleQueryId\r\n );\r\n\r\n struct RadonSLAv1 {\r\n uint8 numWitnesses;\r\n uint8 minConsensusPercentage;\r\n uint64 witnessReward;\r\n uint64 witnessCollateral;\r\n uint64 minerCommitRevealFee;\r\n }\r\n\r\n struct RadonSLAv2 {\r\n uint8 numWitnesses;\r\n uint64 unitaryReward;\r\n }\r\n\r\n /// Primitive data type produced by successful data updates of all supported\r\n /// feeds (e.g. Witnet.RadonDataTypes.Integer in WitPriceFeeds).\r\n function dataType() external view returns (Witnet.RadonDataTypes);\r\n \r\n function defaultRadonSLA() external view returns (RadonSLAv1 memory);\r\n\r\n function estimateUpdateBaseFee(uint256 evmGasPrice) external view returns (uint);\r\n\r\n /// Returns a unique hash determined by the combination of data sources being used by \r\n /// supported non-routed price feeds, and dependencies of all supported routed \r\n /// price feeds. The footprint changes if any price feed is modified, added, removed \r\n /// or if the dependency tree of any routed price feed is altered.\r\n function footprint() external view returns (bytes4);\r\n\r\n /// This pure function determines the ERC-2362 identifier of the given data feed \r\n /// caption string, truncated to bytes4.\r\n function hash(string calldata caption) external pure returns (bytes4);\r\n\r\n /// Returns the query id (in the context of the WitOracle addressed by witOracle()) \r\n /// that solved the most recently updated value for the given feed.\r\n function lastValidQueryId(bytes4 feedId) external view returns (uint256);\r\n\r\n /// Returns the actual response from the Witnet oracle blockchain to the last \r\n /// successful update for the given data feed.\r\n function lastValidQueryResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory);\r\n\r\n function latestPrice(bytes4 feedId) external view returns (IWitPriceFeedsLegacySolver.Price memory);\r\n function latestPrices(bytes4[] calldata feedIds) external view returns (IWitPriceFeedsLegacySolver.Price[] memory);\r\n\r\n /// Returns the Witnet query id of the latest update attempt for the given data feed.\r\n function latestUpdateQueryId(bytes4 feedId) external view returns (uint256);\r\n\r\n /// Returns the actual request queried to the the Witnet oracle blockchain on the latest \r\n /// update attempt for the given data feed.\r\n function latestUpdateQueryRequest(bytes4 feedId) external view returns (Witnet.QueryRequest memory);\r\n\r\n function latestUpdateResponse(bytes4 feedId) external view returns (Witnet.QueryResponse memory);\r\n function latestUpdateResponseStatus(bytes4 feedId) external view returns (IWitOracleLegacy.QueryResponseStatus);\r\n function latestUpdateResultError(bytes4 feedId) external view returns (IWitOracleLegacy.ResultError memory);\r\n\r\n /// Returns the ERC-2362 caption of the given feed identifier, if known. \r\n function lookupCaption(bytes4) external view returns (string memory);\r\n\r\n function lookupDecimals(bytes4 feedId) external view returns (uint8); \r\n function lookupPriceSolver(bytes4 feedId) external view returns (\r\n address solverAddress, \r\n string[] memory solverDeps\r\n );\r\n \r\n function lookupWitnetBytecode(bytes4) external view returns (bytes memory);\r\n function lookupWitnetRadHash(bytes4) external view returns (bytes32);\r\n function lookupWitnetRetrievals(bytes4) external view returns (Witnet.RadonRetrieval[] memory);\r\n \r\n /// ERC-2362 caption prefix shared by all supported feeds (e.g. \"Price-\" in WitPriceFeeds).\r\n function prefix() external view returns (string memory);\r\n \r\n /// Triggers a fresh update on the Witnet oracle blockchain for the given data feed, \r\n /// using the defaultRadonSLA() security parameters.\r\n function requestUpdate(bytes4 feedId) external payable returns (uint256 usedFunds);\r\n function requestUpdate(bytes4, RadonSLAv2 calldata) external payable returns (uint256 usedFunds);\r\n\r\n /// Returns the list of feed ERC-2362 ids, captions and RAD hashes of all currently supported \r\n /// data feeds. The RAD hash of a data feed determines in a verifiable way the actual data sources \r\n /// and off-chain computations solved by the Witnet oracle blockchain upon every data update. \r\n /// The RAD hash value for a routed feed actually contains the address of the IWitnetPriceSolver \r\n /// logic contract that solves it.\r\n function supportedFeeds() external view returns (bytes4[] memory, string[] memory, bytes32[] memory);\r\n\r\n /// Tells whether the given ERC-2362 feed caption is currently supported.\r\n function supportsCaption(string calldata) external view returns (bool);\r\n\r\n /// Total number of data feeds, routed or not, that are currently supported.\r\n function totalFeeds() external view returns (uint256);\r\n\r\n function witnet() external view returns (address);\r\n}\r\n",
"sourcePath": "C:\\Users\\guill\\github\\guidiaz\\witnet-solidity-bridge\\contracts\\interfaces\\legacy\\IWitPriceFeedsLegacy.sol",
"ast": {
"absolutePath": "project:/contracts/interfaces/legacy/IWitPriceFeedsLegacy.sol",
"exportedSymbols": {
"Bech32": [
31372
],
"IWitOracleLegacy": [
28786
],
"IWitOracleRadonRegistry": [
27394
],
"IWitOracleRequest": [
28922
],
"IWitOracleRequestTemplate": [
29115
],
"IWitPriceFeedsLegacy": [
29361
],
"IWitPriceFeedsLegacySolver": [
29521
],
"Secp256k1": [
32535
],
"Witnet": [
40741
],
"WitnetBuffer": [
42631
],
"WitnetCBOR": [
44174
]
},
"id": 29362,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 29117,
"literals": [
"solidity",
">=",
"0.8",
".0",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "35:31:99"
},
{
"absolutePath": "project:/contracts/interfaces/legacy/IWitOracleLegacy.sol",
"file": "./IWitOracleLegacy.sol",
"id": 29118,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 29362,
"sourceUnit": 28787,
"src": "70:32:99",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "project:/contracts/interfaces/legacy/IWitPriceFeedsLegacySolver.sol",
"file": "./IWitPriceFeedsLegacySolver.sol",
"id": 29119,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 29362,
"sourceUnit": 29522,
"src": "104:42:99",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IWitPriceFeedsLegacy",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 29361,
"linearizedBaseContracts": [
29361
],
"name": "IWitPriceFeedsLegacy",
"nameLocation": "160:20:99",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 29120,
"nodeType": "StructuredDocumentation",
"src": "193:200:99",
"text": "A fresh update on the data feed identified as `erc2364Id4` has just been \n requested and paid for by some `evmSender`, under command of the \n `evmOrigin` externally owned account. "
},
"eventSelector": "0bd652a116bb5006c2e07594e8a3fe9b5ba51acf6cd9572568913fda51ad26c4",
"id": 29130,
"name": "PullingUpdate",
"nameLocation": "405:13:99",
"nodeType": "EventDefinition",
"parameters": {
"id": 29129,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 29122,
"indexed": false,
"mutability": "mutable",
"name": "evmOrigin",
"nameLocation": "437:9:99",
"nodeType": "VariableDeclaration",
"scope": 29130,
"src": "429:17:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 29121,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "429:7:99",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29124,
"indexed": false,
"mutability": "mutable",
"name": "evmSender",
"nameLocation": "465:9:99",
"nodeType": "VariableDeclaration",
"scope": 29130,
"src": "457:17:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 29123,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "457:7:99",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29126,
"indexed": false,
"mutability": "mutable",
"name": "erc2362Id4",
"nameLocation": "493:10:99",
"nodeType": "VariableDeclaration",
"scope": 29130,
"src": "485:18:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 29125,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "485:6:99",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29128,
"indexed": false,
"mutability": "mutable",
"name": "witOracleQueryId",
"nameLocation": "522:16:99",
"nodeType": "VariableDeclaration",
"scope": 29130,
"src": "514:24:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 29127,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "514:7:99",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "418:127:99"
},
"src": "399:147:99"
},
{
"canonicalName": "IWitPriceFeedsLegacy.RadonSLAv1",
"id": 29141,
"members": [
{
"constant": false,
"id": 29132,
"mutability": "mutable",
"name": "numWitnesses",
"nameLocation": "589:12:99",
"nodeType": "VariableDeclaration",
"scope": 29141,
"src": "583:18:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 29131,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "583:5:99",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29134,
"mutability": "mutable",
"name": "minConsensusPercentage",
"nameLocation": "618:22:99",
"nodeType": "VariableDeclaration",
"scope": 29141,
"src": "612:28:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 29133,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "612:5:99",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 29136,
"mutability": "mutable",
"name": "witnessReward",
"nameLocation": "658:13:99",
"nodeType": "VariableDeclaration",
"scope": 29141,
"src": "651:20:99",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 29135,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "651:6:99",
"typeDescriptions": {