1547 lines
59 KiB
JSON
1547 lines
59 KiB
JSON
{
|
|
"contractName": "IChainlink",
|
|
"abi": [
|
|
{
|
|
"inputs": [],
|
|
"name": "latestAnswer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"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/ChainlinkYFIUSDCPriceOracleProxy.sol\":\"IChainlink\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkYFIUSDCPriceOracleProxy.sol\":{\"keccak256\":\"0x968af1e723a96686c3835fe68dbdbe21684935743b1639a9342aa5021c2e0c88\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e358426ab8ef57cc2647d8a7d40a876e9e8f81fc69b16b5a298659024894a808\",\"dweb:/ipfs/QmQQkhg9rajRi9Xg6rwbMV8swyC8kjT2ukb34EL2tMr3EG\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"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\nimport {SafeMath} from \"../lib/SafeMath.sol\";\n\n\ninterface IChainlink {\n function latestAnswer() external view returns (uint256);\n}\n\n\n// for YFI-USDC(decimals=6) price convert\n\ncontract ChainlinkYFIUSDCPriceOracleProxy {\n using SafeMath for uint256;\n\n address public yfiEth = 0x7c5d4F8345e66f68099581Db340cd65B078C41f4;\n address public EthUsd = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419;\n\n function getPrice() external view returns (uint256) {\n uint256 yfiEthPrice = IChainlink(yfiEth).latestAnswer();\n uint256 EthUsdPrice = IChainlink(EthUsd).latestAnswer();\n return yfiEthPrice.mul(EthUsdPrice).div(10**20);\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkYFIUSDCPriceOracleProxy.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkYFIUSDCPriceOracleProxy.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkYFIUSDCPriceOracleProxy": [
|
|
1975
|
|
],
|
|
"IChainlink": [
|
|
1933
|
|
]
|
|
},
|
|
"id": 1976,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1924,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:11"
|
|
},
|
|
{
|
|
"id": 1925,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:11"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 1927,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1976,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:11",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 1926,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1933,
|
|
"linearizedBaseContracts": [
|
|
1933
|
|
],
|
|
"name": "IChainlink",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "50d25bcd",
|
|
"id": 1932,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestAnswer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1928,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "232:2:11"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1931,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1930,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1932,
|
|
"src": "258:7:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1929,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "258:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "257:9:11"
|
|
},
|
|
"scope": 1933,
|
|
"src": "211:56:11",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1976,
|
|
"src": "184:85:11"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1975,
|
|
"linearizedBaseContracts": [
|
|
1975
|
|
],
|
|
"name": "ChainlinkYFIUSDCPriceOracleProxy",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 1936,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 1934,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "369:8:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "363:27:11",
|
|
"typeName": {
|
|
"id": 1935,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "382:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "28737ae5",
|
|
"id": 1939,
|
|
"mutability": "mutable",
|
|
"name": "yfiEth",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1975,
|
|
"src": "396:66:11",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1937,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "396:7:11",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307837633564344638333435653636663638303939353831446233343063643635423037384334316634",
|
|
"id": 1938,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "420:42:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0x7c5d4F8345e66f68099581Db340cd65B078C41f4"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "f57689d5",
|
|
"id": 1942,
|
|
"mutability": "mutable",
|
|
"name": "EthUsd",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1975,
|
|
"src": "468:66:11",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1940,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "468:7:11",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307835663465433344663963626434333731344645323734306635453336313631353563356238343139",
|
|
"id": 1941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "492:42:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1973,
|
|
"nodeType": "Block",
|
|
"src": "593:194:11",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1948
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1948,
|
|
"mutability": "mutable",
|
|
"name": "yfiEthPrice",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1973,
|
|
"src": "603:19:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1947,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "603:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1954,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1950,
|
|
"name": "yfiEth",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1939,
|
|
"src": "636:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1949,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1933,
|
|
"src": "625:10:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1933_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "625:18:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1933",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1932,
|
|
"src": "625:31:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1953,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "625:33:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "603:55:11"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1956
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1956,
|
|
"mutability": "mutable",
|
|
"name": "EthUsdPrice",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1973,
|
|
"src": "668:19:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1955,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "668:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1962,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1958,
|
|
"name": "EthUsd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1942,
|
|
"src": "701:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1957,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1933,
|
|
"src": "690:10:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1933_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1959,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "690:18:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1933",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1960,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1932,
|
|
"src": "690:31:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1961,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "690:33:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "668:55:11"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
},
|
|
"id": 1970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 1968,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "773:2:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3230",
|
|
"id": 1969,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "777:2:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_20_by_1",
|
|
"typeString": "int_const 20"
|
|
},
|
|
"value": "20"
|
|
},
|
|
"src": "773:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1965,
|
|
"name": "EthUsdPrice",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1956,
|
|
"src": "756:11:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1963,
|
|
"name": "yfiEthPrice",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1948,
|
|
"src": "740:11:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1964,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11478,
|
|
"src": "740:15:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "740:28:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1967,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11499,
|
|
"src": "740:32:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "740:40:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1946,
|
|
"id": 1972,
|
|
"nodeType": "Return",
|
|
"src": "733:47:11"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "98d5fdca",
|
|
"id": 1974,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getPrice",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1943,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "558:2:11"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1946,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1945,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1974,
|
|
"src": "584:7:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1944,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "584:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "583:9:11"
|
|
},
|
|
"scope": 1975,
|
|
"src": "541:246:11",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1976,
|
|
"src": "315:474:11"
|
|
}
|
|
],
|
|
"src": "78:712:11"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/ChainlinkYFIUSDCPriceOracleProxy.sol",
|
|
"exportedSymbols": {
|
|
"ChainlinkYFIUSDCPriceOracleProxy": [
|
|
1975
|
|
],
|
|
"IChainlink": [
|
|
1933
|
|
]
|
|
},
|
|
"id": 1976,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1924,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:11"
|
|
},
|
|
{
|
|
"id": 1925,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:11"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 1927,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1976,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:11",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 1926,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1933,
|
|
"linearizedBaseContracts": [
|
|
1933
|
|
],
|
|
"name": "IChainlink",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "50d25bcd",
|
|
"id": 1932,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestAnswer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1928,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "232:2:11"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1931,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1930,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1932,
|
|
"src": "258:7:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1929,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "258:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "257:9:11"
|
|
},
|
|
"scope": 1933,
|
|
"src": "211:56:11",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1976,
|
|
"src": "184:85:11"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 1975,
|
|
"linearizedBaseContracts": [
|
|
1975
|
|
],
|
|
"name": "ChainlinkYFIUSDCPriceOracleProxy",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 1936,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 1934,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "369:8:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "363:27:11",
|
|
"typeName": {
|
|
"id": 1935,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "382:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "28737ae5",
|
|
"id": 1939,
|
|
"mutability": "mutable",
|
|
"name": "yfiEth",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1975,
|
|
"src": "396:66:11",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1937,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "396:7:11",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307837633564344638333435653636663638303939353831446233343063643635423037384334316634",
|
|
"id": 1938,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "420:42:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0x7c5d4F8345e66f68099581Db340cd65B078C41f4"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "f57689d5",
|
|
"id": 1942,
|
|
"mutability": "mutable",
|
|
"name": "EthUsd",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1975,
|
|
"src": "468:66:11",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1940,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "468:7:11",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "307835663465433344663963626434333731344645323734306635453336313631353563356238343139",
|
|
"id": 1941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "492:42:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"value": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1973,
|
|
"nodeType": "Block",
|
|
"src": "593:194:11",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1948
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1948,
|
|
"mutability": "mutable",
|
|
"name": "yfiEthPrice",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1973,
|
|
"src": "603:19:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1947,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "603:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1954,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1950,
|
|
"name": "yfiEth",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1939,
|
|
"src": "636:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1949,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1933,
|
|
"src": "625:10:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1933_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "625:18:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1933",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1932,
|
|
"src": "625:31:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1953,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "625:33:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "603:55:11"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1956
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1956,
|
|
"mutability": "mutable",
|
|
"name": "EthUsdPrice",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1973,
|
|
"src": "668:19:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1955,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "668:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1962,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1958,
|
|
"name": "EthUsd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1942,
|
|
"src": "701:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1957,
|
|
"name": "IChainlink",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1933,
|
|
"src": "690:10:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IChainlink_$1933_$",
|
|
"typeString": "type(contract IChainlink)"
|
|
}
|
|
},
|
|
"id": 1959,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "690:18:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IChainlink_$1933",
|
|
"typeString": "contract IChainlink"
|
|
}
|
|
},
|
|
"id": 1960,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "latestAnswer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1932,
|
|
"src": "690:31:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1961,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "690:33:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "668:55:11"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
},
|
|
"id": 1970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 1968,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "773:2:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3230",
|
|
"id": 1969,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "777:2:11",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_20_by_1",
|
|
"typeString": "int_const 20"
|
|
},
|
|
"value": "20"
|
|
},
|
|
"src": "773:6:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_100000000000000000000_by_1",
|
|
"typeString": "int_const 100000000000000000000"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1965,
|
|
"name": "EthUsdPrice",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1956,
|
|
"src": "756:11:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1963,
|
|
"name": "yfiEthPrice",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1948,
|
|
"src": "740:11:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1964,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mul",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11478,
|
|
"src": "740:15:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "740:28:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1967,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "div",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11499,
|
|
"src": "740:32:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "740:40:11",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1946,
|
|
"id": 1972,
|
|
"nodeType": "Return",
|
|
"src": "733:47:11"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "98d5fdca",
|
|
"id": 1974,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getPrice",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1943,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "558:2:11"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1946,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1945,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1974,
|
|
"src": "584:7:11",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1944,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "584:7:11",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "583:9:11"
|
|
},
|
|
"scope": 1975,
|
|
"src": "541:246:11",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 1976,
|
|
"src": "315:474:11"
|
|
}
|
|
],
|
|
"src": "78:712:11"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.493Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |