6613 lines
248 KiB
JSON
6613 lines
248 KiB
JSON
{
|
|
"absolutePath": "/home/oliver/Projects/github/rari-capital/solmate/src/mixins/ERC4626.sol",
|
|
"id": 2954,
|
|
"exportedSymbols": {
|
|
"ERC20": [
|
|
31408
|
|
],
|
|
"ERC4626": [
|
|
2953
|
|
],
|
|
"FixedPointMathLib": [
|
|
32321
|
|
],
|
|
"SafeTransferLib": [
|
|
32785
|
|
]
|
|
},
|
|
"nodeType": "SourceUnit",
|
|
"src": "42:6474:4",
|
|
"nodes": [
|
|
{
|
|
"id": 2434,
|
|
"nodeType": "PragmaDirective",
|
|
"src": "42:24:4",
|
|
"literals": [
|
|
"solidity",
|
|
">=",
|
|
"0.8",
|
|
".0"
|
|
]
|
|
},
|
|
{
|
|
"id": 2436,
|
|
"nodeType": "ImportDirective",
|
|
"src": "68:42:4",
|
|
"absolutePath": "/home/oliver/Projects/github/rari-capital/solmate/src/tokens/ERC20.sol",
|
|
"file": "../tokens/ERC20.sol",
|
|
"nameLocation": "-1:-1:-1",
|
|
"scope": 2954,
|
|
"sourceUnit": 31409,
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2435,
|
|
"name": "ERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"src": "76:5:4",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"id": 2438,
|
|
"nodeType": "ImportDirective",
|
|
"src": "111:61:4",
|
|
"absolutePath": "/home/oliver/Projects/github/rari-capital/solmate/src/utils/SafeTransferLib.sol",
|
|
"file": "../utils/SafeTransferLib.sol",
|
|
"nameLocation": "-1:-1:-1",
|
|
"scope": 2954,
|
|
"sourceUnit": 32786,
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2437,
|
|
"name": "SafeTransferLib",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"src": "119:15:4",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"id": 2440,
|
|
"nodeType": "ImportDirective",
|
|
"src": "173:65:4",
|
|
"absolutePath": "/home/oliver/Projects/github/rari-capital/solmate/src/utils/FixedPointMathLib.sol",
|
|
"file": "../utils/FixedPointMathLib.sol",
|
|
"nameLocation": "-1:-1:-1",
|
|
"scope": 2954,
|
|
"sourceUnit": 32322,
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2439,
|
|
"name": "FixedPointMathLib",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"src": "181:17:4",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"id": 2953,
|
|
"nodeType": "ContractDefinition",
|
|
"src": "395:6120:4",
|
|
"nodes": [
|
|
{
|
|
"id": 2447,
|
|
"nodeType": "UsingForDirective",
|
|
"src": "436:32:4",
|
|
"libraryName": {
|
|
"id": 2444,
|
|
"name": "SafeTransferLib",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 32785,
|
|
"src": "442:15:4"
|
|
},
|
|
"typeName": {
|
|
"id": 2446,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2445,
|
|
"name": "ERC20",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 31408,
|
|
"src": "462:5:4"
|
|
},
|
|
"referencedDeclaration": 31408,
|
|
"src": "462:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 2450,
|
|
"nodeType": "UsingForDirective",
|
|
"src": "473:36:4",
|
|
"libraryName": {
|
|
"id": 2448,
|
|
"name": "FixedPointMathLib",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 32321,
|
|
"src": "479:17:4"
|
|
},
|
|
"typeName": {
|
|
"id": 2449,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "501:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 2460,
|
|
"nodeType": "EventDefinition",
|
|
"src": "694:93:4",
|
|
"anonymous": false,
|
|
"name": "Deposit",
|
|
"nameLocation": "700:7:4",
|
|
"parameters": {
|
|
"id": 2459,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2452,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "caller",
|
|
"nameLocation": "724:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2460,
|
|
"src": "708:22:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2451,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "708:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2454,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "748:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2460,
|
|
"src": "732:21:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2453,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "732:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2456,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "763:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2460,
|
|
"src": "755:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2455,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "755:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2458,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "779:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2460,
|
|
"src": "771:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2457,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "771:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "707:79:4"
|
|
}
|
|
},
|
|
{
|
|
"id": 2472,
|
|
"nodeType": "EventDefinition",
|
|
"src": "793:166:4",
|
|
"anonymous": false,
|
|
"name": "Withdraw",
|
|
"nameLocation": "799:8:4",
|
|
"parameters": {
|
|
"id": 2471,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2462,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "caller",
|
|
"nameLocation": "833:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2472,
|
|
"src": "817:22:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2461,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "817:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2464,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "receiver",
|
|
"nameLocation": "865:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2472,
|
|
"src": "849:24:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2463,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "849:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2466,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "899:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2472,
|
|
"src": "883:21:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2465,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "883:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2468,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "922:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2472,
|
|
"src": "914:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2467,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "914:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2470,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "946:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2472,
|
|
"src": "938:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2469,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "938:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "807:151:4"
|
|
}
|
|
},
|
|
{
|
|
"id": 2475,
|
|
"nodeType": "VariableDeclaration",
|
|
"src": "1146:28:4",
|
|
"constant": false,
|
|
"functionSelector": "38d52e0f",
|
|
"mutability": "immutable",
|
|
"name": "asset",
|
|
"nameLocation": "1169:5:4",
|
|
"scope": 2953,
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 2474,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2473,
|
|
"name": "ERC20",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 31408,
|
|
"src": "1146:5:4"
|
|
},
|
|
"referencedDeclaration": 31408,
|
|
"src": "1146:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2497,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1181:172:4",
|
|
"body": {
|
|
"id": 2496,
|
|
"nodeType": "Block",
|
|
"src": "1322:31:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 2494,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 2492,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2475,
|
|
"src": "1332:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 2493,
|
|
"name": "_asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2478,
|
|
"src": "1340:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"src": "1332:14:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2495,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1332:14:4"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 2485,
|
|
"name": "_name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2480,
|
|
"src": "1287:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 2486,
|
|
"name": "_symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2482,
|
|
"src": "1294:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"id": 2487,
|
|
"name": "_asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2478,
|
|
"src": "1303:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2488,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 31045,
|
|
"src": "1303:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
|
|
"typeString": "function () view external returns (uint8)"
|
|
}
|
|
},
|
|
"id": 2489,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1303:17:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
}
|
|
],
|
|
"id": 2490,
|
|
"kind": "baseConstructorSpecifier",
|
|
"modifierName": {
|
|
"id": 2484,
|
|
"name": "ERC20",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 31408,
|
|
"src": "1281:5:4"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1281:40:4"
|
|
}
|
|
],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"parameters": {
|
|
"id": 2483,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2478,
|
|
"mutability": "mutable",
|
|
"name": "_asset",
|
|
"nameLocation": "1208:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2497,
|
|
"src": "1202:12:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 2477,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2476,
|
|
"name": "ERC20",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 31408,
|
|
"src": "1202:5:4"
|
|
},
|
|
"referencedDeclaration": 31408,
|
|
"src": "1202:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2480,
|
|
"mutability": "mutable",
|
|
"name": "_name",
|
|
"nameLocation": "1238:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2497,
|
|
"src": "1224:19:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 2479,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1224:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2482,
|
|
"mutability": "mutable",
|
|
"name": "_symbol",
|
|
"nameLocation": "1267:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2497,
|
|
"src": "1253:21:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 2481,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1253:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1192:88:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2491,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1322:0:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 2549,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1547:516:4",
|
|
"body": {
|
|
"id": 2548,
|
|
"nodeType": "Block",
|
|
"src": "1638:425:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2514,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"id": 2511,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 2507,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2504,
|
|
"src": "1732:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 2509,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2499,
|
|
"src": "1756:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2508,
|
|
"name": "previewDeposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2822,
|
|
"src": "1741:14:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2510,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1741:22:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1732:31:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 2512,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1731:33:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2513,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1768:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1731:38:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5a45524f5f534841524553",
|
|
"id": 2515,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1771:13:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2119bd5d92259e418533f96b824fbd100e3dea453e6ac4c5f7315e6344368f2f",
|
|
"typeString": "literal_string \"ZERO_SHARES\""
|
|
},
|
|
"value": "ZERO_SHARES"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2119bd5d92259e418533f96b824fbd100e3dea453e6ac4c5f7315e6344368f2f",
|
|
"typeString": "literal_string \"ZERO_SHARES\""
|
|
}
|
|
],
|
|
"id": 2506,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1723:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 2516,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1723:62:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2517,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1723:62:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2521,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1888:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2522,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1888:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 2525,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -28,
|
|
"src": "1908:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC4626_$2953",
|
|
"typeString": "contract ERC4626"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC4626_$2953",
|
|
"typeString": "contract ERC4626"
|
|
}
|
|
],
|
|
"id": 2524,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1900:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 2523,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1900:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 2526,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1900:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2527,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2499,
|
|
"src": "1915:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2518,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2475,
|
|
"src": "1865:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2520,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransferFrom",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32744,
|
|
"src": "1865:22:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$31408_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$31408_$",
|
|
"typeString": "function (contract ERC20,address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 2528,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1865:57:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2529,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1865:57:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2531,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2501,
|
|
"src": "1939:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2532,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2504,
|
|
"src": "1949:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2530,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31379,
|
|
"src": "1933:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 2533,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1933:23:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2534,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1933:23:4"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2536,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1980:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2537,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1980:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2538,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2501,
|
|
"src": "1992:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2539,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2499,
|
|
"src": "2002:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2540,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2504,
|
|
"src": "2010:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2535,
|
|
"name": "Deposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2460,
|
|
"src": "1972:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2541,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1972:45:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2542,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1967:50:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2544,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2499,
|
|
"src": "2041:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2545,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2504,
|
|
"src": "2049:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2543,
|
|
"name": "afterDeposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2952,
|
|
"src": "2028:12:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2546,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2028:28:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2547,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2028:28:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "6e553f65",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "deposit",
|
|
"nameLocation": "1556:7:4",
|
|
"parameters": {
|
|
"id": 2502,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2499,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "1572:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2549,
|
|
"src": "1564:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2498,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1564:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2501,
|
|
"mutability": "mutable",
|
|
"name": "receiver",
|
|
"nameLocation": "1588:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2549,
|
|
"src": "1580:16:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2500,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1580:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1563:34:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2505,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2504,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "1630:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2549,
|
|
"src": "1622:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2503,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1622:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1621:16:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2595,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "2069:467:4",
|
|
"body": {
|
|
"id": 2594,
|
|
"nodeType": "Block",
|
|
"src": "2157:379:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 2562,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 2558,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2556,
|
|
"src": "2167:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 2560,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2551,
|
|
"src": "2188:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2559,
|
|
"name": "previewMint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2846,
|
|
"src": "2176:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2561,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2176:19:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2167:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2563,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2167:28:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2567,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2361:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2568,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2361:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 2571,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -28,
|
|
"src": "2381:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC4626_$2953",
|
|
"typeString": "contract ERC4626"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ERC4626_$2953",
|
|
"typeString": "contract ERC4626"
|
|
}
|
|
],
|
|
"id": 2570,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2373:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 2569,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2373:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 2572,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2373:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2573,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2556,
|
|
"src": "2388:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2564,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2475,
|
|
"src": "2338:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2566,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransferFrom",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32744,
|
|
"src": "2338:22:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$31408_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$31408_$",
|
|
"typeString": "function (contract ERC20,address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 2574,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2338:57:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2575,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2338:57:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2577,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2553,
|
|
"src": "2412:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2578,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2551,
|
|
"src": "2422:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2576,
|
|
"name": "_mint",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31379,
|
|
"src": "2406:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 2579,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2406:23:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2580,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2406:23:4"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2582,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2453:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2583,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2453:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2584,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2553,
|
|
"src": "2465:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2585,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2556,
|
|
"src": "2475:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2586,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2551,
|
|
"src": "2483:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2581,
|
|
"name": "Deposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2460,
|
|
"src": "2445:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2587,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2445:45:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2588,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2440:50:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2590,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2556,
|
|
"src": "2514:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2591,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2551,
|
|
"src": "2522:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2589,
|
|
"name": "afterDeposit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2952,
|
|
"src": "2501:12:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2592,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2501:28:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2593,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2501:28:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "94bf804d",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "mint",
|
|
"nameLocation": "2078:4:4",
|
|
"parameters": {
|
|
"id": 2554,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2551,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "2091:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2595,
|
|
"src": "2083:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2550,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2083:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2553,
|
|
"mutability": "mutable",
|
|
"name": "receiver",
|
|
"nameLocation": "2107:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2595,
|
|
"src": "2099:16:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2552,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2099:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2082:34:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2557,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2556,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "2149:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2595,
|
|
"src": "2141:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2555,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2141:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2140:16:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2673,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "2542:679:4",
|
|
"body": {
|
|
"id": 2672,
|
|
"nodeType": "Block",
|
|
"src": "2679:542:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 2610,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 2606,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2604,
|
|
"src": "2689:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 2608,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2597,
|
|
"src": "2714:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2607,
|
|
"name": "previewWithdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2870,
|
|
"src": "2698:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2609,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2698:23:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2689:32:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2611,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2689:32:4"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 2615,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 2612,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2803:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2613,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2803:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"id": 2614,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2817:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2803:19:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 2645,
|
|
"nodeType": "IfStatement",
|
|
"src": "2799:228:4",
|
|
"trueBody": {
|
|
"id": 2644,
|
|
"nodeType": "Block",
|
|
"src": "2824:203:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2617
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2617,
|
|
"mutability": "mutable",
|
|
"name": "allowed",
|
|
"nameLocation": "2846:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2644,
|
|
"src": "2838:15:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2616,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2838:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2624,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"baseExpression": {
|
|
"id": 2618,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31057,
|
|
"src": "2856:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 2620,
|
|
"indexExpression": {
|
|
"id": 2619,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2866:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2856:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2623,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 2621,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2873:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2622,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2873:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2856:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2838:46:4"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2631,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2625,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2617,
|
|
"src": "2939:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2628,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2955:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 2627,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2955:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
],
|
|
"id": 2626,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -27,
|
|
"src": "2950:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2629,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2950:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint256",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
},
|
|
"id": 2630,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2950:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2939:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 2643,
|
|
"nodeType": "IfStatement",
|
|
"src": "2935:81:4",
|
|
"trueBody": {
|
|
"expression": {
|
|
"id": 2641,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"baseExpression": {
|
|
"id": 2632,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31057,
|
|
"src": "2969:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 2636,
|
|
"indexExpression": {
|
|
"id": 2633,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2979:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2969:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2637,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 2634,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2986:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2635,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2986:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2969:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2640,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2638,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2617,
|
|
"src": "3000:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 2639,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2604,
|
|
"src": "3010:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3000:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2969:47:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2642,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2969:47:4"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2647,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2597,
|
|
"src": "3052:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2648,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2604,
|
|
"src": "3060:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2646,
|
|
"name": "beforeWithdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2944,
|
|
"src": "3037:14:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3037:30:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2650,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3037:30:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2652,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2601,
|
|
"src": "3084:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2653,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2604,
|
|
"src": "3091:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2651,
|
|
"name": "_burn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31407,
|
|
"src": "3078:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 2654,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3078:20:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2655,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3078:20:4"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2657,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3123:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2658,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3123:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2659,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2599,
|
|
"src": "3135:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2660,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2601,
|
|
"src": "3145:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2661,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2597,
|
|
"src": "3152:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2662,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2604,
|
|
"src": "3160:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2656,
|
|
"name": "Withdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2472,
|
|
"src": "3114:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2663,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3114:53:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2664,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3109:58:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2668,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2599,
|
|
"src": "3197:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2669,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2597,
|
|
"src": "3207:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2665,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2475,
|
|
"src": "3178:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2667,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32764,
|
|
"src": "3178:18:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$31408_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$31408_$",
|
|
"typeString": "function (contract ERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 2670,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3178:36:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2671,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3178:36:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "b460af94",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "withdraw",
|
|
"nameLocation": "2551:8:4",
|
|
"parameters": {
|
|
"id": 2602,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2597,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "2577:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2673,
|
|
"src": "2569:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2596,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2569:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2599,
|
|
"mutability": "mutable",
|
|
"name": "receiver",
|
|
"nameLocation": "2601:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2673,
|
|
"src": "2593:16:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2598,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2593:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2601,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "2627:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2673,
|
|
"src": "2619:13:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2600,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2619:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2559:79:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2605,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2604,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "2671:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2673,
|
|
"src": "2663:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2603,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2663:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2662:16:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2757,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "3227:713:4",
|
|
"body": {
|
|
"id": 2756,
|
|
"nodeType": "Block",
|
|
"src": "3362:578:4",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 2687,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 2684,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3376:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2685,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3376:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"id": 2686,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2679,
|
|
"src": "3390:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "3376:19:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 2717,
|
|
"nodeType": "IfStatement",
|
|
"src": "3372:228:4",
|
|
"trueBody": {
|
|
"id": 2716,
|
|
"nodeType": "Block",
|
|
"src": "3397:203:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2689
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2689,
|
|
"mutability": "mutable",
|
|
"name": "allowed",
|
|
"nameLocation": "3419:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2716,
|
|
"src": "3411:15:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2688,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3411:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2696,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"baseExpression": {
|
|
"id": 2690,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31057,
|
|
"src": "3429:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 2692,
|
|
"indexExpression": {
|
|
"id": 2691,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2679,
|
|
"src": "3439:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3429:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2695,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 2693,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3446:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2694,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3446:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3429:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3411:46:4"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2703,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2697,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2689,
|
|
"src": "3512:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2700,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3528:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 2699,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3528:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
],
|
|
"id": 2698,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -27,
|
|
"src": "3523:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2701,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3523:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint256",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
},
|
|
"id": 2702,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3523:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3512:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 2715,
|
|
"nodeType": "IfStatement",
|
|
"src": "3508:81:4",
|
|
"trueBody": {
|
|
"expression": {
|
|
"id": 2713,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"baseExpression": {
|
|
"id": 2704,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31057,
|
|
"src": "3542:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 2708,
|
|
"indexExpression": {
|
|
"id": 2705,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2679,
|
|
"src": "3552:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3542:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2709,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 2706,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3559:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2707,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3559:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3542:28:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2712,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2710,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2689,
|
|
"src": "3573:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 2711,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2675,
|
|
"src": "3583:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3573:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3542:47:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2714,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3542:47:4"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2726,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"id": 2723,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 2719,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2682,
|
|
"src": "3693:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 2721,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2675,
|
|
"src": "3716:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2720,
|
|
"name": "previewRedeem",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2882,
|
|
"src": "3702:13:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2722,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3702:21:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3693:30:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 2724,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3692:32:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2725,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3728:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3692:37:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5a45524f5f415353455453",
|
|
"id": 2727,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3731:13:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_bf169ab2ef12d57708bb5afe72ea54ba3ad2eccb91dd95f37571afa377c52483",
|
|
"typeString": "literal_string \"ZERO_ASSETS\""
|
|
},
|
|
"value": "ZERO_ASSETS"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_bf169ab2ef12d57708bb5afe72ea54ba3ad2eccb91dd95f37571afa377c52483",
|
|
"typeString": "literal_string \"ZERO_ASSETS\""
|
|
}
|
|
],
|
|
"id": 2718,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "3684:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 2728,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3684:61:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2729,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3684:61:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2731,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2682,
|
|
"src": "3771:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2732,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2675,
|
|
"src": "3779:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2730,
|
|
"name": "beforeWithdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2944,
|
|
"src": "3756:14:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2733,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3756:30:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2734,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3756:30:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2736,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2679,
|
|
"src": "3803:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2737,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2675,
|
|
"src": "3810:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2735,
|
|
"name": "_burn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31407,
|
|
"src": "3797:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,uint256)"
|
|
}
|
|
},
|
|
"id": 2738,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3797:20:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2739,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3797:20:4"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 2741,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3842:3:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 2742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3842:10:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2743,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2677,
|
|
"src": "3854:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2744,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2679,
|
|
"src": "3864:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2745,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2682,
|
|
"src": "3871:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2746,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2675,
|
|
"src": "3879:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2740,
|
|
"name": "Withdraw",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2472,
|
|
"src": "3833:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 2747,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3833:53:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2748,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3828:58:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2752,
|
|
"name": "receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2677,
|
|
"src": "3916:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 2753,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2682,
|
|
"src": "3926:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2749,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2475,
|
|
"src": "3897:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ERC20_$31408",
|
|
"typeString": "contract ERC20"
|
|
}
|
|
},
|
|
"id": 2751,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32764,
|
|
"src": "3897:18:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$31408_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_ERC20_$31408_$",
|
|
"typeString": "function (contract ERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 2754,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3897:36:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 2755,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3897:36:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "ba087652",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "redeem",
|
|
"nameLocation": "3236:6:4",
|
|
"parameters": {
|
|
"id": 2680,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2675,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "3260:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2757,
|
|
"src": "3252:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2674,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3252:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2677,
|
|
"mutability": "mutable",
|
|
"name": "receiver",
|
|
"nameLocation": "3284:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2757,
|
|
"src": "3276:16:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2676,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3276:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2679,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "3310:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2757,
|
|
"src": "3302:13:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2678,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3302:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3242:79:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2683,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2682,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "3354:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2757,
|
|
"src": "3346:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2681,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3346:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3345:16:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2762,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "4130:61:4",
|
|
"functionSelector": "01e1d114",
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "totalAssets",
|
|
"nameLocation": "4139:11:4",
|
|
"parameters": {
|
|
"id": 2758,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4150:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2761,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2760,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2762,
|
|
"src": "4182:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2759,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4182:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4181:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2786,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "4197:257:4",
|
|
"body": {
|
|
"id": 2785,
|
|
"nodeType": "Block",
|
|
"src": "4276:178:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2770
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2770,
|
|
"mutability": "mutable",
|
|
"name": "supply",
|
|
"nameLocation": "4294:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2785,
|
|
"src": "4286:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2769,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4286:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2772,
|
|
"initialValue": {
|
|
"id": 2771,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31047,
|
|
"src": "4303:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4286:28:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2773,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2770,
|
|
"src": "4384:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2774,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4394:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "4384:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2779,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2770,
|
|
"src": "4425:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 2780,
|
|
"name": "totalAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2762,
|
|
"src": "4433:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2781,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4433:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2777,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2764,
|
|
"src": "4407:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2778,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mulDivDown",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32285,
|
|
"src": "4407:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2782,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4407:40:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2783,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "4384:63:4",
|
|
"trueExpression": {
|
|
"id": 2776,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2764,
|
|
"src": "4398:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2768,
|
|
"id": 2784,
|
|
"nodeType": "Return",
|
|
"src": "4377:70:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "c6e6f592",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "convertToShares",
|
|
"nameLocation": "4206:15:4",
|
|
"parameters": {
|
|
"id": 2765,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2764,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "4230:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2786,
|
|
"src": "4222:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2763,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4222:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4221:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2768,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2767,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2786,
|
|
"src": "4267:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2766,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4267:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4266:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2810,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "4460:257:4",
|
|
"body": {
|
|
"id": 2809,
|
|
"nodeType": "Block",
|
|
"src": "4539:178:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2794
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2794,
|
|
"mutability": "mutable",
|
|
"name": "supply",
|
|
"nameLocation": "4557:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2809,
|
|
"src": "4549:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2793,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4549:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2796,
|
|
"initialValue": {
|
|
"id": 2795,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31047,
|
|
"src": "4566:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4549:28:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2799,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2797,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2794,
|
|
"src": "4647:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2798,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4657:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "4647:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 2803,
|
|
"name": "totalAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2762,
|
|
"src": "4688:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2804,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4688:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2805,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2794,
|
|
"src": "4703:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2801,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2788,
|
|
"src": "4670:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2802,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mulDivDown",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32285,
|
|
"src": "4670:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2806,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4670:40:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2807,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "4647:63:4",
|
|
"trueExpression": {
|
|
"id": 2800,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2788,
|
|
"src": "4661:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2792,
|
|
"id": 2808,
|
|
"nodeType": "Return",
|
|
"src": "4640:70:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "07a2d13a",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "convertToAssets",
|
|
"nameLocation": "4469:15:4",
|
|
"parameters": {
|
|
"id": 2789,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2788,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "4493:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2810,
|
|
"src": "4485:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2787,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4485:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4484:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2792,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2791,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2810,
|
|
"src": "4530:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2790,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4530:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4529:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2822,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "4723:125:4",
|
|
"body": {
|
|
"id": 2821,
|
|
"nodeType": "Block",
|
|
"src": "4801:47:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2818,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2812,
|
|
"src": "4834:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2817,
|
|
"name": "convertToShares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2786,
|
|
"src": "4818:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4818:23:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2816,
|
|
"id": 2820,
|
|
"nodeType": "Return",
|
|
"src": "4811:30:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "ef8b30f7",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "previewDeposit",
|
|
"nameLocation": "4732:14:4",
|
|
"parameters": {
|
|
"id": 2813,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2812,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "4755:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2822,
|
|
"src": "4747:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2811,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4747:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4746:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2816,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2815,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2822,
|
|
"src": "4792:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2814,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4792:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4791:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2846,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "4854:251:4",
|
|
"body": {
|
|
"id": 2845,
|
|
"nodeType": "Block",
|
|
"src": "4929:176:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2830
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2830,
|
|
"mutability": "mutable",
|
|
"name": "supply",
|
|
"nameLocation": "4947:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2845,
|
|
"src": "4939:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2829,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4939:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2832,
|
|
"initialValue": {
|
|
"id": 2831,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31047,
|
|
"src": "4956:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4939:28:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2835,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2833,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2830,
|
|
"src": "5037:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2834,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5047:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5037:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 2839,
|
|
"name": "totalAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2762,
|
|
"src": "5076:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2840,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5076:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 2841,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2830,
|
|
"src": "5091:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2837,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2824,
|
|
"src": "5060:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2838,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mulDivUp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32298,
|
|
"src": "5060:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2842,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5060:38:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2843,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "5037:61:4",
|
|
"trueExpression": {
|
|
"id": 2836,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2824,
|
|
"src": "5051:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2828,
|
|
"id": 2844,
|
|
"nodeType": "Return",
|
|
"src": "5030:68:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "b3d7f6b9",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "previewMint",
|
|
"nameLocation": "4863:11:4",
|
|
"parameters": {
|
|
"id": 2825,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2824,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "4883:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2846,
|
|
"src": "4875:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2823,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4875:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4874:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2828,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2827,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2846,
|
|
"src": "4920:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2826,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4920:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4919:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2870,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5111:255:4",
|
|
"body": {
|
|
"id": 2869,
|
|
"nodeType": "Block",
|
|
"src": "5190:176:4",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
2854
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2854,
|
|
"mutability": "mutable",
|
|
"name": "supply",
|
|
"nameLocation": "5208:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2869,
|
|
"src": "5200:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2853,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5200:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2856,
|
|
"initialValue": {
|
|
"id": 2855,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31047,
|
|
"src": "5217:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5200:28:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2859,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2857,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2854,
|
|
"src": "5298:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 2858,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5308:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5298:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2863,
|
|
"name": "supply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2854,
|
|
"src": "5337:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 2864,
|
|
"name": "totalAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2762,
|
|
"src": "5345:11:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5345:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2861,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2848,
|
|
"src": "5321:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2862,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "mulDivUp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 32298,
|
|
"src": "5321:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2866,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5321:38:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2867,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "5298:61:4",
|
|
"trueExpression": {
|
|
"id": 2860,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2848,
|
|
"src": "5312:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2852,
|
|
"id": 2868,
|
|
"nodeType": "Return",
|
|
"src": "5291:68:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "0a28a477",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "previewWithdraw",
|
|
"nameLocation": "5120:15:4",
|
|
"parameters": {
|
|
"id": 2849,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2848,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "5144:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2870,
|
|
"src": "5136:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2847,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5136:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5135:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2852,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2851,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2870,
|
|
"src": "5181:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2850,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5181:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5180:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2882,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5372:124:4",
|
|
"body": {
|
|
"id": 2881,
|
|
"nodeType": "Block",
|
|
"src": "5449:47:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2878,
|
|
"name": "shares",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2872,
|
|
"src": "5482:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2877,
|
|
"name": "convertToAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2810,
|
|
"src": "5466:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2879,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5466:23:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2876,
|
|
"id": 2880,
|
|
"nodeType": "Return",
|
|
"src": "5459:30:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "4cdad506",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "previewRedeem",
|
|
"nameLocation": "5381:13:4",
|
|
"parameters": {
|
|
"id": 2873,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2872,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "5403:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2882,
|
|
"src": "5395:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2871,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5395:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5394:16:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2876,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2875,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2882,
|
|
"src": "5440:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2874,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5440:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5439:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2896,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5693:108:4",
|
|
"body": {
|
|
"id": 2895,
|
|
"nodeType": "Block",
|
|
"src": "5760:41:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2891,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5782:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 2890,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5782:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
],
|
|
"id": 2889,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -27,
|
|
"src": "5777:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2892,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5777:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint256",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
},
|
|
"id": 2893,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5777:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2888,
|
|
"id": 2894,
|
|
"nodeType": "Return",
|
|
"src": "5770:24:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "402d267d",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "maxDeposit",
|
|
"nameLocation": "5702:10:4",
|
|
"parameters": {
|
|
"id": 2885,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2884,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2896,
|
|
"src": "5713:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2883,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5713:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5712:9:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2888,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2887,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2896,
|
|
"src": "5751:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2886,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5751:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5750:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2910,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5807:105:4",
|
|
"body": {
|
|
"id": 2909,
|
|
"nodeType": "Block",
|
|
"src": "5871:41:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2905,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5893:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 2904,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5893:7:4",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
],
|
|
"id": 2903,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -27,
|
|
"src": "5888:4:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2906,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5888:13:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint256",
|
|
"typeString": "type(uint256)"
|
|
}
|
|
},
|
|
"id": 2907,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5888:17:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2902,
|
|
"id": 2908,
|
|
"nodeType": "Return",
|
|
"src": "5881:24:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "c63d75b6",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "maxMint",
|
|
"nameLocation": "5816:7:4",
|
|
"parameters": {
|
|
"id": 2899,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2898,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2910,
|
|
"src": "5824:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2897,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5824:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5823:9:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2902,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2901,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2910,
|
|
"src": "5862:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2900,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5862:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5861:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2924,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "5918:131:4",
|
|
"body": {
|
|
"id": 2923,
|
|
"nodeType": "Block",
|
|
"src": "5992:57:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"baseExpression": {
|
|
"id": 2918,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31051,
|
|
"src": "6025:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2920,
|
|
"indexExpression": {
|
|
"id": 2919,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2912,
|
|
"src": "6035:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6025:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 2917,
|
|
"name": "convertToAssets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2810,
|
|
"src": "6009:15:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 2921,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6009:33:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2916,
|
|
"id": 2922,
|
|
"nodeType": "Return",
|
|
"src": "6002:40:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "ce96cb77",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "maxWithdraw",
|
|
"nameLocation": "5927:11:4",
|
|
"parameters": {
|
|
"id": 2913,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2912,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "5947:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2924,
|
|
"src": "5939:13:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2911,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5939:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5938:15:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2916,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2915,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2924,
|
|
"src": "5983:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2914,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5983:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5982:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2936,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "6055:112:4",
|
|
"body": {
|
|
"id": 2935,
|
|
"nodeType": "Block",
|
|
"src": "6127:40:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 2931,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 31051,
|
|
"src": "6144:9:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 2933,
|
|
"indexExpression": {
|
|
"id": 2932,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2926,
|
|
"src": "6154:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6144:16:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2930,
|
|
"id": 2934,
|
|
"nodeType": "Return",
|
|
"src": "6137:23:4"
|
|
}
|
|
]
|
|
},
|
|
"functionSelector": "d905777e",
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "maxRedeem",
|
|
"nameLocation": "6064:9:4",
|
|
"parameters": {
|
|
"id": 2927,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2926,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "6082:5:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2936,
|
|
"src": "6074:13:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2925,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6074:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6073:15:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2930,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2929,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2936,
|
|
"src": "6118:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2928,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6118:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6117:9:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 2944,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "6359:75:4",
|
|
"body": {
|
|
"id": 2943,
|
|
"nodeType": "Block",
|
|
"src": "6432:2:4",
|
|
"statements": []
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "beforeWithdraw",
|
|
"nameLocation": "6368:14:4",
|
|
"parameters": {
|
|
"id": 2941,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2938,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "6391:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2944,
|
|
"src": "6383:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2937,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6383:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2940,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "6407:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2944,
|
|
"src": "6399:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2939,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6399:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6382:32:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2942,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6432:0:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 2952,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "6440:73:4",
|
|
"body": {
|
|
"id": 2951,
|
|
"nodeType": "Block",
|
|
"src": "6511:2:4",
|
|
"statements": []
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "afterDeposit",
|
|
"nameLocation": "6449:12:4",
|
|
"parameters": {
|
|
"id": 2949,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2946,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "6470:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2952,
|
|
"src": "6462:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2945,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6462:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2948,
|
|
"mutability": "mutable",
|
|
"name": "shares",
|
|
"nameLocation": "6486:6:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2952,
|
|
"src": "6478:14:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2947,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6478:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6461:32:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2950,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6511:0:4"
|
|
},
|
|
"scope": 2953,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 2442,
|
|
"name": "ERC20",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 31408,
|
|
"src": "424:5:4"
|
|
},
|
|
"id": 2443,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "424:5:4"
|
|
}
|
|
],
|
|
"canonicalName": "ERC4626",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 2441,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "240:155:4",
|
|
"text": "@notice Minimal ERC4626 tokenized Vault implementation.\n @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)"
|
|
},
|
|
"fullyImplemented": false,
|
|
"linearizedBaseContracts": [
|
|
2953,
|
|
31408
|
|
],
|
|
"name": "ERC4626",
|
|
"nameLocation": "413:7:4",
|
|
"scope": 2954,
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"license": "AGPL-3.0-only"
|
|
}
|