896 lines
35 KiB
JSON
896 lines
35 KiB
JSON
{
|
|
"contractName": "ChainlinkWBTCUSDCPriceOracleProxy",
|
|
"abi": [
|
|
{
|
|
"inputs": [],
|
|
"name": "chainlink",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"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\":[],\"name\":\"chainlink\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkWBTCUSDCPriceOracleProxy.sol\":\"ChainlinkWBTCUSDCPriceOracleProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkWBTCUSDCPriceOracleProxy.sol\":{\"keccak256\":\"0x4cf5f2c16709da7d57fd12d78905b2d05fb5214435f457775f7995dfad5b4b4b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://94e2acb2295b9c87c61334eb2ea3047661deca6832a3607478222a5dcac23f02\",\"dweb:/ipfs/QmQcFeei8XdiVPHCHRhQLRpBr5zVYRT8ZyhMJtgVKUHitw\"]}},\"version\":1}",
|
|
"bytecode": "0x6080604052600080546001600160a01b03191673f4030086522a5beea4988f8ca5b36dbc97bee88c17905534801561003657600080fd5b5061017a806100466000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806398d5fdca1461003b5780639c3feeb714610059575b600080fd5b61004361006e565b604051610050919061013b565b60405180910390f35b610061610100565b6040516100509190610127565b60008060009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100bd57600080fd5b505afa1580156100d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f5919061010f565b6305f5e10002905090565b6000546001600160a01b031681565b600060208284031215610120578081fd5b5051919050565b6001600160a01b0391909116815260200190565b9081526020019056fea2646970667358221220d469809a49a9725cd835c28c7285647482061285333dd44129abfdfd87f51d7b64736f6c63430006090033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806398d5fdca1461003b5780639c3feeb714610059575b600080fd5b61004361006e565b604051610050919061013b565b60405180910390f35b610061610100565b6040516100509190610127565b60008060009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100bd57600080fd5b505afa1580156100d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f5919061010f565b6305f5e10002905090565b6000546001600160a01b031681565b600060208284031215610120578081fd5b5051919050565b6001600160a01b0391909116815260200190565b9081526020019056fea2646970667358221220d469809a49a9725cd835c28c7285647482061285333dd44129abfdfd87f51d7b64736f6c63430006090033",
|
|
"immutableReferences": {},
|
|
"sourceMap": "281:249:10:-:0;;;330:69;;;-1:-1:-1;;;;;;330:69:10;357:42;330:69;;;281:249;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "281:249:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;406:122;;;:::i;:::-;;;;;;;;;;;;;;;;330:69;;;:::i;:::-;;;;;;;;406:122;449:7;486:9;;;;;;;;;-1:-1:-1;;;;;486:9:10;-1:-1:-1;;;;;475:34:10;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;515:5;475:46;468:53;;406:122;:::o;330:69::-;;;-1:-1:-1;;;;;330:69:10;;:::o;146:263:-1:-;;261:2;249:9;240:7;236:23;232:32;229:2;;;-1:-1;;267:12;229:2;-1:-1;83:13;;223:186;-1:-1;223:186;656:222;-1:-1;;;;;1274:54;;;;487:37;;783:2;768:18;;754:124;885:222;607:37;;;1012:2;997:18;;983: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 IChainlink {\n function latestAnswer() external view returns (uint256);\n}\n\n\n// for WBTC(decimals=8)-USDC(decimals=6) price convert\n\ncontract ChainlinkWBTCUSDCPriceOracleProxy {\n address public chainlink = 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c;\n\n function getPrice() external view returns (uint256) {\n return IChainlink(chainlink).latestAnswer() * (10**8);\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkWBTCUSDCPriceOracleProxy.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkWBTCUSDCPriceOracleProxy.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkWBTCUSDCPriceOracleProxy": [
|
|
1922
|
|
],
|
|
"IChainlink": [
|
|
1901
|
|
]
|
|
},
|
|
"id": 1923,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1894,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:10"
|
|
},
|
|
{
|
|
"id": 1895,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:10"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1901,
|
|
"linearizedBaseContracts": [
|
|
1901
|
|
],
|
|
"name": "IChainlink",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "50d25bcd",
|
|
"id": 1900,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestAnswer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1896,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "185:2:10"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1899,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1898,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1900,
|
|
"src": "211:7:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1897,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "211:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "210:9:10"
|
|
},
|
|
"scope": 1901,
|
|
"src": "164:56:10",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1923,
|
|
"src": "137:85:10"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1922,
|
|
"linearizedBaseContracts": [
|
|
1922
|
|
],
|
|
"name": "ChainlinkWBTCUSDCPriceOracleProxy",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "9c3feeb7",
|
|
"id": 1904,
|
|
"mutability": "mutable",
|
|
"name": "chainlink",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1922,
|
|
"src": "330:69:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1902,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:7:10",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307846343033303038363532326135624545613439383846386341354233366462433937426545383863",
|
|
"id": 1903,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "357:42:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1920,
|
|
"nodeType": "Block",
|
|
"src": "458:70:10",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1918,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1910,
|
|
"name": "chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1904,
|
|
"src": "486:9:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1909,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1901,
|
|
"src": "475:10:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1901_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1911,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "475:21:10",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1901",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1912,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1900,
|
|
"src": "475:34:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1913,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "475:36:10",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
},
|
|
"id": 1916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 1914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "515:2:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "38",
|
|
"id": 1915,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "519:1:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "515:5:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
}
|
|
],
|
|
"id": 1917,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "514:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
},
|
|
"src": "475:46:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1908,
|
|
"id": 1919,
|
|
"nodeType": "Return",
|
|
"src": "468:53:10"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "98d5fdca",
|
|
"id": 1921,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getPrice",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1905,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "423:2:10"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1907,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1921,
|
|
"src": "449:7:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1906,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "449:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "448:9:10"
|
|
},
|
|
"scope": 1922,
|
|
"src": "406:122:10",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1923,
|
|
"src": "281:249:10"
|
|
}
|
|
],
|
|
"src": "78:453:10"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkWBTCUSDCPriceOracleProxy.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkWBTCUSDCPriceOracleProxy": [
|
|
1922
|
|
],
|
|
"IChainlink": [
|
|
1901
|
|
]
|
|
},
|
|
"id": 1923,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1894,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:10"
|
|
},
|
|
{
|
|
"id": 1895,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:10"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1901,
|
|
"linearizedBaseContracts": [
|
|
1901
|
|
],
|
|
"name": "IChainlink",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "50d25bcd",
|
|
"id": 1900,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestAnswer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1896,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "185:2:10"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1899,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1898,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1900,
|
|
"src": "211:7:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1897,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "211:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "210:9:10"
|
|
},
|
|
"scope": 1901,
|
|
"src": "164:56:10",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1923,
|
|
"src": "137:85:10"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1922,
|
|
"linearizedBaseContracts": [
|
|
1922
|
|
],
|
|
"name": "ChainlinkWBTCUSDCPriceOracleProxy",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "9c3feeb7",
|
|
"id": 1904,
|
|
"mutability": "mutable",
|
|
"name": "chainlink",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1922,
|
|
"src": "330:69:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1902,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:7:10",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307846343033303038363532326135624545613439383846386341354233366462433937426545383863",
|
|
"id": 1903,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "357:42:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1920,
|
|
"nodeType": "Block",
|
|
"src": "458:70:10",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1918,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1910,
|
|
"name": "chainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1904,
|
|
"src": "486:9:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1909,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1901,
|
|
"src": "475:10:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1901_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1911,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "475:21:10",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1901",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1912,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1900,
|
|
"src": "475:34:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1913,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "475:36:10",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
},
|
|
"id": 1916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 1914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "515:2:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "38",
|
|
"id": 1915,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "519:1:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_8_by_1",
|
|
"typeString": "int_const 8"
|
|
},
|
|
"value": "8"
|
|
},
|
|
"src": "515:5:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
}
|
|
],
|
|
"id": 1917,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "514:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000_by_1",
|
|
"typeString": "int_const 100000000"
|
|
}
|
|
},
|
|
"src": "475:46:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1908,
|
|
"id": 1919,
|
|
"nodeType": "Return",
|
|
"src": "468:53:10"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "98d5fdca",
|
|
"id": 1921,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getPrice",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1905,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "423:2:10"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1907,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1921,
|
|
"src": "449:7:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1906,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "449:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "448:9:10"
|
|
},
|
|
"scope": 1922,
|
|
"src": "406:122:10",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1923,
|
|
"src": "281:249:10"
|
|
}
|
|
],
|
|
"src": "78:453:10"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.506Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |