{ "contractName": "MinimumOracle", "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransfer", "type": "event" }, { "inputs": [], "name": "_OWNER_", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "tokenPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "newPrice", "type": "uint256" } ], "name": "setPrice", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_OWNER_\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"setPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/MinimumOracle.sol\":\"MinimumOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/MinimumOracle.sol\":{\"keccak256\":\"0x66ac490e135af4b70e2d0df8b0872480c964221e225ece8301e06f334d040a9c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://adc9b73a0b2586f440355ed94761cdd0c891a1fa0effcd267dd1f4fbedb6bb75\",\"dweb:/ipfs/QmSaYizENPPjsWDGeDLj1ntRW9zomfVwbfJUgRBCY9yQky\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f22500af037c600dd7b720644ab6e358635085601d9ac508ad83eb2d6b2d729ca908290a36102a0806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806316048bc41461005c5780637ff9b5961461007a57806391b7f5ed1461008f57806398d5fdca146100a4578063f2fde38b146100ac575b600080fd5b6100646100bf565b6040516100719190610203565b60405180910390f35b6100826100ce565b6040516100719190610261565b6100a261009d3660046101eb565b6100d4565b005b61008261010c565b6100a26100ba3660046101bd565b610112565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633146101075760405162461bcd60e51b81526004016100fe9061023e565b60405180910390fd5b600155565b60015490565b6000546001600160a01b0316331461013c5760405162461bcd60e51b81526004016100fe9061023e565b6001600160a01b0381166101625760405162461bcd60e51b81526004016100fe90610217565b600080546040516001600160a01b03808516939216917f22500af037c600dd7b720644ab6e358635085601d9ac508ad83eb2d6b2d729ca91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000602082840312156101ce578081fd5b81356001600160a01b03811681146101e4578182fd5b9392505050565b6000602082840312156101fc578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b9081526020019056fea2646970667358221220c3a5edff3cea46018780be4a5f46fbf1a2761357373d836472ac7100d1d9c6c764736f6c63430006090033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806316048bc41461005c5780637ff9b5961461007a57806391b7f5ed1461008f57806398d5fdca146100a4578063f2fde38b146100ac575b600080fd5b6100646100bf565b6040516100719190610203565b60405180910390f35b6100826100ce565b6040516100719190610261565b6100a261009d3660046101eb565b6100d4565b005b61008261010c565b6100a26100ba3660046101bd565b610112565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633146101075760405162461bcd60e51b81526004016100fe9061023e565b60405180910390fd5b600155565b60015490565b6000546001600160a01b0316331461013c5760405162461bcd60e51b81526004016100fe9061023e565b6001600160a01b0381166101625760405162461bcd60e51b81526004016100fe90610217565b600080546040516001600160a01b03808516939216917f22500af037c600dd7b720644ab6e358635085601d9ac508ad83eb2d6b2d729ca91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000602082840312156101ce578081fd5b81356001600160a01b03811681146101e4578182fd5b9392505050565b6000602082840312156101fc578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b9081526020019056fea2646970667358221220c3a5edff3cea46018780be4a5f46fbf1a2761357373d836472ac7100d1d9c6c764736f6c63430006090033", "immutableReferences": {}, "sourceMap": "336:921:15:-:0;;;739:111;;;;;;;;;-1:-1:-1;770:7:15;:20;;-1:-1:-1;;;;;;770:20:15;780:10;770:20;;;;805:38;;-1:-1:-1;;;;;835:7:15;;;;;770;805:38;;770:7;;805:38;336:921;;;;;;", "deployedSourceMap": "336:921:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;365:22;;;:::i;:::-;;;;;;;;;;;;;;;;393:25;;;:::i;:::-;;;;;;;;1070:93;;;;;;;;;:::i;:::-;;1169:86;;;:::i;856:208::-;;;;;;;;;:::i;365:22::-;;;-1:-1:-1;;;;;365:22:15;;:::o;393:25::-;;;;:::o;1070:93::-;650:7;;-1:-1:-1;;;;;650:7:15;636:10;:21;628:43;;;;-1:-1:-1;;;628:43:15;;;;;;;;;;;;;;;;;1135:10:::1;:21:::0;1070:93::o;1169:86::-;1238:10;;1169:86;:::o;856:208::-;650:7;;-1:-1:-1;;;;;650:7:15;636:10;:21;628:43;;;;-1:-1:-1;;;628:43:15;;;;;;;;;-1:-1:-1;;;;;938:22:15;::::1;930:48;;;;-1:-1:-1::0;;;930:48:15::1;;;;;;;;;1011:7;::::0;;993:36:::1;::::0;-1:-1:-1;;;;;993:36:15;;::::1;::::0;1011:7;::::1;::::0;993:36:::1;::::0;::::1;1039:7;:18:::0;;-1:-1:-1;;;;;;1039:18:15::1;-1:-1:-1::0;;;;;1039:18:15;;;::::1;::::0;;;::::1;::::0;;856:208::o;279:241:-1:-;;383:2;371:9;362:7;358:23;354:32;351:2;;;-1:-1;;389:12;351:2;72:20;;-1:-1;;;;;3290:54;;3494:35;;3484:2;;-1:-1;;3533:12;3484:2;441:63;345:175;-1:-1;;;345:175;527:241;;631:2;619:9;610:7;606:23;602:32;599:2;;;-1:-1;;637:12;599:2;-1:-1;209:20;;593:175;-1:-1;593:175;1654:222;-1:-1;;;;;3290:54;;;;846:37;;1781:2;1766:18;;1752:124;1883:416;2083:2;2097:47;;;1120:2;2068:18;;;3062:19;-1:-1;;;3102:14;;;1136:36;1191:12;;;2054:245;2306:416;2506:2;2520:47;;;1442:1;2491:18;;;3062:19;-1:-1;;;3102:14;;;1457:32;1508:12;;;2477:245;2729:222;1605:37;;;2856:2;2841:18;;2827:124", "source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\n\ninterface IMinimumOracle {\n function getPrice() external view returns (uint256);\n\n function setPrice(uint256 newPrice) external;\n\n function transferOwnership(address newOwner) external;\n}\n\n\ncontract MinimumOracle {\n address public _OWNER_;\n uint256 public tokenPrice;\n\n // ============ Events ============\n\n event OwnershipTransfer(address indexed previousOwner, address indexed newOwner);\n\n // ============ Modifiers ============\n\n modifier onlyOwner() {\n require(msg.sender == _OWNER_, \"NOT_OWNER\");\n _;\n }\n\n // ============ Functions ============\n\n constructor() public {\n _OWNER_ = msg.sender;\n emit OwnershipTransfer(address(0), _OWNER_);\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n require(newOwner != address(0), \"INVALID_OWNER\");\n emit OwnershipTransfer(_OWNER_, newOwner);\n _OWNER_ = newOwner;\n }\n\n function setPrice(uint256 newPrice) external onlyOwner {\n tokenPrice = newPrice;\n }\n\n function getPrice() external view returns (uint256) {\n return tokenPrice;\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/MinimumOracle.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/MinimumOracle.sol", "exportedSymbols": { "IMinimumOracle": [ 2110 ], "MinimumOracle": [ 2197 ] }, "id": 2198, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2093, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:15" }, { "id": 2094, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:15" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 2110, "linearizedBaseContracts": [ 2110 ], "name": "IMinimumOracle", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "98d5fdca", "id": 2099, "implemented": false, "kind": "function", "modifiers": [], "name": "getPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2095, "nodeType": "ParameterList", "parameters": [], "src": "185:2:15" }, "returnParameters": { "id": 2098, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2097, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2099, "src": "211:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2096, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "211:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "210:9:15" }, "scope": 2110, "src": "168:52:15", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "91b7f5ed", "id": 2104, "implemented": false, "kind": "function", "modifiers": [], "name": "setPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2102, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2101, "mutability": "mutable", "name": "newPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2104, "src": "244:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2100, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "243:18:15" }, "returnParameters": { "id": 2103, "nodeType": "ParameterList", "parameters": [], "src": "270:0:15" }, "scope": 2110, "src": "226:45:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "f2fde38b", "id": 2109, "implemented": false, "kind": "function", "modifiers": [], "name": "transferOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2107, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2106, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2109, "src": "304:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2105, "name": "address", "nodeType": "ElementaryTypeName", "src": "304:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "303:18:15" }, "returnParameters": { "id": 2108, "nodeType": "ParameterList", "parameters": [], "src": "330:0:15" }, "scope": 2110, "src": "277:54:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 2198, "src": "137:196:15" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2197, "linearizedBaseContracts": [ 2197 ], "name": "MinimumOracle", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "16048bc4", "id": 2112, "mutability": "mutable", "name": "_OWNER_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2197, "src": "365:22:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2111, "name": "address", "nodeType": "ElementaryTypeName", "src": "365:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "7ff9b596", "id": 2114, "mutability": "mutable", "name": "tokenPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2197, "src": "393:25:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "393:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 2120, "name": "OwnershipTransfer", "nodeType": "EventDefinition", "parameters": { "id": 2119, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2116, "indexed": true, "mutability": "mutable", "name": "previousOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2120, "src": "490:29:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2115, "name": "address", "nodeType": "ElementaryTypeName", "src": "490:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2118, "indexed": true, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2120, "src": "521:24:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2117, "name": "address", "nodeType": "ElementaryTypeName", "src": "521:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "489:57:15" }, "src": "466:81:15" }, { "body": { "id": 2131, "nodeType": "Block", "src": "618:71:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2123, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "636:3:15", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2124, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "636:10:15", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2125, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "650:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "636:21:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f4f574e4552", "id": 2127, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "659:11:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d4d6719c9f6bf1f398a61e7ceb8dff26d48346602421236409d0fb0b222f65b2", "typeString": "literal_string \"NOT_OWNER\"" }, "value": "NOT_OWNER" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d4d6719c9f6bf1f398a61e7ceb8dff26d48346602421236409d0fb0b222f65b2", "typeString": "literal_string \"NOT_OWNER\"" } ], "id": 2122, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "628:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2128, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "628:43:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2129, "nodeType": "ExpressionStatement", "src": "628:43:15" }, { "id": 2130, "nodeType": "PlaceholderStatement", "src": "681:1:15" } ] }, "documentation": null, "id": 2132, "name": "onlyOwner", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 2121, "nodeType": "ParameterList", "parameters": [], "src": "615:2:15" }, "src": "597:92:15", "virtual": false, "visibility": "internal" }, { "body": { "id": 2148, "nodeType": "Block", "src": "760:90:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2138, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2135, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "770:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2136, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "780:3:15", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2137, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "780:10:15", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "770:20:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2139, "nodeType": "ExpressionStatement", "src": "770:20:15" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2143, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "831:1:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2142, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "823:7:15", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 2141, "name": "address", "nodeType": "ElementaryTypeName", "src": "823:7:15", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 2144, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "823:10:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 2145, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "835:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2140, "name": "OwnershipTransfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2120, "src": "805:17:15", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 2146, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "805:38:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2147, "nodeType": "EmitStatement", "src": "800:43:15" } ] }, "documentation": null, "id": 2149, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2133, "nodeType": "ParameterList", "parameters": [], "src": "750:2:15" }, "returnParameters": { "id": 2134, "nodeType": "ParameterList", "parameters": [], "src": "760:0:15" }, "scope": 2197, "src": "739:111:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2175, "nodeType": "Block", "src": "920:144:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2157, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "938:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "958:1:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2159, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "950:7:15", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 2158, "name": "address", "nodeType": "ElementaryTypeName", "src": "950:7:15", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 2161, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "950:10:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "938:22:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "494e56414c49445f4f574e4552", "id": 2163, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "962:15:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a30e2b4f22d955e30086ae3aef0adfd87eec9d0d3f055d6aa9af61f522dda886", "typeString": "literal_string \"INVALID_OWNER\"" }, "value": "INVALID_OWNER" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_a30e2b4f22d955e30086ae3aef0adfd87eec9d0d3f055d6aa9af61f522dda886", "typeString": "literal_string \"INVALID_OWNER\"" } ], "id": 2156, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "930:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2164, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "930:48:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2165, "nodeType": "ExpressionStatement", "src": "930:48:15" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2167, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "1011:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2168, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "1020:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2166, "name": "OwnershipTransfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2120, "src": "993:17:15", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 2169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "993:36:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2170, "nodeType": "EmitStatement", "src": "988:41:15" }, { "expression": { "argumentTypes": null, "id": 2173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2171, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "1039:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2172, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "1049:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1039:18:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2174, "nodeType": "ExpressionStatement", "src": "1039:18:15" } ] }, "documentation": null, "functionSelector": "f2fde38b", "id": 2176, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2154, "modifierName": { "argumentTypes": null, "id": 2153, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2132, "src": "910:9:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "910:9:15" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2152, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2151, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2176, "src": "883:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2150, "name": "address", "nodeType": "ElementaryTypeName", "src": "883:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "882:18:15" }, "returnParameters": { "id": 2155, "nodeType": "ParameterList", "parameters": [], "src": "920:0:15" }, "scope": 2197, "src": "856:208:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 2187, "nodeType": "Block", "src": "1125:38:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2183, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2114, "src": "1135:10:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2184, "name": "newPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2178, "src": "1148:8:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1135:21:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2186, "nodeType": "ExpressionStatement", "src": "1135:21:15" } ] }, "documentation": null, "functionSelector": "91b7f5ed", "id": 2188, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2181, "modifierName": { "argumentTypes": null, "id": 2180, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2132, "src": "1115:9:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1115:9:15" } ], "name": "setPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2179, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2178, "mutability": "mutable", "name": "newPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2188, "src": "1088:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2177, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1088:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:18:15" }, "returnParameters": { "id": 2182, "nodeType": "ParameterList", "parameters": [], "src": "1125:0:15" }, "scope": 2197, "src": "1070:93:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 2195, "nodeType": "Block", "src": "1221:34:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2193, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2114, "src": "1238:10:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 2192, "id": 2194, "nodeType": "Return", "src": "1231:17:15" } ] }, "documentation": null, "functionSelector": "98d5fdca", "id": 2196, "implemented": true, "kind": "function", "modifiers": [], "name": "getPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2189, "nodeType": "ParameterList", "parameters": [], "src": "1186:2:15" }, "returnParameters": { "id": 2192, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2191, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2196, "src": "1212:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2190, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1212:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1211:9:15" }, "scope": 2197, "src": "1169:86:15", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 2198, "src": "336:921:15" } ], "src": "78:1180:15" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/MinimumOracle.sol", "exportedSymbols": { "IMinimumOracle": [ 2110 ], "MinimumOracle": [ 2197 ] }, "id": 2198, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2093, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:15" }, { "id": 2094, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:15" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 2110, "linearizedBaseContracts": [ 2110 ], "name": "IMinimumOracle", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "98d5fdca", "id": 2099, "implemented": false, "kind": "function", "modifiers": [], "name": "getPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2095, "nodeType": "ParameterList", "parameters": [], "src": "185:2:15" }, "returnParameters": { "id": 2098, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2097, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2099, "src": "211:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2096, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "211:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "210:9:15" }, "scope": 2110, "src": "168:52:15", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "91b7f5ed", "id": 2104, "implemented": false, "kind": "function", "modifiers": [], "name": "setPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2102, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2101, "mutability": "mutable", "name": "newPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2104, "src": "244:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2100, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "243:18:15" }, "returnParameters": { "id": 2103, "nodeType": "ParameterList", "parameters": [], "src": "270:0:15" }, "scope": 2110, "src": "226:45:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "f2fde38b", "id": 2109, "implemented": false, "kind": "function", "modifiers": [], "name": "transferOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2107, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2106, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2109, "src": "304:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2105, "name": "address", "nodeType": "ElementaryTypeName", "src": "304:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "303:18:15" }, "returnParameters": { "id": 2108, "nodeType": "ParameterList", "parameters": [], "src": "330:0:15" }, "scope": 2110, "src": "277:54:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 2198, "src": "137:196:15" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2197, "linearizedBaseContracts": [ 2197 ], "name": "MinimumOracle", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "16048bc4", "id": 2112, "mutability": "mutable", "name": "_OWNER_", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2197, "src": "365:22:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2111, "name": "address", "nodeType": "ElementaryTypeName", "src": "365:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "7ff9b596", "id": 2114, "mutability": "mutable", "name": "tokenPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2197, "src": "393:25:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "393:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 2120, "name": "OwnershipTransfer", "nodeType": "EventDefinition", "parameters": { "id": 2119, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2116, "indexed": true, "mutability": "mutable", "name": "previousOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2120, "src": "490:29:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2115, "name": "address", "nodeType": "ElementaryTypeName", "src": "490:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2118, "indexed": true, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2120, "src": "521:24:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2117, "name": "address", "nodeType": "ElementaryTypeName", "src": "521:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "489:57:15" }, "src": "466:81:15" }, { "body": { "id": 2131, "nodeType": "Block", "src": "618:71:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2123, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "636:3:15", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2124, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "636:10:15", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2125, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "650:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "636:21:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4e4f545f4f574e4552", "id": 2127, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "659:11:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d4d6719c9f6bf1f398a61e7ceb8dff26d48346602421236409d0fb0b222f65b2", "typeString": "literal_string \"NOT_OWNER\"" }, "value": "NOT_OWNER" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d4d6719c9f6bf1f398a61e7ceb8dff26d48346602421236409d0fb0b222f65b2", "typeString": "literal_string \"NOT_OWNER\"" } ], "id": 2122, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "628:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2128, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "628:43:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2129, "nodeType": "ExpressionStatement", "src": "628:43:15" }, { "id": 2130, "nodeType": "PlaceholderStatement", "src": "681:1:15" } ] }, "documentation": null, "id": 2132, "name": "onlyOwner", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 2121, "nodeType": "ParameterList", "parameters": [], "src": "615:2:15" }, "src": "597:92:15", "virtual": false, "visibility": "internal" }, { "body": { "id": 2148, "nodeType": "Block", "src": "760:90:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2138, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2135, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "770:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2136, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "780:3:15", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2137, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "780:10:15", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "770:20:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2139, "nodeType": "ExpressionStatement", "src": "770:20:15" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2143, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "831:1:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2142, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "823:7:15", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 2141, "name": "address", "nodeType": "ElementaryTypeName", "src": "823:7:15", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 2144, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "823:10:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 2145, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "835:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2140, "name": "OwnershipTransfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2120, "src": "805:17:15", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 2146, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "805:38:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2147, "nodeType": "EmitStatement", "src": "800:43:15" } ] }, "documentation": null, "id": 2149, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2133, "nodeType": "ParameterList", "parameters": [], "src": "750:2:15" }, "returnParameters": { "id": 2134, "nodeType": "ParameterList", "parameters": [], "src": "760:0:15" }, "scope": 2197, "src": "739:111:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2175, "nodeType": "Block", "src": "920:144:15", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2157, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "938:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "958:1:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2159, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "950:7:15", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 2158, "name": "address", "nodeType": "ElementaryTypeName", "src": "950:7:15", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 2161, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "950:10:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "938:22:15", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "494e56414c49445f4f574e4552", "id": 2163, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "962:15:15", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a30e2b4f22d955e30086ae3aef0adfd87eec9d0d3f055d6aa9af61f522dda886", "typeString": "literal_string \"INVALID_OWNER\"" }, "value": "INVALID_OWNER" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_a30e2b4f22d955e30086ae3aef0adfd87eec9d0d3f055d6aa9af61f522dda886", "typeString": "literal_string \"INVALID_OWNER\"" } ], "id": 2156, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "930:7:15", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2164, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "930:48:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2165, "nodeType": "ExpressionStatement", "src": "930:48:15" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2167, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "1011:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2168, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "1020:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2166, "name": "OwnershipTransfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2120, "src": "993:17:15", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 2169, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "993:36:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2170, "nodeType": "EmitStatement", "src": "988:41:15" }, { "expression": { "argumentTypes": null, "id": 2173, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2171, "name": "_OWNER_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2112, "src": "1039:7:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2172, "name": "newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2151, "src": "1049:8:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1039:18:15", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2174, "nodeType": "ExpressionStatement", "src": "1039:18:15" } ] }, "documentation": null, "functionSelector": "f2fde38b", "id": 2176, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2154, "modifierName": { "argumentTypes": null, "id": 2153, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2132, "src": "910:9:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "910:9:15" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2152, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2151, "mutability": "mutable", "name": "newOwner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2176, "src": "883:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2150, "name": "address", "nodeType": "ElementaryTypeName", "src": "883:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "882:18:15" }, "returnParameters": { "id": 2155, "nodeType": "ParameterList", "parameters": [], "src": "920:0:15" }, "scope": 2197, "src": "856:208:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 2187, "nodeType": "Block", "src": "1125:38:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2183, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2114, "src": "1135:10:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2184, "name": "newPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2178, "src": "1148:8:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1135:21:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2186, "nodeType": "ExpressionStatement", "src": "1135:21:15" } ] }, "documentation": null, "functionSelector": "91b7f5ed", "id": 2188, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2181, "modifierName": { "argumentTypes": null, "id": 2180, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2132, "src": "1115:9:15", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1115:9:15" } ], "name": "setPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2179, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2178, "mutability": "mutable", "name": "newPrice", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2188, "src": "1088:16:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2177, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1088:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:18:15" }, "returnParameters": { "id": 2182, "nodeType": "ParameterList", "parameters": [], "src": "1125:0:15" }, "scope": 2197, "src": "1070:93:15", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 2195, "nodeType": "Block", "src": "1221:34:15", "statements": [ { "expression": { "argumentTypes": null, "id": 2193, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2114, "src": "1238:10:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 2192, "id": 2194, "nodeType": "Return", "src": "1231:17:15" } ] }, "documentation": null, "functionSelector": "98d5fdca", "id": 2196, "implemented": true, "kind": "function", "modifiers": [], "name": "getPrice", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2189, "nodeType": "ParameterList", "parameters": [], "src": "1186:2:15" }, "returnParameters": { "id": 2192, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2191, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2196, "src": "1212:7:15", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2190, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1212:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1211:9:15" }, "scope": 2197, "src": "1169:86:15", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 2198, "src": "336:921:15" } ], "src": "78:1180:15" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.511Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }