UNPKG

@price-oracle/v1-core-interfaces

Version:

Price Oracle v1 Core Interfaces and needed integration files

733 lines 27.4 kB
{ "abi": [ { "inputs": [], "name": "PriceGovernable_NoGovernanceZeroAddress", "type": "error" }, { "inputs": [], "name": "PriceGovernable_OnlyGovernance", "type": "error" }, { "inputs": [], "name": "PriceGovernable_OnlyPendingGovernance", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "_pendingGovernance", "type": "address" } ], "name": "GovernanceProposal", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "_governance", "type": "address" } ], "name": "GovernanceSet", "type": "event" }, { "inputs": [], "name": "acceptGovernance", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "governance", "outputs": [ { "internalType": "address", "name": "_governance", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingGovernance", "outputs": [ { "internalType": "address", "name": "_pendingGovernance", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_governance", "type": "address" } ], "name": "setGovernance", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "deployedBytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "methodIdentifiers": { "acceptGovernance()": "238efcbc", "governance()": "5aa6e675", "pendingGovernance()": "f39c38a0", "setGovernance(address)": "ab033ea9" }, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"PriceGovernable_NoGovernanceZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceGovernable_OnlyGovernance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceGovernable_OnlyPendingGovernance\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pendingGovernance\",\"type\":\"address\"}],\"name\":\"GovernanceProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"name\":\"GovernanceSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingGovernance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_pendingGovernance\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governance\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"GovernanceProposal(address)\":{\"params\":{\"_pendingGovernance\":\"The address proposed to be the new governance\"}},\"GovernanceSet(address)\":{\"params\":{\"_governance\":\"Address of the new governance\"}}},\"kind\":\"dev\",\"methods\":{\"governance()\":{\"returns\":{\"_governance\":\"The governance address\"}},\"pendingGovernance()\":{\"returns\":{\"_pendingGovernance\":\"The pendingGovernance address\"}},\"setGovernance(address)\":{\"params\":{\"_governance\":\"The address being proposed as the new governance\"}}},\"title\":\"Governable contract\",\"version\":1},\"userdoc\":{\"errors\":{\"PriceGovernable_NoGovernanceZeroAddress()\":[{\"notice\":\"Thrown when trying to set governance to zero address\"}],\"PriceGovernable_OnlyGovernance()\":[{\"notice\":\"Thrown when the caller of the function is not governance\"}],\"PriceGovernable_OnlyPendingGovernance()\":[{\"notice\":\"Thrown when the caller of the function is not pendingGovernance\"}]},\"events\":{\"GovernanceProposal(address)\":{\"notice\":\"Emitted when new governance is proposed\"},\"GovernanceSet(address)\":{\"notice\":\"Emitted when pendingGovernance accepts to be governance\"}},\"kind\":\"user\",\"methods\":{\"acceptGovernance()\":{\"notice\":\"Changes the governance from the current one to the previously proposed address\"},\"governance()\":{\"notice\":\"Returns the governance address\"},\"pendingGovernance()\":{\"notice\":\"Returns the pendingGovernance address\"},\"setGovernance(address)\":{\"notice\":\"Proposes a new address to be governance\"}},\"notice\":\"Manages the governance role\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solidity/interfaces/utils/IPriceGovernable.sol\":\"IPriceGovernable\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@contracts/=solidity/contracts/\",\":@defi-wonderland/=node_modules/@defi-wonderland/\",\":@interfaces/=solidity/interfaces/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":@test/=solidity/test/\",\":@uniswap/=node_modules/@uniswap/\",\":@uniswap/v3-core/=node_modules/@uniswap/v3-core/\",\":@uniswap/v3-periphery/=node_modules/@uniswap/v3-periphery/\",\":base64-sol/=node_modules/base64-sol/\",\":chainlink/=node_modules/chainlink/contracts/src/v0.8/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\",\":isolmate/=node_modules/@defi-wonderland/isolmate/src/\",\":keep3r-v2/=node_modules/keep3r-v2/\",\":keep3r/=node_modules/keep3r-v2/solidity/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":oz/=node_modules/openzeppelin-solidity/contracts/\",\":uni-v3-core/=node_modules/@uniswap/v3-core/contracts/\",\":uni-v3-periphery/=node_modules/@uniswap/v3-periphery/contracts/\",\":weird-erc20/=node_modules/weird-erc20/src/\"]},\"sources\":{\"solidity/interfaces/utils/IPriceGovernable.sol\":{\"keccak256\":\"0xd58d6f0d8634ccd0e4ebf04a73c48b6741e221c66c369f3d09ec7891e96a266f\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://8e838c65618d08f0300e555d520e8062eae0d09f387812437a9dad0fd782ae9b\",\"dweb:/ipfs/QmYarNLYUK192seJ4hgB4nHjzzb5sxS8Bsm1K4aA21fLuX\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.10+commit.fc410830" }, "language": "Solidity", "output": { "abi": [ { "inputs": [], "type": "error", "name": "PriceGovernable_NoGovernanceZeroAddress" }, { "inputs": [], "type": "error", "name": "PriceGovernable_OnlyGovernance" }, { "inputs": [], "type": "error", "name": "PriceGovernable_OnlyPendingGovernance" }, { "inputs": [ { "internalType": "address", "name": "_pendingGovernance", "type": "address", "indexed": false } ], "type": "event", "name": "GovernanceProposal", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "_governance", "type": "address", "indexed": false } ], "type": "event", "name": "GovernanceSet", "anonymous": false }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "acceptGovernance" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "governance", "outputs": [ { "internalType": "address", "name": "_governance", "type": "address" } ] }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "pendingGovernance", "outputs": [ { "internalType": "address", "name": "_pendingGovernance", "type": "address" } ] }, { "inputs": [ { "internalType": "address", "name": "_governance", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "setGovernance" } ], "devdoc": { "kind": "dev", "methods": { "governance()": { "returns": { "_governance": "The governance address" } }, "pendingGovernance()": { "returns": { "_pendingGovernance": "The pendingGovernance address" } }, "setGovernance(address)": { "params": { "_governance": "The address being proposed as the new governance" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "acceptGovernance()": { "notice": "Changes the governance from the current one to the previously proposed address" }, "governance()": { "notice": "Returns the governance address" }, "pendingGovernance()": { "notice": "Returns the pendingGovernance address" }, "setGovernance(address)": { "notice": "Proposes a new address to be governance" } }, "version": 1 } }, "settings": { "remappings": [ ":@contracts/=solidity/contracts/", ":@defi-wonderland/=node_modules/@defi-wonderland/", ":@interfaces/=solidity/interfaces/", ":@openzeppelin/=node_modules/@openzeppelin/", ":@test/=solidity/test/", ":@uniswap/=node_modules/@uniswap/", ":@uniswap/v3-core/=node_modules/@uniswap/v3-core/", ":@uniswap/v3-periphery/=node_modules/@uniswap/v3-periphery/", ":base64-sol/=node_modules/base64-sol/", ":chainlink/=node_modules/chainlink/contracts/src/v0.8/", ":ds-test/=node_modules/ds-test/src/", ":forge-std/=node_modules/forge-std/src/", ":isolmate/=node_modules/@defi-wonderland/isolmate/src/", ":keep3r-v2/=node_modules/keep3r-v2/", ":keep3r/=node_modules/keep3r-v2/solidity/", ":openzeppelin-solidity/=node_modules/openzeppelin-solidity/", ":oz/=node_modules/openzeppelin-solidity/contracts/", ":uni-v3-core/=node_modules/@uniswap/v3-core/contracts/", ":uni-v3-periphery/=node_modules/@uniswap/v3-periphery/contracts/", ":weird-erc20/=node_modules/weird-erc20/src/" ], "optimizer": { "enabled": true, "runs": 20000 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "solidity/interfaces/utils/IPriceGovernable.sol": "IPriceGovernable" }, "libraries": {} }, "sources": { "solidity/interfaces/utils/IPriceGovernable.sol": { "keccak256": "0xd58d6f0d8634ccd0e4ebf04a73c48b6741e221c66c369f3d09ec7891e96a266f", "urls": [ "bzz-raw://8e838c65618d08f0300e555d520e8062eae0d09f387812437a9dad0fd782ae9b", "dweb:/ipfs/QmYarNLYUK192seJ4hgB4nHjzzb5sxS8Bsm1K4aA21fLuX" ], "license": "AGPL-3.0-only" } }, "version": 1 }, "ast": { "absolutePath": "solidity/interfaces/utils/IPriceGovernable.sol", "id": 45140, "exportedSymbols": { "IPriceGovernable": [ 45139 ] }, "nodeType": "SourceUnit", "src": "42:2312:101", "nodes": [ { "id": 45096, "nodeType": "PragmaDirective", "src": "42:31:101", "nodes": [], "literals": [ "solidity", ">=", "0.8", ".4", "<", "0.9", ".0" ] }, { "id": 45139, "nodeType": "ContractDefinition", "src": "150:2203:101", "nodes": [ { "id": 45102, "nodeType": "EventDefinition", "src": "487:41:101", "nodes": [], "anonymous": false, "documentation": { "id": 45098, "nodeType": "StructuredDocumentation", "src": "354:130:101", "text": "@notice Emitted when pendingGovernance accepts to be governance\n@param _governance Address of the new governance" }, "name": "GovernanceSet", "nameLocation": "493:13:101", "parameters": { "id": 45101, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45100, "indexed": false, "mutability": "mutable", "name": "_governance", "nameLocation": "515:11:101", "nodeType": "VariableDeclaration", "scope": 45102, "src": "507:19:101", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45099, "name": "address", "nodeType": "ElementaryTypeName", "src": "507:7:101", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "506:21:101" } }, { "id": 45107, "nodeType": "EventDefinition", "src": "672:53:101", "nodes": [], "anonymous": false, "documentation": { "id": 45103, "nodeType": "StructuredDocumentation", "src": "532:137:101", "text": "@notice Emitted when new governance is proposed\n@param _pendingGovernance The address proposed to be the new governance" }, "name": "GovernanceProposal", "nameLocation": "678:18:101", "parameters": { "id": 45106, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45105, "indexed": false, "mutability": "mutable", "name": "_pendingGovernance", "nameLocation": "705:18:101", "nodeType": "VariableDeclaration", "scope": 45107, "src": "697:26:101", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45104, "name": "address", "nodeType": "ElementaryTypeName", "src": "697:7:101", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "696:28:101" } }, { "id": 45110, "nodeType": "ErrorDefinition", "src": "983:39:101", "nodes": [], "documentation": { "id": 45108, "nodeType": "StructuredDocumentation", "src": "902:78:101", "text": "@notice Thrown when the caller of the function is not governance" }, "name": "PriceGovernable_OnlyGovernance", "nameLocation": "989:30:101", "parameters": { "id": 45109, "nodeType": "ParameterList", "parameters": [], "src": "1019:2:101" } }, { "id": 45113, "nodeType": "ErrorDefinition", "src": "1114:46:101", "nodes": [], "documentation": { "id": 45111, "nodeType": "StructuredDocumentation", "src": "1026:85:101", "text": "@notice Thrown when the caller of the function is not pendingGovernance" }, "name": "PriceGovernable_OnlyPendingGovernance", "nameLocation": "1120:37:101", "parameters": { "id": 45112, "nodeType": "ParameterList", "parameters": [], "src": "1157:2:101" } }, { "id": 45116, "nodeType": "ErrorDefinition", "src": "1241:48:101", "nodes": [], "documentation": { "id": 45114, "nodeType": "StructuredDocumentation", "src": "1164:74:101", "text": "@notice Thrown when trying to set governance to zero address" }, "name": "PriceGovernable_NoGovernanceZeroAddress", "nameLocation": "1247:39:101", "parameters": { "id": 45115, "nodeType": "ParameterList", "parameters": [], "src": "1286:2:101" } }, { "id": 45122, "nodeType": "FunctionDefinition", "src": "1569:66:101", "nodes": [], "documentation": { "id": 45117, "nodeType": "StructuredDocumentation", "src": "1467:99:101", "text": "@notice Returns the governance address\n@return _governance The governance address" }, "functionSelector": "5aa6e675", "implemented": false, "kind": "function", "modifiers": [], "name": "governance", "nameLocation": "1578:10:101", "parameters": { "id": 45118, "nodeType": "ParameterList", "parameters": [], "src": "1588:2:101" }, "returnParameters": { "id": 45121, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45120, "mutability": "mutable", "name": "_governance", "nameLocation": "1622:11:101", "nodeType": "VariableDeclaration", "scope": 45122, "src": "1614:19:101", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45119, "name": "address", "nodeType": "ElementaryTypeName", "src": "1614:7:101", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1613:21:101" }, "scope": 45139, "stateMutability": "view", "virtual": false, "visibility": "external" }, { "id": 45128, "nodeType": "FunctionDefinition", "src": "1762:80:101", "nodes": [], "documentation": { "id": 45123, "nodeType": "StructuredDocumentation", "src": "1639:120:101", "text": "@notice Returns the pendingGovernance address\n@return _pendingGovernance The pendingGovernance address" }, "functionSelector": "f39c38a0", "implemented": false, "kind": "function", "modifiers": [], "name": "pendingGovernance", "nameLocation": "1771:17:101", "parameters": { "id": 45124, "nodeType": "ParameterList", "parameters": [], "src": "1788:2:101" }, "returnParameters": { "id": 45127, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45126, "mutability": "mutable", "name": "_pendingGovernance", "nameLocation": "1822:18:101", "nodeType": "VariableDeclaration", "scope": 45128, "src": "1814:26:101", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45125, "name": "address", "nodeType": "ElementaryTypeName", "src": "1814:7:101", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1813:28:101" }, "scope": 45139, "stateMutability": "view", "virtual": false, "visibility": "external" }, { "id": 45134, "nodeType": "FunctionDefinition", "src": "2154:53:101", "nodes": [], "documentation": { "id": 45129, "nodeType": "StructuredDocumentation", "src": "2018:133:101", "text": "@notice Proposes a new address to be governance\n@param _governance The address being proposed as the new governance" }, "functionSelector": "ab033ea9", "implemented": false, "kind": "function", "modifiers": [], "name": "setGovernance", "nameLocation": "2163:13:101", "parameters": { "id": 45132, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45131, "mutability": "mutable", "name": "_governance", "nameLocation": "2185:11:101", "nodeType": "VariableDeclaration", "scope": 45134, "src": "2177:19:101", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45130, "name": "address", "nodeType": "ElementaryTypeName", "src": "2177:7:101", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2176:21:101" }, "returnParameters": { "id": 45133, "nodeType": "ParameterList", "parameters": [], "src": "2206:0:101" }, "scope": 45139, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "id": 45138, "nodeType": "FunctionDefinition", "src": "2314:37:101", "nodes": [], "documentation": { "id": 45135, "nodeType": "StructuredDocumentation", "src": "2211:100:101", "text": "@notice Changes the governance from the current one to the previously proposed address" }, "functionSelector": "238efcbc", "implemented": false, "kind": "function", "modifiers": [], "name": "acceptGovernance", "nameLocation": "2323:16:101", "parameters": { "id": 45136, "nodeType": "ParameterList", "parameters": [], "src": "2339:2:101" }, "returnParameters": { "id": 45137, "nodeType": "ParameterList", "parameters": [], "src": "2350:0:101" }, "scope": 45139, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "abstract": false, "baseContracts": [], "canonicalName": "IPriceGovernable", "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 45097, "nodeType": "StructuredDocumentation", "src": "75:74:101", "text": "@title Governable contract\n@notice Manages the governance role" }, "fullyImplemented": false, "linearizedBaseContracts": [ 45139 ], "name": "IPriceGovernable", "nameLocation": "160:16:101", "scope": 45140, "usedErrors": [ 45110, 45113, 45116 ] } ], "license": "AGPL-3.0-only" }, "id": 101 }