Files
dodo-contractV2/build-v1/contracts/IDODOMine.json
2020-11-10 18:38:34 +08:00

3630 lines
146 KiB
JSON

{
"contractName": "IDODOMine",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_lpToken",
"type": "address"
},
{
"internalType": "address",
"name": "_user",
"type": "address"
}
],
"name": "getUserLpBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_lpToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getUserLpBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOMineReader.sol\":\"IDODOMine\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol\":{\"keccak256\":\"0x8fd9ec49ff1517e33698dc8dd4022da05f3a1ae6e4bf97c48f5f5b6714df2123\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://cfaa388f09d627ad26c66e6c4a73c232d494010b73b989392e264f815a84cd1d\",\"dweb:/ipfs/QmSBNeEyjgFSAtcYpKjyQfKZx7ahZKFwUtnnbpSSpS3p2H\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol\":{\"keccak256\":\"0x40355eddd56b5a9ac760c5a056e135946b372b724fb632415792ad82c60a9ac5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://66e932da3bb19bdd0a7b17715099bc419f087cbf06809885fd98a7a35574387e\",\"dweb:/ipfs/Qmdv97dz4214Xrbb8xGbuYPJtvmqAoUcXuSCFgA8NzBUsg\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOMineReader.sol\":{\"keccak256\":\"0xacdbbc17ce75a41a7656e2ff50c85633af00f5c57240269a3bcfcc4800427574\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b915a0b00401e7355693594d02a1b606172e29c8886fe909749b4422bd8accb3\",\"dweb:/ipfs/QmbaER9zTzjuUh4x4YMDMiXu4cHzMCqihBUP7h2DP4ERmq\"]}},\"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 {IDODO} from \"../intf/IDODO.sol\";\nimport {IERC20} from \"../intf/IERC20.sol\";\nimport {SafeMath} from \"../lib/SafeMath.sol\";\n\n\ninterface IDODOMine {\n function getUserLpBalance(address _lpToken, address _user) external view returns (uint256);\n}\n\n\ncontract DODOMineReader {\n using SafeMath for uint256;\n\n function getUserStakedBalance(\n address _dodoMine,\n address _dodo,\n address _user\n ) external view returns (uint256 baseBalance, uint256 quoteBalance) {\n address baseLpToken = IDODO(_dodo)._BASE_CAPITAL_TOKEN_();\n address quoteLpToken = IDODO(_dodo)._QUOTE_CAPITAL_TOKEN_();\n\n uint256 baseLpBalance = IDODOMine(_dodoMine).getUserLpBalance(baseLpToken, _user);\n uint256 quoteLpBalance = IDODOMine(_dodoMine).getUserLpBalance(quoteLpToken, _user);\n\n uint256 baseLpTotalSupply = IERC20(baseLpToken).totalSupply();\n uint256 quoteLpTotalSupply = IERC20(quoteLpToken).totalSupply();\n\n (uint256 baseTarget, uint256 quoteTarget) = IDODO(_dodo).getExpectedTarget();\n baseBalance = baseTarget.mul(baseLpBalance).div(baseLpTotalSupply);\n quoteBalance = quoteTarget.mul(quoteLpBalance).div(quoteLpTotalSupply);\n\n return (baseBalance, quoteBalance);\n }\n}\n",
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOMineReader.sol",
"ast": {
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOMineReader.sol",
"exportedSymbols": {
"DODOMineReader": [
12945
],
"IDODOMine": [
12841
]
},
"id": 12946,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 12824,
"literals": [
"solidity",
"0.6",
".9"
],
"nodeType": "PragmaDirective",
"src": "78:22:44"
},
{
"id": 12825,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "101:33:44"
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol",
"file": "../intf/IDODO.sol",
"id": 12827,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 10492,
"src": "136:40:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12826,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "144:5:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol",
"file": "../intf/IERC20.sol",
"id": 12829,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 10608,
"src": "177:42:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12828,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "185:6:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
"file": "../lib/SafeMath.sol",
"id": 12831,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 11624,
"src": "220:45:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12830,
"name": "SafeMath",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "228:8:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 12841,
"linearizedBaseContracts": [
12841
],
"name": "IDODOMine",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"functionSelector": "19a78f55",
"id": 12840,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getUserLpBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12836,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12833,
"mutability": "mutable",
"name": "_lpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "320:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12832,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "320:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12835,
"mutability": "mutable",
"name": "_user",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "338:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12834,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "338:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "319:33:44"
},
"returnParameters": {
"id": 12839,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12838,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "376:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12837,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "376:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "375:9:44"
},
"scope": 12841,
"src": "294:91:44",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 12946,
"src": "268:119:44"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 12945,
"linearizedBaseContracts": [
12945
],
"name": "DODOMineReader",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 12844,
"libraryName": {
"contractScope": null,
"id": 12842,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11623,
"src": "426:8:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$11623",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "420:27:44",
"typeName": {
"id": 12843,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "439:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 12943,
"nodeType": "Block",
"src": "628:761:44",
"statements": [
{
"assignments": [
12858
],
"declarations": [
{
"constant": false,
"id": 12858,
"mutability": "mutable",
"name": "baseLpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "638:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12857,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "638:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12864,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12860,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "666:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12859,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "660:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12861,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "660:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_BASE_CAPITAL_TOKEN_",
"nodeType": "MemberAccess",
"referencedDeclaration": 10475,
"src": "660:33:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "660:35:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "638:57:44"
},
{
"assignments": [
12866
],
"declarations": [
{
"constant": false,
"id": 12866,
"mutability": "mutable",
"name": "quoteLpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "705:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12865,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "705:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12872,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12868,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "734:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12867,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "728:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "728:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12870,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_QUOTE_CAPITAL_TOKEN_",
"nodeType": "MemberAccess",
"referencedDeclaration": 10480,
"src": "728:34:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "728:36:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "705:59:44"
},
{
"assignments": [
12874
],
"declarations": [
{
"constant": false,
"id": 12874,
"mutability": "mutable",
"name": "baseLpBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "775:21:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12873,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "775:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12882,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12879,
"name": "baseLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12858,
"src": "837:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12880,
"name": "_user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12850,
"src": "850:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12876,
"name": "_dodoMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12846,
"src": "809:9:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12875,
"name": "IDODOMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12841,
"src": "799:9:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODOMine_$12841_$",
"typeString": "type(contract IDODOMine)"
}
},
"id": 12877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODOMine_$12841",
"typeString": "contract IDODOMine"
}
},
"id": 12878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getUserLpBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 12840,
"src": "799:37:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
"typeString": "function (address,address) view external returns (uint256)"
}
},
"id": 12881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:57:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "775:81:44"
},
{
"assignments": [
12884
],
"declarations": [
{
"constant": false,
"id": 12884,
"mutability": "mutable",
"name": "quoteLpBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "866:22:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12883,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "866:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12892,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12889,
"name": "quoteLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "929:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12890,
"name": "_user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12850,
"src": "943:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12886,
"name": "_dodoMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12846,
"src": "901:9:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12885,
"name": "IDODOMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12841,
"src": "891:9:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODOMine_$12841_$",
"typeString": "type(contract IDODOMine)"
}
},
"id": 12887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "891:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODOMine_$12841",
"typeString": "contract IDODOMine"
}
},
"id": 12888,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getUserLpBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 12840,
"src": "891:37:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
"typeString": "function (address,address) view external returns (uint256)"
}
},
"id": 12891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "891:58:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "866:83:44"
},
{
"assignments": [
12894
],
"declarations": [
{
"constant": false,
"id": 12894,
"mutability": "mutable",
"name": "baseLpTotalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "960:25:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "960:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12900,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12896,
"name": "baseLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12858,
"src": "995:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12895,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10607,
"src": "988:6:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
"typeString": "type(contract IERC20)"
}
},
"id": 12897,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "988:19:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$10607",
"typeString": "contract IERC20"
}
},
"id": 12898,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "totalSupply",
"nodeType": "MemberAccess",
"referencedDeclaration": 10546,
"src": "988:31:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
}
},
"id": 12899,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "988:33:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "960:61:44"
},
{
"assignments": [
12902
],
"declarations": [
{
"constant": false,
"id": 12902,
"mutability": "mutable",
"name": "quoteLpTotalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1031:26:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12901,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1031:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12908,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12904,
"name": "quoteLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "1067:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12903,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10607,
"src": "1060:6:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
"typeString": "type(contract IERC20)"
}
},
"id": 12905,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1060:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$10607",
"typeString": "contract IERC20"
}
},
"id": 12906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "totalSupply",
"nodeType": "MemberAccess",
"referencedDeclaration": 10546,
"src": "1060:32:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
}
},
"id": 12907,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1060:34:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1031:63:44"
},
{
"assignments": [
12910,
12912
],
"declarations": [
{
"constant": false,
"id": 12910,
"mutability": "mutable",
"name": "baseTarget",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1106:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12909,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1106:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12912,
"mutability": "mutable",
"name": "quoteTarget",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1126:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12911,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1126:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12918,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12914,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "1155:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12913,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "1149:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1149:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12916,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getExpectedTarget",
"nodeType": "MemberAccess",
"referencedDeclaration": 10428,
"src": "1149:30:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$",
"typeString": "function () view external returns (uint256,uint256)"
}
},
"id": 12917,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1149:32:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1105:76:44"
},
{
"expression": {
"argumentTypes": null,
"id": 12927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12919,
"name": "baseBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12853,
"src": "1191:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12925,
"name": "baseLpTotalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12894,
"src": "1239:17:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12922,
"name": "baseLpBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12874,
"src": "1220:13:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12920,
"name": "baseTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12910,
"src": "1205:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12921,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 11478,
"src": "1205:14:44",
"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": 12923,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1205:29:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12924,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 11499,
"src": "1205:33:44",
"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": 12926,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1205:52:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1191:66:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12928,
"nodeType": "ExpressionStatement",
"src": "1191:66:44"
},
{
"expression": {
"argumentTypes": null,
"id": 12937,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12929,
"name": "quoteBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12855,
"src": "1267:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12935,
"name": "quoteLpTotalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12902,
"src": "1318:18:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12932,
"name": "quoteLpBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12884,
"src": "1298:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12930,
"name": "quoteTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12912,
"src": "1282:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 11478,
"src": "1282:15:44",
"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": 12933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1282:31:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 11499,
"src": "1282:35:44",
"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": 12936,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1282:55:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1267:70:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12938,
"nodeType": "ExpressionStatement",
"src": "1267:70:44"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 12939,
"name": "baseBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12853,
"src": "1356:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 12940,
"name": "quoteBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12855,
"src": "1369:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 12941,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1355:27:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 12856,
"id": 12942,
"nodeType": "Return",
"src": "1348:34:44"
}
]
},
"documentation": null,
"functionSelector": "4e41de7f",
"id": 12944,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getUserStakedBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12851,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12846,
"mutability": "mutable",
"name": "_dodoMine",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "492:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12845,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "492:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12848,
"mutability": "mutable",
"name": "_dodo",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "519:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12847,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "519:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12850,
"mutability": "mutable",
"name": "_user",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "542:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "542:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "482:79:44"
},
"returnParameters": {
"id": 12856,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12853,
"mutability": "mutable",
"name": "baseBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "585:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12852,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "585:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12855,
"mutability": "mutable",
"name": "quoteBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "606:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12854,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "606:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "584:43:44"
},
"scope": 12945,
"src": "453:936:44",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 12946,
"src": "390:1001:44"
}
],
"src": "78:1314:44"
},
"legacyAST": {
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOMineReader.sol",
"exportedSymbols": {
"DODOMineReader": [
12945
],
"IDODOMine": [
12841
]
},
"id": 12946,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 12824,
"literals": [
"solidity",
"0.6",
".9"
],
"nodeType": "PragmaDirective",
"src": "78:22:44"
},
{
"id": 12825,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "101:33:44"
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IDODO.sol",
"file": "../intf/IDODO.sol",
"id": 12827,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 10492,
"src": "136:40:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12826,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "144:5:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol",
"file": "../intf/IERC20.sol",
"id": 12829,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 10608,
"src": "177:42:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12828,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "185:6:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
"file": "../lib/SafeMath.sol",
"id": 12831,
"nodeType": "ImportDirective",
"scope": 12946,
"sourceUnit": 11624,
"src": "220:45:44",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 12830,
"name": "SafeMath",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "228:8:44",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 12841,
"linearizedBaseContracts": [
12841
],
"name": "IDODOMine",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"functionSelector": "19a78f55",
"id": 12840,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getUserLpBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12836,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12833,
"mutability": "mutable",
"name": "_lpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "320:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12832,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "320:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12835,
"mutability": "mutable",
"name": "_user",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "338:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12834,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "338:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "319:33:44"
},
"returnParameters": {
"id": 12839,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12838,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12840,
"src": "376:7:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12837,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "376:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "375:9:44"
},
"scope": 12841,
"src": "294:91:44",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 12946,
"src": "268:119:44"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 12945,
"linearizedBaseContracts": [
12945
],
"name": "DODOMineReader",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 12844,
"libraryName": {
"contractScope": null,
"id": 12842,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11623,
"src": "426:8:44",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$11623",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "420:27:44",
"typeName": {
"id": 12843,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "439:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body": {
"id": 12943,
"nodeType": "Block",
"src": "628:761:44",
"statements": [
{
"assignments": [
12858
],
"declarations": [
{
"constant": false,
"id": 12858,
"mutability": "mutable",
"name": "baseLpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "638:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12857,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "638:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12864,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12860,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "666:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12859,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "660:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12861,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "660:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_BASE_CAPITAL_TOKEN_",
"nodeType": "MemberAccess",
"referencedDeclaration": 10475,
"src": "660:33:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "660:35:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "638:57:44"
},
{
"assignments": [
12866
],
"declarations": [
{
"constant": false,
"id": 12866,
"mutability": "mutable",
"name": "quoteLpToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "705:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12865,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "705:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12872,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12868,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "734:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12867,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "728:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "728:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12870,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_QUOTE_CAPITAL_TOKEN_",
"nodeType": "MemberAccess",
"referencedDeclaration": 10480,
"src": "728:34:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "728:36:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "705:59:44"
},
{
"assignments": [
12874
],
"declarations": [
{
"constant": false,
"id": 12874,
"mutability": "mutable",
"name": "baseLpBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "775:21:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12873,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "775:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12882,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12879,
"name": "baseLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12858,
"src": "837:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12880,
"name": "_user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12850,
"src": "850:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12876,
"name": "_dodoMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12846,
"src": "809:9:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12875,
"name": "IDODOMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12841,
"src": "799:9:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODOMine_$12841_$",
"typeString": "type(contract IDODOMine)"
}
},
"id": 12877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODOMine_$12841",
"typeString": "contract IDODOMine"
}
},
"id": 12878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getUserLpBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 12840,
"src": "799:37:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
"typeString": "function (address,address) view external returns (uint256)"
}
},
"id": 12881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:57:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "775:81:44"
},
{
"assignments": [
12884
],
"declarations": [
{
"constant": false,
"id": 12884,
"mutability": "mutable",
"name": "quoteLpBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "866:22:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12883,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "866:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12892,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12889,
"name": "quoteLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "929:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12890,
"name": "_user",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12850,
"src": "943:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12886,
"name": "_dodoMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12846,
"src": "901:9:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12885,
"name": "IDODOMine",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12841,
"src": "891:9:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODOMine_$12841_$",
"typeString": "type(contract IDODOMine)"
}
},
"id": 12887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "891:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODOMine_$12841",
"typeString": "contract IDODOMine"
}
},
"id": 12888,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getUserLpBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 12840,
"src": "891:37:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
"typeString": "function (address,address) view external returns (uint256)"
}
},
"id": 12891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "891:58:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "866:83:44"
},
{
"assignments": [
12894
],
"declarations": [
{
"constant": false,
"id": 12894,
"mutability": "mutable",
"name": "baseLpTotalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "960:25:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "960:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12900,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12896,
"name": "baseLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12858,
"src": "995:11:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12895,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10607,
"src": "988:6:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
"typeString": "type(contract IERC20)"
}
},
"id": 12897,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "988:19:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$10607",
"typeString": "contract IERC20"
}
},
"id": 12898,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "totalSupply",
"nodeType": "MemberAccess",
"referencedDeclaration": 10546,
"src": "988:31:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
}
},
"id": 12899,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "988:33:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "960:61:44"
},
{
"assignments": [
12902
],
"declarations": [
{
"constant": false,
"id": 12902,
"mutability": "mutable",
"name": "quoteLpTotalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1031:26:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12901,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1031:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12908,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12904,
"name": "quoteLpToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "1067:12:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12903,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10607,
"src": "1060:6:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
"typeString": "type(contract IERC20)"
}
},
"id": 12905,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1060:20:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$10607",
"typeString": "contract IERC20"
}
},
"id": 12906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "totalSupply",
"nodeType": "MemberAccess",
"referencedDeclaration": 10546,
"src": "1060:32:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
}
},
"id": 12907,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1060:34:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1031:63:44"
},
{
"assignments": [
12910,
12912
],
"declarations": [
{
"constant": false,
"id": 12910,
"mutability": "mutable",
"name": "baseTarget",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1106:18:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12909,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1106:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12912,
"mutability": "mutable",
"name": "quoteTarget",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12943,
"src": "1126:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12911,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1126:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12918,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12914,
"name": "_dodo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "1155:5:44",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12913,
"name": "IDODO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10491,
"src": "1149:5:44",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IDODO_$10491_$",
"typeString": "type(contract IDODO)"
}
},
"id": 12915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1149:12:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDODO_$10491",
"typeString": "contract IDODO"
}
},
"id": 12916,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getExpectedTarget",
"nodeType": "MemberAccess",
"referencedDeclaration": 10428,
"src": "1149:30:44",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$",
"typeString": "function () view external returns (uint256,uint256)"
}
},
"id": 12917,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1149:32:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1105:76:44"
},
{
"expression": {
"argumentTypes": null,
"id": 12927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12919,
"name": "baseBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12853,
"src": "1191:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12925,
"name": "baseLpTotalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12894,
"src": "1239:17:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12922,
"name": "baseLpBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12874,
"src": "1220:13:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12920,
"name": "baseTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12910,
"src": "1205:10:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12921,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 11478,
"src": "1205:14:44",
"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": 12923,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1205:29:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12924,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 11499,
"src": "1205:33:44",
"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": 12926,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1205:52:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1191:66:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12928,
"nodeType": "ExpressionStatement",
"src": "1191:66:44"
},
{
"expression": {
"argumentTypes": null,
"id": 12937,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12929,
"name": "quoteBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12855,
"src": "1267:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12935,
"name": "quoteLpTotalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12902,
"src": "1318:18:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12932,
"name": "quoteLpBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12884,
"src": "1298:14:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12930,
"name": "quoteTarget",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12912,
"src": "1282:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 11478,
"src": "1282:15:44",
"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": 12933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1282:31:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "div",
"nodeType": "MemberAccess",
"referencedDeclaration": 11499,
"src": "1282:35:44",
"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": 12936,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1282:55:44",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1267:70:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12938,
"nodeType": "ExpressionStatement",
"src": "1267:70:44"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 12939,
"name": "baseBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12853,
"src": "1356:11:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 12940,
"name": "quoteBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12855,
"src": "1369:12:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 12941,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1355:27:44",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 12856,
"id": 12942,
"nodeType": "Return",
"src": "1348:34:44"
}
]
},
"documentation": null,
"functionSelector": "4e41de7f",
"id": 12944,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getUserStakedBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12851,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12846,
"mutability": "mutable",
"name": "_dodoMine",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "492:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12845,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "492:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12848,
"mutability": "mutable",
"name": "_dodo",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "519:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12847,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "519:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12850,
"mutability": "mutable",
"name": "_user",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "542:13:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "542:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "482:79:44"
},
"returnParameters": {
"id": 12856,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12853,
"mutability": "mutable",
"name": "baseBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "585:19:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12852,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "585:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12855,
"mutability": "mutable",
"name": "quoteBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12944,
"src": "606:20:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12854,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "606:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "584:43:44"
},
"scope": 12945,
"src": "453:936:44",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 12946,
"src": "390:1001:44"
}
],
"src": "78:1314:44"
},
"compiler": {
"name": "solc",
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-11-06T08:03:35.737Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}