UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,557 lines 37.4 kB
{ "_format": "hh3-artifact-1", "contractName": "IWitPriceFeeds", "sourceName": "contracts/interfaces/IWitPriceFeeds.sol", "abi": [ { "inputs": [], "name": "DeviantPrice", "type": "error" }, { "inputs": [], "name": "HotPrice", "type": "error" }, { "inputs": [], "name": "InvalidArgument", "type": "error" }, { "inputs": [], "name": "InvalidGovernanceTarget", "type": "error" }, { "inputs": [], "name": "InvalidUpdateData", "type": "error" }, { "inputs": [], "name": "InvalidUpdateDataSource", "type": "error" }, { "inputs": [], "name": "NoFreshUpdate", "type": "error" }, { "inputs": [], "name": "PriceFeedNotFound", "type": "error" }, { "inputs": [], "name": "PriceFeedNotFoundWithinRange", "type": "error" }, { "inputs": [], "name": "StalePrice", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" }, { "indexed": false, "internalType": "string", "name": "caption", "type": "string" }, { "indexed": false, "internalType": "int8", "name": "exponent", "type": "int8" }, { "indexed": false, "internalType": "enum IWitPriceFeedsTypes.Mappers", "name": "mapper", "type": "uint8" }, { "indexed": false, "internalType": "string[]", "name": "dependencies", "type": "string[]" } ], "name": "PriceFeedMapper", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" }, { "indexed": false, "internalType": "string", "name": "caption", "type": "string" }, { "indexed": false, "internalType": "int8", "name": "exponent", "type": "int8" }, { "indexed": false, "internalType": "enum IWitPriceFeedsTypes.Oracles", "name": "oracle", "type": "uint8" }, { "indexed": false, "internalType": "address", "name": "oracleAddress", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "oracleSources", "type": "bytes32" } ], "name": "PriceFeedOracle", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" }, { "indexed": false, "internalType": "string", "name": "caption", "type": "string" } ], "name": "PriceFeedRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "IWitPriceFeedsTypes.ID4", "name": "ID4", "type": "bytes4" }, { "indexed": false, "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "indexed": false, "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "price", "type": "uint64" }, { "indexed": false, "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "indexed": false, "internalType": "int8", "name": "exponent", "type": "int8" } ], "name": "PriceFeedUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "publishTime", "type": "uint64" }, { "indexed": false, "internalType": "int64", "name": "price", "type": "int64" }, { "indexed": false, "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "PriceFeedUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" }, { "indexed": false, "internalType": "string", "name": "caption", "type": "string" }, { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "indexed": false, "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "conditions", "type": "tuple" } ], "name": "PriceFeedUpdateConditions", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "base", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "curator", "type": "address" } ], "name": "clone", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "consumer", "outputs": [ { "internalType": "contract IWitPriceFeedsConsumer", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "symbol", "type": "string" } ], "name": "createChainlinkAggregator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "defaultUpdateConditions", "outputs": [ { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "footprint", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" } ], "name": "getEmaPrice", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" }, { "internalType": "uint64", "name": "age", "type": "uint64" } ], "name": "getEmaPriceNotOlderThan", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" } ], "name": "getEmaPriceUnsafe", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" } ], "name": "getPrice", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "getPrice", "outputs": [ { "components": [ { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "uint64", "name": "price", "type": "uint64" }, { "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Price", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" }, { "internalType": "uint64", "name": "age", "type": "uint64" } ], "name": "getPriceNotOlderThan", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" }, { "internalType": "uint24", "name": "age", "type": "uint24" } ], "name": "getPriceNotOlderThan", "outputs": [ { "components": [ { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "uint64", "name": "price", "type": "uint64" }, { "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Price", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" } ], "name": "getPriceUnsafe", "outputs": [ { "components": [ { "internalType": "int64", "name": "price", "type": "int64" }, { "internalType": "uint64", "name": "conf", "type": "uint64" }, { "internalType": "int32", "name": "expo", "type": "int32" }, { "internalType": "uint256", "name": "publishTime", "type": "uint256" } ], "internalType": "struct IWitPyth.PythPrice", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "getPriceUnsafe", "outputs": [ { "components": [ { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "uint64", "name": "price", "type": "uint64" }, { "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Price", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "getUpdateFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "symbol", "type": "string" } ], "name": "hash", "outputs": [ { "internalType": "IWitPyth.ID", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "lookupPriceFeed", "outputs": [ { "components": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "components": [ { "internalType": "enum IWitPriceFeedsTypes.Mappers", "name": "class", "type": "uint8" }, { "internalType": "string[]", "name": "deps", "type": "string[]" } ], "internalType": "struct IWitPriceFeedsTypes.Mapper", "name": "mapper", "type": "tuple" }, { "components": [ { "internalType": "enum IWitPriceFeedsTypes.Oracles", "name": "class", "type": "uint8" }, { "internalType": "address", "name": "target", "type": "address" }, { "internalType": "bytes32", "name": "sources", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Oracle", "name": "oracle", "type": "tuple" }, { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "updateConditions", "type": "tuple" }, { "components": [ { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "uint64", "name": "price", "type": "uint64" }, { "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Price", "name": "lastUpdate", "type": "tuple" } ], "internalType": "struct IWitPriceFeedsTypes.Info", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "lookupPriceFeedCaption", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "lookupPriceFeedExponent", "outputs": [ { "internalType": "int8", "name": "", "type": "int8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "IWitPriceFeedsTypes.ID4", "name": "id4", "type": "bytes4" } ], "name": "lookupPriceFeedID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lookupPriceFeeds", "outputs": [ { "components": [ { "internalType": "IWitPyth.ID", "name": "id", "type": "bytes32" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "components": [ { "internalType": "enum IWitPriceFeedsTypes.Mappers", "name": "class", "type": "uint8" }, { "internalType": "string[]", "name": "deps", "type": "string[]" } ], "internalType": "struct IWitPriceFeedsTypes.Mapper", "name": "mapper", "type": "tuple" }, { "components": [ { "internalType": "enum IWitPriceFeedsTypes.Oracles", "name": "class", "type": "uint8" }, { "internalType": "address", "name": "target", "type": "address" }, { "internalType": "bytes32", "name": "sources", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Oracle", "name": "oracle", "type": "tuple" }, { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "updateConditions", "type": "tuple" }, { "components": [ { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "uint64", "name": "price", "type": "uint64" }, { "internalType": "int56", "name": "deltaPrice", "type": "int56" }, { "internalType": "Witnet.Timestamp", "name": "timestamp", "type": "uint64" }, { "internalType": "Witnet.TransactionHash", "name": "trail", "type": "bytes32" } ], "internalType": "struct IWitPriceFeedsTypes.Price", "name": "lastUpdate", "type": "tuple" } ], "internalType": "struct IWitPriceFeedsTypes.Info[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "", "type": "string" }, { "internalType": "bool", "name": "", "type": "bool" } ], "name": "removePriceFeed", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "settleConsumer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "", "type": "tuple" } ], "name": "settleDefaultUpdateConditions", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "enum IWitPriceFeedsTypes.Mappers", "name": "mapper", "type": "uint8" }, { "internalType": "string[]", "name": "deps", "type": "string[]" } ], "name": "settlePriceFeedMapper", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "enum IWitPriceFeedsTypes.Oracles", "name": "oracle", "type": "uint8" }, { "internalType": "address", "name": "target", "type": "address" }, { "internalType": "bytes32", "name": "sources", "type": "bytes32" } ], "name": "settlePriceFeedOracle", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "bytes", "name": "radonBytecode", "type": "bytes" } ], "name": "settlePriceFeedRadonBytecode", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" }, { "internalType": "int8", "name": "exponent", "type": "int8" }, { "internalType": "Witnet.RadonHash", "name": "radonHash", "type": "bytes32" } ], "name": "settlePriceFeedRadonHash", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" }, { "components": [ { "internalType": "uint24", "name": "callbackGas", "type": "uint24" }, { "internalType": "bool", "name": "computeEma", "type": "bool" }, { "internalType": "uint24", "name": "cooldownSecs", "type": "uint24" }, { "internalType": "uint24", "name": "heartbeatSecs", "type": "uint24" }, { "internalType": "uint16", "name": "maxDeviation1000", "type": "uint16" }, { "internalType": "uint16", "name": "minWitnesses", "type": "uint16" } ], "internalType": "struct IWitPriceFeedsTypes.UpdateConditions", "name": "conditions", "type": "tuple" } ], "name": "settlePriceFeedUpdateConditions", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "caption", "type": "string" } ], "name": "supportsCaption", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "witOracle", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, "inputSourceName": "project/contracts/interfaces/IWitPriceFeeds.sol", "buildInfoId": "solc-0_8_30-47301052af11a5aa5062e9b98ca44d5e142950cf" }