diff --git a/cache/solidity-files-cache.json b/cache/solidity-files-cache.json new file mode 100644 index 0000000..2e9224b --- /dev/null +++ b/cache/solidity-files-cache.json @@ -0,0 +1,197 @@ +{ + "_format": "ethers-rs-sol-cache-3", + "paths": { + "artifacts": "out", + "sources": "src", + "tests": "test", + "libraries": [ + "lib" + ] + }, + "files": { + "F:\\Git\\yvarb\\lib\\ds-test\\src/test.sol": { + "lastModificationDate": 1650365129624, + "contentHash": "2c9806925f5d78ba4f4fb0570611cca3", + "sourceName": "lib\\ds-test\\src/test.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs" + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ] + } + }, + "evmVersion": "london" + } + }, + "imports": [], + "versionRequirement": ">=0.5.0", + "artifacts": { + "DSTest": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "test.sol\\DSTest.json" + } + } + }, + "F:\\Git\\yvarb\\src\\YieldLever.sol": { + "lastModificationDate": 1650373944406, + "contentHash": "50fa26e3effb92bcb0894fd72797e8f2", + "sourceName": "src\\YieldLever.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs" + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ] + } + }, + "evmVersion": "london" + } + }, + "imports": [], + "versionRequirement": "^0.8.13", + "artifacts": { + "Cauldron": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\Cauldron.json" + }, + "IERC20": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\IERC20.json" + }, + "IFYToken": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\IFYToken.json" + }, + "IToken": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\IToken.json" + }, + "YieldLadle": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\YieldLadle.json" + }, + "YieldLever": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\YieldLever.json" + }, + "yVault": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.sol\\yVault.json" + } + } + }, + "F:\\Git\\yvarb\\test\\Interfaces.sol": { + "lastModificationDate": 1645212081681, + "contentHash": "3dfdd07ce11cc0f3f5811c96038216b0", + "sourceName": "test\\Interfaces.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs" + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ] + } + }, + "evmVersion": "london" + } + }, + "imports": [], + "versionRequirement": "^0.8.0", + "artifacts": { + "IUniswapV2Router02": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "Interfaces.sol\\IUniswapV2Router02.json" + } + } + }, + "F:\\Git\\yvarb\\test\\YieldLever.t.sol": { + "lastModificationDate": 1650374139987, + "contentHash": "3d1fb30be8bb8cd0cc1888e7d1b38376", + "sourceName": "test\\YieldLever.t.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs" + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers" + ] + } + }, + "evmVersion": "london" + } + }, + "imports": [ + "lib\\ds-test\\src/test.sol", + "src\\YieldLever.sol" + ], + "versionRequirement": "^0.8.13", + "artifacts": { + "AccessControl": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\AccessControl.json" + }, + "CheatCodes": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\CheatCodes.json" + }, + "HelperContract": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\HelperContract.json" + }, + "IUniswapV2Router02": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\IUniswapV2Router02.json" + }, + "Pool": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\Pool.json" + }, + "YieldLeverTest": { + "0.8.13+commit.abaa5c0e.Windows.msvc": "YieldLever.t.sol\\YieldLeverTest.json" + } + } + } + } +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml new file mode 100644 index 0000000..09bb4ba --- /dev/null +++ b/foundry.toml @@ -0,0 +1,5 @@ +[default] +src = 'src' +out = 'out' + +# See more config options https://github.com/gakonst/foundry/tree/master/config \ No newline at end of file diff --git a/out/Interfaces.sol/IUniswapV2Router02.json b/out/Interfaces.sol/IUniswapV2Router02.json new file mode 100644 index 0000000..d592576 --- /dev/null +++ b/out/Interfaces.sol/IUniswapV2Router02.json @@ -0,0 +1,498 @@ +{ + "abi": [ + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsIn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\Interfaces.sol", + "exportedSymbols": { + "IUniswapV2Router02": [ + 2503 + ] + }, + "id": 2504, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2471, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2503, + "linearizedBaseContracts": [ + 2503 + ], + "name": "IUniswapV2Router02", + "nameLocation": "37:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2476, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "72:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2472, + "nodeType": "ParameterList", + "parameters": [], + "src": "76:2:4" + }, + "returnParameters": { + "id": 2475, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2474, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2476, + "src": "102:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2473, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "101:9:4" + }, + "scope": 2503, + "src": "63:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2491, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "126:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2478, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "153:9:4", + "nodeType": "VariableDeclaration", + "scope": 2491, + "src": "148:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2477, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "148:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "path", + "nameLocation": "183:4:4", + "nodeType": "VariableDeclaration", + "scope": 2491, + "src": "164:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "164:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2480, + "nodeType": "ArrayTypeName", + "src": "164:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2483, + "mutability": "mutable", + "name": "to", + "nameLocation": "197:2:4", + "nodeType": "VariableDeclaration", + "scope": 2491, + "src": "189:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "189:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2485, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "206:8:4", + "nodeType": "VariableDeclaration", + "scope": 2491, + "src": "201:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "201:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "147:68:4" + }, + "returnParameters": { + "id": 2490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2489, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "283:7:4", + "nodeType": "VariableDeclaration", + "scope": 2491, + "src": "269:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2487, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "269:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2488, + "nodeType": "ArrayTypeName", + "src": "269:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "268:23:4" + }, + "scope": 2503, + "src": "117:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2502, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "307:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2497, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2493, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "325:9:4", + "nodeType": "VariableDeclaration", + "scope": 2502, + "src": "320:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "320:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2496, + "mutability": "mutable", + "name": "path", + "nameLocation": "355:4:4", + "nodeType": "VariableDeclaration", + "scope": 2502, + "src": "336:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "336:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2495, + "nodeType": "ArrayTypeName", + "src": "336:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "319:41:4" + }, + "returnParameters": { + "id": 2501, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2500, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "398:7:4", + "nodeType": "VariableDeclaration", + "scope": 2502, + "src": "384:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2498, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "384:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2499, + "nodeType": "ArrayTypeName", + "src": "384:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "383:23:4" + }, + "scope": 2503, + "src": "298:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2504, + "src": "27:383:4", + "usedErrors": [] + } + ], + "src": "0:412:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/Cauldron.json b/out/YieldLever.sol/Cauldron.json new file mode 100644 index 0000000..962bee9 --- /dev/null +++ b/out/YieldLever.sol/Cauldron.json @@ -0,0 +1,9574 @@ +{ + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "VaultGiven", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + } + ], + "name": "balances", + "outputs": [ + { + "components": [ + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "ink", + "type": "uint128" + } + ], + "internalType": "struct Balances", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes6", + "name": "baseId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + } + ], + "name": "debt", + "outputs": [ + { + "components": [ + { + "internalType": "uint96", + "name": "max", + "type": "uint96" + }, + { + "internalType": "uint24", + "name": "min", + "type": "uint24" + }, + { + "internalType": "uint8", + "name": "dec", + "type": "uint8" + }, + { + "internalType": "uint128", + "name": "sum", + "type": "uint128" + } + ], + "internalType": "struct Debt", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + } + ], + "name": "debtToBase", + "outputs": [ + { + "internalType": "uint128", + "name": "base", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "give", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + } + ], + "internalType": "struct Vault", + "name": "vault", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + } + ], + "name": "series", + "outputs": [ + { + "components": [ + { + "internalType": "contract IFYToken", + "name": "fyToken", + "type": "address" + }, + { + "internalType": "bytes6", + "name": "baseId", + "type": "bytes6" + }, + { + "internalType": "uint32", + "name": "maturity", + "type": "uint32" + } + ], + "internalType": "struct Series", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + } + ], + "name": "vaults", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + } + ], + "internalType": "struct Vault", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/IERC20.json b/out/YieldLever.sol/IERC20.json new file mode 100644 index 0000000..1cfeaf1 --- /dev/null +++ b/out/YieldLever.sol/IERC20.json @@ -0,0 +1,9487 @@ +{ + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/IFYToken.json b/out/YieldLever.sol/IFYToken.json new file mode 100644 index 0000000..7a0c580 --- /dev/null +++ b/out/YieldLever.sol/IFYToken.json @@ -0,0 +1,9340 @@ +{ + "abi": [], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/IToken.json b/out/YieldLever.sol/IToken.json new file mode 100644 index 0000000..ebbf3fb --- /dev/null +++ b/out/YieldLever.sol/IToken.json @@ -0,0 +1,9393 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashBorrow", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "loanTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/YieldLadle.json b/out/YieldLever.sol/YieldLadle.json new file mode 100644 index 0000000..5542781 --- /dev/null +++ b/out/YieldLever.sol/YieldLadle.json @@ -0,0 +1,9593 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + }, + { + "internalType": "uint8", + "name": "salt", + "type": "uint8" + } + ], + "name": "build", + "outputs": [ + { + "internalType": "bytes12", + "name": "", + "type": "bytes12" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + } + ], + "internalType": "struct Vault", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId_", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "int128", + "name": "ink", + "type": "int128" + }, + { + "internalType": "int128", + "name": "art", + "type": "int128" + } + ], + "name": "close", + "outputs": [ + { + "internalType": "uint128", + "name": "base", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId_", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "give", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + }, + { + "internalType": "bytes6", + "name": "ilkId", + "type": "bytes6" + } + ], + "internalType": "struct Vault", + "name": "vault", + "type": "tuple" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + } + ], + "name": "pools", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId_", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "int128", + "name": "ink", + "type": "int128" + }, + { + "internalType": "uint128", + "name": "min", + "type": "uint128" + } + ], + "name": "repay", + "outputs": [ + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId_", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "int128", + "name": "ink", + "type": "int128" + }, + { + "internalType": "uint128", + "name": "max", + "type": "uint128" + } + ], + "name": "repayVault", + "outputs": [ + { + "internalType": "uint128", + "name": "base", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId_", + "type": "bytes12" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint128", + "name": "ink", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "base", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "max", + "type": "uint128" + } + ], + "name": "serve", + "outputs": [ + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/YieldLever.json b/out/YieldLever.sol/YieldLever.json new file mode 100644 index 0000000..d823086 --- /dev/null +++ b/out/YieldLever.sol/YieldLever.json @@ -0,0 +1,9507 @@ +{ + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + }, + { + "internalType": "uint128", + "name": "base", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "ink", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + } + ], + "name": "doClose", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "investAmount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "borrowAmount", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "maxFyAmount", + "type": "uint128" + }, + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + } + ], + "name": "doInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "ink", + "type": "uint128" + } + ], + "name": "doRepay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseAmount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "borrowAmount", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "maxFyAmount", + "type": "uint128" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + } + ], + "name": "invest", + "outputs": [ + { + "internalType": "bytes12", + "name": "", + "type": "bytes12" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes12", + "name": "vaultId", + "type": "bytes12" + }, + { + "internalType": "uint256", + "name": "maxAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint128", + "name": "ink", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "art", + "type": "uint128" + }, + { + "internalType": "bytes6", + "name": "seriesId", + "type": "bytes6" + } + ], + "name": "unwind", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x608060405234801561001057600080fd5b5060405163095ea7b360e01b815273a354f35829ae975e850e23e9615b11da1b3dc4de6004820152600019602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063095ea7b3906044016020604051808303816000875af115801561007e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a291906100a8565b506100d1565b6000602082840312156100ba57600080fd5b815180151581146100ca57600080fd5b9392505050565b6115d2806100e06000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806347b348451461005c57806350bf94d7146100715780636e6bf1f414610084578063d238b43314610097578063fcd064cf146100aa575b600080fd5b61006f61006a366004610fce565b6100da565b005b61006f61007f366004611036565b610230565b61006f61009236600461107e565b6104e5565b61006f6100a5366004611105565b61079d565b6100bd6100b836600461117e565b610c5d565b6040516001600160a01b0319909116815260200160405180910390f35b604051636e553f6560e01b81526004810185905273403ae7384e89b086ea2935d5fafed07465242b38602482015260009073a354f35829ae975e850e23e9615b11da1b3dc4de90636e553f65906044016020604051808303816000875af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d91906111c6565b6040516315bf1a8f60e31b81526001600160a01b0319841660048201527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560248201526001600160801b038083166044830152808716606483015285166084820152909150736cb18ff2a33e981d1e38a663ca056c0a5265066a9063adf8d4789060a4016020604051808303816000875af1158015610204573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906111df565b505050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a6324bd54b4843061025585611219565b6040516001600160e01b031960e086901b1681526001600160a01b031990931660048401526001600160a01b039091166024830152600f0b60448201526001600160801b03851660648201526084016020604051808303816000875af11580156102c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e791906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561033c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036091906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526024810183905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af11580156103cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f19190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90869083906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611248565b5050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a63441c70f7853061050a86611219565b61051386611219565b6040516001600160e01b031960e087901b1681526001600160a01b031990941660048501526001600160a01b039092166024840152600f90810b60448401520b60648201526084016020604051808303816000875af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526001600160801b038416602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af115801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90879083906370a0823190602401602060405180830381865afa15801561070a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072e91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610779573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102289190611248565b604051631e81f82960e01b81526001600160a01b03198716600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f82990602401606060405180830381865afa1580156107f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081d91906112f8565b6040516315740f8d60e21b81526001600160d01b03198416600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190611314565b82519091506001600160a01b031633146108b957600080fd5b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b906108f2908b90309060040161138f565b6060604051808303816000875af1158015610911573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093591906112f8565b50806040015163ffffffff164263ffffffff161015610a3b576040513360248201526001600160a01b031989166044820152606481018890526001600160801b03861660848201527332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9089908990309060a40160408051601f198184030181529181526020820180516001600160e01b03166350bf94d760e01b1790525160e086901b6001600160e01b03191681526109ee949392919060040161140e565b6000604051808303816000875af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a359190810190611458565b50610bd6565b60405163550b025360e01b81526001600160d01b0319841660048201526001600160801b038516602482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca8679063550b0253906044016020604051808303816000875af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906111df565b6040513360248201526001600160a01b03198b1660448201526001600160801b0380831660648301528089166084830152871660a48201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d908390730d9a1a773be5a83eebda23bf98efb8585c3ae4f490309060c40160408051601f198184030181529181526020820180516001600160e01b0316631b9afc7d60e21b1790525160e086901b6001600160e01b0319168152610b8c9493929190600401611505565b6000604051808303816000875af1158015610bab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd39190810190611458565b50505b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610c0f908b90339060040161138f565b6060604051808303816000875af1158015610c2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5291906112f8565b505050505050505050565b6040516315740f8d60e21b81526001600160d01b03198216600482015260009061181960f11b9073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce49190611314565b602001516001600160d01b03191614610cfc57600080fd5b6040516323b872dd60e01b81523360048201523060248201526044810186905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd906064016020604051808303816000875af1158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611248565b50604051636d4756d760e01b81526001600160d01b03198316600482015261303960f01b602482015260006044820181905290736cb18ff2a33e981d1e38a663ca056c0a5265066a90636d4756d7906064016080604051808303816000875af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e13919061154e565b5090506000610e2b6001600160801b03871688611584565b604051602481018290526001600160801b038089166044830152871660648201526001600160a01b0319841660848201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9088903090819060a40160408051601f198184030181529181526020820180516001600160e01b03166347b3484560e01b1790525160e086901b6001600160e01b0319168152610ed09493929190600401611505565b6000604051808303816000875af1158015610eef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f179190810190611458565b5060405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610f51908590339060040161138f565b6060604051808303816000875af1158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906112f8565b50909695505050505050565b6001600160801b0381168114610fb557600080fd5b50565b6001600160a01b031981168114610fb557600080fd5b60008060008060808587031215610fe457600080fd5b843593506020850135610ff681610fa0565b9250604085013561100681610fa0565b9150606085013561101681610fb8565b939692955090935050565b6001600160a01b0381168114610fb557600080fd5b6000806000806080858703121561104c57600080fd5b843561105781611021565b9350602085013561106781610fb8565b925060408501359150606085013561101681610fa0565b600080600080600060a0868803121561109657600080fd5b85356110a181611021565b945060208601356110b181610fb8565b935060408601356110c181610fa0565b925060608601356110d181610fa0565b915060808601356110e181610fa0565b809150509295509295909350565b6001600160d01b031981168114610fb557600080fd5b60008060008060008060c0878903121561111e57600080fd5b863561112981610fb8565b955060208701359450604087013561114081611021565b9350606087013561115081610fa0565b9250608087013561116081610fa0565b915060a0870135611170816110ef565b809150509295509295509295565b6000806000806080858703121561119457600080fd5b8435935060208501356111a681610fa0565b925060408501356111b681610fa0565b91506060850135611016816110ef565b6000602082840312156111d857600080fd5b5051919050565b6000602082840312156111f157600080fd5b81516111fc81610fa0565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19810361123f5761123f611203565b60000392915050565b60006020828403121561125a57600080fd5b815180151581146111fc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006060828403121561129257600080fd5b6040516060810181811067ffffffffffffffff821117156112b5576112b561126a565b806040525080915082516112c881611021565b815260208301516112d8816110ef565b602082015260408301516112eb816110ef565b6040919091015292915050565b60006060828403121561130a57600080fd5b6111fc8383611280565b60006060828403121561132657600080fd5b6040516060810181811067ffffffffffffffff821117156113495761134961126a565b604052825161135781611021565b81526020830151611367816110ef565b6020820152604083015163ffffffff8116811461138357600080fd5b60408201529392505050565b6001600160a01b03199290921682526001600160a01b0316602082015260400190565b60005b838110156113cd5781810151838201526020016113b5565b838111156113dc576000848401525b50505050565b600081518084526113fa8160208601602086016113b2565b601f01601f19169290920160200192915050565b8481526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b9695505050505050565b60006020828403121561146a57600080fd5b815167ffffffffffffffff8082111561148257600080fd5b818401915084601f83011261149657600080fd5b8151818111156114a8576114a861126a565b604051601f8201601f19908116603f011681019083821181831017156114d0576114d061126a565b816040528281528760208487010111156114e957600080fd5b6114fa8360208301602088016113b2565b979650505050505050565b6001600160801b03851681526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b6000806080838503121561156157600080fd5b825161156c81610fb8565b915061157b8460208501611280565b90509250929050565b6000821982111561159757611597611203565b50019056fea2646970667358221220ce5d293465800b1f6e33d4a91f7e346be2fba87d44ac0f450ea8badf266705b064736f6c634300080d0033", + "sourceMap": "3880:7984:3:-:0;;;4662:75;;;;;;;;;-1:-1:-1;4683:48:3;;-1:-1:-1;;;4683:48:3;;3937:42;4683:48;;;188:51:5;-1:-1:-1;;255:18:5;;;248:34;4160:42:3;;4683:12;;161:18:5;;4683:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3880:7984;;293:277:5;360:6;413:2;401:9;392:7;388:23;384:32;381:52;;;429:1;426;419:12;381:52;461:9;455:16;514:5;507:13;500:21;493:5;490:32;480:60;;536:1;533;526:12;480:60;559:5;293:277;-1:-1:-1;;;293:277:5:o;:::-;3880:7984:3;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806347b348451461005c57806350bf94d7146100715780636e6bf1f414610084578063d238b43314610097578063fcd064cf146100aa575b600080fd5b61006f61006a366004610fce565b6100da565b005b61006f61007f366004611036565b610230565b61006f61009236600461107e565b6104e5565b61006f6100a5366004611105565b61079d565b6100bd6100b836600461117e565b610c5d565b6040516001600160a01b0319909116815260200160405180910390f35b604051636e553f6560e01b81526004810185905273403ae7384e89b086ea2935d5fafed07465242b38602482015260009073a354f35829ae975e850e23e9615b11da1b3dc4de90636e553f65906044016020604051808303816000875af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d91906111c6565b6040516315bf1a8f60e31b81526001600160a01b0319841660048201527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560248201526001600160801b038083166044830152808716606483015285166084820152909150736cb18ff2a33e981d1e38a663ca056c0a5265066a9063adf8d4789060a4016020604051808303816000875af1158015610204573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906111df565b505050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a6324bd54b4843061025585611219565b6040516001600160e01b031960e086901b1681526001600160a01b031990931660048401526001600160a01b039091166024830152600f0b60448201526001600160801b03851660648201526084016020604051808303816000875af11580156102c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e791906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561033c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036091906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526024810183905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af11580156103cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f19190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90869083906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611248565b5050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a63441c70f7853061050a86611219565b61051386611219565b6040516001600160e01b031960e087901b1681526001600160a01b031990941660048501526001600160a01b039092166024840152600f90810b60448401520b60648201526084016020604051808303816000875af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526001600160801b038416602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af115801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90879083906370a0823190602401602060405180830381865afa15801561070a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072e91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610779573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102289190611248565b604051631e81f82960e01b81526001600160a01b03198716600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f82990602401606060405180830381865afa1580156107f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081d91906112f8565b6040516315740f8d60e21b81526001600160d01b03198416600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190611314565b82519091506001600160a01b031633146108b957600080fd5b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b906108f2908b90309060040161138f565b6060604051808303816000875af1158015610911573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093591906112f8565b50806040015163ffffffff164263ffffffff161015610a3b576040513360248201526001600160a01b031989166044820152606481018890526001600160801b03861660848201527332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9089908990309060a40160408051601f198184030181529181526020820180516001600160e01b03166350bf94d760e01b1790525160e086901b6001600160e01b03191681526109ee949392919060040161140e565b6000604051808303816000875af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a359190810190611458565b50610bd6565b60405163550b025360e01b81526001600160d01b0319841660048201526001600160801b038516602482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca8679063550b0253906044016020604051808303816000875af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906111df565b6040513360248201526001600160a01b03198b1660448201526001600160801b0380831660648301528089166084830152871660a48201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d908390730d9a1a773be5a83eebda23bf98efb8585c3ae4f490309060c40160408051601f198184030181529181526020820180516001600160e01b0316631b9afc7d60e21b1790525160e086901b6001600160e01b0319168152610b8c9493929190600401611505565b6000604051808303816000875af1158015610bab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd39190810190611458565b50505b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610c0f908b90339060040161138f565b6060604051808303816000875af1158015610c2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5291906112f8565b505050505050505050565b6040516315740f8d60e21b81526001600160d01b03198216600482015260009061181960f11b9073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce49190611314565b602001516001600160d01b03191614610cfc57600080fd5b6040516323b872dd60e01b81523360048201523060248201526044810186905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd906064016020604051808303816000875af1158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611248565b50604051636d4756d760e01b81526001600160d01b03198316600482015261303960f01b602482015260006044820181905290736cb18ff2a33e981d1e38a663ca056c0a5265066a90636d4756d7906064016080604051808303816000875af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e13919061154e565b5090506000610e2b6001600160801b03871688611584565b604051602481018290526001600160801b038089166044830152871660648201526001600160a01b0319841660848201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9088903090819060a40160408051601f198184030181529181526020820180516001600160e01b03166347b3484560e01b1790525160e086901b6001600160e01b0319168152610ed09493929190600401611505565b6000604051808303816000875af1158015610eef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f179190810190611458565b5060405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610f51908590339060040161138f565b6060604051808303816000875af1158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906112f8565b50909695505050505050565b6001600160801b0381168114610fb557600080fd5b50565b6001600160a01b031981168114610fb557600080fd5b60008060008060808587031215610fe457600080fd5b843593506020850135610ff681610fa0565b9250604085013561100681610fa0565b9150606085013561101681610fb8565b939692955090935050565b6001600160a01b0381168114610fb557600080fd5b6000806000806080858703121561104c57600080fd5b843561105781611021565b9350602085013561106781610fb8565b925060408501359150606085013561101681610fa0565b600080600080600060a0868803121561109657600080fd5b85356110a181611021565b945060208601356110b181610fb8565b935060408601356110c181610fa0565b925060608601356110d181610fa0565b915060808601356110e181610fa0565b809150509295509295909350565b6001600160d01b031981168114610fb557600080fd5b60008060008060008060c0878903121561111e57600080fd5b863561112981610fb8565b955060208701359450604087013561114081611021565b9350606087013561115081610fa0565b9250608087013561116081610fa0565b915060a0870135611170816110ef565b809150509295509295509295565b6000806000806080858703121561119457600080fd5b8435935060208501356111a681610fa0565b925060408501356111b681610fa0565b91506060850135611016816110ef565b6000602082840312156111d857600080fd5b5051919050565b6000602082840312156111f157600080fd5b81516111fc81610fa0565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19810361123f5761123f611203565b60000392915050565b60006020828403121561125a57600080fd5b815180151581146111fc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006060828403121561129257600080fd5b6040516060810181811067ffffffffffffffff821117156112b5576112b561126a565b806040525080915082516112c881611021565b815260208301516112d8816110ef565b602082015260408301516112eb816110ef565b6040919091015292915050565b60006060828403121561130a57600080fd5b6111fc8383611280565b60006060828403121561132657600080fd5b6040516060810181811067ffffffffffffffff821117156113495761134961126a565b604052825161135781611021565b81526020830151611367816110ef565b6020820152604083015163ffffffff8116811461138357600080fd5b60408201529392505050565b6001600160a01b03199290921682526001600160a01b0316602082015260400190565b60005b838110156113cd5781810151838201526020016113b5565b838111156113dc576000848401525b50505050565b600081518084526113fa8160208601602086016113b2565b601f01601f19169290920160200192915050565b8481526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b9695505050505050565b60006020828403121561146a57600080fd5b815167ffffffffffffffff8082111561148257600080fd5b818401915084601f83011261149657600080fd5b8151818111156114a8576114a861126a565b604051601f8201601f19908116603f011681019083821181831017156114d0576114d061126a565b816040528281528760208487010111156114e957600080fd5b6114fa8360208301602088016113b2565b979650505050505050565b6001600160801b03851681526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b6000806080838503121561156157600080fd5b825161156c81610fb8565b915061157b8460208501611280565b90509250929050565b6000821982111561159757611597611203565b50019056fea2646970667358221220ce5d293465800b1f6e33d4a91f7e346be2fba87d44ac0f450ea8badf266705b064736f6c634300080d0033", + "sourceMap": "3880:7984:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7176:616;;;;;;:::i;:::-;;:::i;:::-;;10457:459;;;;;;:::i;:::-;;:::i;11448:413::-;;;;;;:::i;:::-;;:::i;8498:1376::-;;;;;;:::i;:::-;;:::i;5574:1142::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;;4268:49:5;;;4250:68;;4238:2;4223:18;5574:1142:3;;;;;;;7176:616;7509:40;;-1:-1:-1;;;7509:40:3;;;;;4503:25:5;;;4417:42:3;4544:18:5;;;4537:60;7477:21:3;;3937:42;;7509:14;;4476:18:5;;7509:40:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7708:78;;-1:-1:-1;;;7708:78:3;;-1:-1:-1;;;;;;5074:49:5;;7708:78:3;;;5056:68:5;4081:42:3;5140:18:5;;;5133:60;-1:-1:-1;;;;;5282:15:5;;;5262:18;;;5255:43;5334:15;;;5314:18;;;5307:43;5387:15;;5366:19;;;5359:44;7477:73:3;;-1:-1:-1;4331:42:3;;7708:11;;5028:19:5;;7708:78:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7310:482;7176:616;;;;:::o;10457:459::-;4331:42;10588:16;10605:7;10622:4;10629:12;10637:3;10629:12;:::i;:::-;10588:77;;-1:-1:-1;;;;;;10588:77:3;;;;;;;-1:-1:-1;;;;;;6267:49:5;;;10588:77:3;;;6249:68:5;-1:-1:-1;;;;;6353:32:5;;;6333:18;;;6326:60;6433:2;6422:22;6402:18;;;6395:50;-1:-1:-1;;;;;6481:47:5;;6461:18;;;6454:75;6221:19;;10588:77:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3937:42;-1:-1:-1;;;;;10703:15:3;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;10756:43:3;;-1:-1:-1;;;10756:43:3;;4081:42;10756:43;;;6714:51:5;6781:18;;;6774:34;;;4160:42:3;;10756:13;;6687:18:5;;10756:43:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;10880:29:3;;-1:-1:-1;;;10880:29:3;;10903:4;10880:29;;;7247:51:5;4160:42:3;;10859:13;;10873:5;;4160:42;;10880:14;;7220:18:5;;10880:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10859:51;;-1:-1:-1;;;;;;10859:51:3;;;;;;;-1:-1:-1;;;;;6732:32:5;;;10859:51:3;;;6714::5;6781:18;;;6774:34;6687:18;;10859:51:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10457:459;;;;:::o;11448:413::-;4331:42;11577:11;11589:7;11606:4;11613:12;11621:3;11613:12;:::i;:::-;11627;11635:3;11627:12;:::i;:::-;11577:63;;-1:-1:-1;;;;;;11577:63:3;;;;;;;-1:-1:-1;;;;;;7554:49:5;;;11577:63:3;;;7536:68:5;-1:-1:-1;;;;;7640:32:5;;;7620:18;;;7613:60;7720:2;7709:22;;;7689:18;;;7682:50;7768:22;7748:18;;;7741:50;7508:19;;11577:63:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3937:42;-1:-1:-1;;;;;11678:15:3;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;11727:35:3;;-1:-1:-1;;;11727:35:3;;4081:42;11727:35;;;7976:51:5;-1:-1:-1;;;;;8063:47:5;;8043:18;;;8036:75;4160:42:3;;11727:13;;7949:18:5;;11727:35:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;11825:29:3;;-1:-1:-1;;;11825:29:3;;11848:4;11825:29;;;7247:51:5;4160:42:3;;11804:13;;11818:5;;4160:42;;11825:14;;7220:18:5;;11825:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11804:51;;-1:-1:-1;;;;;;11804:51:3;;;;;;;-1:-1:-1;;;;;6732:32:5;;;11804:51:3;;;6714::5;6781:18;;;6774:34;6687:18;;11804:51:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;8498:1376::-;8645:24;;-1:-1:-1;;;8645:24:3;;-1:-1:-1;;;;;;4268:49:5;;8645:24:3;;;4250:68:5;8623:19:3;;4503:42;;8645:15;;4223:18:5;;8645:24:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8700:25;;-1:-1:-1;;;8700:25:3;;-1:-1:-1;;;;;;9414:37:5;;8700:25:3;;;9396:56:5;8623:46:3;;-1:-1:-1;8676:21:3;;4503:42;;8700:15;;9369:18:5;;8700:25:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8869:12;;8676:49;;-1:-1:-1;;;;;;8869:26:3;8885:10;8869:26;8861:35;;;;;;8944:37;;-1:-1:-1;;;8944:37:3;;4503:42;;8944:13;;:37;;8958:7;;8975:4;;8944:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;9022:7;:16;;;8996:42;;9003:15;8996:42;;;8992:755;;;9246:104;;9314:10;9246:104;;;10824:51:5;-1:-1:-1;;;;;;10911:49:5;;10891:18;;;10884:77;10977:18;;;10970:34;;;-1:-1:-1;;;;;11040:47:5;;11020:18;;;11013:75;4081:42:3;;9146:17;;9174:9;;9194:4;;9217;;10796:19:5;;9246:104:3;;;-1:-1:-1;;9246:104:3;;;;;;;;;;;;;;-1:-1:-1;;;;;9246:104:3;-1:-1:-1;;;9246:104:3;;;9146:213;;;;;-1:-1:-1;;;;;;9146:213:3;;;;;;;;9246:104;9146:213;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9146:213:3;;;;;;;;;;;;:::i;:::-;;8992:755;;;9476:34;;-1:-1:-1;;;9476:34:3;;-1:-1:-1;;;;;;13376:37:5;;9476:34:3;;;13358:56:5;-1:-1:-1;;;;;13450:47:5;;13430:18;;;13423:75;9461:12:3;;4503:42;;9476:19;;13331:18:5;;9476:34:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9618:112;;9694:10;9618:112;;;13768:51:5;-1:-1:-1;;;;;;13855:49:5;;13835:18;;;13828:77;-1:-1:-1;;;;;13994:15:5;;;13974:18;;;13967:43;14046:15;;;14026:18;;;14019:43;14099:15;;14078:19;;;14071:44;9461:49:3;;-1:-1:-1;4081:42:3;;9519:17;;9461:49;;4244:42;;9589:4;;13740:19:5;;9618:112:3;;;-1:-1:-1;;9618:112:3;;;;;;;;;;;;;;-1:-1:-1;;;;;9618:112:3;-1:-1:-1;;;9618:112:3;;;9519:220;;;;;-1:-1:-1;;;;;;9519:220:3;;;;;;;;9618:112;9519:220;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9519:220:3;;;;;;;;;;;;:::i;:::-;;9373:374;8992:755;9834:34;;-1:-1:-1;;;9834:34:3;;4503:42;;9834:13;;:34;;9848:7;;9857:10;;9834:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;8616:1258;;8498:1376;;;;;;:::o;5574:1142::-;5777:25;;-1:-1:-1;;;5777:25:3;;-1:-1:-1;;;;;;9414:37:5;;5777:25:3;;;9396:56:5;5713:7:3;;-1:-1:-1;;;4585:13:3;4503:42;;5777:15;;9369:18:5;;5777:25:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:32;;;-1:-1:-1;;;;;;5777:42:3;;5769:51;;;;;;6055:56;;-1:-1:-1;;;6055:56:3;;6073:10;6055:56;;;15081:34:5;6093:4:3;15131:18:5;;;15124:43;15183:18;;;15176:34;;;4160:42:3;;6055:17;;15016:18:5;;6055:56:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6168:31:3;;-1:-1:-1;;;6168:31:3;;-1:-1:-1;;;;;;15486:15:5;;6168:31:3;;;15468:34:5;-1:-1:-1;;;15518:18:5;;;15511:43;6147:15:3;15570:18:5;;;15563:45;;;6147:15:3;4331:42;;6168:11;;15398:18:5;;6168:31:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6146:53:3;-1:-1:-1;6208:20:3;6231:25;-1:-1:-1;;;;;6231:25:3;;:10;:25;:::i;:::-;6403:184;;;;;16362:25:5;;;-1:-1:-1;;;;;16476:15:5;;;16456:18;;;16449:43;16528:15;;16508:18;;;16501:43;-1:-1:-1;;;;;;16580:49:5;;16560:18;;;16553:77;6208:48:3;;-1:-1:-1;4081:42:3;;6291:17;;6319:12;;6350:4;;;;16334:19:5;;6403:184:3;;;-1:-1:-1;;6403:184:3;;;;;;;;;;;;;;-1:-1:-1;;;;;6403:184:3;-1:-1:-1;;;6403:184:3;;;6291:303;;;;;-1:-1:-1;;;;;;6291:303:3;;;;;;;;6403:184;6291:303;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6291:303:3;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6653:34:3;;-1:-1:-1;;;6653:34:3;;4503:42;;6653:13;;:34;;6667:7;;6676:10;;6653:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6703:7:3;;5574:1142;-1:-1:-1;;;;;;5574:1142:3:o;14:146:5:-;-1:-1:-1;;;;;93:5:5;89:46;82:5;79:57;69:85;;150:1;147;140:12;69:85;14:146;:::o;165:148::-;-1:-1:-1;;;;;;240:48:5;;230:59;;220:87;;303:1;300;293:12;318:598;404:6;412;420;428;481:3;469:9;460:7;456:23;452:33;449:53;;;498:1;495;488:12;449:53;534:9;521:23;511:33;;594:2;583:9;579:18;566:32;607:31;632:5;607:31;:::i;:::-;657:5;-1:-1:-1;714:2:5;699:18;;686:32;727:33;686:32;727:33;:::i;:::-;779:7;-1:-1:-1;838:2:5;823:18;;810:32;851:33;810:32;851:33;:::i;:::-;318:598;;;;-1:-1:-1;318:598:5;;-1:-1:-1;;318:598:5:o;921:131::-;-1:-1:-1;;;;;996:31:5;;986:42;;976:70;;1042:1;1039;1032:12;1057:598;1143:6;1151;1159;1167;1220:3;1208:9;1199:7;1195:23;1191:33;1188:53;;;1237:1;1234;1227:12;1188:53;1276:9;1263:23;1295:31;1320:5;1295:31;:::i;:::-;1345:5;-1:-1:-1;1402:2:5;1387:18;;1374:32;1415:33;1374:32;1415:33;:::i;:::-;1467:7;-1:-1:-1;1521:2:5;1506:18;;1493:32;;-1:-1:-1;1577:2:5;1562:18;;1549:32;1590:33;1549:32;1590:33;:::i;1660:813::-;1755:6;1763;1771;1779;1787;1840:3;1828:9;1819:7;1815:23;1811:33;1808:53;;;1857:1;1854;1847:12;1808:53;1896:9;1883:23;1915:31;1940:5;1915:31;:::i;:::-;1965:5;-1:-1:-1;2022:2:5;2007:18;;1994:32;2035:33;1994:32;2035:33;:::i;:::-;2087:7;-1:-1:-1;2146:2:5;2131:18;;2118:32;2159:33;2118:32;2159:33;:::i;:::-;2211:7;-1:-1:-1;2270:2:5;2255:18;;2242:32;2283:33;2242:32;2283:33;:::i;:::-;2335:7;-1:-1:-1;2394:3:5;2379:19;;2366:33;2408;2366;2408;:::i;:::-;2460:7;2450:17;;;1660:813;;;;;;;;:::o;2478:135::-;-1:-1:-1;;;;;;2552:36:5;;2542:47;;2532:75;;2603:1;2600;2593:12;2618:880;2721:6;2729;2737;2745;2753;2761;2814:3;2802:9;2793:7;2789:23;2785:33;2782:53;;;2831:1;2828;2821:12;2782:53;2870:9;2857:23;2889:31;2914:5;2889:31;:::i;:::-;2939:5;-1:-1:-1;2991:2:5;2976:18;;2963:32;;-1:-1:-1;3047:2:5;3032:18;;3019:32;3060:33;3019:32;3060:33;:::i;:::-;3112:7;-1:-1:-1;3171:2:5;3156:18;;3143:32;3184:33;3143:32;3184:33;:::i;:::-;3236:7;-1:-1:-1;3295:3:5;3280:19;;3267:33;3309;3267;3309;:::i;:::-;3361:7;-1:-1:-1;3420:3:5;3405:19;;3392:33;3434:32;3392:33;3434:32;:::i;:::-;3485:7;3475:17;;;2618:880;;;;;;;;:::o;3503:596::-;3588:6;3596;3604;3612;3665:3;3653:9;3644:7;3640:23;3636:33;3633:53;;;3682:1;3679;3672:12;3633:53;3718:9;3705:23;3695:33;;3778:2;3767:9;3763:18;3750:32;3791:31;3816:5;3791:31;:::i;:::-;3841:5;-1:-1:-1;3898:2:5;3883:18;;3870:32;3911:33;3870:32;3911:33;:::i;:::-;3963:7;-1:-1:-1;4022:2:5;4007:18;;3994:32;4035;3994;4035;:::i;4608:184::-;4678:6;4731:2;4719:9;4710:7;4706:23;4702:32;4699:52;;;4747:1;4744;4737:12;4699:52;-1:-1:-1;4770:16:5;;4608:184;-1:-1:-1;4608:184:5:o;5414:251::-;5484:6;5537:2;5525:9;5516:7;5512:23;5508:32;5505:52;;;5553:1;5550;5543:12;5505:52;5585:9;5579:16;5604:31;5629:5;5604:31;:::i;:::-;5654:5;5414:251;-1:-1:-1;;;5414:251:5:o;5670:127::-;5731:10;5726:3;5722:20;5719:1;5712:31;5762:4;5759:1;5752:15;5786:4;5783:1;5776:15;5802:213;5837:3;5885:5;5881:2;5870:21;5919:34;5915:39;5906:7;5903:52;5900:78;;5958:18;;:::i;:::-;5998:1;5994:15;;5802:213;-1:-1:-1;;5802:213:5:o;6819:277::-;6886:6;6939:2;6927:9;6918:7;6914:23;6910:32;6907:52;;;6955:1;6952;6945:12;6907:52;6987:9;6981:16;7040:5;7033:13;7026:21;7019:5;7016:32;7006:60;;7062:1;7059;7052:12;8122:127;8183:10;8178:3;8174:20;8171:1;8164:31;8214:4;8211:1;8204:15;8238:4;8235:1;8228:15;8254:743;8317:5;8365:4;8353:9;8348:3;8344:19;8340:30;8337:50;;;8383:1;8380;8373:12;8337:50;8416:2;8410:9;8458:4;8450:6;8446:17;8529:6;8517:10;8514:22;8493:18;8481:10;8478:34;8475:62;8472:88;;;8540:18;;:::i;:::-;8580:10;8576:2;8569:22;;8609:6;8600:15;;8645:9;8639:16;8664:33;8689:7;8664:33;:::i;:::-;8706:23;;8774:2;8759:18;;8753:25;8787:32;8753:25;8787:32;:::i;:::-;8847:2;8835:15;;8828:32;8905:2;8890:18;;8884:25;8918:32;8884:25;8918:32;:::i;:::-;8978:2;8966:15;;;;8959:32;8254:743;;-1:-1:-1;;8254:743:5:o;9002:245::-;9095:6;9148:2;9136:9;9127:7;9123:23;9119:32;9116:52;;;9164:1;9161;9154:12;9116:52;9187:54;9233:7;9222:9;9187:54;:::i;9463:803::-;9557:6;9610:2;9598:9;9589:7;9585:23;9581:32;9578:52;;;9626:1;9623;9616:12;9578:52;9659:2;9653:9;9701:2;9693:6;9689:15;9770:6;9758:10;9755:22;9734:18;9722:10;9719:34;9716:62;9713:88;;;9781:18;;:::i;:::-;9817:2;9810:22;9854:16;;9879:31;9854:16;9879:31;:::i;:::-;9919:21;;9985:2;9970:18;;9964:25;9998:32;9964:25;9998:32;:::i;:::-;10058:2;10046:15;;10039:32;10116:2;10101:18;;10095:25;10164:10;10151:24;;10139:37;;10129:65;;10190:1;10187;10180:12;10129:65;10222:2;10210:15;;10203:32;10214:6;9463:803;-1:-1:-1;;;9463:803:5:o;10271:317::-;-1:-1:-1;;;;;;10463:49:5;;;;10445:68;;-1:-1:-1;;;;;10549:32:5;10544:2;10529:18;;10522:60;10433:2;10418:18;;10271:317::o;11099:258::-;11171:1;11181:113;11195:6;11192:1;11189:13;11181:113;;;11271:11;;;11265:18;11252:11;;;11245:39;11217:2;11210:10;11181:113;;;11312:6;11309:1;11306:13;11303:48;;;11347:1;11338:6;11333:3;11329:16;11322:27;11303:48;;11099:258;;;:::o;11362:257::-;11403:3;11441:5;11435:12;11468:6;11463:3;11456:19;11484:63;11540:6;11533:4;11528:3;11524:14;11517:4;11510:5;11506:16;11484:63;:::i;:::-;11601:2;11580:15;-1:-1:-1;;11576:29:5;11567:39;;;;11608:4;11563:50;;11362:257;-1:-1:-1;;11362:257:5:o;11624:669::-;11938:25;;;-1:-1:-1;;;;;12037:15:5;;;12032:2;12017:18;;12010:43;12089:15;;12084:2;12069:18;;12062:43;11990:3;12136:2;12121:18;;12114:31;;;11919:4;12161:19;;;12154:30;;;12221:3;12215;12200:19;;12193:32;;;12242:45;;12267:19;;12259:6;12242:45;:::i;:::-;12234:53;11624:669;-1:-1:-1;;;;;;11624:669:5:o;12298:883::-;12377:6;12430:2;12418:9;12409:7;12405:23;12401:32;12398:52;;;12446:1;12443;12436:12;12398:52;12479:9;12473:16;12508:18;12549:2;12541:6;12538:14;12535:34;;;12565:1;12562;12555:12;12535:34;12603:6;12592:9;12588:22;12578:32;;12648:7;12641:4;12637:2;12633:13;12629:27;12619:55;;12670:1;12667;12660:12;12619:55;12699:2;12693:9;12721:2;12717;12714:10;12711:36;;;12727:18;;:::i;:::-;12802:2;12796:9;12770:2;12856:13;;-1:-1:-1;;12852:22:5;;;12876:2;12848:31;12844:40;12832:53;;;12900:18;;;12920:22;;;12897:46;12894:72;;;12946:18;;:::i;:::-;12986:10;12982:2;12975:22;13021:2;13013:6;13006:18;13061:7;13056:2;13051;13047;13043:11;13039:20;13036:33;13033:53;;;13082:1;13079;13072:12;13033:53;13095:55;13147:2;13142;13134:6;13130:15;13125:2;13121;13117:11;13095:55;:::i;:::-;13169:6;12298:883;-1:-1:-1;;;;;;;12298:883:5:o;14126:710::-;-1:-1:-1;;;;;14458:47:5;;14440:66;;-1:-1:-1;;;;;14580:15:5;;;14575:2;14560:18;;14553:43;14632:15;;14627:2;14612:18;;14605:43;14533:3;14679:2;14664:18;;14657:31;;;14421:4;14704:19;;;14697:30;;;14764:3;14758;14743:19;;14736:32;;;14785:45;;14810:19;;14802:6;14785:45;:::i;15619:374::-;15721:6;15729;15782:3;15770:9;15761:7;15757:23;15753:33;15750:53;;;15799:1;15796;15789:12;15750:53;15831:9;15825:16;15850:31;15875:5;15850:31;:::i;:::-;15900:5;-1:-1:-1;15924:63:5;15979:7;15974:2;15959:18;;15924:63;:::i;:::-;15914:73;;15619:374;;;;;:::o;15998:128::-;16038:3;16069:1;16065:6;16062:1;16059:13;16056:39;;;16075:18;;:::i;:::-;-1:-1:-1;16111:9:5;;15998:128::o", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.sol/yVault.json b/out/YieldLever.sol/yVault.json new file mode 100644 index 0000000..4e04705 --- /dev/null +++ b/out/YieldLever.sol/yVault.json @@ -0,0 +1,9524 @@ +{ + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\src\\YieldLever.sol", + "exportedSymbols": { + "Balances": [ + 1809 + ], + "Cauldron": [ + 2055 + ], + "Debt": [ + 1818 + ], + "IERC20": [ + 1957 + ], + "IFYToken": [ + 1796 + ], + "IToken": [ + 1995 + ], + "Series": [ + 1804 + ], + "Vault": [ + 1795 + ], + "YieldLadle": [ + 1904 + ], + "YieldLever": [ + 2498 + ], + "yVault": [ + 1974 + ] + }, + "id": 2499, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1788, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "526:24:3" + }, + { + "canonicalName": "Vault", + "id": 1795, + "members": [ + { + "constant": false, + "id": 1790, + "mutability": "mutable", + "name": "owner", + "nameLocation": "582:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "574:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "574:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1792, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "601:8:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "594:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1791, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "594:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "706:5:3", + "nodeType": "VariableDeclaration", + "scope": 1795, + "src": "699:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1793, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "699:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "name": "Vault", + "nameLocation": "561:5:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "554:193:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IFYToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": true, + "id": 1796, + "linearizedBaseContracts": [ + 1796 + ], + "name": "IFYToken", + "nameLocation": "761:8:3", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 2499, + "src": "751:21:3", + "usedErrors": [] + }, + { + "canonicalName": "Series", + "id": 1804, + "members": [ + { + "constant": false, + "id": 1799, + "mutability": "mutable", + "name": "fyToken", + "nameLocation": "806:7:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "797:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + }, + "typeName": { + "id": 1798, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1797, + "name": "IFYToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1796, + "src": "797:8:3" + }, + "referencedDeclaration": 1796, + "src": "797:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFYToken_$1796", + "typeString": "contract IFYToken" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1801, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "863:6:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "856:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1800, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "856:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "maturity", + "nameLocation": "916:8:3", + "nodeType": "VariableDeclaration", + "scope": 1804, + "src": "909:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 1802, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "909:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "name": "Series", + "nameLocation": "783:6:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "776:203:3", + "visibility": "public" + }, + { + "canonicalName": "Balances", + "id": 1809, + "members": [ + { + "constant": false, + "id": 1806, + "mutability": "mutable", + "name": "art", + "nameLocation": "1014:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1006:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1805, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1808, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1047:3:3", + "nodeType": "VariableDeclaration", + "scope": 1809, + "src": "1039:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1807, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1039:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Balances", + "nameLocation": "990:8:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "983:92:3", + "visibility": "public" + }, + { + "canonicalName": "Debt", + "id": 1818, + "members": [ + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "max", + "nameLocation": "1105:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1098:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 1810, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "1098:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1813, + "mutability": "mutable", + "name": "min", + "nameLocation": "1189:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1182:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 1812, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "1182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "dec", + "nameLocation": "1272:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1266:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1814, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1266:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "sum", + "nameLocation": "1338:3:3", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "1330:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1816, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1330:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "name": "Debt", + "nameLocation": "1086:4:3", + "nodeType": "StructDefinition", + "scope": 2499, + "src": "1079:324:3", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLadle", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1904, + "linearizedBaseContracts": [ + 1904 + ], + "name": "YieldLadle", + "nameLocation": "1417:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "bf1025f3", + "id": 1825, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "pools", + "nameLocation": "1442:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1820, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1455:8:3", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1448:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1819, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1448:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "1447:17:3" + }, + "returnParameters": { + "id": 1824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1825, + "src": "1488:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1487:9:3" + }, + "scope": 1904, + "src": "1433:64:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6d4756d7", + "id": 1839, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "build", + "nameLocation": "1510:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1827, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "1523:8:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1516:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1826, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1516:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1829, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "1540:5:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1533:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1828, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "1533:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "salt", + "nameLocation": "1553:4:3", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1547:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1830, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1547:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1515:43:3" + }, + "returnParameters": { + "id": 1838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1834, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1602:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1833, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1602:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1839, + "src": "1611:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1836, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1835, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "1611:5:3" + }, + "referencedDeclaration": 1795, + "src": "1611:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "1601:23:3" + }, + "scope": 1904, + "src": "1501:124:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "adf8d478", + "id": 1854, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "serve", + "nameLocation": "1638:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1850, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1652:8:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1644:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1840, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1644:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "to", + "nameLocation": "1670:2:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1662:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1845, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1682:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1674:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1844, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1674:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "base", + "nameLocation": "1695:4:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1687:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1846, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1687:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1849, + "mutability": "mutable", + "name": "max", + "nameLocation": "1709:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1701:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1848, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1701:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1643:70:3" + }, + "returnParameters": { + "id": 1853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1852, + "mutability": "mutable", + "name": "art", + "nameLocation": "1766:3:3", + "nodeType": "VariableDeclaration", + "scope": 1854, + "src": "1758:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1851, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1758:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1757:13:3" + }, + "scope": 1904, + "src": "1629:142:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "543645ae", + "id": 1867, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repay", + "nameLocation": "1784:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1856, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1798:8:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1790:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1855, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1790:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1858, + "mutability": "mutable", + "name": "to", + "nameLocation": "1816:2:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1808:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1808:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1860, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1827:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1820:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1859, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1820:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1862, + "mutability": "mutable", + "name": "min", + "nameLocation": "1840:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1832:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1861, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1789:55:3" + }, + "returnParameters": { + "id": 1866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "art", + "nameLocation": "1897:3:3", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "1889:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1864, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1889:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1888:13:3" + }, + "scope": 1904, + "src": "1775:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "24bd54b4", + "id": 1880, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "repayVault", + "nameLocation": "1915:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1869, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "1934:8:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1926:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1868, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "1926:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "to", + "nameLocation": "1952:2:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1944:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1944:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1873, + "mutability": "mutable", + "name": "ink", + "nameLocation": "1963:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1956:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1872, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "1956:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "max", + "nameLocation": "1976:3:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "1968:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1874, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1968:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1925:55:3" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "mutability": "mutable", + "name": "base", + "nameLocation": "2033:4:3", + "nodeType": "VariableDeclaration", + "scope": 1880, + "src": "2025:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1877, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2025:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2024:14:3" + }, + "scope": 1904, + "src": "1906:133:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "441c70f7", + "id": 1893, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "close", + "nameLocation": "2052:5:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1882, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2066:8:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2058:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1881, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2058:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1884, + "mutability": "mutable", + "name": "to", + "nameLocation": "2084:2:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2076:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2076:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1886, + "mutability": "mutable", + "name": "ink", + "nameLocation": "2095:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2088:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1885, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2088:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1888, + "mutability": "mutable", + "name": "art", + "nameLocation": "2107:3:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2100:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 1887, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "2100:6:3", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "2057:54:3" + }, + "returnParameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "base", + "nameLocation": "2164:4:3", + "nodeType": "VariableDeclaration", + "scope": 1893, + "src": "2156:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 1890, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2156:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "2155:14:3" + }, + "scope": 1904, + "src": "2043:127:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 1903, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "2183:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1895, + "mutability": "mutable", + "name": "vaultId_", + "nameLocation": "2196:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2188:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 1894, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "2188:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2214:8:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2206:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2187:36:3" + }, + "returnParameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "vault", + "nameLocation": "2280:5:3", + "nodeType": "VariableDeclaration", + "scope": 1903, + "src": "2267:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "2267:5:3" + }, + "referencedDeclaration": 1795, + "src": "2267:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "2266:20:3" + }, + "scope": 1904, + "src": "2174:113:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "1407:883:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1957, + "linearizedBaseContracts": [ + 1957 + ], + "name": "IERC20", + "nameLocation": "2304:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 1912, + "name": "Approval", + "nameLocation": "2324:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1906, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2349:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2333:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1905, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2333:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1908, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2372:7:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2356:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1910, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2386:5:3", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2381:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1909, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2332:60:3" + }, + "src": "2318:75:3" + }, + { + "anonymous": false, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 1920, + "name": "Transfer", + "nameLocation": "2405:8:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 1919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1914, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "2430:4:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2414:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1916, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2452:2:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2436:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2436:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1918, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "2461:5:3", + "nodeType": "VariableDeclaration", + "scope": 1920, + "src": "2456:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2456:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2413:54:3" + }, + "src": "2399:69:3" + }, + { + "functionSelector": "70a08231", + "id": 1927, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "2485:9:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2503:5:3", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2495:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2495:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2494:15:3" + }, + "returnParameters": { + "id": 1926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1927, + "src": "2533:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2533:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2532:6:3" + }, + "scope": 1957, + "src": "2476:63:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 1936, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2558:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1929, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2574:7:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2566:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "value", + "nameLocation": "2588:5:3", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2583:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2583:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2565:29:3" + }, + "returnParameters": { + "id": 1935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1936, + "src": "2613:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2613:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2612:6:3" + }, + "scope": 1957, + "src": "2549:70:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a9059cbb", + "id": 1945, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "2634:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1938, + "mutability": "mutable", + "name": "to", + "nameLocation": "2651:2:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2643:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1937, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2643:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1940, + "mutability": "mutable", + "name": "value", + "nameLocation": "2660:5:3", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2655:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1939, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2655:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2642:24:3" + }, + "returnParameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2685:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1942, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2685:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2684:6:3" + }, + "scope": 1957, + "src": "2625:66:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 1956, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2706:12:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1947, + "mutability": "mutable", + "name": "from", + "nameLocation": "2727:4:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2719:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2719:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1949, + "mutability": "mutable", + "name": "to", + "nameLocation": "2741:2:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2733:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1951, + "mutability": "mutable", + "name": "value", + "nameLocation": "2750:5:3", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2745:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1950, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2745:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2718:38:3" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "2775:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2774:6:3" + }, + "scope": 1957, + "src": "2697:84:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2294:490:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1958, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "2808:6:3" + }, + "id": 1959, + "nodeType": "InheritanceSpecifier", + "src": "2808:6:3" + } + ], + "canonicalName": "yVault", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1974, + "linearizedBaseContracts": [ + 1974, + 1957 + ], + "name": "yVault", + "nameLocation": "2798:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "6e553f65", + "id": 1968, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nameLocation": "2829:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1961, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2837:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1960, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2837:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "to", + "nameLocation": "2858:2:3", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2850:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2836:25:3" + }, + "returnParameters": { + "id": 1967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1966, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1968, + "src": "2880:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2880:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2879:9:3" + }, + "scope": 1974, + "src": "2820:69:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3ccfd60b", + "id": 1973, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "2902:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2910:2:3" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1973, + "src": "2931:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2931:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2930:6:3" + }, + "scope": 1974, + "src": "2893:44:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2788:152:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IToken", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1995, + "linearizedBaseContracts": [ + 1995 + ], + "name": "IToken", + "nameLocation": "2954:6:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "797bf385", + "id": 1979, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "loanTokenAddress", + "nameLocation": "2977:16:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1975, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:2:3" + }, + "returnParameters": { + "id": 1978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1979, + "src": "3019:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3019:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3018:9:3" + }, + "scope": 1995, + "src": "2968:60:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c5bf0e9d", + "id": 1994, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "flashBorrow", + "nameLocation": "3043:11:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1981, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "3073:12:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3065:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3065:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1983, + "mutability": "mutable", + "name": "borrower", + "nameLocation": "3104:8:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3096:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3096:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1985, + "mutability": "mutable", + "name": "target", + "nameLocation": "3131:6:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3123:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3123:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3164:9:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3148:25:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1986, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "data", + "nameLocation": "3199:4:3", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3184:19:3", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1988, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3184:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3054:156:3" + }, + "returnParameters": { + "id": 1993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1992, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1994, + "src": "3237:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1991, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3237:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3236:14:3" + }, + "scope": 1995, + "src": "3034:217:3", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "2944:310:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Cauldron", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2055, + "linearizedBaseContracts": [ + 2055 + ], + "name": "Cauldron", + "nameLocation": "3268:8:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "55d03e34", + "id": 2003, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "series", + "nameLocation": "3291:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3305:8:3", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3298:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 1996, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3298:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3297:17:3" + }, + "returnParameters": { + "id": 2002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2001, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2003, + "src": "3338:13:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2000, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1999, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "3338:6:3" + }, + "referencedDeclaration": 1804, + "src": "3338:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "src": "3337:15:3" + }, + "scope": 2055, + "src": "3282:71:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1e81f829", + "id": 2011, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "vaults", + "nameLocation": "3366:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2005, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3381:7:3", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3373:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2004, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3373:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3372:17:3" + }, + "returnParameters": { + "id": 2010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2011, + "src": "3413:12:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2008, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2007, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3413:5:3" + }, + "referencedDeclaration": 1795, + "src": "3413:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3412:14:3" + }, + "scope": 2055, + "src": "3357:70:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "7229280c", + "id": 2019, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balances", + "nameLocation": "3440:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2013, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3457:7:3", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3449:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2012, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "3448:17:3" + }, + "returnParameters": { + "id": 2018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2017, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2019, + "src": "3489:15:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2016, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2015, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1809, + "src": "3489:8:3" + }, + "referencedDeclaration": 1809, + "src": "3489:8:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$1809_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "src": "3488:17:3" + }, + "scope": 2055, + "src": "3431:75:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "9be24c4d", + "id": 2029, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debt", + "nameLocation": "3519:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "baseId", + "nameLocation": "3531:6:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3524:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2020, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3524:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "ilkId", + "nameLocation": "3546:5:3", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3539:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2022, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3539:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "3523:29:3" + }, + "returnParameters": { + "id": 2028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2027, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2029, + "src": "3576:11:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 2026, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2025, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1818, + "src": "3576:4:3" + }, + "referencedDeclaration": 1818, + "src": "3576:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$1818_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "src": "3575:13:3" + }, + "scope": 2055, + "src": "3510:79:3", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "550b0253", + "id": 2038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "debtToBase", + "nameLocation": "3602:10:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2031, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "3620:8:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3613:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2030, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3613:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2033, + "mutability": "mutable", + "name": "art", + "nameLocation": "3638:3:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3630:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2032, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3630:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3612:30:3" + }, + "returnParameters": { + "id": 2037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2036, + "mutability": "mutable", + "name": "base", + "nameLocation": "3687:4:3", + "nodeType": "VariableDeclaration", + "scope": 2038, + "src": "3679:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2035, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3679:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "3678:14:3" + }, + "scope": 2055, + "src": "3593:100:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "798a828b", + "id": 2048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "give", + "nameLocation": "3706:4:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2040, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3719:7:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3711:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2039, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3711:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2042, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3736:8:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3728:16:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2041, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3728:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3710:35:3" + }, + "returnParameters": { + "id": 2047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "vault", + "nameLocation": "3794:5:3", + "nodeType": "VariableDeclaration", + "scope": 2048, + "src": "3781:18:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "3781:5:3" + }, + "referencedDeclaration": 1795, + "src": "3781:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "src": "3780:20:3" + }, + "scope": 2055, + "src": "3697:104:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "eventSelector": "12d0ad6ae14e565fab3ac8b7fff11605af9042db1cb20da586af813a0b47bf26", + "id": 2054, + "name": "VaultGiven", + "nameLocation": "3811:10:3", + "nodeType": "EventDefinition", + "parameters": { + "id": 2053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2050, + "indexed": true, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "3838:7:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3822:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2049, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "3822:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2052, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "3863:8:3", + "nodeType": "VariableDeclaration", + "scope": 2054, + "src": "3847:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3821:51:3" + }, + "src": "3805:68:3" + } + ], + "scope": 2499, + "src": "3258:618:3", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "YieldLever", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2498, + "linearizedBaseContracts": [ + 2498 + ], + "name": "YieldLever", + "nameLocation": "3889:10:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2061, + "mutability": "constant", + "name": "yvUSDC", + "nameLocation": "3921:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3905:75:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + }, + "typeName": { + "id": 2057, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2056, + "name": "yVault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1974, + "src": "3905:6:3" + }, + "referencedDeclaration": 1974, + "src": "3905:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307861333534463335383239416539373565383530653233653936313562313144613142336443344445", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3937:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2058, + "name": "yVault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1974, + "src": "3930:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_yVault_$1974_$", + "typeString": "type(contract yVault)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2067, + "mutability": "constant", + "name": "ilkId", + "nameLocation": "4001:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "3985:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2062, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3985:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "hexValue": "3078333033393030303030303030", + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4016:14:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + } + ], + "id": 2064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4009:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2063, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4009:6:3", + "typeDescriptions": {} + } + }, + "id": 2066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:22:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2073, + "mutability": "constant", + "name": "iUSDC", + "nameLocation": "4066:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4050:74:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + }, + "typeName": { + "id": 2069, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2068, + "name": "IToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1995, + "src": "4050:6:3" + }, + "referencedDeclaration": 1995, + "src": "4050:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307833324534633638423341346138313362373130353935416562413766364237363034416239633135", + "id": 2071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4081:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2070, + "name": "IToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "4074:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IToken_$1995_$", + "typeString": "type(contract IToken)" + } + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4074:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2079, + "mutability": "constant", + "name": "usdc", + "nameLocation": "4146:4:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4130:73:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2074, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1957, + "src": "4130:6:3" + }, + "referencedDeclaration": 1957, + "src": "4130:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4160:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2076, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1957, + "src": "4153:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1957_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4153:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2085, + "mutability": "constant", + "name": "usdcJoin", + "nameLocation": "4225:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4208:79:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4208:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830643941314137373362653561383365456264613233626639386566423835383543336165346634", + "id": 2083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4244:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x0d9A1A773be5a83eEbda23bf98efB8585C3ae4f4" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4236:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4236:7:3", + "typeDescriptions": {} + } + }, + "id": 2084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4236:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2091, + "mutability": "constant", + "name": "ladle", + "nameLocation": "4312:5:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4292:82:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2087, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2086, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1904, + "src": "4292:10:3" + }, + "referencedDeclaration": 1904, + "src": "4292:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4331:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2088, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1904, + "src": "4320:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$1904_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2097, + "mutability": "constant", + "name": "yvUSDCJoin", + "nameLocation": "4396:10:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4379:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4379:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307834303361653733383445383962303836456132393335643566414665643037343635323432423338", + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4417:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x403ae7384E89b086Ea2935d5fAFed07465242B38" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4409:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4409:7:3", + "typeDescriptions": {} + } + }, + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4409:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2103, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "4483:8:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4465:81:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2098, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2055, + "src": "4465:8:3" + }, + "referencedDeclaration": 2055, + "src": "4465:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:42:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2100, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2055, + "src": "4494:8:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$2055_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:52:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2112, + "mutability": "constant", + "name": "usdcId", + "nameLocation": "4569:6:3", + "nodeType": "VariableDeclaration", + "scope": 2498, + "src": "4553:46:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2104, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4553:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "3032", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4593:4:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + }, + "value": "02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c810d4a7471a2c9f9fdc62a2715a1c7f2c7102d52841c11e2cbc662de9cc030e", + "typeString": "literal_string \"02\"" + } + ], + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4585:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2107, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4585:7:3", + "typeDescriptions": {} + } + }, + "id": 2110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4585:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4578:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes6_$", + "typeString": "type(bytes6)" + }, + "typeName": { + "id": 2105, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "4578:6:3", + "typeDescriptions": {} + } + }, + "id": 2111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4578:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2130, + "nodeType": "Block", + "src": "4676:61:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2121, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "4704:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + ], + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:3", + "typeDescriptions": {} + } + }, + "id": 2122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4718:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4718:7:3", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 2123, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4713:4:3", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4713:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4713:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2116, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "4683:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1936, + "src": "4683:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:48:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2129, + "nodeType": "ExpressionStatement", + "src": "4683:48:3" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "4606:52:3", + "text": "@dev YieldLever is not expected to hold any USDC" + }, + "id": 2131, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4673:2:3" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [], + "src": "4676:0:3" + }, + "scope": 2498, + "src": "4662:75:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2215, + "nodeType": "Block", + "src": "5722:994:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "id": 2152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 2148, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "5793:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2146, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "5777:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "5777:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5777:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 1801, + "src": "5777:32:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2151, + "name": "usdcId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "5813:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "src": "5777:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2145, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5769:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "5769:51:3" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6073:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6073:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2162, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6093:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6085:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6085:7:3", + "typeDescriptions": {} + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2164, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6100:10:3", + "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": 2155, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "6055:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1956, + "src": "6055:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6055:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2166, + "nodeType": "ExpressionStatement", + "src": "6055:56:3" + }, + { + "assignments": [ + 2168, + null + ], + "declarations": [ + { + "constant": false, + "id": 2168, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6155:7:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6147:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2167, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6147:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + null + ], + "id": 2175, + "initialValue": { + "arguments": [ + { + "id": 2171, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2140, + "src": "6180:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2172, + "name": "ilkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "6190:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "hexValue": "30", + "id": 2173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:3", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 2169, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "6168:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "build", + "nodeType": "MemberAccess", + "referencedDeclaration": 1839, + "src": "6168:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes6_$_t_bytes6_$_t_uint8_$returns$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes6,bytes6,uint8) payable external returns (bytes12,struct Vault memory)" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6168:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes12_$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "tuple(bytes12,struct Vault memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6146:53:3" + }, + { + "assignments": [ + 2177 + ], + "declarations": [ + { + "constant": false, + "id": 2177, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "6216:12:3", + "nodeType": "VariableDeclaration", + "scope": 2215, + "src": "6208:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6208:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2181, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2178, + "name": "baseAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "6231:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2179, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6244:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6231:25:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:48:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2185, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6319:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2188, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6350:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6342:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6342:7:3", + "typeDescriptions": {} + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6342:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6374:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6366:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6366:7:3", + "typeDescriptions": {} + } + }, + "id": 2193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6366:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6390:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f496e766573742875696e743235362c75696e743132382c75696e743132382c6279746573313229", + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6439:43:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + "value": "doInvest(uint256,uint128,uint128,bytes12)" + }, + { + "id": 2198, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2177, + "src": "6495:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2199, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "6520:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2200, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "6545:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2201, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6569:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_47b34845029d274e25eda635cf8939b29bcf4a4002e0c275b9c8cce466366569", + "typeString": "literal_string \"doInvest(uint256,uint128,uint128,bytes12)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2195, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6403:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "6403:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6403:184:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2182, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "6291:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "6291:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6291:303:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2204, + "nodeType": "ExpressionStatement", + "src": "6291:303:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2208, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6676:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6676:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2205, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "6653:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "6653:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "6653:34:3" + }, + { + "expression": { + "id": 2213, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "6703:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "functionReturnParameters": 2144, + "id": 2214, + "nodeType": "Return", + "src": "6696:14:3" + } + ] + }, + "documentation": { + "id": 2132, + "nodeType": "StructuredDocumentation", + "src": "4743:826:3", + "text": "@notice Invest `baseAmount` and borrow an additional `borrowAmount`.\n Use this to obtain a maximum of `maxFyAmount` to repay the flash loan.\n The end goal is to have a debt of `borrowAmount`, but earn interest on\n the entire collateral, including the borrowed part.\n @param baseAmount - The amount to invest from your own funds.\n @param borrowAmount - The extra amount to borrow. This is immediately\n repaid, so setting this to 3 times baseAmount will incur a debt of 75%\n of the collateral.\n @param maxFyAmount - The maximum amount of fyTokens to sell. Should be\n enough to cover the flash loan.\n @param seriesId - The series Id to invest in. For example, 0x303230360000\n for FYUSDC06LP.\n @return vauldId - The ID of the created vault." + }, + "functionSelector": "fcd064cf", + "id": 2216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invest", + "nameLocation": "5583:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2134, + "mutability": "mutable", + "name": "baseAmount", + "nameLocation": "5604:10:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5596:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5596:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "5629:12:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5621:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2135, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5621:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "5656:11:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5648:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2137, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5648:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2140, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "5681:8:3", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5674:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2139, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "5674:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "5589:105:3" + }, + "returnParameters": { + "id": 2144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2143, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2216, + "src": "5713:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2142, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "5713:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "5712:9:3" + }, + "scope": 2498, + "src": "5574:1142:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2252, + "nodeType": "Block", + "src": "7310:482:3", + "statements": [ + { + "assignments": [ + 2229 + ], + "declarations": [ + { + "constant": false, + "id": 2229, + "mutability": "mutable", + "name": "yvUSDCBalance", + "nameLocation": "7485:13:3", + "nodeType": "VariableDeclaration", + "scope": 2252, + "src": "7477:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2228, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7477:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2238, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2234, + "name": "investAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2219, + "src": "7524:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2235, + "name": "yvUSDCJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2097, + "src": "7538:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2232, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "7509:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 1968, + "src": "7509:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7509:40:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7501:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2230, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7501:7:3", + "typeDescriptions": {} + } + }, + "id": 2237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7501:49:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7477:73:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2242, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "7720:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2245, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "7737:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7729:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7729:7:3", + "typeDescriptions": {} + } + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2247, + "name": "yvUSDCBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2229, + "src": "7745:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2248, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2221, + "src": "7760:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2249, + "name": "maxFyAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2223, + "src": "7774:11:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2239, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "7708:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "serve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1854, + "src": "7708:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_uint128_$_t_uint128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,uint128,uint128,uint128) payable external returns (uint128)" + } + }, + "id": 2250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7708:78:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2251, + "nodeType": "ExpressionStatement", + "src": "7708:78:3" + } + ] + }, + "documentation": { + "id": 2217, + "nodeType": "StructuredDocumentation", + "src": "6722:450:3", + "text": "@notice This function is called inside the flash loan and handles the\n actual investment.\n @param borrowAmount - The amount borrowed using a flash loan.\n @param maxFyAmount - The maximum amount of fyTokens to sell.\n @param vaultId - The vault id to invest in.\n @dev Calling this function outside a flash loan achieves nothing,\n since the contract needs to have assets and own the vault it's borrowing from." + }, + "functionSelector": "47b34845", + "id": 2253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doInvest", + "nameLocation": "7185:8:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "investAmount", + "nameLocation": "7208:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7200:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7200:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2221, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "7235:12:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7227:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2220, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7227:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2223, + "mutability": "mutable", + "name": "maxFyAmount", + "nameLocation": "7262:11:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7254:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2222, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7254:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7288:7:3", + "nodeType": "VariableDeclaration", + "scope": 2253, + "src": "7280:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2224, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7280:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "src": "7193:107:3" + }, + "returnParameters": { + "id": 2227, + "nodeType": "ParameterList", + "parameters": [], + "src": "7310:0:3" + }, + "scope": 2498, + "src": "7176:616:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2373, + "nodeType": "Block", + "src": "8616:1258:3", + "statements": [ + { + "assignments": [ + 2271 + ], + "declarations": [ + { + "constant": false, + "id": 2271, + "mutability": "mutable", + "name": "vault_", + "nameLocation": "8636:6:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8623:19:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2270, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2269, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1795, + "src": "8623:5:3" + }, + "referencedDeclaration": 1795, + "src": "8623:5:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2276, + "initialValue": { + "arguments": [ + { + "id": 2274, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8661:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2272, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8645:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 2011, + "src": "8645:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8645:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8623:46:3" + }, + { + "assignments": [ + 2279 + ], + "declarations": [ + { + "constant": false, + "id": 2279, + "mutability": "mutable", + "name": "series_", + "nameLocation": "8690:7:3", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "8676:21:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 2278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2277, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1804, + "src": "8676:6:3" + }, + "referencedDeclaration": 1804, + "src": "8676:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 2284, + "initialValue": { + "arguments": [ + { + "id": 2282, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "8716:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2280, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8700:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 2003, + "src": "8700:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$1804_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8700:25:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8676:49:3" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2286, + "name": "vault_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2271, + "src": "8869:6:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 1790, + "src": "8869:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 2288, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8885:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8885:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8869:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 2285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8861:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8861:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2292, + "nodeType": "ExpressionStatement", + "src": "8861:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "8958:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2299, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8975:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8967:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8967:7:3", + "typeDescriptions": {} + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8967:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2293, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "8944:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "8944:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8944:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2302, + "nodeType": "ExpressionStatement", + "src": "8944:37:3" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 2305, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9003:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9003:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8996:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 2303, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8996:6:3", + "typeDescriptions": {} + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8996:23:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2308, + "name": "series_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2279, + "src": "9022:7:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$1804_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 1803, + "src": "9022:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "8996:42:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2363, + "nodeType": "Block", + "src": "9373:374:3", + "statements": [ + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "mutability": "mutable", + "name": "base", + "nameLocation": "9469:4:3", + "nodeType": "VariableDeclaration", + "scope": 2363, + "src": "9461:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2333, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "arguments": [ + { + "id": 2337, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2266, + "src": "9496:8:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2338, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9506:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2335, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9476:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debtToBase", + "nodeType": "MemberAccess", + "referencedDeclaration": 2038, + "src": "9476:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes6_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes6,uint128) external returns (uint128)" + } + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9476:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9461:49:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2344, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9547:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2345, + "name": "usdcJoin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "9562:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9589:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9581:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9581:7:3", + "typeDescriptions": {} + } + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9581:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9605:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f436c6f736528616464726573732c627974657331322c75696e743132382c75696e743132382c75696e7431323829", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9642:50:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + "value": "doClose(address,bytes12,uint128,uint128,uint128)" + }, + { + "expression": { + "id": 2354, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9694:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9694:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2356, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9706:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2357, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "9715:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2358, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9721:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2359, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "9726:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6e6bf1f414ec0163a4dc56c7255a81d43898d85fe2872f717866f457729df53f", + "typeString": "literal_string \"doClose(address,bytes12,uint128,uint128,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2351, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9618:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9618:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:112:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2341, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9519:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9519:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9519:220:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2362, + "nodeType": "ExpressionStatement", + "src": "9519:220:3" + } + ] + }, + "id": 2364, + "nodeType": "IfStatement", + "src": "8992:755:3", + "trueBody": { + "id": 2332, + "nodeType": "Block", + "src": "9040:327:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2314, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9174:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2315, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2260, + "src": "9194:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2318, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9217:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2316, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9209:7:3", + "typeDescriptions": {} + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9209:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "", + "id": 2320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9233:2:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "arguments": [ + { + "hexValue": "646f526570617928616464726573732c627974657331322c75696e743235362c75696e7431323829", + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9270:42:3", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + "value": "doRepay(address,bytes12,uint256,uint128)" + }, + { + "expression": { + "id": 2324, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9314:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9314:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2326, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9326:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 2327, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2258, + "src": "9335:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2328, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2262, + "src": "9346:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_50bf94d73fcc33b85b59858c665e1bad2dd66f9efaa09d3e9592ec241319c0dd", + "typeString": "literal_string \"doRepay(address,bytes12,uint256,uint128)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2321, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9246:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "9246:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:104:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2311, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "9146:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "flashBorrow", + "nodeType": "MemberAccess", + "referencedDeclaration": 1994, + "src": "9146:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256,address,address,string memory,bytes memory) payable external returns (bytes memory)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:213:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "9146:213:3" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2368, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2256, + "src": "9848:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "expression": { + "id": 2369, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9857:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9857:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2365, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2103, + "src": "9834:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$2055", + "typeString": "contract Cauldron" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "give", + "nodeType": "MemberAccess", + "referencedDeclaration": 2048, + "src": "9834:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_address_$returns$_t_struct$_Vault_$1795_memory_ptr_$", + "typeString": "function (bytes12,address) external returns (struct Vault memory)" + } + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9834:34:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$1795_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2372, + "nodeType": "ExpressionStatement", + "src": "9834:34:3" + } + ] + }, + "documentation": { + "id": 2254, + "nodeType": "StructuredDocumentation", + "src": "7798:696:3", + "text": "@notice Empty a vault.\n @param vaultId - The id of the vault that should be emptied.\n @param maxAmount - The maximum amount of USDC to borrow. If past\n maturity, this parameter is unused as the amount can be determined\n precisely.\n @param pool - The pool to deposit USDC into. This can be obtained via the\n seriesId, and calling `address pool = ladle.pools(seriesId);`\n @param ink - The amount of collateral in the vault. Together with art,\n this value can be obtained using `cauldron.balances(vaultId);`, which\n will return an object containing both `art` and `ink`.\n @param art - The amount of debt taken from the vault." + }, + "functionSelector": "d238b433", + "id": 2374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unwind", + "nameLocation": "8507:6:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8522:7:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8514:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2255, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8514:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2258, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "8539:9:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8531:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2260, + "mutability": "mutable", + "name": "pool", + "nameLocation": "8558:4:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8550:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8550:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2262, + "mutability": "mutable", + "name": "ink", + "nameLocation": "8572:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8564:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2261, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8564:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "art", + "nameLocation": "8585:3:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8577:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2263, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8577:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2266, + "mutability": "mutable", + "name": "seriesId", + "nameLocation": "8597:8:3", + "nodeType": "VariableDeclaration", + "scope": 2374, + "src": "8590:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2265, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "8590:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "visibility": "internal" + } + ], + "src": "8513:93:3" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:0:3" + }, + "scope": 2498, + "src": "8498:1376:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "10550:366:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2389, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2379, + "src": "10605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2392, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10622:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10614:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10614:7:3", + "typeDescriptions": {} + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10614:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10629:12:3", + "subExpression": { + "arguments": [ + { + "id": 2396, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2383, + "src": "10637:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10630:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2394, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "10630:6:3", + "typeDescriptions": {} + } + }, + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10630:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "arguments": [ + { + "id": 2401, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10643:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 2399, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10643:7:3", + "typeDescriptions": {} + } + }, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2386, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "10588:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "repayVault", + "nodeType": "MemberAccess", + "referencedDeclaration": 1880, + "src": "10588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,uint128) payable external returns (uint128)" + } + }, + "id": 2403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10588:77:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2404, + "nodeType": "ExpressionStatement", + "src": "10588:77:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2405, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "10703:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "10703:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10703:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2409, + "nodeType": "ExpressionStatement", + "src": "10703:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2415, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "10778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10770:7:3", + "typeDescriptions": {} + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10770:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2417, + "name": "borrowAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2381, + "src": "10786:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2410, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10756:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10756:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10756:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "10756:43:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2423, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2377, + "src": "10873:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10903:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10895:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10895:7:3", + "typeDescriptions": {} + } + }, + "id": 2429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10895:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2424, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10880:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "10880:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10880:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2420, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "10859:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "10859:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10859:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "10859:51:3" + } + ] + }, + "documentation": { + "id": 2375, + "nodeType": "StructuredDocumentation", + "src": "9880:573:3", + "text": "@notice Repay a vault after having borrowed a suitable amount using a\n flash loan. Will only succeed if the pool hasn't reached its expiration\n date yet.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "50bf94d7", + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doRepay", + "nameLocation": "10466:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2377, + "mutability": "mutable", + "name": "owner", + "nameLocation": "10482:5:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10474:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10474:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2379, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "10497:7:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10489:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2378, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "10489:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2381, + "mutability": "mutable", + "name": "borrowAmount", + "nameLocation": "10514:12:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10506:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10506:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "ink", + "nameLocation": "10536:3:3", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "10528:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2382, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "10528:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "10473:67:3" + }, + "returnParameters": { + "id": 2385, + "nodeType": "ParameterList", + "parameters": [], + "src": "10550:0:3" + }, + "scope": 2498, + "src": "10457:459:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2496, + "nodeType": "Block", + "src": "11546:315:3", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2451, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "11589:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "arguments": [ + { + "id": 2454, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11606:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11598:7:3", + "typeDescriptions": {} + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11598:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11613:12:3", + "subExpression": { + "arguments": [ + { + "id": 2458, + "name": "ink", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2443, + "src": "11621:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11614:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2456, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11614:6:3", + "typeDescriptions": {} + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11614:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "11627:12:3", + "subExpression": { + "arguments": [ + { + "id": 2463, + "name": "art", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2445, + "src": "11635:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11628:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 2461, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "11628:6:3", + "typeDescriptions": {} + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11628:11:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + ], + "expression": { + "id": 2448, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2091, + "src": "11577:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$1904", + "typeString": "contract YieldLadle" + } + }, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "close", + "nodeType": "MemberAccess", + "referencedDeclaration": 1893, + "src": "11577:11:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_bytes12_$_t_address_$_t_int128_$_t_int128_$returns$_t_uint128_$", + "typeString": "function (bytes12,address,int128,int128) payable external returns (uint128)" + } + }, + "id": 2466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 2467, + "nodeType": "ExpressionStatement", + "src": "11577:63:3" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2468, + "name": "yvUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2061, + "src": "11678:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_yVault_$1974", + "typeString": "contract yVault" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1973, + "src": "11678:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", + "typeString": "function () external returns (uint256)" + } + }, + "id": 2471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11678:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2472, + "nodeType": "ExpressionStatement", + "src": "11678:17:3" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2478, + "name": "iUSDC", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "11749:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IToken_$1995", + "typeString": "contract IToken" + } + ], + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11741:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11741:7:3", + "typeDescriptions": {} + } + }, + "id": 2479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:14:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2480, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2441, + "src": "11757:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2473, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11727:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11727:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11727:35:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "nodeType": "ExpressionStatement", + "src": "11727:35:3" + }, + { + "expression": { + "arguments": [ + { + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "11818:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2491, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "11848:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$2498", + "typeString": "contract YieldLever" + } + ], + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11840:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11840:7:3", + "typeDescriptions": {} + } + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11840:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2487, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11825:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1927, + "src": "11825:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11825:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2483, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2079, + "src": "11804:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1957", + "typeString": "contract IERC20" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1945, + "src": "11804:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11804:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2495, + "nodeType": "ExpressionStatement", + "src": "11804:51:3" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "10922:522:3", + "text": "@notice Close a vault that has already reached its expiration date.\n @param owner - The address of the owner. This is the address that will be\n used to obtain certain parameters, and it is also the destination for\n the profit that was obtained.\n @param vaultId - The vault id to repay.\n @param base - The size of the debt in USDC.\n @dev Calling this function outside a flash loan achieves nothing, since\n the contract needs to own the vault it's getting collateral from." + }, + "functionSelector": "6e6bf1f4", + "id": 2497, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doClose", + "nameLocation": "11457:7:3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "owner", + "nameLocation": "11473:5:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11465:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11465:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "11488:7:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11480:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2438, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "11480:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "base", + "nameLocation": "11505:4:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11497:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2440, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11497:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2443, + "mutability": "mutable", + "name": "ink", + "nameLocation": "11519:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11511:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2442, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11511:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2445, + "mutability": "mutable", + "name": "art", + "nameLocation": "11532:3:3", + "nodeType": "VariableDeclaration", + "scope": 2497, + "src": "11524:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2444, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "11524:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "11464:72:3" + }, + "returnParameters": { + "id": 2447, + "nodeType": "ParameterList", + "parameters": [], + "src": "11546:0:3" + }, + "scope": 2498, + "src": "11448:413:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2499, + "src": "3880:7984:3", + "usedErrors": [] + } + ], + "src": "526:11340:3" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/AccessControl.json b/out/YieldLever.t.sol/AccessControl.json new file mode 100644 index 0000000..8a38a57 --- /dev/null +++ b/out/YieldLever.t.sol/AccessControl.json @@ -0,0 +1,12739 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "role", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/CheatCodes.json b/out/YieldLever.t.sol/CheatCodes.json new file mode 100644 index 0000000..6df31ef --- /dev/null +++ b/out/YieldLever.t.sol/CheatCodes.json @@ -0,0 +1,12824 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "assume", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "who", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "deal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "expectEmit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "label", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "prank", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "warp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/HelperContract.json b/out/YieldLever.t.sol/HelperContract.json new file mode 100644 index 0000000..49323ee --- /dev/null +++ b/out/YieldLever.t.sol/HelperContract.json @@ -0,0 +1,13062 @@ +{ + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "log_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "log_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "log_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "name": "log_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "val", + "type": "address" + } + ], + "name": "log_named_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "val", + "type": "bytes" + } + ], + "name": "log_named_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "val", + "type": "bytes32" + } + ], + "name": "log_named_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + } + ], + "name": "log_named_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "val", + "type": "string" + } + ], + "name": "log_named_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + } + ], + "name": "log_named_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "log_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "logs", + "type": "event" + }, + { + "inputs": [], + "name": "IS_TEST", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "buyUsdc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "failed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldLeverAddress", + "type": "address" + } + ], + "name": "grantYieldLeverAccess", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "testBuyUsdc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": { + "object": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b50604080516318caf8e360e31b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860048083019190915260248201929092526044810191909152635553444360e01b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c657c71890608401600060405180830381600087803b1580156100a057600080fd5b505af11580156100b4573d6000803e3d6000fd5b5050604080516318caf8e360e31b8152737a250d5630b4cf539739df2c5dacb4c659f2488d60048201526024810191909152601260448201527124aab734b9bbb0b82b192937baba32b9181960711b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b15801561014357600080fd5b505af1158015610157573d6000803e3d6000fd5b5050604080516318caf8e360e31b815273c88191f8cb8e6d4a668b047c1c8503432c3ca86760048201526024810191909152600860448201526721b0bab6323937b760c11b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b1580156101dc57600080fd5b505af11580156101f0573d6000803e3d6000fd5b50505050610b2c806102036000396000f3fe60806040526004361061004e5760003560e01c806321ce60061461005a578063742c0e721461007c578063ba414fa614610091578063d4babbca146100ba578063fa7626d4146100da57600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046107df565b6100f4565b005b34801561008857600080fd5b5061007a610512565b34801561009d57600080fd5b506100a6610573565b604051901515815260200160405180910390f35b3480156100c657600080fd5b5061007a6100d536600461080f565b61069e565b3480156100e657600080fd5b506000546100a69060ff1681565b6040516370a0823160e01b81526001600160a01b038216600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610833565b6040805160028082526060820183529293506000929091602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020f9190610862565b816000815181106102225761022261087f565b60200260200101906001600160a01b031690816001600160a01b03168152505073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488160018151811061026a5761026a61087f565b6001600160a01b03909216602092830291909101909101526040516307c0329d60e21b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d90631f00ca74906102be90889086906004016108d9565b600060405180830381865afa1580156102db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261030391908101906108fa565b6000815181106103155761031561087f565b6020026020010151600261032991906109ce565b60405163c88a5e6d60e01b815230600482015260248101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c88a5e6d90604401600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b505060405163fb3bdb4160e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d925063fb3bdb41915083906103d690899087908a9042906004016109ed565b60006040518083038185885af11580156103f4573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261041d91908101906108fa565b506040516370a0823160e01b81526001600160a01b038516600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d9190610833565b90506104a98487610a22565b811461050a5760405162461bcd60e51b815260206004820152602660248201527f5553444320627579206661696c65643a20496e636f727265637420656e642062604482015265616c616e636560d01b606482015260840160405180910390fd5b505050505050565b6040516310e7300360e11b81526305f5e10060048201819052306024830181905290916321ce600690604401600060405180830381600087803b15801561055857600080fd5b505af115801561056c573d6000803e3d6000fd5b5050505050565b60008054610100900460ff16156105935750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156106995760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610621917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc491608001610a75565b60408051601f198184030181529082905261063b91610a91565b6000604051808303816000865af19150503d8060008114610678576040519150601f19603f3d011682016040523d82523d6000602084013e61067d565b606091505b50915050808060200190518101906106959190610a9d565b9150505b919050565b6040805160048152602481019091526020810180516001600160e01b031663798a828b60e01b1790526000906106d390610abf565b60405163ca669fa760e01b8152733b870db67a45611cf4723d44487eaf398fac51e36004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063ca669fa790602401600060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505060405163de02cde760e01b81526001600160e01b0319841660048201526001600160a01b038516602482015273c88191f8cb8e6d4a668b047c1c8503432c3ca867925063de02cde79150604401600060405180830381600087803b1580156107b357600080fd5b505af115801561050a573d6000803e3d6000fd5b6001600160a01b03811681146107dc57600080fd5b50565b600080604083850312156107f257600080fd5b823591506020830135610804816107c7565b809150509250929050565b60006020828403121561082157600080fd5b813561082c816107c7565b9392505050565b60006020828403121561084557600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561087457600080fd5b815161082c816107c7565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156108ce5781516001600160a01b0316875295820195908201906001016108a9565b509495945050505050565b8281526040602082015260006108f26040830184610895565b949350505050565b6000602080838503121561090d57600080fd5b825167ffffffffffffffff8082111561092557600080fd5b818501915085601f83011261093957600080fd5b81518181111561094b5761094b61084c565b8060051b604051601f19603f830116810181811085821117156109705761097061084c565b60405291825284820192508381018501918883111561098e57600080fd5b938501935b828510156109ac57845184529385019392850192610993565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156109e8576109e86109b8565b500290565b848152608060208201526000610a066080830186610895565b6001600160a01b03949094166040830152506060015292915050565b60008219821115610a3557610a356109b8565b500190565b6000815160005b81811015610a5b5760208185018101518683015201610a41565b81811115610a6a576000828601525b509290920192915050565b6001600160e01b03198316815260006108f26004830184610a3a565b600061082c8284610a3a565b600060208284031215610aaf57600080fd5b8151801515811461082c57600080fd5b805160208201516001600160e01b03198082169291906004831015610aee5780818460040360031b1b83161693505b50505091905056fea26469706673582212207c7d650374d069e153a414943a55d7c0356801883a13dae6d793cfc0174fdfe164736f6c634300080d0033", + "sourceMap": "1661:1723:4:-:0;;;1609:26:0;;;-1:-1:-1;;1609:26:0;1631:4;1609:26;;;2049:185:4;;;;;;;;;-1:-1:-1;2074:35:4;;;-1:-1:-1;;;2074:35:4;;1899:42;2074:35;;;;226:51:5;;;;293:18;;;286:30;;;;332:18;;;325:29;;;;-1:-1:-1;;;370:18:5;;;363:34;1712:64:0;;2074:12:4;;414:19:5;;2074:35:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2120:52:4;;;-1:-1:-1;;;2120:52:4;;1819:42;2120:52;;;656:51:5;723:18;;;716:30;;;;782:2;762:18;;;755:30;-1:-1:-1;;;801:18:5;;;794:48;1712:64:0;;-1:-1:-1;2120:12:4;;-1:-1:-1;859:19:5;;2120:52:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2183:43:4;;;-1:-1:-1;;;2183:43:4;;1997:42;2183:43;;;1101:51:5;1168:18;;;1161:30;;;;1227:1;1207:18;;;1200:29;-1:-1:-1;;;1245:18:5;;;1238:38;1712:64:0;;-1:-1:-1;2183:12:4;;-1:-1:-1;1293:19:5;;2183:43:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1661:1723;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x60806040526004361061004e5760003560e01c806321ce60061461005a578063742c0e721461007c578063ba414fa614610091578063d4babbca146100ba578063fa7626d4146100da57600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046107df565b6100f4565b005b34801561008857600080fd5b5061007a610512565b34801561009d57600080fd5b506100a6610573565b604051901515815260200160405180910390f35b3480156100c657600080fd5b5061007a6100d536600461080f565b61069e565b3480156100e657600080fd5b506000546100a69060ff1681565b6040516370a0823160e01b81526001600160a01b038216600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610833565b6040805160028082526060820183529293506000929091602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020f9190610862565b816000815181106102225761022261087f565b60200260200101906001600160a01b031690816001600160a01b03168152505073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488160018151811061026a5761026a61087f565b6001600160a01b03909216602092830291909101909101526040516307c0329d60e21b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d90631f00ca74906102be90889086906004016108d9565b600060405180830381865afa1580156102db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261030391908101906108fa565b6000815181106103155761031561087f565b6020026020010151600261032991906109ce565b60405163c88a5e6d60e01b815230600482015260248101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c88a5e6d90604401600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b505060405163fb3bdb4160e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d925063fb3bdb41915083906103d690899087908a9042906004016109ed565b60006040518083038185885af11580156103f4573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261041d91908101906108fa565b506040516370a0823160e01b81526001600160a01b038516600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d9190610833565b90506104a98487610a22565b811461050a5760405162461bcd60e51b815260206004820152602660248201527f5553444320627579206661696c65643a20496e636f727265637420656e642062604482015265616c616e636560d01b606482015260840160405180910390fd5b505050505050565b6040516310e7300360e11b81526305f5e10060048201819052306024830181905290916321ce600690604401600060405180830381600087803b15801561055857600080fd5b505af115801561056c573d6000803e3d6000fd5b5050505050565b60008054610100900460ff16156105935750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156106995760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610621917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc491608001610a75565b60408051601f198184030181529082905261063b91610a91565b6000604051808303816000865af19150503d8060008114610678576040519150601f19603f3d011682016040523d82523d6000602084013e61067d565b606091505b50915050808060200190518101906106959190610a9d565b9150505b919050565b6040805160048152602481019091526020810180516001600160e01b031663798a828b60e01b1790526000906106d390610abf565b60405163ca669fa760e01b8152733b870db67a45611cf4723d44487eaf398fac51e36004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063ca669fa790602401600060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505060405163de02cde760e01b81526001600160e01b0319841660048201526001600160a01b038516602482015273c88191f8cb8e6d4a668b047c1c8503432c3ca867925063de02cde79150604401600060405180830381600087803b1580156107b357600080fd5b505af115801561050a573d6000803e3d6000fd5b6001600160a01b03811681146107dc57600080fd5b50565b600080604083850312156107f257600080fd5b823591506020830135610804816107c7565b809150509250929050565b60006020828403121561082157600080fd5b813561082c816107c7565b9392505050565b60006020828403121561084557600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561087457600080fd5b815161082c816107c7565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156108ce5781516001600160a01b0316875295820195908201906001016108a9565b509495945050505050565b8281526040602082015260006108f26040830184610895565b949350505050565b6000602080838503121561090d57600080fd5b825167ffffffffffffffff8082111561092557600080fd5b818501915085601f83011261093957600080fd5b81518181111561094b5761094b61084c565b8060051b604051601f19603f830116810181811085821117156109705761097061084c565b60405291825284820192508381018501918883111561098e57600080fd5b938501935b828510156109ac57845184529385019392850192610993565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156109e8576109e86109b8565b500290565b848152608060208201526000610a066080830186610895565b6001600160a01b03949094166040830152506060015292915050565b60008219821115610a3557610a356109b8565b500190565b6000815160005b81811015610a5b5760208185018101518683015201610a41565b81811115610a6a576000828601525b509290920192915050565b6001600160e01b03198316815260006108f26004830184610a3a565b600061082c8284610a3a565b600060208284031215610aaf57600080fd5b8151801515811461082c57600080fd5b805160208201516001600160e01b03198082169291906004831015610aee5780818460040360031b1b83161693505b50505091905056fea26469706673582212207c7d650374d069e153a414943a55d7c0356801883a13dae6d793cfc0174fdfe164736f6c634300080d0033", + "sourceMap": "1661:1723:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2242:642;;;;;;;;;;-1:-1:-1;2242:642:4;;;;;:::i;:::-;;:::i;:::-;;3259:122;;;;;;;;;;;;;:::i;1865:600:0:-;;;;;;;;;;;;;:::i;:::-;;;635:14:5;;628:22;610:41;;598:2;583:18;1865:600:0;;;;;;;2892:322:4;;;;;;;;;;-1:-1:-1;2892:322:4;;;;;:::i;:::-;;:::i;1609:26:0:-;;;;;;;;;;-1:-1:-1;1609:26:0;;;;;;;;2242:642:4;2336:24;;-1:-1:-1;;;2336:24:4;;-1:-1:-1;;;;;1078:32:5;;2336:24:4;;;1060:51:5;2313:20:4;;1899:42;;2336:14;;1033:18:5;;2336:24:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2397:16;;;2411:1;2397:16;;;;;;;;2313:47;;-1:-1:-1;2373:21:4;;2397:16;;;;;;;;;;;;-1:-1:-1;2397:16:4;2373:40;;1819:42;-1:-1:-1;;;;;2434:12:4;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2424:4;2429:1;2424:7;;;;;;;;:::i;:::-;;;;;;:24;-1:-1:-1;;;;;2424:24:4;;;-1:-1:-1;;;;;2424:24:4;;;;;1899:42;2459:4;2464:1;2459:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2459:23:4;;;:7;;;;;;;;;;;:23;2518:37;;-1:-1:-1;;;2518:37:4;;2495:16;;1819:42;;2518:20;;:37;;2539:9;;2550:4;;2518:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2518:37:4;;;;;;;;;;;;:::i;:::-;2556:1;2518:40;;;;;;;;:::i;:::-;;;;;;;2514:1;:44;;;;:::i;:::-;2569:39;;-1:-1:-1;;;2569:39:4;;2589:4;2569:39;;;4223:51:5;4290:18;;;4283:34;;;2495:63:4;;-1:-1:-1;1712:64:0;;2569:11:4;;4196:18:5;;2569:39:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2621:93:4;;-1:-1:-1;;;2621:93:4;;1819:42;;-1:-1:-1;2621:29:4;;-1:-1:-1;2658:11:4;;2621:93;;2671:9;;2682:4;;2688:8;;2698:15;;2621:93;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2621:93:4;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2749:24:4;;-1:-1:-1;;;2749:24:4;;-1:-1:-1;;;;;1078:32:5;;2749:24:4;;;1060:51:5;2731:15:4;;1899:42;;2749:14;;1033:18:5;;2749:24:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2731:42;-1:-1:-1;2806:27:4;2818:15;2806:9;:27;:::i;:::-;2792:10;:41;2784:92;;;;-1:-1:-1;;;2784:92:4;;5170:2:5;2784:92:4;;;5152:21:5;5209:2;5189:18;;;5182:30;5248:34;5228:18;;;5221:62;-1:-1:-1;;;5299:18:5;;;5292:36;5345:19;;2784:92:4;;;;;;;;2302:582;;;;2242:642;;:::o;3259:122::-;3338:35;;-1:-1:-1;;;3338:35:4;;3316:11;3338:35;;;5549:25:5;;;3338:4:4;5590:18:5;;;5583:60;;;3316:11:4;;3338:12;;5522:18:5;;3338:35:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3291:90;3259:122::o;1865:600:0:-;1899:4;1920:7;;;;;;;1916:542;;;-1:-1:-1;1951:7:0;;;;;;;;1865:600::o;1916:542::-;1991:17;3070:42;3058:55;3141:16;2031:382;;2251:43;;;1712:64;2251:43;;;4223:51:5;;;-1:-1:-1;;;4290:18:5;;;4283:34;2251:43:0;;;;;;;;;4196:18:5;;;2251:43:0;;;-1:-1:-1;;1712:64:0;;2139:178;;2189:34;;2139:178;;;:::i;:::-;;;;-1:-1:-1;;2139:178:0;;;;;;;;;;2099:237;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2072:264;;;2381:7;2370:27;;;;;;;;;;;;:::i;:::-;2355:42;;2053:360;2031:382;2434:12;1865:600;-1:-1:-1;1865:600:0:o;2892:322:4:-;2990:48;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2990:48:4;-1:-1:-1;;;2990:48:4;;;2970:10;;2983:56;;;:::i;:::-;3097;;-1:-1:-1;;;3097:56:4;;3110:42;3097:56;;;1060:51:5;2970:69:4;;-1:-1:-1;1712:64:0;;3097:12:4;;1033:18:5;;3097:56:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3164:42:4;;-1:-1:-1;;;3164:42:4;;-1:-1:-1;;;;;;7589:33:5;;3164:42:4;;;7571:52:5;-1:-1:-1;;;;;7659:32:5;;7639:18;;;7632:60;1997:42:4;;-1:-1:-1;3164:18:4;;-1:-1:-1;7544:18:5;;3164:42:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:131:5;-1:-1:-1;;;;;89:31:5;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:315::-;218:6;226;279:2;267:9;258:7;254:23;250:32;247:52;;;295:1;292;285:12;247:52;331:9;318:23;308:33;;391:2;380:9;376:18;363:32;404:31;429:5;404:31;:::i;:::-;454:5;444:15;;;150:315;;;;;:::o;662:247::-;721:6;774:2;762:9;753:7;749:23;745:32;742:52;;;790:1;787;780:12;742:52;829:9;816:23;848:31;873:5;848:31;:::i;:::-;898:5;662:247;-1:-1:-1;;;662:247:5:o;1122:184::-;1192:6;1245:2;1233:9;1224:7;1220:23;1216:32;1213:52;;;1261:1;1258;1251:12;1213:52;-1:-1:-1;1284:16:5;;1122:184;-1:-1:-1;1122:184:5:o;1311:127::-;1372:10;1367:3;1363:20;1360:1;1353:31;1403:4;1400:1;1393:15;1427:4;1424:1;1417:15;1443:251;1513:6;1566:2;1554:9;1545:7;1541:23;1537:32;1534:52;;;1582:1;1579;1572:12;1534:52;1614:9;1608:16;1633:31;1658:5;1633:31;:::i;1699:127::-;1760:10;1755:3;1751:20;1748:1;1741:31;1791:4;1788:1;1781:15;1815:4;1812:1;1805:15;1831:461;1884:3;1922:5;1916:12;1949:6;1944:3;1937:19;1975:4;2004:2;1999:3;1995:12;1988:19;;2041:2;2034:5;2030:14;2062:1;2072:195;2086:6;2083:1;2080:13;2072:195;;;2151:13;;-1:-1:-1;;;;;2147:39:5;2135:52;;2207:12;;;;2242:15;;;;2183:1;2101:9;2072:195;;;-1:-1:-1;2283:3:5;;1831:461;-1:-1:-1;;;;;1831:461:5:o;2297:332::-;2504:6;2493:9;2486:25;2547:2;2542;2531:9;2527:18;2520:30;2467:4;2567:56;2619:2;2608:9;2604:18;2596:6;2567:56;:::i;:::-;2559:64;2297:332;-1:-1:-1;;;;2297:332:5:o;2634:1105::-;2729:6;2760:2;2803;2791:9;2782:7;2778:23;2774:32;2771:52;;;2819:1;2816;2809:12;2771:52;2852:9;2846:16;2881:18;2922:2;2914:6;2911:14;2908:34;;;2938:1;2935;2928:12;2908:34;2976:6;2965:9;2961:22;2951:32;;3021:7;3014:4;3010:2;3006:13;3002:27;2992:55;;3043:1;3040;3033:12;2992:55;3072:2;3066:9;3094:2;3090;3087:10;3084:36;;;3100:18;;:::i;:::-;3146:2;3143:1;3139:10;3178:2;3172:9;3241:2;3237:7;3232:2;3228;3224:11;3220:25;3212:6;3208:38;3296:6;3284:10;3281:22;3276:2;3264:10;3261:18;3258:46;3255:72;;;3307:18;;:::i;:::-;3343:2;3336:22;3393:18;;;3427:15;;;;-1:-1:-1;3469:11:5;;;3465:20;;;3497:19;;;3494:39;;;3529:1;3526;3519:12;3494:39;3553:11;;;;3573:135;3589:6;3584:3;3581:15;3573:135;;;3655:10;;3643:23;;3606:12;;;;3686;;;;3573:135;;;3727:6;2634:1105;-1:-1:-1;;;;;;;;2634:1105:5:o;3744:127::-;3805:10;3800:3;3796:20;3793:1;3786:31;3836:4;3833:1;3826:15;3860:4;3857:1;3850:15;3876:168;3916:7;3982:1;3978;3974:6;3970:14;3967:1;3964:21;3959:1;3952:9;3945:17;3941:45;3938:71;;;3989:18;;:::i;:::-;-1:-1:-1;4029:9:5;;3876:168::o;4328:502::-;4591:6;4580:9;4573:25;4634:3;4629:2;4618:9;4614:18;4607:31;4554:4;4655:57;4707:3;4696:9;4692:19;4684:6;4655:57;:::i;:::-;-1:-1:-1;;;;;4748:32:5;;;;4743:2;4728:18;;4721:60;-1:-1:-1;4812:2:5;4797:18;4790:34;4647:65;4328:502;-1:-1:-1;;4328:502:5:o;4835:128::-;4875:3;4906:1;4902:6;4899:1;4896:13;4893:39;;;4912:18;;:::i;:::-;-1:-1:-1;4948:9:5;;4835:128::o;5933:336::-;5974:3;6012:5;6006:12;6036:1;6046:128;6060:6;6057:1;6054:13;6046:128;;;6157:4;6142:13;;;6138:24;;6132:31;6119:11;;;6112:52;6075:12;6046:128;;;6192:6;6189:1;6186:13;6183:48;;;6227:1;6218:6;6213:3;6209:16;6202:27;6183:48;-1:-1:-1;6247:16:5;;;;;5933:336;-1:-1:-1;;5933:336:5:o;6274:278::-;-1:-1:-1;;;;;;6459:33:5;;6447:46;;6429:3;6509:37;6543:1;6534:11;;6526:6;6509:37;:::i;6557:189::-;6686:3;6711:29;6736:3;6728:6;6711:29;:::i;6751:277::-;6818:6;6871:2;6859:9;6850:7;6846:23;6842:32;6839:52;;;6887:1;6884;6877:12;6839:52;6919:9;6913:16;6972:5;6965:13;6958:21;6951:5;6948:32;6938:60;;6994:1;6991;6984:12;7033:361;7150:12;;7198:4;7187:16;;7181:23;-1:-1:-1;;;;;;7261:11:5;;;;7150:12;7181:23;7295:1;7284:13;;7281:107;;;7375:2;7369;7359:6;7356:1;7352:14;7349:1;7345:22;7341:31;7337:2;7333:40;7329:49;7320:58;;7281:107;;;;7033:361;;;:::o", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/IUniswapV2Router02.json b/out/YieldLever.t.sol/IUniswapV2Router02.json new file mode 100644 index 0000000..0eeb204 --- /dev/null +++ b/out/YieldLever.t.sol/IUniswapV2Router02.json @@ -0,0 +1,12792 @@ +{ + "abi": [ + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "getAmountsIn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapETHForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/Pool.json b/out/YieldLever.t.sol/Pool.json new file mode 100644 index 0000000..32c5838 --- /dev/null +++ b/out/YieldLever.t.sol/Pool.json @@ -0,0 +1,12759 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "uint128", + "name": "tokenOut", + "type": "uint128" + } + ], + "name": "buyBasePreview", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "fyTokenOut", + "type": "uint128" + } + ], + "name": "buyFYTokenPreview", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x", + "sourceMap": "", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/YieldLever.t.sol/YieldLeverTest.json b/out/YieldLever.t.sol/YieldLeverTest.json new file mode 100644 index 0000000..bc0ad3c --- /dev/null +++ b/out/YieldLever.t.sol/YieldLeverTest.json @@ -0,0 +1,13066 @@ +{ + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "log_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "log_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "log_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "name": "log_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "val", + "type": "address" + } + ], + "name": "log_named_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "val", + "type": "bytes" + } + ], + "name": "log_named_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "val", + "type": "bytes32" + } + ], + "name": "log_named_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + } + ], + "name": "log_named_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "val", + "type": "string" + } + ], + "name": "log_named_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + } + ], + "name": "log_named_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "log_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "logs", + "type": "event" + }, + { + "inputs": [], + "name": "IS_TEST", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "failed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "testBuildVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "collateral", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "borrowed", + "type": "uint128" + } + ], + "name": "testInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "testInvestAndUnwind", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "testInvestAndUnwindAfterMaturity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x60806040526000805460ff191660011790553480156200001e57600080fd5b5060405163bf1025f360e01b8152631819181b60e11b6004820152736cb18ff2a33e981d1e38a663ca056c0a5265066a9063bf1025f390602401602060405180830381865afa15801562000076573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009c9190620001f1565b600280546001600160a01b0319166001600160a01b0392909216919091179055604080516318caf8e360e31b8152736cb18ff2a33e981d1e38a663ca056c0a5265066a60048201526024810191909152600a6044820152695969656c644c61646c6560b01b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c657c71890608401600060405180830381600087803b1580156200014057600080fd5b505af115801562000155573d6000803e3d6000fd5b5050600254604080516318caf8e360e31b81526001600160a01b039092166004808401919091526024830191909152604482015263141bdbdb60e21b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b158015620001d257600080fd5b505af1158015620001e7573d6000803e3d6000fd5b5050505062000223565b6000602082840312156200020457600080fd5b81516001600160a01b03811681146200021c57600080fd5b9392505050565b61478e80620002336000396000f3fe60806040523480156200001157600080fd5b5060043610620000875760003560e01c80637ade925a11620000625780637ade925a14620000b9578063ba414fa614620000c3578063eeb6f4b014620000e1578063fa7626d414620000eb57600080fd5b80630a9254e4146200008c57806336df4c4a146200009857806368605ade14620000a2575b600080fd5b62000096620000f9565b005b62000096620001f5565b62000096620000b336600462001cb3565b6200071a565b6200009662000f10565b620000cd620012e1565b604051901515815260200160405180910390f35b6200009662001416565b600054620000cd9060ff1681565b604051620001079062001c7e565b604051809103906000f08015801562000124573d6000803e3d6000fd5b50600060026101000a8154816001600160a01b0302191690836001600160a01b03160217905550604051620001599062001c8c565b604051809103906000f08015801562000176573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03928316908117909155600054604051636a5d5de560e11b81526201000090910490921660048301529063d4babbca90602401600060405180830381600087803b158015620001da57600080fd5b505af1158015620001ef573d6000803e3d6000fd5b50505050565b6405d21dba0060006200020a82600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062000245908690309060040162001d39565b600060405180830381600087803b1580156200026057600080fd5b505af115801562000275573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620002c5916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af1158015620002e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200030b919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562000365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200038b919062001db5565b62000397919062001d07565b620003a3919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf90620003ed90889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af11580156200040d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000433919062001e3d565b6040516315740f8d60e21b8152631819181b60e11b600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801562000490573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004b6919062001ed0565b60408181015190516372eb5f8160e11b815263ffffffff9091166004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063e5d6bf0290602401600060405180830381600087803b1580156200051257600080fd5b505af115801562000527573d6000803e3d6000fd5b5050604051631c8a4a0360e21b81526000925073c88191f8cb8e6d4a668b047c1c8503432c3ca8679150637229280c906200056790869060040162001f33565b6040805180830381865afa15801562000584573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005aa919062001f48565b600080546002546020840151845160405163d238b43360e01b81526001600160a01b03198a16600482015260248101959095526001600160a01b0392831660448601526001600160801b039182166064860152166084840152631819181b60e11b60a48401529293506201000090049091169063d238b4339060c4015b600060405180830381600087803b1580156200064257600080fd5b505af115801562000657573d6000803e3d6000fd5b5050604051631c8a4a0360e21b81526000925073c88191f8cb8e6d4a668b047c1c8503432c3ca8679150637229280c906200069790879060040162001f33565b6040805180830381865afa158015620006b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006da919062001f48565b9050620006f681600001516001600160801b03166000620017f6565b6200071081602001516001600160801b03166000620017f6565b5050505050505050565b604051632631f2b160e11b8152620f42406001600160801b03841610156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d90634c63e56290602401600060405180830381600087803b1580156200077657600080fd5b505af11580156200078b573d6000803e3d6000fd5b5050604051632631f2b160e11b8152655af3107a40006001600160801b03861611156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b158015620007ee57600080fd5b505af115801562000803573d6000803e3d6000fd5b5050604051632631f2b160e11b8152620f42406001600160801b03851610156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b1580156200086357600080fd5b505af115801562000878573d6000803e3d6000fd5b5050604051632631f2b160e11b8152655af3107a40006001600160801b03851611156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b158015620008db57600080fd5b505af1158015620008f0573d6000803e3d6000fd5b50506001546040516310e7300360e11b81526103e993506001600160a01b0390911691506321ce6006906200092c908690309060040162001d39565b600060405180830381600087803b1580156200094757600080fd5b505af11580156200095c573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620009ac916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af1158015620009cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009f2919062001d7d565b506040516315740f8d60e21b8152631819181b60e11b600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801562000a4d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a73919062001ed0565b60025460405163b0f2892160e01b81526001600160801b03861660048201529192506000916103e89185916001600160a01b039091169063b0f2892190602401602060405180830381865afa15801562000ad1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000af7919062001db5565b62000b03919062001d07565b62000b0f919062001dd5565b6020830151604051639be24c4d60e01b81526001600160d01b0319909116600482015261303960f01b602482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790639be24c4d90604401608060405180830381865afa15801562000b80573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ba6919062001fbb565b905060008160400151600a62000bbd919062002171565b826020015162ffffff1662000bd3919062002182565b905060008260400151600a62000bea919062002171565b835162000c0691906bffffffffffffffffffffffff1662002182565b604051632631f2b160e11b81526001600160801b0386168411156004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d90634c63e56290602401600060405180830381600087803b15801562000c6257600080fd5b505af115801562000c77573d6000803e3d6000fd5b5050604051632631f2b160e11b81526001600160801b0387168410156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b15801562000cd457600080fd5b505af115801562000ce9573d6000803e3d6000fd5b50506000805460405163fcd064cf60e01b81529193506201000090046001600160a01b0316915063fcd064cf9062000d33908c908c908a90631819181b60e11b9060040162001e0a565b6020604051808303816000875af115801562000d53573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d79919062001e3d565b604051631e81f82960e01b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f8299062000db890859060040162001f33565b606060405180830381865afa15801562000dd6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000dfc9190620021a4565b905062000e0e816000015130620018be565b602081015162000e30906001600160d01b031916631819181b60e11b620019a7565b604081015162000e50906001600160d01b03191661303960f01b620019a7565b604051631c8a4a0360e21b815260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c9062000e8c90869060040162001f33565b6040805180830381865afa15801562000ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ecf919062001f48565b905062000eeb81602001516001600160801b0316600062001a7e565b805162000f03906001600160801b0316600062001a7e565b5050505050505050505050565b6405d21dba00600062000f2582600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062000f60908690309060040162001d39565b600060405180830381600087803b15801562000f7b57600080fd5b505af115801562000f90573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b3925062000fe0916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af115801562001000573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001026919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562001080573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010a6919062001db5565b620010b2919062001d07565b620010be919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf906200110890889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af115801562001128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200114e919062001e3d565b604051631e81f82960e01b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f829906200118d90859060040162001f33565b606060405180830381865afa158015620011ab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011d19190620021a4565b9050620011e3816000015130620018be565b602081015162001205906001600160d01b031916631819181b60e11b620019a7565b604081015162001225906001600160d01b03191661303960f01b620019a7565b604051631c8a4a0360e21b815260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c906200126190869060040162001f33565b6040805180830381865afa1580156200127e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620012a4919062001f48565b9050620012c081602001516001600160801b0316600062001a7e565b8051620012d8906001600160801b0316600062001a7e565b50505050505050565b60008054610100900460ff1615620013025750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15620014115760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b8284015282518083038401815260608301909352600092909162001393917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016200222f565b60408051601f1981840301815290829052620013af9162002255565b6000604051808303816000865af19150503d8060008114620013ee576040519150601f19603f3d011682016040523d82523d6000602084013e620013f3565b606091505b50915050808060200190518101906200140d919062001d7d565b9150505b919050565b6405d21dba0060006200142b82600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062001466908690309060040162001d39565b600060405180830381600087803b1580156200148157600080fd5b505af115801562001496573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620014e6916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af115801562001506573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200152c919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562001586573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620015ac919062001db5565b620015b8919062001d07565b620015c4919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf906200160e90889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af11580156200162e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001654919062001e3d565b604051631c8a4a0360e21b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c906200169390859060040162001f33565b6040805180830381865afa158015620016b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620016d6919062001f48565b600254815160405163fdb0732d60e01b81526001600160801b0390911660048201529192506000916103e89187916001600160a01b039091169063fdb0732d90602401602060405180830381865afa15801562001737573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200175d919062001db5565b62001769919062001d07565b62001775919062001dd5565b6000546002546020850151855160405163d238b43360e01b81526001600160a01b0319891660048201526001600160801b0380871660248301526001600160a01b039485166044830152928316606482015291166084820152631819181b60e11b60a482015292935062010000909104169063d238b4339060c40162000627565b808214620018ba5760008051602062004719833981519152604051620018589060208082526022908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b75696e604082015261745d60f01b606082015260800190565b60405180910390a1600080516020620047398339815191528160405162001880919062002263565b60405180910390a16000805160206200473983398151915282604051620018a891906200229c565b60405180910390a1620018ba62001b6b565b5050565b806001600160a01b0316826001600160a01b031614620018ba5760008051602062004719833981519152604051620019359060208082526025908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b616464604082015264726573735d60d81b606082015260800190565b60405180910390a17f9c4e8541ca8f0dc1c413f9108f66d82d3cecb1bddbce437a61caa3175c4cc96f816040516200196e9190620022c7565b60405180910390a17f9c4e8541ca8f0dc1c413f9108f66d82d3cecb1bddbce437a61caa3175c4cc96f82604051620018a891906200230c565b808214620018ba576000805160206200471983398151915260405162001a0c9060208082526025908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b627974604082015264657333325d60d81b606082015260800190565b60405180910390a17fafb795c9c61e4fe7468c386f925d7a5429ecad9c0495ddb8d38d690614d32f998160405162001a45919062002263565b60405180910390a17fafb795c9c61e4fe7468c386f925d7a5429ecad9c0495ddb8d38d690614d32f9982604051620018a891906200229c565b808211620018ba576000805160206200471983398151915260405162001adf9060208082526021908201527f4572726f723a2061203e2062206e6f7420736174697366696564205b75696e746040820152605d60f81b606082015260800190565b60405180910390a16040805181815260098183015268202056616c7565206160b81b6060820152602081018490529051600080516020620047398339815191529181900360800190a1604080518181526009918101919091526810102b30b63ab2903160b91b6060820152602081018290526000805160206200473983398151915290608001620018a8565b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1562001c6d5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b9282019290925260016060820152600091907f70ca10bbd0dbfd9020a9f4b13402c16cb120705e0d1c0aeab10fa353ae586fc49060800160408051601f198184030181529082905262001c0892916020016200222f565b60408051601f198184030181529082905262001c249162002255565b6000604051808303816000865af19150503d806000811462001c63576040519150601f19603f3d011682016040523d82523d6000602084013e62001c68565b606091505b505050505b6000805461ff001916610100179055565b6116b2806200233883390190565b610d2f80620039ea83390190565b6001600160801b038116811462001cb057600080fd5b50565b6000806040838503121562001cc757600080fd5b823562001cd48162001c9a565b9150602083013562001ce68162001c9a565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b60006001600160801b038083168185168183048111821515161562001d305762001d3062001cf1565b02949350505050565b6001600160801b039290921682526001600160a01b0316602082015260400190565b6001600160a01b039290921682526001600160801b0316602082015260400190565b60006020828403121562001d9057600080fd5b8151801515811462001da157600080fd5b9392505050565b8051620014118162001c9a565b60006020828403121562001dc857600080fd5b815162001da18162001c9a565b60006001600160801b038084168062001dfe57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6001600160801b0394851681529284166020840152921660408201526001600160d01b0319909116606082015260800190565b60006020828403121562001e5057600080fd5b81516001600160a01b03198116811462001da157600080fd5b6040516060810167ffffffffffffffff8111828210171562001e9b57634e487b7160e01b600052604160045260246000fd5b60405290565b6001600160a01b038116811462001cb057600080fd5b80516001600160d01b0319811681146200141157600080fd5b60006060828403121562001ee357600080fd5b62001eed62001e69565b825162001efa8162001ea1565b815262001f0a6020840162001eb7565b6020820152604083015163ffffffff8116811462001f2757600080fd5b60408201529392505050565b6001600160a01b031991909116815260200190565b60006040828403121562001f5b57600080fd5b6040516040810181811067ffffffffffffffff8211171562001f8d57634e487b7160e01b600052604160045260246000fd5b604052825162001f9d8162001c9a565b8152602083015162001faf8162001c9a565b60208201529392505050565b60006080828403121562001fce57600080fd5b6040516080810181811067ffffffffffffffff821117156200200057634e487b7160e01b600052604160045260246000fd5b60405282516bffffffffffffffffffffffff811681146200202057600080fd5b8152602083015162ffffff811681146200203957600080fd5b6020820152604083015160ff811681146200205357600080fd5b6040820152620020666060840162001da8565b60608201529392505050565b600181815b80851115620020b357816000190482111562002097576200209762001cf1565b80851615620020a557918102915b93841c939080029062002077565b509250929050565b600082620020cc575060016200216b565b81620020db575060006200216b565b8160018114620020f45760028114620020ff576200211f565b60019150506200216b565b60ff84111562002113576200211362001cf1565b50506001821b6200216b565b5060208310610133831016604e8410600b841016171562002144575081810a6200216b565b62002150838362002072565b806000190482111562002167576200216762001cf1565b0290505b92915050565b600062001da160ff841683620020bb565b60008160001904831182151516156200219f576200219f62001cf1565b500290565b600060608284031215620021b757600080fd5b620021c162001e69565b8251620021ce8162001ea1565b8152620021de6020840162001eb7565b602082015262001f276040840162001eb7565b6000815160005b81811015620022145760208185018101518683015201620021f8565b8181111562002224576000828601525b509290920192915050565b6001600160e01b03198316815260006200224d6004830184620021f1565b949350505050565b600062001da18284620021f1565b6040815260006200228e60408301600a8152690808115e1c1958dd195960b21b602082015260400190565b905082602083015292915050565b6040815260006200228e60408301600a815269080808081058dd1d585b60b21b602082015260400190565b604081526000620022f260408301600a8152690808115e1c1958dd195960b21b602082015260400190565b6001600160a01b0393909316602092909201919091525090565b604081526000620022f260408301600a815269080808081058dd1d585b60b21b60208201526040019056fe608060405234801561001057600080fd5b5060405163095ea7b360e01b815273a354f35829ae975e850e23e9615b11da1b3dc4de6004820152600019602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063095ea7b3906044016020604051808303816000875af115801561007e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a291906100a8565b506100d1565b6000602082840312156100ba57600080fd5b815180151581146100ca57600080fd5b9392505050565b6115d2806100e06000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806347b348451461005c57806350bf94d7146100715780636e6bf1f414610084578063d238b43314610097578063fcd064cf146100aa575b600080fd5b61006f61006a366004610fce565b6100da565b005b61006f61007f366004611036565b610230565b61006f61009236600461107e565b6104e5565b61006f6100a5366004611105565b61079d565b6100bd6100b836600461117e565b610c5d565b6040516001600160a01b0319909116815260200160405180910390f35b604051636e553f6560e01b81526004810185905273403ae7384e89b086ea2935d5fafed07465242b38602482015260009073a354f35829ae975e850e23e9615b11da1b3dc4de90636e553f65906044016020604051808303816000875af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d91906111c6565b6040516315bf1a8f60e31b81526001600160a01b0319841660048201527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560248201526001600160801b038083166044830152808716606483015285166084820152909150736cb18ff2a33e981d1e38a663ca056c0a5265066a9063adf8d4789060a4016020604051808303816000875af1158015610204573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906111df565b505050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a6324bd54b4843061025585611219565b6040516001600160e01b031960e086901b1681526001600160a01b031990931660048401526001600160a01b039091166024830152600f0b60448201526001600160801b03851660648201526084016020604051808303816000875af11580156102c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e791906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561033c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036091906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526024810183905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af11580156103cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f19190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90869083906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611248565b5050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a63441c70f7853061050a86611219565b61051386611219565b6040516001600160e01b031960e087901b1681526001600160a01b031990941660048501526001600160a01b039092166024840152600f90810b60448401520b60648201526084016020604051808303816000875af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526001600160801b038416602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af115801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90879083906370a0823190602401602060405180830381865afa15801561070a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072e91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610779573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102289190611248565b604051631e81f82960e01b81526001600160a01b03198716600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f82990602401606060405180830381865afa1580156107f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081d91906112f8565b6040516315740f8d60e21b81526001600160d01b03198416600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190611314565b82519091506001600160a01b031633146108b957600080fd5b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b906108f2908b90309060040161138f565b6060604051808303816000875af1158015610911573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093591906112f8565b50806040015163ffffffff164263ffffffff161015610a3b576040513360248201526001600160a01b031989166044820152606481018890526001600160801b03861660848201527332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9089908990309060a40160408051601f198184030181529181526020820180516001600160e01b03166350bf94d760e01b1790525160e086901b6001600160e01b03191681526109ee949392919060040161140e565b6000604051808303816000875af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a359190810190611458565b50610bd6565b60405163550b025360e01b81526001600160d01b0319841660048201526001600160801b038516602482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca8679063550b0253906044016020604051808303816000875af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906111df565b6040513360248201526001600160a01b03198b1660448201526001600160801b0380831660648301528089166084830152871660a48201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d908390730d9a1a773be5a83eebda23bf98efb8585c3ae4f490309060c40160408051601f198184030181529181526020820180516001600160e01b0316631b9afc7d60e21b1790525160e086901b6001600160e01b0319168152610b8c9493929190600401611505565b6000604051808303816000875af1158015610bab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd39190810190611458565b50505b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610c0f908b90339060040161138f565b6060604051808303816000875af1158015610c2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5291906112f8565b505050505050505050565b6040516315740f8d60e21b81526001600160d01b03198216600482015260009061181960f11b9073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce49190611314565b602001516001600160d01b03191614610cfc57600080fd5b6040516323b872dd60e01b81523360048201523060248201526044810186905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd906064016020604051808303816000875af1158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611248565b50604051636d4756d760e01b81526001600160d01b03198316600482015261303960f01b602482015260006044820181905290736cb18ff2a33e981d1e38a663ca056c0a5265066a90636d4756d7906064016080604051808303816000875af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e13919061154e565b5090506000610e2b6001600160801b03871688611584565b604051602481018290526001600160801b038089166044830152871660648201526001600160a01b0319841660848201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9088903090819060a40160408051601f198184030181529181526020820180516001600160e01b03166347b3484560e01b1790525160e086901b6001600160e01b0319168152610ed09493929190600401611505565b6000604051808303816000875af1158015610eef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f179190810190611458565b5060405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610f51908590339060040161138f565b6060604051808303816000875af1158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906112f8565b50909695505050505050565b6001600160801b0381168114610fb557600080fd5b50565b6001600160a01b031981168114610fb557600080fd5b60008060008060808587031215610fe457600080fd5b843593506020850135610ff681610fa0565b9250604085013561100681610fa0565b9150606085013561101681610fb8565b939692955090935050565b6001600160a01b0381168114610fb557600080fd5b6000806000806080858703121561104c57600080fd5b843561105781611021565b9350602085013561106781610fb8565b925060408501359150606085013561101681610fa0565b600080600080600060a0868803121561109657600080fd5b85356110a181611021565b945060208601356110b181610fb8565b935060408601356110c181610fa0565b925060608601356110d181610fa0565b915060808601356110e181610fa0565b809150509295509295909350565b6001600160d01b031981168114610fb557600080fd5b60008060008060008060c0878903121561111e57600080fd5b863561112981610fb8565b955060208701359450604087013561114081611021565b9350606087013561115081610fa0565b9250608087013561116081610fa0565b915060a0870135611170816110ef565b809150509295509295509295565b6000806000806080858703121561119457600080fd5b8435935060208501356111a681610fa0565b925060408501356111b681610fa0565b91506060850135611016816110ef565b6000602082840312156111d857600080fd5b5051919050565b6000602082840312156111f157600080fd5b81516111fc81610fa0565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19810361123f5761123f611203565b60000392915050565b60006020828403121561125a57600080fd5b815180151581146111fc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006060828403121561129257600080fd5b6040516060810181811067ffffffffffffffff821117156112b5576112b561126a565b806040525080915082516112c881611021565b815260208301516112d8816110ef565b602082015260408301516112eb816110ef565b6040919091015292915050565b60006060828403121561130a57600080fd5b6111fc8383611280565b60006060828403121561132657600080fd5b6040516060810181811067ffffffffffffffff821117156113495761134961126a565b604052825161135781611021565b81526020830151611367816110ef565b6020820152604083015163ffffffff8116811461138357600080fd5b60408201529392505050565b6001600160a01b03199290921682526001600160a01b0316602082015260400190565b60005b838110156113cd5781810151838201526020016113b5565b838111156113dc576000848401525b50505050565b600081518084526113fa8160208601602086016113b2565b601f01601f19169290920160200192915050565b8481526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b9695505050505050565b60006020828403121561146a57600080fd5b815167ffffffffffffffff8082111561148257600080fd5b818401915084601f83011261149657600080fd5b8151818111156114a8576114a861126a565b604051601f8201601f19908116603f011681019083821181831017156114d0576114d061126a565b816040528281528760208487010111156114e957600080fd5b6114fa8360208301602088016113b2565b979650505050505050565b6001600160801b03851681526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b6000806080838503121561156157600080fd5b825161156c81610fb8565b915061157b8460208501611280565b90509250929050565b6000821982111561159757611597611203565b50019056fea2646970667358221220a5d244c3604d1f1ecc63178ed8c27be05dc2e9541d6d982b7df36206ed99a61f64736f6c634300080d003360806040526000805460ff1916600117905534801561001d57600080fd5b50604080516318caf8e360e31b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860048083019190915260248201929092526044810191909152635553444360e01b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c657c71890608401600060405180830381600087803b1580156100a057600080fd5b505af11580156100b4573d6000803e3d6000fd5b5050604080516318caf8e360e31b8152737a250d5630b4cf539739df2c5dacb4c659f2488d60048201526024810191909152601260448201527124aab734b9bbb0b82b192937baba32b9181960711b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b15801561014357600080fd5b505af1158015610157573d6000803e3d6000fd5b5050604080516318caf8e360e31b815273c88191f8cb8e6d4a668b047c1c8503432c3ca86760048201526024810191909152600860448201526721b0bab6323937b760c11b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b1580156101dc57600080fd5b505af11580156101f0573d6000803e3d6000fd5b50505050610b2c806102036000396000f3fe60806040526004361061004e5760003560e01c806321ce60061461005a578063742c0e721461007c578063ba414fa614610091578063d4babbca146100ba578063fa7626d4146100da57600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046107df565b6100f4565b005b34801561008857600080fd5b5061007a610512565b34801561009d57600080fd5b506100a6610573565b604051901515815260200160405180910390f35b3480156100c657600080fd5b5061007a6100d536600461080f565b61069e565b3480156100e657600080fd5b506000546100a69060ff1681565b6040516370a0823160e01b81526001600160a01b038216600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610833565b6040805160028082526060820183529293506000929091602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020f9190610862565b816000815181106102225761022261087f565b60200260200101906001600160a01b031690816001600160a01b03168152505073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488160018151811061026a5761026a61087f565b6001600160a01b03909216602092830291909101909101526040516307c0329d60e21b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d90631f00ca74906102be90889086906004016108d9565b600060405180830381865afa1580156102db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261030391908101906108fa565b6000815181106103155761031561087f565b6020026020010151600261032991906109ce565b60405163c88a5e6d60e01b815230600482015260248101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c88a5e6d90604401600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b505060405163fb3bdb4160e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d925063fb3bdb41915083906103d690899087908a9042906004016109ed565b60006040518083038185885af11580156103f4573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261041d91908101906108fa565b506040516370a0823160e01b81526001600160a01b038516600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d9190610833565b90506104a98487610a22565b811461050a5760405162461bcd60e51b815260206004820152602660248201527f5553444320627579206661696c65643a20496e636f727265637420656e642062604482015265616c616e636560d01b606482015260840160405180910390fd5b505050505050565b6040516310e7300360e11b81526305f5e10060048201819052306024830181905290916321ce600690604401600060405180830381600087803b15801561055857600080fd5b505af115801561056c573d6000803e3d6000fd5b5050505050565b60008054610100900460ff16156105935750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156106995760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610621917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc491608001610a75565b60408051601f198184030181529082905261063b91610a91565b6000604051808303816000865af19150503d8060008114610678576040519150601f19603f3d011682016040523d82523d6000602084013e61067d565b606091505b50915050808060200190518101906106959190610a9d565b9150505b919050565b6040805160048152602481019091526020810180516001600160e01b031663798a828b60e01b1790526000906106d390610abf565b60405163ca669fa760e01b8152733b870db67a45611cf4723d44487eaf398fac51e36004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063ca669fa790602401600060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505060405163de02cde760e01b81526001600160e01b0319841660048201526001600160a01b038516602482015273c88191f8cb8e6d4a668b047c1c8503432c3ca867925063de02cde79150604401600060405180830381600087803b1580156107b357600080fd5b505af115801561050a573d6000803e3d6000fd5b6001600160a01b03811681146107dc57600080fd5b50565b600080604083850312156107f257600080fd5b823591506020830135610804816107c7565b809150509250929050565b60006020828403121561082157600080fd5b813561082c816107c7565b9392505050565b60006020828403121561084557600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561087457600080fd5b815161082c816107c7565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156108ce5781516001600160a01b0316875295820195908201906001016108a9565b509495945050505050565b8281526040602082015260006108f26040830184610895565b949350505050565b6000602080838503121561090d57600080fd5b825167ffffffffffffffff8082111561092557600080fd5b818501915085601f83011261093957600080fd5b81518181111561094b5761094b61084c565b8060051b604051601f19603f830116810181811085821117156109705761097061084c565b60405291825284820192508381018501918883111561098e57600080fd5b938501935b828510156109ac57845184529385019392850192610993565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156109e8576109e86109b8565b500290565b848152608060208201526000610a066080830186610895565b6001600160a01b03949094166040830152506060015292915050565b60008219821115610a3557610a356109b8565b500190565b6000815160005b81811015610a5b5760208185018101518683015201610a41565b81811115610a6a576000828601525b509290920192915050565b6001600160e01b03198316815260006108f26004830184610a3a565b600061082c8284610a3a565b600060208284031215610aaf57600080fd5b8151801515811461082c57600080fd5b805160208201516001600160e01b03198082169291906004831015610aee5780818460040360031b1b83161693505b50505091905056fea26469706673582212207c7d650374d069e153a414943a55d7c0356801883a13dae6d793cfc0174fdfe164736f6c634300080d003341304facd9323d75b11bcdd609cb38effffdb05710f7caf0e9b16c6d9d709f50b2de2fbe801a0df6c0cbddfd448ba3c41d48a040ca35c56c8196ef0fcae721a8a264697066735822122045fdbc7bfb0268fc620208ff738b6843b13e2f5268b0a654919cbce6b2c3dac764736f6c634300080d0033", + "sourceMap": "3388:5268:4:-:0;;;1609:26:0;;;-1:-1:-1;;1609:26:0;1631:4;1609:26;;;3977:166:4;;;;;;;;;-1:-1:-1;4014:21:4;;-1:-1:-1;;;4014:21:4;;-1:-1:-1;;;4014:21:4;;;158:56:5;3702:42:4;;4014:11;;131:18:5;;4014:21:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4002:4;:34;;-1:-1:-1;;;;;;4002:34:4;-1:-1:-1;;;;;4002:34:4;;;;;;;;;;4047:42;;;-1:-1:-1;;;4047:42:4;;3702;4047;;;732:51:5;799:18;;;792:30;;;;858:2;838:18;;;831:30;-1:-1:-1;;;877:18:5;;;870:40;1712:64:0;;4047:12:4;;927:19:5;;4047:42:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4121:4:4;;4100:35;;;-1:-1:-1;;;4100:35:4;;-1:-1:-1;;;;;4121:4:4;;;4100:35;;;;1169:51:5;;;;1236:18;;;1229:30;;;;1275:18;;;1268:29;-1:-1:-1;;;1313:18:5;;;1306:34;1712:64:0;;-1:-1:-1;4100:12:4;;-1:-1:-1;1357:19:5;;4100:35:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3388:5268;;225:290:5;295:6;348:2;336:9;327:7;323:23;319:32;316:52;;;364:1;361;354:12;316:52;390:16;;-1:-1:-1;;;;;435:31:5;;425:42;;415:70;;481:1;478;471:12;415:70;504:5;225:290;-1:-1:-1;;;225:290:5:o;957:425::-;3388:5268:4;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x60806040523480156200001157600080fd5b5060043610620000875760003560e01c80637ade925a11620000625780637ade925a14620000b9578063ba414fa614620000c3578063eeb6f4b014620000e1578063fa7626d414620000eb57600080fd5b80630a9254e4146200008c57806336df4c4a146200009857806368605ade14620000a2575b600080fd5b62000096620000f9565b005b62000096620001f5565b62000096620000b336600462001cb3565b6200071a565b6200009662000f10565b620000cd620012e1565b604051901515815260200160405180910390f35b6200009662001416565b600054620000cd9060ff1681565b604051620001079062001c7e565b604051809103906000f08015801562000124573d6000803e3d6000fd5b50600060026101000a8154816001600160a01b0302191690836001600160a01b03160217905550604051620001599062001c8c565b604051809103906000f08015801562000176573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03928316908117909155600054604051636a5d5de560e11b81526201000090910490921660048301529063d4babbca90602401600060405180830381600087803b158015620001da57600080fd5b505af1158015620001ef573d6000803e3d6000fd5b50505050565b6405d21dba0060006200020a82600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062000245908690309060040162001d39565b600060405180830381600087803b1580156200026057600080fd5b505af115801562000275573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620002c5916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af1158015620002e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200030b919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562000365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200038b919062001db5565b62000397919062001d07565b620003a3919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf90620003ed90889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af11580156200040d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000433919062001e3d565b6040516315740f8d60e21b8152631819181b60e11b600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801562000490573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004b6919062001ed0565b60408181015190516372eb5f8160e11b815263ffffffff9091166004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063e5d6bf0290602401600060405180830381600087803b1580156200051257600080fd5b505af115801562000527573d6000803e3d6000fd5b5050604051631c8a4a0360e21b81526000925073c88191f8cb8e6d4a668b047c1c8503432c3ca8679150637229280c906200056790869060040162001f33565b6040805180830381865afa15801562000584573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005aa919062001f48565b600080546002546020840151845160405163d238b43360e01b81526001600160a01b03198a16600482015260248101959095526001600160a01b0392831660448601526001600160801b039182166064860152166084840152631819181b60e11b60a48401529293506201000090049091169063d238b4339060c4015b600060405180830381600087803b1580156200064257600080fd5b505af115801562000657573d6000803e3d6000fd5b5050604051631c8a4a0360e21b81526000925073c88191f8cb8e6d4a668b047c1c8503432c3ca8679150637229280c906200069790879060040162001f33565b6040805180830381865afa158015620006b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006da919062001f48565b9050620006f681600001516001600160801b03166000620017f6565b6200071081602001516001600160801b03166000620017f6565b5050505050505050565b604051632631f2b160e11b8152620f42406001600160801b03841610156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d90634c63e56290602401600060405180830381600087803b1580156200077657600080fd5b505af11580156200078b573d6000803e3d6000fd5b5050604051632631f2b160e11b8152655af3107a40006001600160801b03861611156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b158015620007ee57600080fd5b505af115801562000803573d6000803e3d6000fd5b5050604051632631f2b160e11b8152620f42406001600160801b03851610156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b1580156200086357600080fd5b505af115801562000878573d6000803e3d6000fd5b5050604051632631f2b160e11b8152655af3107a40006001600160801b03851611156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b158015620008db57600080fd5b505af1158015620008f0573d6000803e3d6000fd5b50506001546040516310e7300360e11b81526103e993506001600160a01b0390911691506321ce6006906200092c908690309060040162001d39565b600060405180830381600087803b1580156200094757600080fd5b505af11580156200095c573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620009ac916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af1158015620009cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009f2919062001d7d565b506040516315740f8d60e21b8152631819181b60e11b600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801562000a4d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a73919062001ed0565b60025460405163b0f2892160e01b81526001600160801b03861660048201529192506000916103e89185916001600160a01b039091169063b0f2892190602401602060405180830381865afa15801562000ad1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000af7919062001db5565b62000b03919062001d07565b62000b0f919062001dd5565b6020830151604051639be24c4d60e01b81526001600160d01b0319909116600482015261303960f01b602482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790639be24c4d90604401608060405180830381865afa15801562000b80573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ba6919062001fbb565b905060008160400151600a62000bbd919062002171565b826020015162ffffff1662000bd3919062002182565b905060008260400151600a62000bea919062002171565b835162000c0691906bffffffffffffffffffffffff1662002182565b604051632631f2b160e11b81526001600160801b0386168411156004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d90634c63e56290602401600060405180830381600087803b15801562000c6257600080fd5b505af115801562000c77573d6000803e3d6000fd5b5050604051632631f2b160e11b81526001600160801b0387168410156004820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9250634c63e5629150602401600060405180830381600087803b15801562000cd457600080fd5b505af115801562000ce9573d6000803e3d6000fd5b50506000805460405163fcd064cf60e01b81529193506201000090046001600160a01b0316915063fcd064cf9062000d33908c908c908a90631819181b60e11b9060040162001e0a565b6020604051808303816000875af115801562000d53573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d79919062001e3d565b604051631e81f82960e01b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f8299062000db890859060040162001f33565b606060405180830381865afa15801562000dd6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000dfc9190620021a4565b905062000e0e816000015130620018be565b602081015162000e30906001600160d01b031916631819181b60e11b620019a7565b604081015162000e50906001600160d01b03191661303960f01b620019a7565b604051631c8a4a0360e21b815260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c9062000e8c90869060040162001f33565b6040805180830381865afa15801562000ea9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ecf919062001f48565b905062000eeb81602001516001600160801b0316600062001a7e565b805162000f03906001600160801b0316600062001a7e565b5050505050505050505050565b6405d21dba00600062000f2582600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062000f60908690309060040162001d39565b600060405180830381600087803b15801562000f7b57600080fd5b505af115801562000f90573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b3925062000fe0916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af115801562001000573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001026919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562001080573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010a6919062001db5565b620010b2919062001d07565b620010be919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf906200110890889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af115801562001128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200114e919062001e3d565b604051631e81f82960e01b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f829906200118d90859060040162001f33565b606060405180830381865afa158015620011ab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011d19190620021a4565b9050620011e3816000015130620018be565b602081015162001205906001600160d01b031916631819181b60e11b620019a7565b604081015162001225906001600160d01b03191661303960f01b620019a7565b604051631c8a4a0360e21b815260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c906200126190869060040162001f33565b6040805180830381865afa1580156200127e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620012a4919062001f48565b9050620012c081602001516001600160801b0316600062001a7e565b8051620012d8906001600160801b0316600062001a7e565b50505050505050565b60008054610100900460ff1615620013025750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15620014115760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b8284015282518083038401815260608301909352600092909162001393917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016200222f565b60408051601f1981840301815290829052620013af9162002255565b6000604051808303816000865af19150503d8060008114620013ee576040519150601f19603f3d011682016040523d82523d6000602084013e620013f3565b606091505b50915050808060200190518101906200140d919062001d7d565b9150505b919050565b6405d21dba0060006200142b82600362001d07565b6001546040516310e7300360e11b81529192506103e9916001600160a01b03909116906321ce60069062001466908690309060040162001d39565b600060405180830381600087803b1580156200148157600080fd5b505af115801562001496573d6000803e3d6000fd5b505060005460405163095ea7b360e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48935063095ea7b39250620014e6916201000090046001600160a01b031690879060040162001d5b565b6020604051808303816000875af115801562001506573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200152c919062001d7d565b5060025460405163b0f2892160e01b81526001600160801b03841660048201526000916103e89184916001600160a01b03169063b0f2892190602401602060405180830381865afa15801562001586573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620015ac919062001db5565b620015b8919062001d07565b620015c4919062001dd5565b6000805460405163fcd064cf60e01b81529293509091620100009091046001600160a01b03169063fcd064cf906200160e90889088908790631819181b60e11b9060040162001e0a565b6020604051808303816000875af11580156200162e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001654919062001e3d565b604051631c8a4a0360e21b815290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790637229280c906200169390859060040162001f33565b6040805180830381865afa158015620016b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620016d6919062001f48565b600254815160405163fdb0732d60e01b81526001600160801b0390911660048201529192506000916103e89187916001600160a01b039091169063fdb0732d90602401602060405180830381865afa15801562001737573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200175d919062001db5565b62001769919062001d07565b62001775919062001dd5565b6000546002546020850151855160405163d238b43360e01b81526001600160a01b0319891660048201526001600160801b0380871660248301526001600160a01b039485166044830152928316606482015291166084820152631819181b60e11b60a482015292935062010000909104169063d238b4339060c40162000627565b808214620018ba5760008051602062004719833981519152604051620018589060208082526022908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b75696e604082015261745d60f01b606082015260800190565b60405180910390a1600080516020620047398339815191528160405162001880919062002263565b60405180910390a16000805160206200473983398151915282604051620018a891906200229c565b60405180910390a1620018ba62001b6b565b5050565b806001600160a01b0316826001600160a01b031614620018ba5760008051602062004719833981519152604051620019359060208082526025908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b616464604082015264726573735d60d81b606082015260800190565b60405180910390a17f9c4e8541ca8f0dc1c413f9108f66d82d3cecb1bddbce437a61caa3175c4cc96f816040516200196e9190620022c7565b60405180910390a17f9c4e8541ca8f0dc1c413f9108f66d82d3cecb1bddbce437a61caa3175c4cc96f82604051620018a891906200230c565b808214620018ba576000805160206200471983398151915260405162001a0c9060208082526025908201527f4572726f723a2061203d3d2062206e6f7420736174697366696564205b627974604082015264657333325d60d81b606082015260800190565b60405180910390a17fafb795c9c61e4fe7468c386f925d7a5429ecad9c0495ddb8d38d690614d32f998160405162001a45919062002263565b60405180910390a17fafb795c9c61e4fe7468c386f925d7a5429ecad9c0495ddb8d38d690614d32f9982604051620018a891906200229c565b808211620018ba576000805160206200471983398151915260405162001adf9060208082526021908201527f4572726f723a2061203e2062206e6f7420736174697366696564205b75696e746040820152605d60f81b606082015260800190565b60405180910390a16040805181815260098183015268202056616c7565206160b81b6060820152602081018490529051600080516020620047398339815191529181900360800190a1604080518181526009918101919091526810102b30b63ab2903160b91b6060820152602081018290526000805160206200473983398151915290608001620018a8565b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1562001c6d5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b9282019290925260016060820152600091907f70ca10bbd0dbfd9020a9f4b13402c16cb120705e0d1c0aeab10fa353ae586fc49060800160408051601f198184030181529082905262001c0892916020016200222f565b60408051601f198184030181529082905262001c249162002255565b6000604051808303816000865af19150503d806000811462001c63576040519150601f19603f3d011682016040523d82523d6000602084013e62001c68565b606091505b505050505b6000805461ff001916610100179055565b6116b2806200233883390190565b610d2f80620039ea83390190565b6001600160801b038116811462001cb057600080fd5b50565b6000806040838503121562001cc757600080fd5b823562001cd48162001c9a565b9150602083013562001ce68162001c9a565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b60006001600160801b038083168185168183048111821515161562001d305762001d3062001cf1565b02949350505050565b6001600160801b039290921682526001600160a01b0316602082015260400190565b6001600160a01b039290921682526001600160801b0316602082015260400190565b60006020828403121562001d9057600080fd5b8151801515811462001da157600080fd5b9392505050565b8051620014118162001c9a565b60006020828403121562001dc857600080fd5b815162001da18162001c9a565b60006001600160801b038084168062001dfe57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b6001600160801b0394851681529284166020840152921660408201526001600160d01b0319909116606082015260800190565b60006020828403121562001e5057600080fd5b81516001600160a01b03198116811462001da157600080fd5b6040516060810167ffffffffffffffff8111828210171562001e9b57634e487b7160e01b600052604160045260246000fd5b60405290565b6001600160a01b038116811462001cb057600080fd5b80516001600160d01b0319811681146200141157600080fd5b60006060828403121562001ee357600080fd5b62001eed62001e69565b825162001efa8162001ea1565b815262001f0a6020840162001eb7565b6020820152604083015163ffffffff8116811462001f2757600080fd5b60408201529392505050565b6001600160a01b031991909116815260200190565b60006040828403121562001f5b57600080fd5b6040516040810181811067ffffffffffffffff8211171562001f8d57634e487b7160e01b600052604160045260246000fd5b604052825162001f9d8162001c9a565b8152602083015162001faf8162001c9a565b60208201529392505050565b60006080828403121562001fce57600080fd5b6040516080810181811067ffffffffffffffff821117156200200057634e487b7160e01b600052604160045260246000fd5b60405282516bffffffffffffffffffffffff811681146200202057600080fd5b8152602083015162ffffff811681146200203957600080fd5b6020820152604083015160ff811681146200205357600080fd5b6040820152620020666060840162001da8565b60608201529392505050565b600181815b80851115620020b357816000190482111562002097576200209762001cf1565b80851615620020a557918102915b93841c939080029062002077565b509250929050565b600082620020cc575060016200216b565b81620020db575060006200216b565b8160018114620020f45760028114620020ff576200211f565b60019150506200216b565b60ff84111562002113576200211362001cf1565b50506001821b6200216b565b5060208310610133831016604e8410600b841016171562002144575081810a6200216b565b62002150838362002072565b806000190482111562002167576200216762001cf1565b0290505b92915050565b600062001da160ff841683620020bb565b60008160001904831182151516156200219f576200219f62001cf1565b500290565b600060608284031215620021b757600080fd5b620021c162001e69565b8251620021ce8162001ea1565b8152620021de6020840162001eb7565b602082015262001f276040840162001eb7565b6000815160005b81811015620022145760208185018101518683015201620021f8565b8181111562002224576000828601525b509290920192915050565b6001600160e01b03198316815260006200224d6004830184620021f1565b949350505050565b600062001da18284620021f1565b6040815260006200228e60408301600a8152690808115e1c1958dd195960b21b602082015260400190565b905082602083015292915050565b6040815260006200228e60408301600a815269080808081058dd1d585b60b21b602082015260400190565b604081526000620022f260408301600a8152690808115e1c1958dd195960b21b602082015260400190565b6001600160a01b0393909316602092909201919091525090565b604081526000620022f260408301600a815269080808081058dd1d585b60b21b60208201526040019056fe608060405234801561001057600080fd5b5060405163095ea7b360e01b815273a354f35829ae975e850e23e9615b11da1b3dc4de6004820152600019602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063095ea7b3906044016020604051808303816000875af115801561007e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a291906100a8565b506100d1565b6000602082840312156100ba57600080fd5b815180151581146100ca57600080fd5b9392505050565b6115d2806100e06000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806347b348451461005c57806350bf94d7146100715780636e6bf1f414610084578063d238b43314610097578063fcd064cf146100aa575b600080fd5b61006f61006a366004610fce565b6100da565b005b61006f61007f366004611036565b610230565b61006f61009236600461107e565b6104e5565b61006f6100a5366004611105565b61079d565b6100bd6100b836600461117e565b610c5d565b6040516001600160a01b0319909116815260200160405180910390f35b604051636e553f6560e01b81526004810185905273403ae7384e89b086ea2935d5fafed07465242b38602482015260009073a354f35829ae975e850e23e9615b11da1b3dc4de90636e553f65906044016020604051808303816000875af1158015610149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016d91906111c6565b6040516315bf1a8f60e31b81526001600160a01b0319841660048201527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560248201526001600160801b038083166044830152808716606483015285166084820152909150736cb18ff2a33e981d1e38a663ca056c0a5265066a9063adf8d4789060a4016020604051808303816000875af1158015610204573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906111df565b505050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a6324bd54b4843061025585611219565b6040516001600160e01b031960e086901b1681526001600160a01b031990931660048401526001600160a01b039091166024830152600f0b60448201526001600160801b03851660648201526084016020604051808303816000875af11580156102c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e791906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561033c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036091906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526024810183905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af11580156103cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f19190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90869083906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611248565b5050505050565b736cb18ff2a33e981d1e38a663ca056c0a5265066a63441c70f7853061050a86611219565b61051386611219565b6040516001600160e01b031960e087901b1681526001600160a01b031990941660048501526001600160a01b039092166024840152600f90810b60448401520b60648201526084016020604051808303816000875af115801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906111df565b5073a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b0316633ccfd60b6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906111c6565b5060405163a9059cbb60e01b81527332e4c68b3a4a813b710595aeba7f6b7604ab9c1560048201526001600160801b038416602482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb906044016020604051808303816000875af115801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611248565b506040516370a0823160e01b815230600482015273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063a9059cbb90879083906370a0823190602401602060405180830381865afa15801561070a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072e91906111c6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610779573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102289190611248565b604051631e81f82960e01b81526001600160a01b03198716600482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca86790631e81f82990602401606060405180830381865afa1580156107f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081d91906112f8565b6040516315740f8d60e21b81526001600160d01b03198416600482015290915060009073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190611314565b82519091506001600160a01b031633146108b957600080fd5b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b906108f2908b90309060040161138f565b6060604051808303816000875af1158015610911573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093591906112f8565b50806040015163ffffffff164263ffffffff161015610a3b576040513360248201526001600160a01b031989166044820152606481018890526001600160801b03861660848201527332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9089908990309060a40160408051601f198184030181529181526020820180516001600160e01b03166350bf94d760e01b1790525160e086901b6001600160e01b03191681526109ee949392919060040161140e565b6000604051808303816000875af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a359190810190611458565b50610bd6565b60405163550b025360e01b81526001600160d01b0319841660048201526001600160801b038516602482015260009073c88191f8cb8e6d4a668b047c1c8503432c3ca8679063550b0253906044016020604051808303816000875af1158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc91906111df565b6040513360248201526001600160a01b03198b1660448201526001600160801b0380831660648301528089166084830152871660a48201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d908390730d9a1a773be5a83eebda23bf98efb8585c3ae4f490309060c40160408051601f198184030181529181526020820180516001600160e01b0316631b9afc7d60e21b1790525160e086901b6001600160e01b0319168152610b8c9493929190600401611505565b6000604051808303816000875af1158015610bab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd39190810190611458565b50505b60405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610c0f908b90339060040161138f565b6060604051808303816000875af1158015610c2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5291906112f8565b505050505050505050565b6040516315740f8d60e21b81526001600160d01b03198216600482015260009061181960f11b9073c88191f8cb8e6d4a668b047c1c8503432c3ca867906355d03e3490602401606060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce49190611314565b602001516001600160d01b03191614610cfc57600080fd5b6040516323b872dd60e01b81523360048201523060248201526044810186905273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd906064016020604051808303816000875af1158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611248565b50604051636d4756d760e01b81526001600160d01b03198316600482015261303960f01b602482015260006044820181905290736cb18ff2a33e981d1e38a663ca056c0a5265066a90636d4756d7906064016080604051808303816000875af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e13919061154e565b5090506000610e2b6001600160801b03871688611584565b604051602481018290526001600160801b038089166044830152871660648201526001600160a01b0319841660848201529091507332e4c68b3a4a813b710595aeba7f6b7604ab9c159063c5bf0e9d9088903090819060a40160408051601f198184030181529181526020820180516001600160e01b03166347b3484560e01b1790525160e086901b6001600160e01b0319168152610ed09493929190600401611505565b6000604051808303816000875af1158015610eef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f179190810190611458565b5060405163798a828b60e01b815273c88191f8cb8e6d4a668b047c1c8503432c3ca8679063798a828b90610f51908590339060040161138f565b6060604051808303816000875af1158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906112f8565b50909695505050505050565b6001600160801b0381168114610fb557600080fd5b50565b6001600160a01b031981168114610fb557600080fd5b60008060008060808587031215610fe457600080fd5b843593506020850135610ff681610fa0565b9250604085013561100681610fa0565b9150606085013561101681610fb8565b939692955090935050565b6001600160a01b0381168114610fb557600080fd5b6000806000806080858703121561104c57600080fd5b843561105781611021565b9350602085013561106781610fb8565b925060408501359150606085013561101681610fa0565b600080600080600060a0868803121561109657600080fd5b85356110a181611021565b945060208601356110b181610fb8565b935060408601356110c181610fa0565b925060608601356110d181610fa0565b915060808601356110e181610fa0565b809150509295509295909350565b6001600160d01b031981168114610fb557600080fd5b60008060008060008060c0878903121561111e57600080fd5b863561112981610fb8565b955060208701359450604087013561114081611021565b9350606087013561115081610fa0565b9250608087013561116081610fa0565b915060a0870135611170816110ef565b809150509295509295509295565b6000806000806080858703121561119457600080fd5b8435935060208501356111a681610fa0565b925060408501356111b681610fa0565b91506060850135611016816110ef565b6000602082840312156111d857600080fd5b5051919050565b6000602082840312156111f157600080fd5b81516111fc81610fa0565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19810361123f5761123f611203565b60000392915050565b60006020828403121561125a57600080fd5b815180151581146111fc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006060828403121561129257600080fd5b6040516060810181811067ffffffffffffffff821117156112b5576112b561126a565b806040525080915082516112c881611021565b815260208301516112d8816110ef565b602082015260408301516112eb816110ef565b6040919091015292915050565b60006060828403121561130a57600080fd5b6111fc8383611280565b60006060828403121561132657600080fd5b6040516060810181811067ffffffffffffffff821117156113495761134961126a565b604052825161135781611021565b81526020830151611367816110ef565b6020820152604083015163ffffffff8116811461138357600080fd5b60408201529392505050565b6001600160a01b03199290921682526001600160a01b0316602082015260400190565b60005b838110156113cd5781810151838201526020016113b5565b838111156113dc576000848401525b50505050565b600081518084526113fa8160208601602086016113b2565b601f01601f19169290920160200192915050565b8481526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b9695505050505050565b60006020828403121561146a57600080fd5b815167ffffffffffffffff8082111561148257600080fd5b818401915084601f83011261149657600080fd5b8151818111156114a8576114a861126a565b604051601f8201601f19908116603f011681019083821181831017156114d0576114d061126a565b816040528281528760208487010111156114e957600080fd5b6114fa8360208301602088016113b2565b979650505050505050565b6001600160801b03851681526001600160a01b0384811660208301528316604082015260a060608201819052600090820181905260c06080830181905261144e908301846113e2565b6000806080838503121561156157600080fd5b825161156c81610fb8565b915061157b8460208501611280565b90509250929050565b6000821982111561159757611597611203565b50019056fea2646970667358221220a5d244c3604d1f1ecc63178ed8c27be05dc2e9541d6d982b7df36206ed99a61f64736f6c634300080d003360806040526000805460ff1916600117905534801561001d57600080fd5b50604080516318caf8e360e31b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860048083019190915260248201929092526044810191909152635553444360e01b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c657c71890608401600060405180830381600087803b1580156100a057600080fd5b505af11580156100b4573d6000803e3d6000fd5b5050604080516318caf8e360e31b8152737a250d5630b4cf539739df2c5dacb4c659f2488d60048201526024810191909152601260448201527124aab734b9bbb0b82b192937baba32b9181960711b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b15801561014357600080fd5b505af1158015610157573d6000803e3d6000fd5b5050604080516318caf8e360e31b815273c88191f8cb8e6d4a668b047c1c8503432c3ca86760048201526024810191909152600860448201526721b0bab6323937b760c11b6064820152737109709ecfa91a80626ff3989d68f67f5b1dd12d925063c657c7189150608401600060405180830381600087803b1580156101dc57600080fd5b505af11580156101f0573d6000803e3d6000fd5b50505050610b2c806102036000396000f3fe60806040526004361061004e5760003560e01c806321ce60061461005a578063742c0e721461007c578063ba414fa614610091578063d4babbca146100ba578063fa7626d4146100da57600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046107df565b6100f4565b005b34801561008857600080fd5b5061007a610512565b34801561009d57600080fd5b506100a6610573565b604051901515815260200160405180910390f35b3480156100c657600080fd5b5061007a6100d536600461080f565b61069e565b3480156100e657600080fd5b506000546100a69060ff1681565b6040516370a0823160e01b81526001600160a01b038216600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610833565b6040805160028082526060820183529293506000929091602083019080368337019050509050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020f9190610862565b816000815181106102225761022261087f565b60200260200101906001600160a01b031690816001600160a01b03168152505073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488160018151811061026a5761026a61087f565b6001600160a01b03909216602092830291909101909101526040516307c0329d60e21b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d90631f00ca74906102be90889086906004016108d9565b600060405180830381865afa1580156102db573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261030391908101906108fa565b6000815181106103155761031561087f565b6020026020010151600261032991906109ce565b60405163c88a5e6d60e01b815230600482015260248101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063c88a5e6d90604401600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b505060405163fb3bdb4160e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d925063fb3bdb41915083906103d690899087908a9042906004016109ed565b60006040518083038185885af11580156103f4573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261041d91908101906108fa565b506040516370a0823160e01b81526001600160a01b038516600482015260009073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906370a0823190602401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d9190610833565b90506104a98487610a22565b811461050a5760405162461bcd60e51b815260206004820152602660248201527f5553444320627579206661696c65643a20496e636f727265637420656e642062604482015265616c616e636560d01b606482015260840160405180910390fd5b505050505050565b6040516310e7300360e11b81526305f5e10060048201819052306024830181905290916321ce600690604401600060405180830381600087803b15801561055857600080fd5b505af115801561056c573d6000803e3d6000fd5b5050505050565b60008054610100900460ff16156105935750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156106995760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610621917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc491608001610a75565b60408051601f198184030181529082905261063b91610a91565b6000604051808303816000865af19150503d8060008114610678576040519150601f19603f3d011682016040523d82523d6000602084013e61067d565b606091505b50915050808060200190518101906106959190610a9d565b9150505b919050565b6040805160048152602481019091526020810180516001600160e01b031663798a828b60e01b1790526000906106d390610abf565b60405163ca669fa760e01b8152733b870db67a45611cf4723d44487eaf398fac51e36004820152909150737109709ecfa91a80626ff3989d68f67f5b1dd12d9063ca669fa790602401600060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505060405163de02cde760e01b81526001600160e01b0319841660048201526001600160a01b038516602482015273c88191f8cb8e6d4a668b047c1c8503432c3ca867925063de02cde79150604401600060405180830381600087803b1580156107b357600080fd5b505af115801561050a573d6000803e3d6000fd5b6001600160a01b03811681146107dc57600080fd5b50565b600080604083850312156107f257600080fd5b823591506020830135610804816107c7565b809150509250929050565b60006020828403121561082157600080fd5b813561082c816107c7565b9392505050565b60006020828403121561084557600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561087457600080fd5b815161082c816107c7565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156108ce5781516001600160a01b0316875295820195908201906001016108a9565b509495945050505050565b8281526040602082015260006108f26040830184610895565b949350505050565b6000602080838503121561090d57600080fd5b825167ffffffffffffffff8082111561092557600080fd5b818501915085601f83011261093957600080fd5b81518181111561094b5761094b61084c565b8060051b604051601f19603f830116810181811085821117156109705761097061084c565b60405291825284820192508381018501918883111561098e57600080fd5b938501935b828510156109ac57845184529385019392850192610993565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156109e8576109e86109b8565b500290565b848152608060208201526000610a066080830186610895565b6001600160a01b03949094166040830152506060015292915050565b60008219821115610a3557610a356109b8565b500190565b6000815160005b81811015610a5b5760208185018101518683015201610a41565b81811115610a6a576000828601525b509290920192915050565b6001600160e01b03198316815260006108f26004830184610a3a565b600061082c8284610a3a565b600060208284031215610aaf57600080fd5b8151801515811461082c57600080fd5b805160208201516001600160e01b03198082169291906004831015610aee5780818460040360031b1b83161693505b50505091905056fea26469706673582212207c7d650374d069e153a414943a55d7c0356801883a13dae6d793cfc0174fdfe164736f6c634300080d003341304facd9323d75b11bcdd609cb38effffdb05710f7caf0e9b16c6d9d709f50b2de2fbe801a0df6c0cbddfd448ba3c41d48a040ca35c56c8196ef0fcae721a8a264697066735822122045fdbc7bfb0268fc620208ff738b6843b13e2f5268b0a654919cbce6b2c3dac764736f6c634300080d0033", + "sourceMap": "3388:5268:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4151:188;;;:::i;:::-;;7640:1013;;;:::i;5275:1381::-;;;;;;:::i;:::-;;:::i;4386:881::-;;;:::i;1865:600:0:-;;;:::i;:::-;;;723:14:5;;716:22;698:41;;686:2;671:18;1865:600:0;;;;;;;6664:964:4;;;:::i;1609:26:0:-;;;;;;;;;4151:188:4;4199:16;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;4186:10;;:29;;;;;-1:-1:-1;;;;;4186:29:4;;;;;-1:-1:-1;;;;;4186:29:4;;;;;;4243:20;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4226:14:4;:37;;-1:-1:-1;;;;;;4226:37:4;-1:-1:-1;;;;;4226:37:4;;;;;;;;;-1:-1:-1;4319:10:4;4274:57;;-1:-1:-1;;;4274:57:4;;4319:10;;;;;;;4274:57;;;896:51:5;4226:37:4;4274:36;;869:18:5;;4274:57:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4151:188::o;7640:1013::-;7723:14;7702:18;7767:14;7723;7767:1;:14;:::i;:::-;7893;;:49;;-1:-1:-1;;;7893:49:4;;7748:33;;-1:-1:-1;7877:5:4;;-1:-1:-1;;;;;7893:14:4;;;;:22;;:49;;7916:10;;7936:4;;7893:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7974:10:4;;7953:45;;-1:-1:-1;;;7953:45:4;;3525:42;;-1:-1:-1;7953:12:4;;-1:-1:-1;7953:45:4;;7974:10;;;-1:-1:-1;;;;;7974:10:4;;7987;;7953:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8026:4:4;;:29;;-1:-1:-1;;;8026:29:4;;-1:-1:-1;;;;;2468:47:5;;8026:29:4;;;2450:66:5;8009:13:4;;8070:4;;8058:8;;-1:-1:-1;;;;;8026:4:4;;:19;;2423:18:5;;8026:29:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;:::i;:::-;8025:49;;;;:::i;:::-;8085:15;8103:10;;:56;;-1:-1:-1;;;8103:56:4;;8009:65;;-1:-1:-1;8085:15:4;;8103:10;;;;-1:-1:-1;;;;;8103:10:4;;:17;;:56;;8121:10;;8133:8;;8009:65;;-1:-1:-1;;;8150:8:4;8103:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8226:25;;-1:-1:-1;;;8226:25:4;;-1:-1:-1;;;8226:25:4;;;4205:56:5;8085:74:4;;-1:-1:-1;8203:20:4;;3613:42;;8226:15;;4178:18:5;;8226:25:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8274:15;;;;;8262:28;;-1:-1:-1;;;8262:28:4;;5735:10:5;5723:23;;;8262:28:4;;;5705:42:5;8274:15:4;;-1:-1:-1;1712:64:0;;8262:11:4;;5678:18:5;;8262:28:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8349:26:4;;-1:-1:-1;;;8349:26:4;;8322:24;;-1:-1:-1;3613:42:4;;-1:-1:-1;8349:17:4;;:26;;8367:7;;8349:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8386:10;;;;8424:4;8431:12;;;;8445;;8386:82;;-1:-1:-1;;;8386:82:4;;-1:-1:-1;;;;;;7038:49:5;;8386:82:4;;;7020:68:5;7104:18;;;7097:34;;;;-1:-1:-1;;;;;8424:4:4;;;7147:18:5;;;7140:60;-1:-1:-1;;;;;7289:15:5;;;7269:18;;;7262:43;7342:15;7321:19;;;7314:44;-1:-1:-1;;;7374:19:5;;;7367:66;8431:12:4;;-1:-1:-1;8386:10:4;;;;;;;:17;;6992:19:5;;8386:82:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8541:26:4;;-1:-1:-1;;;8541:26:4;;8511:27;;-1:-1:-1;3613:42:4;;-1:-1:-1;8541:17:4;;:26;;8559:7;;8541:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8511:56;;8578:28;8587:11;:15;;;-1:-1:-1;;;;;8578:28:4;8604:1;8578:8;:28::i;:::-;8617;8626:11;:15;;;-1:-1:-1;;;;;8617:28:4;8643:1;8617:8;:28::i;:::-;7691:962;;;;;;;;7640:1013::o;5275:1381::-;5351:38;;-1:-1:-1;;;5351:38:4;;5379:9;-1:-1:-1;;;;;5365:23:4;;;;5351:38;;;698:41:5;1712:64:0;;5351:13:4;;671:18:5;;5351:38:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5400:48:4;;-1:-1:-1;;;5400:48:4;;5428:19;-1:-1:-1;;;;;5414:33:4;;;;5400:48;;;698:41:5;1712:64:0;;-1:-1:-1;5400:13:4;;-1:-1:-1;671:18:5;;5400:48:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5459:36:4;;-1:-1:-1;;;5459:36:4;;5485:9;-1:-1:-1;;;;;5473:21:4;;;;5459:36;;;698:41:5;1712:64:0;;-1:-1:-1;5459:13:4;;-1:-1:-1;671:18:5;;5459:36:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5506:46:4;;-1:-1:-1;;;5506:46:4;;5532:19;-1:-1:-1;;;;;5520:31:4;;;;5506:46;;;698:41:5;1712:64:0;;-1:-1:-1;5506:13:4;;-1:-1:-1;671:18:5;;5506:46:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5668:14:4;;:49;;-1:-1:-1;;;5668:49:4;;5650:5;;-1:-1:-1;;;;;;5668:14:4;;;;-1:-1:-1;5668:22:4;;:49;;5691:10;;5711:4;;5668:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5749:10:4;;5728:45;;-1:-1:-1;;;5728:45:4;;3525:42;;-1:-1:-1;5728:12:4;;-1:-1:-1;5728:45:4;;5749:10;;;-1:-1:-1;;;;;5749:10:4;;5762;;5728:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;5838:25:4;;-1:-1:-1;;;5838:25:4;;-1:-1:-1;;;5838:25:4;;;4205:56:5;5815:20:4;;3613:42;;5838:15;;4178:18:5;;5838:25:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5891:4;;:29;;-1:-1:-1;;;5891:29:4;;-1:-1:-1;;;;;2468:47:5;;5891:29:4;;;2450:66:5;5815:48:4;;-1:-1:-1;5874:13:4;;5935:4;;5923:8;;-1:-1:-1;;;;;5891:4:4;;;;:19;;2423:18:5;;5891:29:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;:::i;:::-;5890:49;;;;:::i;:::-;5983:13;;;;5969:36;;-1:-1:-1;;;5969:36:4;;-1:-1:-1;;;;;;7675:15:5;;;5969:36:4;;;7657:34:5;-1:-1:-1;;;7707:18:5;;;7700:43;5874:65:4;;-1:-1:-1;5950:16:4;;3613:42;;5969:13;;7587:18:5;;5969:36:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5950:55;;6016:12;6049:4;:8;;;6043:2;:14;;;;:::i;:::-;6031:4;:8;;;:27;;;;;;:::i;:::-;6016:42;;6069:12;6102:4;:8;;;6096:2;:14;;;;:::i;:::-;6084:8;;:27;;;;;;:::i;:::-;6122:31;;-1:-1:-1;;;6122:31:4;;-1:-1:-1;;;;;6136:16:4;;-1:-1:-1;;6136:16:4;6122:31;;;698:41:5;6069:42:4;;-1:-1:-1;1712:64:0;;6122:13:4;;671:18:5;;6122:31:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6164:31:4;;-1:-1:-1;;;6164:31:4;;-1:-1:-1;;;;;6178:16:4;;-1:-1:-1;;6178:16:4;6164:31;;;698:41:5;1712:64:0;;-1:-1:-1;6164:13:4;;-1:-1:-1;671:18:5;;6164:31:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6208:15:4;6226:10;;:56;;-1:-1:-1;;;6226:56:4;;6208:15;;-1:-1:-1;6226:10:4;;;-1:-1:-1;;;;;6226:10:4;;-1:-1:-1;6226:17:4;;:56;;6244:10;;6256:8;;6266:5;;-1:-1:-1;;;6273:8:4;6226:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6349:24;;-1:-1:-1;;;6349:24:4;;6208:74;;-1:-1:-1;6328:18:4;;3613:42;;6349:15;;:24;;6208:74;;6349:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6328:45;;6384:36;6393:5;:11;;;6414:4;6384:8;:36::i;:::-;6440:14;;;;6431:34;;-1:-1:-1;;;;;;6431:34:4;-1:-1:-1;;;6431:8:4;:34::i;:::-;6485:11;;;;6476:34;;-1:-1:-1;;;;;;6476:34:4;-1:-1:-1;;;6476:8:4;:34::i;:::-;6550:26;;-1:-1:-1;;;6550:26:4;;6523:24;;3613:42;;6550:17;;:26;;6568:7;;6550:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6523:53;;6587:25;6596:8;:12;;;-1:-1:-1;;;;;6587:25:4;6610:1;6587:8;:25::i;:::-;6632:12;;6623:25;;-1:-1:-1;;;;;6623:25:4;6632:12;6623:8;:25::i;:::-;5340:1316;;;;;;;;;5275:1381;;:::o;4386:881::-;4451:14;4430:18;4495:14;4451;4495:1;:14;:::i;:::-;4623;;:49;;-1:-1:-1;;;4623:49:4;;4476:33;;-1:-1:-1;4605:5:4;;-1:-1:-1;;;;;4623:14:4;;;;:22;;:49;;4646:10;;4666:4;;4623:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4704:10:4;;4683:45;;-1:-1:-1;;;4683:45:4;;3525:42;;-1:-1:-1;4683:12:4;;-1:-1:-1;4683:45:4;;4704:10;;;-1:-1:-1;;;;;4704:10:4;;4717;;4683:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;4758:4:4;;:29;;-1:-1:-1;;;4758:29:4;;-1:-1:-1;;;;;2468:47:5;;4758:29:4;;;2450:66:5;4741:13:4;;4802:4;;4790:8;;-1:-1:-1;;;;;4758:4:4;;:19;;2423:18:5;;4758:29:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;:::i;:::-;4757:49;;;;:::i;:::-;4819:15;4837:10;;:56;;-1:-1:-1;;;4837:56:4;;4741:65;;-1:-1:-1;4819:15:4;;4837:10;;;;-1:-1:-1;;;;;4837:10:4;;:17;;:56;;4855:10;;4867:8;;4741:65;;-1:-1:-1;;;4884:8:4;4837:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4960:24;;-1:-1:-1;;;4960:24:4;;4819:74;;-1:-1:-1;4939:18:4;;3613:42;;4960:15;;:24;;4819:74;;4960:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4939:45;;4995:36;5004:5;:11;;;5025:4;4995:8;:36::i;:::-;5051:14;;;;5042:34;;-1:-1:-1;;;;;;5042:34:4;-1:-1:-1;;;5042:8:4;:34::i;:::-;5096:11;;;;5087:34;;-1:-1:-1;;;;;;5087:34:4;-1:-1:-1;;;5087:8:4;:34::i;:::-;5161:26;;-1:-1:-1;;;5161:26:4;;5134:24;;3613:42;;5161:17;;:26;;5179:7;;5161:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5134:53;;5198:25;5207:8;:12;;;-1:-1:-1;;;;;5198:25:4;5221:1;5198:8;:25::i;:::-;5243:12;;5234:25;;-1:-1:-1;;;;;5234:25:4;5243:12;5234:8;:25::i;:::-;4419:848;;;;;;;4386:881::o;1865:600:0:-;1899:4;1920:7;;;;;;;1916:542;;;-1:-1:-1;1951:7:0;;;;;;;;1865:600::o;1916:542::-;1991:17;3070:42;3058:55;3141:16;2031:382;;2251:43;;;1712:64;2251:43;;;11068:51:5;;;-1:-1:-1;;;11135:18:5;;;11128:34;2251:43:0;;;;;;;;;11041:18:5;;;2251:43:0;;;-1:-1:-1;;1712:64:0;;2139:178;;2189:34;;2139:178;;;:::i;:::-;;;;-1:-1:-1;;2139:178:0;;;;;;;;;;2099:237;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2072:264;;;2381:7;2370:27;;;;;;;;;;;;:::i;:::-;2355:42;;2053:360;2031:382;2434:12;1865:600;-1:-1:-1;1865:600:0:o;6664:964:4:-;6734:14;6713:18;6778:14;6734;6778:1;:14;:::i;:::-;6904;;:49;;-1:-1:-1;;;6904:49:4;;6759:33;;-1:-1:-1;6888:5:4;;-1:-1:-1;;;;;6904:14:4;;;;:22;;:49;;6927:10;;6947:4;;6904:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6985:10:4;;6964:45;;-1:-1:-1;;;6964:45:4;;3525:42;;-1:-1:-1;6964:12:4;;-1:-1:-1;6964:45:4;;6985:10;;;-1:-1:-1;;;;;6985:10:4;;6998;;6964:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;7037:4:4;;:29;;-1:-1:-1;;;7037:29:4;;-1:-1:-1;;;;;2468:47:5;;7037:29:4;;;2450:66:5;7020:13:4;;7081:4;;7069:8;;-1:-1:-1;;;;;7037:4:4;;:19;;2423:18:5;;7037:29:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;:::i;:::-;7036:49;;;;:::i;:::-;7096:15;7114:10;;:56;;-1:-1:-1;;;7114:56:4;;7020:65;;-1:-1:-1;7096:15:4;;7114:10;;;;-1:-1:-1;;;;;7114:10:4;;:17;;:56;;7132:10;;7144:8;;7020:65;;-1:-1:-1;;;7161:8:4;7114:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7229:26;;-1:-1:-1;;;7229:26:4;;7096:74;;-1:-1:-1;7202:24:4;;3613:42;;7229:17;;:26;;7096:74;;7229:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7287:4;;7310:12;;7287:36;;-1:-1:-1;;;7287:36:4;;-1:-1:-1;;;;;2468:47:5;;;7287:36:4;;;2450:66:5;7310:12:4;;-1:-1:-1;7266:17:4;;7338:4;;7326:8;;-1:-1:-1;;;;;7287:4:4;;;;:22;;2423:18:5;;7287:36:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;;;:::i;:::-;7286:56;;;;:::i;:::-;7353:10;;;7399:4;7406:12;;;;7420;;7353:90;;-1:-1:-1;;;7353:90:4;;-1:-1:-1;;;;;;12294:49:5;;7353:90:4;;;12276:68:5;-1:-1:-1;;;;;12433:15:5;;;12413:18;;;12406:43;-1:-1:-1;;;;;7399:4:4;;;12465:18:5;;;12458:60;12554:15;;;12534:18;;;12527:43;12607:15;;12586:19;;;12579:44;-1:-1:-1;;;12639:19:5;;;12632:66;7266:76:4;;-1:-1:-1;7353:10:4;;;;;;:17;;12248:19:5;;7353:90:4;11991:713:5;5358:269:0;5421:1;5416;:6;5412:208;;-1:-1:-1;;;;;;;;;;;5444:41:0;;;;12911:2:5;12893:21;;;12950:2;12930:18;;;12923:30;12989:34;12984:2;12969:18;;12962:62;-1:-1:-1;;;13055:2:5;13040:18;;13033:32;13097:3;13082:19;;12709:398;5444:41:0;;;;;;;;-1:-1:-1;;;;;;;;;;;5534:1:0;5505:31;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;;;;;;;5585:1:0;5556:31;;;;;;:::i;:::-;;;;;;;;5602:6;:4;:6::i;:::-;5358:269;;:::o;3721:284::-;3790:1;-1:-1:-1;;;;;3785:6:0;:1;-1:-1:-1;;;;;3785:6:0;;3781:217;;-1:-1:-1;;;;;;;;;;;3813:44:0;;;;14348:2:5;14330:21;;;14387:2;14367:18;;;14360:30;14426:34;14421:2;14406:18;;14399:62;-1:-1:-1;;;14492:2:5;14477:18;;14470:35;14537:3;14522:19;;14146:401;3813:44:0;;;;;;;;3877:34;3909:1;3877:34;;;;;;:::i;:::-;;;;;;;;3931;3963:1;3931:34;;;;;;:::i;4209:284::-;4278:1;4273;:6;4269:217;;-1:-1:-1;;;;;;;;;;;4301:44:0;;;;15512:2:5;15494:21;;;15551:2;15531:18;;;15524:30;15590:34;15585:2;15570:18;;15563:62;-1:-1:-1;;;15656:2:5;15641:18;;15634:35;15701:3;15686:19;;15310:401;4301:44:0;;;;;;;;4365:34;4397:1;4365:34;;;;;;:::i;:::-;;;;;;;;4419;4451:1;4419:34;;;;;;:::i;6955:266::-;7018:1;7013;:6;7009:205;;-1:-1:-1;;;;;;;;;;;7041:40:0;;;;16624:2:5;16606:21;;;16663:2;16643:18;;;16636:30;16702:34;16697:2;16682:18;;16675:62;-1:-1:-1;;;16768:2:5;16753:18;;16746:31;16809:3;16794:19;;16422:397;7041:40:0;;;;;;;;7101:30;;;17036:21:5;;;17093:1;17073:18;;;17066:29;-1:-1:-1;;;17126:2:5;17111:18;;17104:39;17210:4;17195:20;;17188:36;;;7101:30:0;;-1:-1:-1;;;;;;;;;;;7101:30:0;;;;17175:3:5;7101:30:0;;;7151;;;17447:21:5;;;17504:1;17484:18;;;17477:29;;;;-1:-1:-1;;;17537:2:5;17522:18;;17515:39;17621:4;17606:20;;17599:36;;;-1:-1:-1;;;;;;;;;;;7151:30:0;17586:3:5;17571:19;7151:30:0;17235:406:5;2474:435:0;3070:42;3058:55;3141:16;2510:367;;2714:67;;;1712:64;2714:67;;;17848:51:5;;;-1:-1:-1;;;17915:18:5;;;17908:34;;;;2774:4:0;17958:18:5;;;17951:34;2548:11:0;;1712:64;2647:43;;17821:18:5;;2714:67:0;;;-1:-1:-1;;2714:67:0;;;;;;;;;;2601:199;;;2714:67;2601:199;;:::i;:::-;;;;-1:-1:-1;;2601:199:0;;;;;;;;;;2565:250;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;2510:367:0;2887:7;:14;;-1:-1:-1;;2887:14:0;;;;;2474:435::o;-1:-1:-1:-;;;;;;;;:::o;:::-;;;;;;;;:::o;14:146:5:-;-1:-1:-1;;;;;93:5:5;89:46;82:5;79:57;69:85;;150:1;147;140:12;69:85;14:146;:::o;165:388::-;233:6;241;294:2;282:9;273:7;269:23;265:32;262:52;;;310:1;307;300:12;262:52;349:9;336:23;368:31;393:5;368:31;:::i;:::-;418:5;-1:-1:-1;475:2:5;460:18;;447:32;488:33;447:32;488:33;:::i;:::-;540:7;530:17;;;165:388;;;;;:::o;958:127::-;1019:10;1014:3;1010:20;1007:1;1000:31;1050:4;1047:1;1040:15;1074:4;1071:1;1064:15;1090:287;1130:7;-1:-1:-1;;;;;1223:2:5;1220:1;1216:10;1253:2;1250:1;1246:10;1309:3;1305:2;1301:12;1296:3;1293:21;1286:3;1279:11;1272:19;1268:47;1265:73;;;1318:18;;:::i;:::-;1358:13;;1090:287;-1:-1:-1;;;;1090:287:5:o;1382:315::-;-1:-1:-1;;;;;1574:47:5;;;;1556:66;;-1:-1:-1;;;;;1658:32:5;1653:2;1638:18;;1631:60;1544:2;1529:18;;1382:315::o;1702:::-;-1:-1:-1;;;;;1894:32:5;;;;1876:51;;-1:-1:-1;;;;;1963:47:5;1958:2;1943:18;;1936:75;1864:2;1849:18;;1702:315::o;2022:277::-;2089:6;2142:2;2130:9;2121:7;2117:23;2113:32;2110:52;;;2158:1;2155;2148:12;2110:52;2190:9;2184:16;2243:5;2236:13;2229:21;2222:5;2219:32;2209:60;;2265:1;2262;2255:12;2209:60;2288:5;2022:277;-1:-1:-1;;;2022:277:5:o;2527:138::-;2606:13;;2628:31;2606:13;2628:31;:::i;2670:251::-;2740:6;2793:2;2781:9;2772:7;2768:23;2764:32;2761:52;;;2809:1;2806;2799:12;2761:52;2841:9;2835:16;2860:31;2885:5;2860:31;:::i;2926:313::-;2966:1;-1:-1:-1;;;;;3053:2:5;3050:1;3046:10;3075:3;3065:134;;3121:10;3116:3;3112:20;3109:1;3102:31;3156:4;3153:1;3146:15;3184:4;3181:1;3174:15;3065:134;3217:10;;3213:20;;;;;2926:313;-1:-1:-1;;2926:313:5:o;3244:500::-;-1:-1:-1;;;;;3544:15:5;;;3526:34;;3596:15;;;3591:2;3576:18;;3569:43;3648:15;;3643:2;3628:18;;3621:43;-1:-1:-1;;;;;;3700:37:5;;;3695:2;3680:18;;3673:65;3460:3;3445:19;;3244:500::o;3749:307::-;3819:6;3872:2;3860:9;3851:7;3847:23;3843:32;3840:52;;;3888:1;3885;3878:12;3840:52;3914:16;;-1:-1:-1;;;;;;3959:48:5;;3949:59;;3939:87;;4022:1;4019;4012:12;4272:343;4339:2;4333:9;4381:2;4369:15;;4414:18;4399:34;;4435:22;;;4396:62;4393:185;;;4500:10;4495:3;4491:20;4488:1;4481:31;4535:4;4532:1;4525:15;4563:4;4560:1;4553:15;4393:185;4594:2;4587:22;4272:343;:::o;4620:141::-;-1:-1:-1;;;;;4705:31:5;;4695:42;;4685:70;;4751:1;4748;4741:12;4766:181;4844:13;;-1:-1:-1;;;;;;4886:36:5;;4876:47;;4866:75;;4937:1;4934;4927:12;4952:603;5046:6;5099:2;5087:9;5078:7;5074:23;5070:32;5067:52;;;5115:1;5112;5105:12;5067:52;5141:17;;:::i;:::-;5188:9;5182:16;5207:43;5242:7;5207:43;:::i;:::-;5259:22;;5313:48;5357:2;5342:18;;5313:48;:::i;:::-;5308:2;5301:5;5297:14;5290:72;5407:2;5396:9;5392:18;5386:25;5455:10;5446:7;5442:24;5433:7;5430:37;5420:65;;5481:1;5478;5471:12;5420:65;5512:2;5501:14;;5494:31;5505:5;4952:603;-1:-1:-1;;;4952:603:5:o;5758:220::-;-1:-1:-1;;;;;;5922:49:5;;;;5904:68;;5892:2;5877:18;;5758:220::o;5983:739::-;6079:6;6132:2;6120:9;6111:7;6107:23;6103:32;6100:52;;;6148:1;6145;6138:12;6100:52;6181:2;6175:9;6223:2;6215:6;6211:15;6292:6;6280:10;6277:22;6256:18;6244:10;6241:34;6238:62;6235:185;;;6342:10;6337:3;6333:20;6330:1;6323:31;6377:4;6374:1;6367:15;6405:4;6402:1;6395:15;6235:185;6436:2;6429:22;6473:16;;6498:31;6473:16;6498:31;:::i;:::-;6538:21;;6604:2;6589:18;;6583:25;6617:33;6583:25;6617:33;:::i;:::-;6678:2;6666:15;;6659:32;6670:6;5983:739;-1:-1:-1;;;5983:739:5:o;7754:1054::-;7846:6;7899:3;7887:9;7878:7;7874:23;7870:33;7867:53;;;7916:1;7913;7906:12;7867:53;7949:2;7943:9;7991:3;7983:6;7979:16;8061:6;8049:10;8046:22;8025:18;8013:10;8010:34;8007:62;8004:185;;;8111:10;8106:3;8102:20;8099:1;8092:31;8146:4;8143:1;8136:15;8174:4;8171:1;8164:15;8004:185;8205:2;8198:22;8242:16;;8298:26;8287:38;;8277:49;;8267:77;;8340:1;8337;8330:12;8267:77;8353:21;;8419:2;8404:18;;8398:25;8467:8;8454:22;;8442:35;;8432:63;;8491:1;8488;8481:12;8432:63;8523:2;8511:15;;8504:32;8581:2;8566:18;;8560:25;8629:4;8616:18;;8604:31;;8594:59;;8649:1;8646;8639:12;8594:59;8681:2;8669:15;;8662:32;8727:49;8772:2;8757:18;;8727:49;:::i;:::-;8722:2;8710:15;;8703:74;8714:6;7754:1054;-1:-1:-1;;;7754:1054:5:o;8813:422::-;8902:1;8945:5;8902:1;8959:270;8980:7;8970:8;8967:21;8959:270;;;9039:4;9035:1;9031:6;9027:17;9021:4;9018:27;9015:53;;;9048:18;;:::i;:::-;9098:7;9088:8;9084:22;9081:55;;;9118:16;;;;9081:55;9197:22;;;;9157:15;;;;8959:270;;;8963:3;8813:422;;;;;:::o;9240:806::-;9289:5;9319:8;9309:80;;-1:-1:-1;9360:1:5;9374:5;;9309:80;9408:4;9398:76;;-1:-1:-1;9445:1:5;9459:5;;9398:76;9490:4;9508:1;9503:59;;;;9576:1;9571:130;;;;9483:218;;9503:59;9533:1;9524:10;;9547:5;;;9571:130;9608:3;9598:8;9595:17;9592:43;;;9615:18;;:::i;:::-;-1:-1:-1;;9671:1:5;9657:16;;9686:5;;9483:218;;9785:2;9775:8;9772:16;9766:3;9760:4;9757:13;9753:36;9747:2;9737:8;9734:16;9729:2;9723:4;9720:12;9716:35;9713:77;9710:159;;;-1:-1:-1;9822:19:5;;;9854:5;;9710:159;9901:34;9926:8;9920:4;9901:34;:::i;:::-;9971:6;9967:1;9963:6;9959:19;9950:7;9947:32;9944:58;;;9982:18;;:::i;:::-;10020:20;;-1:-1:-1;9240:806:5;;;;;:::o;10051:140::-;10109:5;10138:47;10179:4;10169:8;10165:19;10159:4;10138:47;:::i;10196:168::-;10236:7;10302:1;10298;10294:6;10290:14;10287:1;10284:21;10279:1;10272:9;10265:17;10261:45;10258:71;;;10309:18;;:::i;:::-;-1:-1:-1;10349:9:5;;10196:168::o;10369:520::-;10462:6;10515:2;10503:9;10494:7;10490:23;10486:32;10483:52;;;10531:1;10528;10521:12;10483:52;10557:17;;:::i;:::-;10604:9;10598:16;10623:43;10658:7;10623:43;:::i;:::-;10675:22;;10729:48;10773:2;10758:18;;10729:48;:::i;:::-;10724:2;10717:5;10713:14;10706:72;10810:48;10854:2;10843:9;10839:18;10810:48;:::i;11173:336::-;11214:3;11252:5;11246:12;11276:1;11286:128;11300:6;11297:1;11294:13;11286:128;;;11397:4;11382:13;;;11378:24;;11372:31;11359:11;;;11352:52;11315:12;11286:128;;;11432:6;11429:1;11426:13;11423:48;;;11467:1;11458:6;11453:3;11449:16;11442:27;11423:48;-1:-1:-1;11487:16:5;;;;;11173:336;-1:-1:-1;;11173:336:5:o;11514:278::-;-1:-1:-1;;;;;;11699:33:5;;11687:46;;11669:3;11749:37;11783:1;11774:11;;11766:6;11749:37;:::i;:::-;11742:44;11514:278;-1:-1:-1;;;;11514:278:5:o;11797:189::-;11926:3;11951:29;11976:3;11968:6;11951:29;:::i;13276:348::-;13506:2;13495:9;13488:21;13469:4;13526:49;13571:2;13560:9;13556:18;13189:2;13177:15;;-1:-1:-1;;;13217:4:5;13208:14;;13201:36;13262:2;13253:12;;13112:159;13526:49;13518:57;;13611:6;13606:2;13595:9;13591:18;13584:34;13276:348;;;;:::o;13793:::-;14023:2;14012:9;14005:21;13986:4;14043:49;14088:2;14077:9;14073:18;13706:2;13694:15;;-1:-1:-1;;;13734:4:5;13725:14;;13718:36;13779:2;13770:12;;13629:159;14552:374;14782:2;14771:9;14764:21;14745:4;14802:49;14847:2;14836:9;14832:18;13189:2;13177:15;;-1:-1:-1;;;13217:4:5;13208:14;;13201:36;13262:2;13253:12;;13112:159;14802:49;-1:-1:-1;;;;;14887:32:5;;;;14882:2;14867:18;;;;14860:60;;;;-1:-1:-1;14794:57:5;14552:374::o;14931:::-;15161:2;15150:9;15143:21;15124:4;15181:49;15226:2;15215:9;15211:18;13706:2;13694:15;;-1:-1:-1;;;13734:4:5;13725:14;;13718:36;13779:2;13770:12;;13629:159", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\test\\YieldLever.t.sol", + "exportedSymbols": { + "AccessControl": [ + 2542 + ], + "Balances": [ + 5255 + ], + "Cauldron": [ + 5501 + ], + "CheatCodes": [ + 2583 + ], + "DSTest": [ + 5232 + ], + "Debt": [ + 5264 + ], + "HelperContract": [ + 2803 + ], + "IERC20": [ + 5403 + ], + "IFYToken": [ + 5242 + ], + "IToken": [ + 5441 + ], + "IUniswapV2Router02": [ + 2534 + ], + "Pool": [ + 2598 + ], + "Series": [ + 5250 + ], + "Vault": [ + 5241 + ], + "YieldLadle": [ + 5350 + ], + "YieldLever": [ + 5944 + ], + "YieldLeverTest": [ + 3445 + ], + "yVault": [ + 5420 + ] + }, + "id": 3446, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2500, + "literals": [ + "solidity", + "^", + "0.8", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "40:24:4" + }, + { + "absolutePath": "F:/Git/yvarb/lib/ds-test/src/test.sol", + "file": "ds-test/test.sol", + "id": 2501, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5233, + "src": "68:26:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "F:/Git/yvarb/src/YieldLever.sol", + "file": "src/YieldLever.sol", + "id": 2502, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3446, + "sourceUnit": 5945, + "src": "96:28:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUniswapV2Router02", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2534, + "linearizedBaseContracts": [ + 2534 + ], + "name": "IUniswapV2Router02", + "nameLocation": "138:18:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ad5c4648", + "id": 2507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "WETH", + "nameLocation": "173:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2503, + "nodeType": "ParameterList", + "parameters": [], + "src": "177:2:4" + }, + "returnParameters": { + "id": 2506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2507, + "src": "203:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "203:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "202:9:4" + }, + "scope": 2534, + "src": "164:48:4", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1f00ca74", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAmountsIn", + "nameLocation": "227:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2509, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "245:9:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "240:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2508, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "240:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2512, + "mutability": "mutable", + "name": "path", + "nameLocation": "275:4:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "256:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2511, + "nodeType": "ArrayTypeName", + "src": "256:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "239:41:4" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2516, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "318:7:4", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "304:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2515, + "nodeType": "ArrayTypeName", + "src": "304:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "303:23:4" + }, + "scope": 2534, + "src": "218:109:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fb3bdb41", + "id": 2533, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "swapETHForExactTokens", + "nameLocation": "342:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2520, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "369:9:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "364:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "364:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "path", + "nameLocation": "399:4:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "380:23:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2522, + "nodeType": "ArrayTypeName", + "src": "380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "to", + "nameLocation": "413:2:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "405:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "405:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2527, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "422:8:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "417:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "363:68:4" + }, + "returnParameters": { + "id": 2532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "amounts", + "nameLocation": "499:7:4", + "nodeType": "VariableDeclaration", + "scope": 2533, + "src": "485:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "485:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2530, + "nodeType": "ArrayTypeName", + "src": "485:6:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "484:23:4" + }, + "scope": 2534, + "src": "333:175:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "128:383:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessControl", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2542, + "linearizedBaseContracts": [ + 2542 + ], + "name": "AccessControl", + "nameLocation": "525:13:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "de02cde7", + "id": 2541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "grantRole", + "nameLocation": "555:9:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "role", + "nameLocation": "572:4:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "565:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2535, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "565:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "account", + "nameLocation": "586:7:4", + "nodeType": "VariableDeclaration", + "scope": 2541, + "src": "578:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "564:30:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:0:4" + }, + "scope": 2542, + "src": "546:58:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "515:92:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "CheatCodes", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2583, + "linearizedBaseContracts": [ + 2583 + ], + "name": "CheatCodes", + "nameLocation": "621:10:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "ca669fa7", + "id": 2547, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "prank", + "nameLocation": "648:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2547, + "src": "654:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "653:9:4" + }, + "returnParameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:4" + }, + "scope": 2583, + "src": "639:33:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c88a5e6d", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deal", + "nameLocation": "720:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2549, + "mutability": "mutable", + "name": "who", + "nameLocation": "733:3:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "725:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2548, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "725:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newBalance", + "nameLocation": "746:10:4", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "738:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "724:33:4" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "766:0:4" + }, + "scope": 2583, + "src": "711:56:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c657c718", + "id": 2561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "label", + "nameLocation": "822:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2556, + "mutability": "mutable", + "name": "addr", + "nameLocation": "836:4:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "828:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2558, + "mutability": "mutable", + "name": "label", + "nameLocation": "858:5:4", + "nodeType": "VariableDeclaration", + "scope": 2561, + "src": "842:21:4", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "827:37:4" + }, + "returnParameters": { + "id": 2560, + "nodeType": "ParameterList", + "parameters": [], + "src": "873:0:4" + }, + "scope": 2583, + "src": "813:61:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "491cc7c2", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "expectEmit", + "nameLocation": "1220:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1231:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2562, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2565, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1237:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1237:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1243:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "1249:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2568, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1249:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1230:24:4" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "1263:0:4" + }, + "scope": 2583, + "src": "1211:53:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e5d6bf02", + "id": 2577, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "warp", + "nameLocation": "1307:4:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "1312:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1311:9:4" + }, + "returnParameters": { + "id": 2576, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:4" + }, + "scope": 2583, + "src": "1298:32:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "4c63e562", + "id": 2582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "assume", + "nameLocation": "1410:6:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2582, + "src": "1417:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1417:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:4" + }, + "returnParameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1431:0:4" + }, + "scope": 2583, + "src": "1401:31:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "611:824:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Pool", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2598, + "linearizedBaseContracts": [ + 2598 + ], + "name": "Pool", + "nameLocation": "1449:4:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "b0f28921", + "id": 2590, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyBasePreview", + "nameLocation": "1470:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2585, + "mutability": "mutable", + "name": "tokenOut", + "nameLocation": "1493:8:4", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1485:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2584, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1485:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1484:18:4" + }, + "returnParameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2588, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2590, + "src": "1543:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2587, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1543:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1542:9:4" + }, + "scope": 2598, + "src": "1461:91:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "fdb0732d", + "id": 2597, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "buyFYTokenPreview", + "nameLocation": "1567:17:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "mutability": "mutable", + "name": "fyTokenOut", + "nameLocation": "1593:10:4", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1585:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2591, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1585:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1584:20:4" + }, + "returnParameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2597, + "src": "1645:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2594, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1645:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "1644:9:4" + }, + "scope": 2598, + "src": "1558:96:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1439:218:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2599, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "1688:6:4" + }, + "id": 2600, + "nodeType": "InheritanceSpecifier", + "src": "1688:6:4" + } + ], + "canonicalName": "HelperContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 2803, + "linearizedBaseContracts": [ + 2803, + 5232 + ], + "name": "HelperContract", + "nameLocation": "1670:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 2606, + "mutability": "constant", + "name": "cheats", + "nameLocation": "1722:6:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1702:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2601, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "1702:10:4" + }, + "referencedDeclaration": 2583, + "src": "1702:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2604, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "1742:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2603, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "1731:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1731:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2612, + "mutability": "constant", + "name": "uniswap", + "nameLocation": "1790:7:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1762:100:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + }, + "typeName": { + "id": 2608, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2607, + "name": "IUniswapV2Router02", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2534, + "src": "1762:18:4" + }, + "referencedDeclaration": 2534, + "src": "1762:18:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307837613235306435363330423463463533393733396446324335644163623463363539463234383844", + "id": 2610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2609, + "name": "IUniswapV2Router02", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2534, + "src": "1800:18:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IUniswapV2Router02_$2534_$", + "typeString": "type(contract IUniswapV2Router02)" + } + }, + "id": 2611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:62:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2618, + "mutability": "constant", + "name": "usdc", + "nameLocation": "1885:4:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1869:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2614, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2613, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "1869:6:4" + }, + "referencedDeclaration": 5403, + "src": "1869:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1899:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2615, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "1892:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1892:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2624, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "1972:8:4", + "nodeType": "VariableDeclaration", + "scope": 2803, + "src": "1949:91:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + }, + "typeName": { + "id": 2620, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2619, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2542, + "src": "1949:13:4" + }, + "referencedDeclaration": 2542, + "src": "1949:13:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1997:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2621, + "name": "AccessControl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "1983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessControl_$2542_$", + "typeString": "type(contract AccessControl)" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1983:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "2063:171:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2632, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2095:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2087:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2087:7:4", + "typeDescriptions": {} + } + }, + "id": 2633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2087:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "55534443", + "id": 2634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2102:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + }, + "value": "USDC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", + "typeString": "literal_string \"USDC\"" + } + ], + "expression": { + "id": 2627, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2074:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2074:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2074:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2636, + "nodeType": "ExpressionStatement", + "src": "2074:35:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2642, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2141:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + ], + "id": 2641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2133:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2133:7:4", + "typeDescriptions": {} + } + }, + "id": 2643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "49556e69737761705632526f757465723032", + "id": 2644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2151:20:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + }, + "value": "IUniswapV2Router02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_752e95a68eb596d735cf554a8bb83c60ed3f2d8c74c6c0af25109b0245aa15e6", + "typeString": "literal_string \"IUniswapV2Router02\"" + } + ], + "expression": { + "id": 2637, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2120:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2120:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2120:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2646, + "nodeType": "ExpressionStatement", + "src": "2120:52:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2652, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "2204:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2196:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2196:7:4", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2196:17:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "4361756c64726f6e", + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:10:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + }, + "value": "Cauldron" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_d9d12fce875dda0f69b2cc86f3744e7ce28b3dc21295072a51581ef4d46e478c", + "typeString": "literal_string \"Cauldron\"" + } + ], + "expression": { + "id": 2647, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2183:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "2183:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2183:43:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2656, + "nodeType": "ExpressionStatement", + "src": "2183:43:4" + } + ] + }, + "id": 2658, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2625, + "nodeType": "ParameterList", + "parameters": [], + "src": "2060:2:4" + }, + "returnParameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "2063:0:4" + }, + "scope": 2803, + "src": "2049:185:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2750, + "nodeType": "Block", + "src": "2302:582:4", + "statements": [ + { + "assignments": [ + 2666 + ], + "declarations": [ + { + "constant": false, + "id": 2666, + "mutability": "mutable", + "name": "startingBalance", + "nameLocation": "2318:15:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2313:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2313:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2671, + "initialValue": { + "arguments": [ + { + "id": 2669, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2351:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2667, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2336:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2336:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:47:4" + }, + { + "assignments": [ + 2676 + ], + "declarations": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "path", + "nameLocation": "2390:4:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2373:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2373:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2675, + "nodeType": "ArrayTypeName", + "src": "2373:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 2682, + "initialValue": { + "arguments": [ + { + "hexValue": "32", + "id": 2680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2411:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 2679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2397:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 2677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2401:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2678, + "nodeType": "ArrayTypeName", + "src": "2401:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2373:40:4" + }, + { + "expression": { + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2683, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2685, + "indexExpression": { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2429:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2424:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 2686, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2434:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "WETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 2507, + "src": "2434:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", + "typeString": "function () pure external returns (address)" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2434:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2424:24:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ExpressionStatement", + "src": "2424:24:4" + }, + { + "expression": { + "id": 2698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2691, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2459:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2693, + "indexExpression": { + "hexValue": "31", + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2464:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2459:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2696, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2477:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + ], + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2469:7:4", + "typeDescriptions": {} + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:23:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2699, + "nodeType": "ExpressionStatement", + "src": "2459:23:4" + }, + { + "assignments": [ + 2701 + ], + "declarations": [ + { + "constant": false, + "id": 2701, + "mutability": "mutable", + "name": "inputAmount", + "nameLocation": "2500:11:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2495:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2700, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2495:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2711, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2514:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "baseExpression": { + "arguments": [ + { + "id": 2705, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2539:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2706, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2550:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 2703, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2518:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getAmountsIn", + "nodeType": "MemberAccess", + "referencedDeclaration": 2518, + "src": "2518:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory) view external returns (uint256[] memory)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2709, + "indexExpression": { + "hexValue": "30", + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2518:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2495:63:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2717, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2581:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2581:7:4", + "typeDescriptions": {} + } + }, + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2581:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2719, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2712, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2569:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deal", + "nodeType": "MemberAccess", + "referencedDeclaration": 2554, + "src": "2569:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 2720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2721, + "nodeType": "ExpressionStatement", + "src": "2569:39:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2727, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2671:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2728, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2676, + "src": "2682:4:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 2729, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2688:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2730, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2698:5:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2698:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2722, + "name": "uniswap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2612, + "src": "2621:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IUniswapV2Router02_$2534", + "typeString": "contract IUniswapV2Router02" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "swapETHForExactTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 2533, + "src": "2621:29:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 2725, + "name": "inputAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2701, + "src": "2658:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2621:49:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$value", + "typeString": "function (uint256,address[] memory,address,uint256) payable external returns (uint256[] memory)" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:93:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 2733, + "nodeType": "ExpressionStatement", + "src": "2621:93:4" + }, + { + "assignments": [ + 2735 + ], + "declarations": [ + { + "constant": false, + "id": 2735, + "mutability": "mutable", + "name": "endBalance", + "nameLocation": "2736:10:4", + "nodeType": "VariableDeclaration", + "scope": 2750, + "src": "2731:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2731:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2740, + "initialValue": { + "arguments": [ + { + "id": 2738, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2662, + "src": "2764:8:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2736, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "2749:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5373, + "src": "2749:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2749:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2731:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "endBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2735, + "src": "2792:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2743, + "name": "amountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2660, + "src": "2806:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2744, + "name": "startingBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2666, + "src": "2818:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2806:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2792:41:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5553444320627579206661696c65643a20496e636f727265637420656e642062616c616e6365", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:40:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + }, + "value": "USDC buy failed: Incorrect end balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bb36307ccc22dbe3a47757a2ec945b723b54841aa7c92ae2f22403ee504f558b", + "typeString": "literal_string \"USDC buy failed: Incorrect end balance\"" + } + ], + "id": 2741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2784:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2784:92:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2749, + "nodeType": "ExpressionStatement", + "src": "2784:92:4" + } + ] + }, + "functionSelector": "21ce6006", + "id": 2751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buyUsdc", + "nameLocation": "2251:7:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2660, + "mutability": "mutable", + "name": "amountOut", + "nameLocation": "2264:9:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2259:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2659, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2259:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2662, + "mutability": "mutable", + "name": "receiver", + "nameLocation": "2283:8:4", + "nodeType": "VariableDeclaration", + "scope": 2751, + "src": "2275:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2275:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2258:34:4" + }, + "returnParameters": { + "id": 2664, + "nodeType": "ParameterList", + "parameters": [], + "src": "2302:0:4" + }, + "scope": 2803, + "src": "2242:642:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2779, + "nodeType": "Block", + "src": "2959:255:4", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "mutability": "mutable", + "name": "sig", + "nameLocation": "2977:3:4", + "nodeType": "VariableDeclaration", + "scope": 2779, + "src": "2970:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2756, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2970:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 2765, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6769766528627974657331322c6164647265737329", + "id": 2762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3014:23:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + }, + "value": "give(bytes12,address)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_798a828b11226c1444c79fa274b1b0903053c2c2ad9baec7e7fd6e60f597f83a", + "typeString": "literal_string \"give(bytes12,address)\"" + } + ], + "expression": { + "id": 2760, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2990:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 2761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2990:23:4", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 2758, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2983:6:4", + "typeDescriptions": {} + } + }, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2983:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2970:69:4" + }, + { + "expression": { + "arguments": [ + { + "hexValue": "307833623837306462363761343536313143463437323364343434383745414633393866416335314533", + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3110:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x3b870db67a45611CF4723d44487EAF398fAc51E3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2766, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3097:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "prank", + "nodeType": "MemberAccess", + "referencedDeclaration": 2547, + "src": "3097:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3097:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2771, + "nodeType": "ExpressionStatement", + "src": "3097:56:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2775, + "name": "sig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "3183:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "id": 2776, + "name": "yieldLeverAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2753, + "src": "3188:17:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2772, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2624, + "src": "3164:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$2542", + "typeString": "contract AccessControl" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantRole", + "nodeType": "MemberAccess", + "referencedDeclaration": 2541, + "src": "3164:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes4_$_t_address_$returns$__$", + "typeString": "function (bytes4,address) external" + } + }, + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2778, + "nodeType": "ExpressionStatement", + "src": "3164:42:4" + } + ] + }, + "functionSelector": "d4babbca", + "id": 2780, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "grantYieldLeverAccess", + "nameLocation": "2901:21:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2753, + "mutability": "mutable", + "name": "yieldLeverAddress", + "nameLocation": "2931:17:4", + "nodeType": "VariableDeclaration", + "scope": 2780, + "src": "2923:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2752, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2923:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2922:27:4" + }, + "returnParameters": { + "id": 2755, + "nodeType": "ParameterList", + "parameters": [], + "src": "2959:0:4" + }, + "scope": 2803, + "src": "2892:322:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "3249:2:4", + "statements": [] + }, + "id": 2784, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2781, + "nodeType": "ParameterList", + "parameters": [], + "src": "3229:2:4" + }, + "returnParameters": { + "id": 2782, + "nodeType": "ParameterList", + "parameters": [], + "src": "3249:0:4" + }, + "scope": 2803, + "src": "3222:29:4", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "3291:90:4", + "statements": [ + { + "assignments": [ + 2788 + ], + "declarations": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "amount", + "nameLocation": "3307:6:4", + "nodeType": "VariableDeclaration", + "scope": 2801, + "src": "3302:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3302:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2790, + "initialValue": { + "hexValue": "3130305f3030305f303030", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3316:11:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "value": "100_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:25:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2794, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2788, + "src": "3351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 2797, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3367:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + ], + "id": 2796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3359:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3359:7:4", + "typeDescriptions": {} + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2791, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "3338:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3338:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2800, + "nodeType": "ExpressionStatement", + "src": "3338:35:4" + } + ] + }, + "functionSelector": "742c0e72", + "id": 2802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuyUsdc", + "nameLocation": "3268:11:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "3279:2:4" + }, + "returnParameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "3291:0:4" + }, + "scope": 2803, + "src": "3259:122:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3446, + "src": "1661:1723:4", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2804, + "name": "DSTest", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5232, + "src": "3415:6:4" + }, + "id": 2805, + "nodeType": "InheritanceSpecifier", + "src": "3415:6:4" + } + ], + "canonicalName": "YieldLeverTest", + "contractDependencies": [ + 2803, + 5944 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3445, + "linearizedBaseContracts": [ + 3445, + 5232 + ], + "name": "YieldLeverTest", + "nameLocation": "3397:14:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 2808, + "mutability": "mutable", + "name": "yieldLever", + "nameLocation": "3440:10:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3429:21:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + }, + "typeName": { + "id": 2807, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2806, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "3429:10:4" + }, + "referencedDeclaration": 5944, + "src": "3429:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2811, + "mutability": "mutable", + "name": "helperContract", + "nameLocation": "3472:14:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3457:29:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + }, + "typeName": { + "id": 2810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2809, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "3457:14:4" + }, + "referencedDeclaration": 2803, + "src": "3457:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2817, + "mutability": "constant", + "name": "usdc", + "nameLocation": "3511:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3495:73:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 2813, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2812, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5403, + "src": "3495:6:4" + }, + "referencedDeclaration": 5403, + "src": "3495:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438", + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3525:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2814, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3518:6:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$5403_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2823, + "mutability": "constant", + "name": "cauldron", + "nameLocation": "3593:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3575:81:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + }, + "typeName": { + "id": 2819, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2818, + "name": "Cauldron", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5501, + "src": "3575:8:4" + }, + "referencedDeclaration": 5501, + "src": "3575:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307863383831393146386362386536443461363638423034376331433835303334333263334361383637", + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3613:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2820, + "name": "Cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "3604:8:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Cauldron_$5501_$", + "typeString": "type(contract Cauldron)" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3604:52:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2829, + "mutability": "constant", + "name": "ladle", + "nameLocation": "3683:5:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3663:82:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + }, + "typeName": { + "id": 2825, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2824, + "name": "YieldLadle", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5350, + "src": "3663:10:4" + }, + "referencedDeclaration": 5350, + "src": "3663:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307836634231386646324133336539383144316533384136363343613035366330613532363530363641", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3702:42:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2826, + "name": "YieldLadle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5350, + "src": "3691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_YieldLadle_$5350_$", + "typeString": "type(contract YieldLadle)" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3691:54:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2835, + "mutability": "constant", + "name": "cheats", + "nameLocation": "3772:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3752:53:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + }, + "typeName": { + "id": 2831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2830, + "name": "CheatCodes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2583, + "src": "3752:10:4" + }, + "referencedDeclaration": 2583, + "src": "3752:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "value": { + "arguments": [ + { + "id": 2833, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "3792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2832, + "name": "CheatCodes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2583, + "src": "3781:10:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CheatCodes_$2583_$", + "typeString": "type(contract CheatCodes)" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3781:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2838, + "mutability": "mutable", + "name": "pool", + "nameLocation": "3817:4:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3812:9:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + }, + "typeName": { + "id": 2837, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2836, + "name": "Pool", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2598, + "src": "3812:4:4" + }, + "referencedDeclaration": 2598, + "src": "3812:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "yvUsdcIlkId", + "nameLocation": "3846:11:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3830:44:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2839, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3830:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3860:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2844, + "mutability": "constant", + "name": "seriesId", + "nameLocation": "3897:8:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3881:41:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2842, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3881:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033323330333630303030", + "id": 2843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_52992115343360_by_1", + "typeString": "int_const 52992115343360" + }, + "value": "0x303230360000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 2847, + "mutability": "constant", + "name": "ILK_ID", + "nameLocation": "3945:6:4", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "3929:39:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + "typeName": { + "id": 2845, + "name": "bytes6", + "nodeType": "ElementaryTypeName", + "src": "3929:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + "value": { + "hexValue": "3078333033393030303030303030", + "id": 2846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3954:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_53021371269120_by_1", + "typeString": "int_const 53021371269120" + }, + "value": "0x303900000000" + }, + "visibility": "internal" + }, + { + "body": { + "id": 2879, + "nodeType": "Block", + "src": "3991:152:4", + "statements": [ + { + "expression": { + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2850, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4002:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2854, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4026:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2852, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4014:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pools", + "nodeType": "MemberAccess", + "referencedDeclaration": 5271, + "src": "4014:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_address_$", + "typeString": "function (bytes6) view external returns (address)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4014:21:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2851, + "name": "Pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "4009:4:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Pool_$2598_$", + "typeString": "type(contract Pool)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:27:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "src": "4002:34:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "4002:34:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2864, + "name": "ladle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2829, + "src": "4068:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLadle_$5350", + "typeString": "contract YieldLadle" + } + ], + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4060:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4060:7:4", + "typeDescriptions": {} + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4060:14:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "5969656c644c61646c65", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:12:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + }, + "value": "YieldLadle" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_f625b18bbc9b8dc285837395b163dc602aebf5d404bd5b3a8b989ac63bd24312", + "typeString": "literal_string \"YieldLadle\"" + } + ], + "expression": { + "id": 2859, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4047:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4047:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4047:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2868, + "nodeType": "ExpressionStatement", + "src": "4047:42:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2874, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4113:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4113:7:4", + "typeDescriptions": {} + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4113:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "506f6f6c", + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4128:6:4", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + }, + "value": "Pool" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_stringliteral_4a62f5c1187999cdd374fd40d850be57b4952a965136e01501e2ac9ed75fe27f", + "typeString": "literal_string \"Pool\"" + } + ], + "expression": { + "id": 2869, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "4100:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 2561, + "src": "4100:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory) external" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4100:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2878, + "nodeType": "ExpressionStatement", + "src": "4100:35:4" + } + ] + }, + "id": 2880, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3988:2:4" + }, + "returnParameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [], + "src": "3991:0:4" + }, + "scope": 3445, + "src": "3977:166:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2906, + "nodeType": "Block", + "src": "4175:164:4", + "statements": [ + { + "expression": { + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2883, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4186:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4199:14:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_YieldLever_$5944_$", + "typeString": "function () returns (contract YieldLever)" + }, + "typeName": { + "id": 2885, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2884, + "name": "YieldLever", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5944, + "src": "4203:10:4" + }, + "referencedDeclaration": 5944, + "src": "4203:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4199:16:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "src": "4186:29:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2889, + "nodeType": "ExpressionStatement", + "src": "4186:29:4" + }, + { + "expression": { + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2890, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4226:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4243:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HelperContract_$2803_$", + "typeString": "function () returns (contract HelperContract)" + }, + "typeName": { + "id": 2892, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2891, + "name": "HelperContract", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2803, + "src": "4247:14:4" + }, + "referencedDeclaration": 2803, + "src": "4247:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:20:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "src": "4226:37:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2896, + "nodeType": "ExpressionStatement", + "src": "4226:37:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2902, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4319:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4311:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4311:7:4", + "typeDescriptions": {} + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4311:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2897, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4274:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "grantYieldLeverAccess", + "nodeType": "MemberAccess", + "referencedDeclaration": 2780, + "src": "4274:36:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 2904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4274:57:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2905, + "nodeType": "ExpressionStatement", + "src": "4274:57:4" + } + ] + }, + "functionSelector": "0a9254e4", + "id": 2907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setUp", + "nameLocation": "4160:5:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:2:4" + }, + "returnParameters": { + "id": 2882, + "nodeType": "ParameterList", + "parameters": [], + "src": "4175:0:4" + }, + "scope": 3445, + "src": "4151:188:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3016, + "nodeType": "Block", + "src": "4419:848:4", + "statements": [ + { + "assignments": [ + 2912 + ], + "declarations": [ + { + "constant": false, + "id": 2912, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "4438:10:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4430:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2911, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4430:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2914, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4451:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4430:35:4" + }, + { + "assignments": [ + 2916 + ], + "declarations": [ + { + "constant": false, + "id": 2916, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "4484:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4476:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2915, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4476:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2920, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4495:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2918, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4499:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4495:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4476:33:4" + }, + { + "assignments": [ + 2922 + ], + "declarations": [ + { + "constant": false, + "id": 2922, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "4594:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4586:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2921, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4586:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2924, + "initialValue": { + "hexValue": "315f303031", + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4605:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4586:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 2928, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4646:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 2931, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4666:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4658:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:4", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4658:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 2925, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "4623:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "4623:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4623:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2934, + "nodeType": "ExpressionStatement", + "src": "4623:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2940, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4704:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4696:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:4", + "typeDescriptions": {} + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4696:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2942, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4717:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2935, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "4683:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "4683:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 2943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2944, + "nodeType": "ExpressionStatement", + "src": "4683:45:4" + }, + { + "assignments": [ + 2946 + ], + "declarations": [ + { + "constant": false, + "id": 2946, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "4749:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4741:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 2945, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "4741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 2956, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2949, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4778:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 2947, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "4758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "4758:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4758:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2951, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2922, + "src": "4790:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "4758:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 2953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4757:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4802:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "4757:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4741:65:4" + }, + { + "assignments": [ + 2958 + ], + "declarations": [ + { + "constant": false, + "id": 2958, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "4827:7:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4819:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 2957, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "4819:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 2966, + "initialValue": { + "arguments": [ + { + "id": 2961, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2912, + "src": "4855:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2962, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2916, + "src": "4867:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2963, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2946, + "src": "4877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 2964, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "4884:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 2959, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "4837:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "4837:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4837:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4819:74:4" + }, + { + "assignments": [ + 2969 + ], + "declarations": [ + { + "constant": false, + "id": 2969, + "mutability": "mutable", + "name": "vault", + "nameLocation": "4952:5:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "4939:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 2968, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2967, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "4939:5:4" + }, + "referencedDeclaration": 5241, + "src": "4939:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 2974, + "initialValue": { + "arguments": [ + { + "id": 2972, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "4976:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2970, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "4960:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "4960:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4939:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5004:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "5004:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2980, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5025:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5017:7:4", + "typeDescriptions": {} + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2975, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "4995:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4995:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4995:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2985, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5051:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "5051:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2987, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5067:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2984, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5042:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5042:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2989, + "nodeType": "ExpressionStatement", + "src": "5042:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2991, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2969, + "src": "5096:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "5096:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 2993, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "5109:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 2990, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "5087:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2995, + "nodeType": "ExpressionStatement", + "src": "5087:34:4" + }, + { + "assignments": [ + 2998 + ], + "declarations": [ + { + "constant": false, + "id": 2998, + "mutability": "mutable", + "name": "balances", + "nameLocation": "5150:8:4", + "nodeType": "VariableDeclaration", + "scope": 3016, + "src": "5134:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 2997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2996, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "5134:8:4" + }, + "referencedDeclaration": 5255, + "src": "5134:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3003, + "initialValue": { + "arguments": [ + { + "id": 3001, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2958, + "src": "5179:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 2999, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "5161:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5161:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5134:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3005, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5207:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "5207:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5221:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3004, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5198:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3009, + "nodeType": "ExpressionStatement", + "src": "5198:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2998, + "src": "5243:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "5243:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5257:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3010, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "5234:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5234:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "5234:25:4" + } + ] + }, + "documentation": { + "id": 2908, + "nodeType": "StructuredDocumentation", + "src": "4347:33:4", + "text": "Test the creation of a Vault." + }, + "functionSelector": "7ade925a", + "id": 3017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testBuildVault", + "nameLocation": "4395:14:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2909, + "nodeType": "ParameterList", + "parameters": [], + "src": "4409:2:4" + }, + "returnParameters": { + "id": 2910, + "nodeType": "ParameterList", + "parameters": [], + "src": "4419:0:4" + }, + "scope": 3445, + "src": "4386:881:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3207, + "nodeType": "Block", + "src": "5340:1316:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3027, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5365:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5379:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5365:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3024, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5351:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5351:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5351:38:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3031, + "nodeType": "ExpressionStatement", + "src": "5351:38:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3035, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5414:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5428:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5414:33:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3032, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5400:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5400:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5400:48:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "5400:48:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3043, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5473:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "hexValue": "315f3030305f303030", + "id": 3044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5485:9:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1_000_000" + }, + "src": "5473:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3040, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5459:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5459:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5459:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3047, + "nodeType": "ExpressionStatement", + "src": "5459:36:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3051, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5520:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "3130305f3030305f3030305f3030305f303030", + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5532:19:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000_by_1", + "typeString": "int_const 100000000000000" + }, + "value": "100_000_000_000_000" + }, + "src": "5520:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3048, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "5506:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "5506:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5506:46:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3055, + "nodeType": "ExpressionStatement", + "src": "5506:46:4" + }, + { + "assignments": [ + 3057 + ], + "declarations": [ + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "5639:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5631:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3056, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5631:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3059, + "initialValue": { + "hexValue": "315f303031", + "id": 3058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5650:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5631:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3063, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5691:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3066, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5711:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5703:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5703:7:4", + "typeDescriptions": {} + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3060, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "5668:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "5668:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5668:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3069, + "nodeType": "ExpressionStatement", + "src": "5668:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3075, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "5749:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5741:7:4", + "typeDescriptions": {} + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3077, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "5762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3070, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "5728:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "5728:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5728:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3079, + "nodeType": "ExpressionStatement", + "src": "5728:45:4" + }, + { + "assignments": [ + 3082 + ], + "declarations": [ + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "series", + "nameLocation": "5829:6:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5815:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3081, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3080, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "5815:6:4" + }, + "referencedDeclaration": 5250, + "src": "5815:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3087, + "initialValue": { + "arguments": [ + { + "id": 3085, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "5854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3083, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5838:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "5838:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5815:48:4" + }, + { + "assignments": [ + 3089 + ], + "declarations": [ + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "5882:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5874:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3088, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3092, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "5911:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3090, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "5891:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "5891:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3094, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "5923:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "5891:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5890:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5935:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "5890:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5874:65:4" + }, + { + "assignments": [ + 3102 + ], + "declarations": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "debt", + "nameLocation": "5962:4:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "5950:16:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt" + }, + "typeName": { + "id": 3101, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3100, + "name": "Debt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5264, + "src": "5950:4:4" + }, + "referencedDeclaration": 5264, + "src": "5950:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_storage_ptr", + "typeString": "struct Debt" + } + }, + "visibility": "internal" + } + ], + "id": 3109, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3105, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "5983:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5247, + "src": "5983:13:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3107, + "name": "ILK_ID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "5998:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3103, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "5969:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "debt", + "nodeType": "MemberAccess", + "referencedDeclaration": 5475, + "src": "5969:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$_t_bytes6_$returns$_t_struct$_Debt_$5264_memory_ptr_$", + "typeString": "function (bytes6,bytes6) view external returns (struct Debt memory)" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5969:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5950:55:4" + }, + { + "assignments": [ + 3111 + ], + "declarations": [ + { + "constant": false, + "id": 3111, + "mutability": "mutable", + "name": "minDebt", + "nameLocation": "6021:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6016:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6016:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3120, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3112, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6031:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 5259, + "src": "6031:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6043:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3115, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6049:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6043:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6042:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6031:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6016:42:4" + }, + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "maxDebt", + "nameLocation": "6074:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6069:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6069:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3131, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3123, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6084:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 5257, + "src": "6084:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6096:2:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 3126, + "name": "debt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Debt_$5264_memory_ptr", + "typeString": "struct Debt memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dec", + "nodeType": "MemberAccess", + "referencedDeclaration": 5261, + "src": "6102:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6096:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6095:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6084:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6069:42:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3135, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6136:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 3136, + "name": "minDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3111, + "src": "6145:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6136:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3132, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6122:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6122:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3139, + "nodeType": "ExpressionStatement", + "src": "6122:31:4" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3143, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6178:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 3144, + "name": "maxDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "6187:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6178:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 3140, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "6164:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "assume", + "nodeType": "MemberAccess", + "referencedDeclaration": 2582, + "src": "6164:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool) external" + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6164:31:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "6164:31:4" + }, + { + "assignments": [ + 3149 + ], + "declarations": [ + { + "constant": false, + "id": 3149, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "6216:7:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6208:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3148, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "6208:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "arguments": [ + { + "id": 3152, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3019, + "src": "6244:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3153, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "6256:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3154, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "6266:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3155, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6273:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3150, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6226:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "6226:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6226:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6208:74:4" + }, + { + "assignments": [ + 3160 + ], + "declarations": [ + { + "constant": false, + "id": 3160, + "mutability": "mutable", + "name": "vault", + "nameLocation": "6341:5:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6328:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault" + }, + "typeName": { + "id": 3159, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3158, + "name": "Vault", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5241, + "src": "6328:5:4" + }, + "referencedDeclaration": 5241, + "src": "6328:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_storage_ptr", + "typeString": "struct Vault" + } + }, + "visibility": "internal" + } + ], + "id": 3165, + "initialValue": { + "arguments": [ + { + "id": 3163, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6365:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3161, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "vaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 5457, + "src": "6349:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Vault_$5241_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Vault memory)" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6349:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:45:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3167, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6393:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3168, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5236, + "src": "6393:11:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 3171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6414:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6406:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6406:7:4", + "typeDescriptions": {} + } + }, + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6406:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3166, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3766, + "src": "6384:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6384:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3174, + "nodeType": "ExpressionStatement", + "src": "6384:36:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3176, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6440:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seriesId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5238, + "src": "6440:14:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3178, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "6456:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3175, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6431:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3180, + "nodeType": "ExpressionStatement", + "src": "6431:34:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3182, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3160, + "src": "6485:5:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Vault_$5241_memory_ptr", + "typeString": "struct Vault memory" + } + }, + "id": 3183, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ilkId", + "nodeType": "MemberAccess", + "referencedDeclaration": 5240, + "src": "6485:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + }, + { + "id": 3184, + "name": "yvUsdcIlkId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "6498:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "id": 3181, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3821, + "src": "6476:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3186, + "nodeType": "ExpressionStatement", + "src": "6476:34:4" + }, + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "balances", + "nameLocation": "6539:8:4", + "nodeType": "VariableDeclaration", + "scope": 3207, + "src": "6523:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3188, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3187, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "6523:8:4" + }, + "referencedDeclaration": 5255, + "src": "6523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3194, + "initialValue": { + "arguments": [ + { + "id": 3192, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3149, + "src": "6568:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3190, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "6550:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "6550:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6550:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6523:53:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3196, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6596:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "6596:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6610:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3195, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6587:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6587:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3200, + "nodeType": "ExpressionStatement", + "src": "6587:25:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3202, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "6632:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "6632:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6646:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3201, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4139, + 4164, + 4194, + 4219 + ], + "referencedDeclaration": 4139, + "src": "6623:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3206, + "nodeType": "ExpressionStatement", + "src": "6623:25:4" + } + ] + }, + "functionSelector": "68605ade", + "id": 3208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvest", + "nameLocation": "5284:10:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3019, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "5303:10:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5295:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3018, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5295:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "5323:8:4", + "nodeType": "VariableDeclaration", + "scope": 3208, + "src": "5315:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3020, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "5315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "5294:38:4" + }, + "returnParameters": { + "id": 3023, + "nodeType": "ParameterList", + "parameters": [], + "src": "5340:0:4" + }, + "scope": 3445, + "src": "5275:1381:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3324, + "nodeType": "Block", + "src": "6702:926:4", + "statements": [ + { + "assignments": [ + 3212 + ], + "declarations": [ + { + "constant": false, + "id": 3212, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "6721:10:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6713:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3211, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6713:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3214, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6734:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:35:4" + }, + { + "assignments": [ + 3216 + ], + "declarations": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "6767:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6759:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3215, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6759:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3220, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6778:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3218, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6782:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "6778:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6759:33:4" + }, + { + "assignments": [ + 3222 + ], + "declarations": [ + { + "constant": false, + "id": 3222, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "6877:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "6869:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3221, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "6869:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3224, + "initialValue": { + "hexValue": "315f303031", + "id": 3223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6888:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6869:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3228, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6927:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3231, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6939:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6939:7:4", + "typeDescriptions": {} + } + }, + "id": 3232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6939:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3225, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "6904:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "6904:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6904:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3234, + "nodeType": "ExpressionStatement", + "src": "6904:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3240, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "6985:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6977:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6977:7:4", + "typeDescriptions": {} + } + }, + "id": 3241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6977:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3242, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "6998:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3235, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "6964:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "6964:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6964:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3244, + "nodeType": "ExpressionStatement", + "src": "6964:45:4" + }, + { + "assignments": [ + 3246 + ], + "declarations": [ + { + "constant": false, + "id": 3246, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "7028:5:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7020:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3245, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7020:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3256, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3249, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7057:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3247, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "7037:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3251, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7069:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7037:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7036:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7081:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7036:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7020:65:4" + }, + { + "assignments": [ + 3258 + ], + "declarations": [ + { + "constant": false, + "id": 3258, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "7104:7:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7096:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3257, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "7096:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3266, + "initialValue": { + "arguments": [ + { + "id": 3261, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3212, + "src": "7132:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3262, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3216, + "src": "7144:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3263, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3246, + "src": "7154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3264, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3259, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7114:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "7114:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7114:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7096:74:4" + }, + { + "assignments": [ + 3269 + ], + "declarations": [ + { + "constant": false, + "id": 3269, + "mutability": "mutable", + "name": "balances", + "nameLocation": "7218:8:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7202:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3267, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7202:8:4" + }, + "referencedDeclaration": 5255, + "src": "7202:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3274, + "initialValue": { + "arguments": [ + { + "id": 3272, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7247:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3270, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7229:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7229:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7202:53:4" + }, + { + "assignments": [ + 3276 + ], + "declarations": [ + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "maxAmount", + "nameLocation": "7274:9:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7266:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3275, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7266:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 3279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7310:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3280, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7310:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3277, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7287:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyFYTokenPreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2597, + "src": "7287:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7287:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3282, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "7326:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7287:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3284, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7286:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "7286:56:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7266:76:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3291, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7371:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "id": 3292, + "name": "maxAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3276, + "src": "7380:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3295, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "7399:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7391:7:4", + "typeDescriptions": {} + } + }, + "id": 3296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7391:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3297, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7406:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3298, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7406:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3299, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3269, + "src": "7420:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7420:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3301, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "7434:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3288, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7353:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "7353:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7353:90:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3303, + "nodeType": "ExpressionStatement", + "src": "7353:90:4" + }, + { + "assignments": [ + 3306 + ], + "declarations": [ + { + "constant": false, + "id": 3306, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "7502:11:4", + "nodeType": "VariableDeclaration", + "scope": 3324, + "src": "7486:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3305, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3304, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "7486:8:4" + }, + "referencedDeclaration": 5255, + "src": "7486:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3311, + "initialValue": { + "arguments": [ + { + "id": 3309, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3258, + "src": "7534:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3307, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "7516:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "7516:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7516:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7486:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3313, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7562:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "7562:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3312, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7553:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7553:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3317, + "nodeType": "ExpressionStatement", + "src": "7553:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3319, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3306, + "src": "7601:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "7601:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3318, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "7592:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7592:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3323, + "nodeType": "ExpressionStatement", + "src": "7592:28:4" + } + ] + }, + "functionSelector": "eeb6f4b0", + "id": 3325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwind", + "nameLocation": "6673:19:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3209, + "nodeType": "ParameterList", + "parameters": [], + "src": "6692:2:4" + }, + "returnParameters": { + "id": 3210, + "nodeType": "ParameterList", + "parameters": [], + "src": "6702:0:4" + }, + "scope": 3445, + "src": "6664:964:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3443, + "nodeType": "Block", + "src": "7691:962:4", + "statements": [ + { + "assignments": [ + 3329 + ], + "declarations": [ + { + "constant": false, + "id": 3329, + "mutability": "mutable", + "name": "collateral", + "nameLocation": "7710:10:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7702:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3328, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7702:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3331, + "initialValue": { + "hexValue": "32355f3030305f3030305f303030", + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7723:14:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_25000000000_by_1", + "typeString": "int_const 25000000000" + }, + "value": "25_000_000_000" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7702:35:4" + }, + { + "assignments": [ + 3333 + ], + "declarations": [ + { + "constant": false, + "id": 3333, + "mutability": "mutable", + "name": "borrowed", + "nameLocation": "7756:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7748:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3332, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7748:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3337, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7767:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3335, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "7767:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7748:33:4" + }, + { + "assignments": [ + 3339 + ], + "declarations": [ + { + "constant": false, + "id": 3339, + "mutability": "mutable", + "name": "slippage", + "nameLocation": "7866:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "7858:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3338, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "7858:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3341, + "initialValue": { + "hexValue": "315f303031", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7877:5:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1001_by_1", + "typeString": "int_const 1001" + }, + "value": "1_001" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7858:24:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3345, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7916:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "arguments": [ + { + "id": 3348, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLeverTest_$3445", + "typeString": "contract YieldLeverTest" + } + ], + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7928:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7928:7:4", + "typeDescriptions": {} + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7928:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3342, + "name": "helperContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7893:14:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_HelperContract_$2803", + "typeString": "contract HelperContract" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyUsdc", + "nodeType": "MemberAccess", + "referencedDeclaration": 2751, + "src": "7893:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7893:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3351, + "nodeType": "ExpressionStatement", + "src": "7893:49:4" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3357, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "7974:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + ], + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7966:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7966:7:4", + "typeDescriptions": {} + } + }, + "id": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7966:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3359, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "7987:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3352, + "name": "usdc", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2817, + "src": "7953:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$5403", + "typeString": "contract IERC20" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 5382, + "src": "7953:12:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7953:45:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3361, + "nodeType": "ExpressionStatement", + "src": "7953:45:4" + }, + { + "assignments": [ + 3363 + ], + "declarations": [ + { + "constant": false, + "id": 3363, + "mutability": "mutable", + "name": "maxFy", + "nameLocation": "8017:5:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8009:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 3362, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "8009:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 3373, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 3369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3366, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8046:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "expression": { + "id": 3364, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8026:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + }, + "id": 3365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "buyBasePreview", + "nodeType": "MemberAccess", + "referencedDeclaration": 2590, + "src": "8026:19:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint128_$returns$_t_uint128_$", + "typeString": "function (uint128) view external returns (uint128)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8026:29:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 3368, + "name": "slippage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3339, + "src": "8058:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "8026:40:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "id": 3370, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8025:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "31303030", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:4:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "8025:49:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8009:65:4" + }, + { + "assignments": [ + 3375 + ], + "declarations": [ + { + "constant": false, + "id": 3375, + "mutability": "mutable", + "name": "vaultId", + "nameLocation": "8093:7:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8085:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + "typeName": { + "id": 3374, + "name": "bytes12", + "nodeType": "ElementaryTypeName", + "src": "8085:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "visibility": "internal" + } + ], + "id": 3383, + "initialValue": { + "arguments": [ + { + "id": 3378, + "name": "collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3329, + "src": "8121:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3379, + "name": "borrowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3333, + "src": "8133:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3380, + "name": "maxFy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3363, + "src": "8143:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3381, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8150:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3376, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8103:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "invest", + "nodeType": "MemberAccess", + "referencedDeclaration": 5662, + "src": "8103:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$_t_bytes12_$", + "typeString": "function (uint256,uint128,uint128,bytes6) external returns (bytes12)" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8103:56:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8085:74:4" + }, + { + "assignments": [ + 3386 + ], + "declarations": [ + { + "constant": false, + "id": 3386, + "mutability": "mutable", + "name": "series", + "nameLocation": "8217:6:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8203:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series" + }, + "typeName": { + "id": 3385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3384, + "name": "Series", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5250, + "src": "8203:6:4" + }, + "referencedDeclaration": 5250, + "src": "8203:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_storage_ptr", + "typeString": "struct Series" + } + }, + "visibility": "internal" + } + ], + "id": 3391, + "initialValue": { + "arguments": [ + { + "id": 3389, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8242:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3387, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8226:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "series", + "nodeType": "MemberAccess", + "referencedDeclaration": 5449, + "src": "8226:15:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes6_$returns$_t_struct$_Series_$5250_memory_ptr_$", + "typeString": "function (bytes6) view external returns (struct Series memory)" + } + }, + "id": 3390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8226:25:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8203:48:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3395, + "name": "series", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3386, + "src": "8274:6:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Series_$5250_memory_ptr", + "typeString": "struct Series memory" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maturity", + "nodeType": "MemberAccess", + "referencedDeclaration": 5249, + "src": "8274:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "id": 3392, + "name": "cheats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2835, + "src": "8262:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CheatCodes_$2583", + "typeString": "contract CheatCodes" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "warp", + "nodeType": "MemberAccess", + "referencedDeclaration": 2577, + "src": "8262:11:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8262:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3398, + "nodeType": "ExpressionStatement", + "src": "8262:28:4" + }, + { + "assignments": [ + 3401 + ], + "declarations": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "balances", + "nameLocation": "8338:8:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8322:24:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3399, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8322:8:4" + }, + "referencedDeclaration": 5255, + "src": "8322:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3406, + "initialValue": { + "arguments": [ + { + "id": 3404, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8367:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3402, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8349:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8349:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8349:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8322:53:4" + }, + { + "expression": { + "arguments": [ + { + "id": 3410, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + }, + { + "hexValue": "30", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8413:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "arguments": [ + { + "id": 3414, + "name": "pool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2838, + "src": "8424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Pool_$2598", + "typeString": "contract Pool" + } + ], + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8416:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8416:7:4", + "typeDescriptions": {} + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8416:13:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3416, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8431:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8431:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "expression": { + "id": 3418, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "8445:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8445:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "id": 3420, + "name": "seriesId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "8459:8:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_bytes6", + "typeString": "bytes6" + } + ], + "expression": { + "id": 3407, + "name": "yieldLever", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2808, + "src": "8386:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_YieldLever_$5944", + "typeString": "contract YieldLever" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unwind", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "8386:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes12_$_t_uint256_$_t_address_$_t_uint128_$_t_uint128_$_t_bytes6_$returns$__$", + "typeString": "function (bytes12,uint256,address,uint128,uint128,bytes6) external" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8386:82:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "8386:82:4" + }, + { + "assignments": [ + 3425 + ], + "declarations": [ + { + "constant": false, + "id": 3425, + "mutability": "mutable", + "name": "newBalances", + "nameLocation": "8527:11:4", + "nodeType": "VariableDeclaration", + "scope": 3443, + "src": "8511:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances" + }, + "typeName": { + "id": 3424, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3423, + "name": "Balances", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5255, + "src": "8511:8:4" + }, + "referencedDeclaration": 5255, + "src": "8511:8:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_storage_ptr", + "typeString": "struct Balances" + } + }, + "visibility": "internal" + } + ], + "id": 3430, + "initialValue": { + "arguments": [ + { + "id": 3428, + "name": "vaultId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3375, + "src": "8559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes12", + "typeString": "bytes12" + } + ], + "expression": { + "id": 3426, + "name": "cauldron", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2823, + "src": "8541:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Cauldron_$5501", + "typeString": "contract Cauldron" + } + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 5465, + "src": "8541:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes12_$returns$_t_struct$_Balances_$5255_memory_ptr_$", + "typeString": "function (bytes12) view external returns (struct Balances memory)" + } + }, + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:26:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8511:56:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3432, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8587:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "art", + "nodeType": "MemberAccess", + "referencedDeclaration": 5252, + "src": "8587:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8604:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3431, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8578:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8578:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3436, + "nodeType": "ExpressionStatement", + "src": "8578:28:4" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3438, + "name": "newBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3425, + "src": "8626:11:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$5255_memory_ptr", + "typeString": "struct Balances memory" + } + }, + "id": 3439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ink", + "nodeType": "MemberAccess", + "referencedDeclaration": 5254, + "src": "8626:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + { + "hexValue": "30", + "id": 3440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8643:1:4", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3437, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3766, + 3791, + 3821, + 3846, + 3905, + 3930, + 3960, + 3985, + 5085, + 5120 + ], + "referencedDeclaration": 3960, + "src": "8617:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8617:28:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3442, + "nodeType": "ExpressionStatement", + "src": "8617:28:4" + } + ] + }, + "functionSelector": "36df4c4a", + "id": 3444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testInvestAndUnwindAfterMaturity", + "nameLocation": "7649:32:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3326, + "nodeType": "ParameterList", + "parameters": [], + "src": "7681:2:4" + }, + "returnParameters": { + "id": 3327, + "nodeType": "ParameterList", + "parameters": [], + "src": "7691:0:4" + }, + "scope": 3445, + "src": "7640:1013:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3446, + "src": "3388:5268:4", + "usedErrors": [] + } + ], + "src": "40:8618:4" + } +} \ No newline at end of file diff --git a/out/test.sol/DSTest.json b/out/test.sol/DSTest.json new file mode 100644 index 0000000..9741d7b --- /dev/null +++ b/out/test.sol/DSTest.json @@ -0,0 +1,23166 @@ +{ + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "log_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "log_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "log_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "name": "log_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "val", + "type": "address" + } + ], + "name": "log_named_address", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "val", + "type": "bytes" + } + ], + "name": "log_named_bytes", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "val", + "type": "bytes32" + } + ], + "name": "log_named_bytes32", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + } + ], + "name": "log_named_decimal_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "int256", + "name": "val", + "type": "int256" + } + ], + "name": "log_named_int", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "val", + "type": "string" + } + ], + "name": "log_named_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "val", + "type": "uint256" + } + ], + "name": "log_named_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "log_string", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "log_uint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "logs", + "type": "event" + }, + { + "inputs": [], + "name": "IS_TEST", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "failed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": { + "object": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b506102598061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063ba414fa61461003b578063fa7626d414610057575b600080fd5b610043610064565b604051901515815260200160405180910390f35b6000546100439060ff1681565b60008054610100900460ff16156100845750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561018a5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610112917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016101ca565b60408051601f198184030181529082905261012c916101ee565b6000604051808303816000865af19150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b50915050808060200190518101906101869190610201565b9150505b919050565b6000815160005b818110156101b05760208185018101518683015201610196565b818111156101bf576000828601525b509290920192915050565b6001600160e01b03198316815260006101e6600483018461018f565b949350505050565b60006101fa828461018f565b9392505050565b60006020828403121561021357600080fd5b815180151581146101fa57600080fdfea26469706673582212202fa93e0cfd26f5dd056a0902374332d9ee9ec8c584a881bb65aa03d42706835664736f6c634300080d0033", + "sourceMap": "732:15884:2:-:0;;;1609:26;;;-1:-1:-1;;1609:26:2;1631:4;1609:26;;;732:15884;;;;;;;;;;;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063ba414fa61461003b578063fa7626d414610057575b600080fd5b610043610064565b604051901515815260200160405180910390f35b6000546100439060ff1681565b60008054610100900460ff16156100845750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561018a5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190526519985a5b195960d21b82840152825180830384018152606083019093526000929091610112917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016101ca565b60408051601f198184030181529082905261012c916101ee565b6000604051808303816000865af19150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b50915050808060200190518101906101869190610201565b9150505b919050565b6000815160005b818110156101b05760208185018101518683015201610196565b818111156101bf576000828601525b509290920192915050565b6001600160e01b03198316815260006101e6600483018461018f565b949350505050565b60006101fa828461018f565b9392505050565b60006020828403121561021357600080fd5b815180151581146101fa57600080fdfea26469706673582212202fa93e0cfd26f5dd056a0902374332d9ee9ec8c584a881bb65aa03d42706835664736f6c634300080d0033", + "sourceMap": "732:15884:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1865:600;;;:::i;:::-;;;179:14:6;;172:22;154:41;;142:2;127:18;1865:600:2;;;;;;;1609:26;;;;;;;;;1865:600;1899:4;1920:7;;;;;;;1916:542;;;-1:-1:-1;1951:7:2;;;;;;;;1865:600::o;1916:542::-;1991:17;3070:42;3058:55;3141:16;2031:382;;2251:43;;;1712:64;2251:43;;;380:51:6;;;-1:-1:-1;;;447:18:6;;;440:34;2251:43:2;;;;;;;;;353:18:6;;;2251:43:2;;;-1:-1:-1;;1712:64:2;;2139:178;;2189:34;;2139:178;;;:::i;:::-;;;;-1:-1:-1;;2139:178:2;;;;;;;;;;2099:237;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2072:264;;;2381:7;2370:27;;;;;;;;;;;;:::i;:::-;2355:42;;2053:360;2031:382;2434:12;1865:600;-1:-1:-1;1865:600:2:o;485:336:6:-;526:3;564:5;558:12;588:1;598:128;612:6;609:1;606:13;598:128;;;709:4;694:13;;;690:24;;684:31;671:11;;;664:52;627:12;598:128;;;744:6;741:1;738:13;735:48;;;779:1;770:6;765:3;761:16;754:27;735:48;-1:-1:-1;799:16:6;;;;;485:336;-1:-1:-1;;485:336:6:o;826:278::-;-1:-1:-1;;;;;;1011:33:6;;999:46;;981:3;1061:37;1095:1;1086:11;;1078:6;1061:37;:::i;:::-;1054:44;826:278;-1:-1:-1;;;;826:278:6:o;1109:189::-;1238:3;1263:29;1288:3;1280:6;1263:29;:::i;:::-;1256:36;1109:189;-1:-1:-1;;;1109:189:6:o;1303:277::-;1370:6;1423:2;1411:9;1402:7;1398:23;1394:32;1391:52;;;1439:1;1436;1429:12;1391:52;1471:9;1465:16;1524:5;1517:13;1510:21;1503:5;1500:32;1490:60;;1546:1;1543;1536:12", + "linkReferences": {} + }, + "ast": { + "absolutePath": "F:\\Git\\yvarb\\lib\\ds-test\\src/test.sol", + "exportedSymbols": { + "DSTest": [ + 1786 + ] + }, + "id": 1787, + "license": "GPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "704:24:2" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "DSTest", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1786, + "linearizedBaseContracts": [ + 1786 + ], + "name": "DSTest", + "nameLocation": "741:6:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "eventSelector": "41304facd9323d75b11bcdd609cb38effffdb05710f7caf0e9b16c6d9d709f50", + "id": 5, + "name": "log", + "nameLocation": "761:3:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "785:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "785:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "784:8:2" + }, + "src": "755:38:2" + }, + { + "anonymous": false, + "eventSelector": "e7950ede0394b9f2ce4a5a1bf5a7e1852411f7e6661b4308c913c4bfd11027e4", + "id": 9, + "name": "logs", + "nameLocation": "805:4:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 9, + "src": "829:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "829:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "828:7:2" + }, + "src": "799:37:2" + }, + { + "anonymous": false, + "eventSelector": "7ae74c527414ae135fd97047b12921a5ec3911b804197855d67e25c7b75ee6f3", + "id": 13, + "name": "log_address", + "nameLocation": "850:11:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 13, + "src": "874:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "874:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "873:9:2" + }, + "src": "844:39:2" + }, + { + "anonymous": false, + "eventSelector": "e81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e3", + "id": 17, + "name": "log_bytes32", + "nameLocation": "895:11:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 17, + "src": "919:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 14, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "919:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "918:9:2" + }, + "src": "889:39:2" + }, + { + "anonymous": false, + "eventSelector": "0eb5d52624c8d28ada9fc55a8c502ed5aa3fbe2fb6e91b71b5f376882b1d2fb8", + "id": 21, + "name": "log_int", + "nameLocation": "940:7:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 21, + "src": "964:3:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 18, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "964:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "963:5:2" + }, + "src": "934:35:2" + }, + { + "anonymous": false, + "eventSelector": "2cab9790510fd8bdfbd2115288db33fec66691d476efc5427cfd4c0969301755", + "id": 25, + "name": "log_uint", + "nameLocation": "981:8:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 23, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 25, + "src": "1005:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1005:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1004:6:2" + }, + "src": "975:36:2" + }, + { + "anonymous": false, + "eventSelector": "23b62ad0584d24a75f0bf3560391ef5659ec6db1269c56e11aa241d637f19b20", + "id": 29, + "name": "log_bytes", + "nameLocation": "1023:9:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "1047:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 26, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1047:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1046:7:2" + }, + "src": "1017:37:2" + }, + { + "anonymous": false, + "eventSelector": "0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b", + "id": 33, + "name": "log_string", + "nameLocation": "1066:10:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 31, + "indexed": false, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 33, + "src": "1090:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 30, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1090:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1089:8:2" + }, + "src": "1060:38:2" + }, + { + "anonymous": false, + "eventSelector": "9c4e8541ca8f0dc1c413f9108f66d82d3cecb1bddbce437a61caa3175c4cc96f", + "id": 39, + "name": "log_named_address", + "nameLocation": "1112:17:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 35, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1143:3:2", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "1136:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 34, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1136:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1156:3:2", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "1148:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1148:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1135:25:2" + }, + "src": "1106:55:2" + }, + { + "anonymous": false, + "eventSelector": "afb795c9c61e4fe7468c386f925d7a5429ecad9c0495ddb8d38d690614d32f99", + "id": 45, + "name": "log_named_bytes32", + "nameLocation": "1173:17:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 44, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 41, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1204:3:2", + "nodeType": "VariableDeclaration", + "scope": 45, + "src": "1197:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 40, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1197:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1217:3:2", + "nodeType": "VariableDeclaration", + "scope": 45, + "src": "1209:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 42, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1209:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1196:25:2" + }, + "src": "1167:55:2" + }, + { + "anonymous": false, + "eventSelector": "5da6ce9d51151ba10c09a559ef24d520b9dac5c5b8810ae8434e4d0d86411a95", + "id": 53, + "name": "log_named_decimal_int", + "nameLocation": "1234:21:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 47, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1265:3:2", + "nodeType": "VariableDeclaration", + "scope": 53, + "src": "1258:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 46, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1258:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 49, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1274:3:2", + "nodeType": "VariableDeclaration", + "scope": 53, + "src": "1270:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 48, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1270:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51, + "indexed": false, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "1284:8:2", + "nodeType": "VariableDeclaration", + "scope": 53, + "src": "1279:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 50, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1279:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1257:36:2" + }, + "src": "1228:66:2" + }, + { + "anonymous": false, + "eventSelector": "eb8ba43ced7537421946bd43e828b8b2b8428927aa8f801c13d934bf11aca57b", + "id": 61, + "name": "log_named_decimal_uint", + "nameLocation": "1306:22:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 55, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1337:3:2", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "1330:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 54, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1330:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1347:3:2", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "1342:8:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1342:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "indexed": false, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "1357:8:2", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "1352:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1352:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1329:37:2" + }, + "src": "1300:67:2" + }, + { + "anonymous": false, + "eventSelector": "2fe632779174374378442a8e978bccfbdcc1d6b2b0d81f7e8eb776ab2286f168", + "id": 67, + "name": "log_named_int", + "nameLocation": "1379:13:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1410:3:2", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "1403:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 62, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1403:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 65, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1419:3:2", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "1415:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 64, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1415:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1402:21:2" + }, + "src": "1373:51:2" + }, + { + "anonymous": false, + "eventSelector": "b2de2fbe801a0df6c0cbddfd448ba3c41d48a040ca35c56c8196ef0fcae721a8", + "id": 73, + "name": "log_named_uint", + "nameLocation": "1436:14:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 72, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 69, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1467:3:2", + "nodeType": "VariableDeclaration", + "scope": 73, + "src": "1460:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 68, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1460:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1477:3:2", + "nodeType": "VariableDeclaration", + "scope": 73, + "src": "1472:8:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 70, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1472:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1459:22:2" + }, + "src": "1430:52:2" + }, + { + "anonymous": false, + "eventSelector": "d26e16cad4548705e4c9e2d94f98ee91c289085ee425594fd5635fa2964ccf18", + "id": 79, + "name": "log_named_bytes", + "nameLocation": "1494:15:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1525:3:2", + "nodeType": "VariableDeclaration", + "scope": 79, + "src": "1518:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 74, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1518:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 77, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1536:3:2", + "nodeType": "VariableDeclaration", + "scope": 79, + "src": "1530:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 76, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1530:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1517:23:2" + }, + "src": "1488:53:2" + }, + { + "anonymous": false, + "eventSelector": "280f4446b28a1372417dda658d30b95b2992b12ac9c7f378535f29a97acf3583", + "id": 85, + "name": "log_named_string", + "nameLocation": "1553:16:2", + "nodeType": "EventDefinition", + "parameters": { + "id": 84, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 81, + "indexed": false, + "mutability": "mutable", + "name": "key", + "nameLocation": "1584:3:2", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "1577:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 80, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1577:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "indexed": false, + "mutability": "mutable", + "name": "val", + "nameLocation": "1596:3:2", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "1589:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 82, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1589:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1576:24:2" + }, + "src": "1547:54:2" + }, + { + "constant": false, + "functionSelector": "fa7626d4", + "id": 88, + "mutability": "mutable", + "name": "IS_TEST", + "nameLocation": "1621:7:2", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1609:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 86, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1609:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "hexValue": "74727565", + "id": 87, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1631:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 90, + "mutability": "mutable", + "name": "_failed", + "nameLocation": "1655:7:2", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1642:20:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 89, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1642:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 107, + "mutability": "constant", + "name": "HEVM_ADDRESS", + "nameLocation": "1688:12:2", + "nodeType": "VariableDeclaration", + "scope": 1786, + "src": "1671:105:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 91, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1671:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6865766d20636865617420636f6465", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1754:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d", + "typeString": "literal_string \"hevm cheat code\"" + }, + "value": "hevm cheat code" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d", + "typeString": "literal_string \"hevm cheat code\"" + } + ], + "id": 100, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1744:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1744:28:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1736:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 98, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1736:7:2", + "typeDescriptions": {} + } + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1736:37:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1728:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 96, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1728:7:2", + "typeDescriptions": {} + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:46:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1720:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes20_$", + "typeString": "type(bytes20)" + }, + "typeName": { + "id": 94, + "name": "bytes20", + "nodeType": "ElementaryTypeName", + "src": "1720:7:2", + "typeDescriptions": {} + } + }, + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1720:55:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes20", + "typeString": "bytes20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes20", + "typeString": "bytes20" + } + ], + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1712:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 92, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1712:7:2", + "typeDescriptions": {} + } + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1712:64:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 110, + "nodeType": "Block", + "src": "1806:6:2", + "statements": [ + { + "id": 109, + "nodeType": "PlaceholderStatement", + "src": "1808:1:2" + } + ] + }, + "id": 111, + "name": "mayRevert", + "nameLocation": "1794:9:2", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 108, + "nodeType": "ParameterList", + "parameters": [], + "src": "1803:2:2" + }, + "src": "1785:27:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "1851:6:2", + "statements": [ + { + "id": 115, + "nodeType": "PlaceholderStatement", + "src": "1853:1:2" + } + ] + }, + "id": 117, + "name": "testopts", + "nameLocation": "1827:8:2", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 114, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 113, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "1836:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 112, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1836:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1835:15:2" + }, + "src": "1818:39:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 171, + "nodeType": "Block", + "src": "1905:560:2", + "statements": [ + { + "condition": { + "id": 122, + "name": "_failed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "1920:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 169, + "nodeType": "Block", + "src": "1976:482:2", + "statements": [ + { + "assignments": [ + 127 + ], + "declarations": [ + { + "constant": false, + "id": 127, + "mutability": "mutable", + "name": "globalFailed", + "nameLocation": "1996:12:2", + "nodeType": "VariableDeclaration", + "scope": 169, + "src": "1991:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 126, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1991:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 129, + "initialValue": { + "hexValue": "66616c7365", + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2011:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1991:25:2" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 130, + "name": "hasHEVMContext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 231, + "src": "2035:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2035:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 166, + "nodeType": "IfStatement", + "src": "2031:382:2", + "trueBody": { + "id": 165, + "nodeType": "Block", + "src": "2053:360:2", + "statements": [ + { + "assignments": [ + null, + 133 + ], + "declarations": [ + null, + { + "constant": false, + "id": 133, + "mutability": "mutable", + "name": "retdata", + "nameLocation": "2088:7:2", + "nodeType": "VariableDeclaration", + "scope": 165, + "src": "2075:20:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 132, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2075:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 154, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6c6f616428616464726573732c6279746573333229", + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2199:23:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4", + "typeString": "literal_string \"load(address,bytes32)\"" + }, + "value": "load(address,bytes32)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4", + "typeString": "literal_string \"load(address,bytes32)\"" + } + ], + "id": 140, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2189:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2182:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 138, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2182:6:2", + "typeDescriptions": {} + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2182:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "arguments": [ + { + "id": 146, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2262:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "6661696c6564", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2284:8:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8f44d68b1a26169d304522fa2f95aa938d98120d628d1db5726120ca84e53b43", + "typeString": "literal_string \"failed\"" + }, + "value": "failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8f44d68b1a26169d304522fa2f95aa938d98120d628d1db5726120ca84e53b43", + "typeString": "literal_string \"failed\"" + } + ], + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2276:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 147, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2276:7:2", + "typeDescriptions": {} + } + }, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2276:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 144, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2251:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "2251:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2251:43:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 136, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2139:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2139:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2139:178:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 134, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2099:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "src": "2099:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2099:237:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2072:264:2" + }, + { + "expression": { + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 155, + "name": "globalFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "2355:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 158, + "name": "retdata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "2381:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "components": [ + { + "id": 160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2391:4:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 159, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2391:4:2", + "typeDescriptions": {} + } + } + ], + "id": 161, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2390:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "id": 156, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2370:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "2370:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2370:27:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2355:42:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "2355:42:2" + } + ] + } + }, + { + "expression": { + "id": 167, + "name": "globalFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "2434:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 121, + "id": 168, + "nodeType": "Return", + "src": "2427:19:2" + } + ] + }, + "id": 170, + "nodeType": "IfStatement", + "src": "1916:542:2", + "trueBody": { + "id": 125, + "nodeType": "Block", + "src": "1929:41:2", + "statements": [ + { + "expression": { + "id": 123, + "name": "_failed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "1951:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 121, + "id": 124, + "nodeType": "Return", + "src": "1944:14:2" + } + ] + } + } + ] + }, + "functionSelector": "ba414fa6", + "id": 172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "failed", + "nameLocation": "1874:6:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 118, + "nodeType": "ParameterList", + "parameters": [], + "src": "1880:2:2" + }, + "returnParameters": { + "id": 121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 172, + "src": "1899:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 119, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1899:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1898:6:2" + }, + "scope": 1786, + "src": "1865:600:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 215, + "nodeType": "Block", + "src": "2499:410:2", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 175, + "name": "hasHEVMContext", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 231, + "src": "2514:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2514:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 210, + "nodeType": "IfStatement", + "src": "2510:367:2", + "trueBody": { + "id": 209, + "nodeType": "Block", + "src": "2532:345:2", + "statements": [ + { + "assignments": [ + 178, + null + ], + "declarations": [ + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "status", + "nameLocation": "2553:6:2", + "nodeType": "VariableDeclaration", + "scope": 209, + "src": "2548:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 177, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2548:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 206, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "73746f726528616464726573732c627974657333322c6279746573333229", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2657:32:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_70ca10bbd0dbfd9020a9f4b13402c16cb120705e0d1c0aeab10fa353ae586fc4", + "typeString": "literal_string \"store(address,bytes32,bytes32)\"" + }, + "value": "store(address,bytes32,bytes32)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_70ca10bbd0dbfd9020a9f4b13402c16cb120705e0d1c0aeab10fa353ae586fc4", + "typeString": "literal_string \"store(address,bytes32,bytes32)\"" + } + ], + "id": 185, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2647:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2647:43:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2640:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 183, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "2640:6:2", + "typeDescriptions": {} + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2640:51:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "arguments": [ + { + "id": 191, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2725:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "6661696c6564", + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2747:8:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8f44d68b1a26169d304522fa2f95aa938d98120d628d1db5726120ca84e53b43", + "typeString": "literal_string \"failed\"" + }, + "value": "failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8f44d68b1a26169d304522fa2f95aa938d98120d628d1db5726120ca84e53b43", + "typeString": "literal_string \"failed\"" + } + ], + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2739:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 192, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2739:7:2", + "typeDescriptions": {} + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2739:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783031", + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2774:4:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x01" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2766:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 198, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2766:7:2", + "typeDescriptions": {} + } + }, + "id": 201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2766:13:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2758:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 196, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2758:7:2", + "typeDescriptions": {} + } + }, + "id": 202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2758:22:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 189, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2714:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "2714:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2714:67:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 181, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2601:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2601:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2601:199:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 179, + "name": "HEVM_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2565:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "src": "2565:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2565:250:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2547:268:2" + }, + { + "expression": { + "id": 207, + "name": "status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "2830:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "2830:6:2" + } + ] + } + }, + { + "expression": { + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 211, + "name": "_failed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "2887:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2897:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2887:14:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 214, + "nodeType": "ExpressionStatement", + "src": "2887:14:2" + } + ] + }, + "id": 216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fail", + "nameLocation": "2483:4:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 173, + "nodeType": "ParameterList", + "parameters": [], + "src": "2487:2:2" + }, + "returnParameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [], + "src": "2499:0:2" + }, + "scope": 1786, + "src": "2474:435:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 230, + "nodeType": "Block", + "src": "2972:193:2", + "statements": [ + { + "assignments": [ + 222 + ], + "declarations": [ + { + "constant": false, + "id": 222, + "mutability": "mutable", + "name": "hevmCodeSize", + "nameLocation": "2991:12:2", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "2983:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2983:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 224, + "initialValue": { + "hexValue": "30", + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3006:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2983:24:2" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "3027:97:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3042:71:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3070:42:2", + "type": "", + "value": "0x7109709ECfa91a80626fF3989D68f67F5b1DD12D" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "3058:11:2" + }, + "nodeType": "YulFunctionCall", + "src": "3058:55:2" + }, + "variableNames": [ + { + "name": "hevmCodeSize", + "nodeType": "YulIdentifier", + "src": "3042:12:2" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 222, + "isOffset": false, + "isSlot": false, + "src": "3042:12:2", + "valueSize": 1 + } + ], + "id": 225, + "nodeType": "InlineAssembly", + "src": "3018:106:2" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 226, + "name": "hevmCodeSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "3141:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3156:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3141:16:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 220, + "id": 229, + "nodeType": "Return", + "src": "3134:23:2" + } + ] + }, + "id": 231, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasHEVMContext", + "nameLocation": "2926:14:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 217, + "nodeType": "ParameterList", + "parameters": [], + "src": "2940:2:2" + }, + "returnParameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 231, + "src": "2966:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2966:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2965:6:2" + }, + "scope": 1786, + "src": "2917:248:2", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 251, + "nodeType": "Block", + "src": "3193:146:2", + "statements": [ + { + "assignments": [ + 234 + ], + "declarations": [ + { + "constant": false, + "id": 234, + "mutability": "mutable", + "name": "startGas", + "nameLocation": "3209:8:2", + "nodeType": "VariableDeclaration", + "scope": 251, + "src": "3204:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 237, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 235, + "name": "gasleft", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -7, + "src": "3220:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_gasleft_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3220:9:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3204:25:2" + }, + { + "id": 238, + "nodeType": "PlaceholderStatement", + "src": "3240:1:2" + }, + { + "assignments": [ + 240 + ], + "declarations": [ + { + "constant": false, + "id": 240, + "mutability": "mutable", + "name": "endGas", + "nameLocation": "3257:6:2", + "nodeType": "VariableDeclaration", + "scope": 251, + "src": "3252:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3252:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 243, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 241, + "name": "gasleft", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -7, + "src": "3266:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_gasleft_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3266:9:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3252:23:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "676173", + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3306:5:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4498c2139ad6cf2beef3ae7bec34c4856d471c8680dfd28d553f117df74df6b7", + "typeString": "literal_string \"gas\"" + }, + "value": "gas" + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 246, + "name": "startGas", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 234, + "src": "3313:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 247, + "name": "endGas", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "3324:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3313:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_4498c2139ad6cf2beef3ae7bec34c4856d471c8680dfd28d553f117df74df6b7", + "typeString": "literal_string \"gas\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 244, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "3291:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3291:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 250, + "nodeType": "EmitStatement", + "src": "3286:45:2" + } + ] + }, + "id": 252, + "name": "logs_gas", + "nameLocation": "3182:8:2", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 232, + "nodeType": "ParameterList", + "parameters": [], + "src": "3190:2:2" + }, + "src": "3173:166:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 268, + "nodeType": "Block", + "src": "3392:117:2", + "statements": [ + { + "condition": { + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3407:10:2", + "subExpression": { + "id": 257, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 254, + "src": "3408:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 267, + "nodeType": "IfStatement", + "src": "3403:99:2", + "trueBody": { + "id": 266, + "nodeType": "Block", + "src": "3419:83:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a20417373657274696f6e204661696c6564", + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3443:25:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc8bd7d7034d6f139e4d0b1fc61bcb3025672e801833991d94fa7390aceb1687", + "typeString": "literal_string \"Error: Assertion Failed\"" + }, + "value": "Error: Assertion Failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_cc8bd7d7034d6f139e4d0b1fc61bcb3025672e801833991d94fa7390aceb1687", + "typeString": "literal_string \"Error: Assertion Failed\"" + } + ], + "id": 259, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "3439:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3439:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 262, + "nodeType": "EmitStatement", + "src": "3434:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 263, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "3484:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 265, + "nodeType": "ExpressionStatement", + "src": "3484:6:2" + } + ] + } + } + ] + }, + "id": 269, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertTrue", + "nameLocation": "3356:10:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 254, + "mutability": "mutable", + "name": "condition", + "nameLocation": "3372:9:2", + "nodeType": "VariableDeclaration", + "scope": 269, + "src": "3367:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 253, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3367:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3366:16:2" + }, + "returnParameters": { + "id": 256, + "nodeType": "ParameterList", + "parameters": [], + "src": "3392:0:2" + }, + "scope": 1786, + "src": "3347:162:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 289, + "nodeType": "Block", + "src": "3581:132:2", + "statements": [ + { + "condition": { + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3596:10:2", + "subExpression": { + "id": 276, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "3597:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 288, + "nodeType": "IfStatement", + "src": "3592:114:2", + "trueBody": { + "id": 287, + "nodeType": "Block", + "src": "3608:98:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3645:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 280, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "3654:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 278, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "3628:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3628:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "EmitStatement", + "src": "3623:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 284, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "3684:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 283, + "name": "assertTrue", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 269, + 290 + ], + "referencedDeclaration": 269, + "src": "3673:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3673:21:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 286, + "nodeType": "ExpressionStatement", + "src": "3673:21:2" + } + ] + } + } + ] + }, + "id": 290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertTrue", + "nameLocation": "3526:10:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "mutability": "mutable", + "name": "condition", + "nameLocation": "3542:9:2", + "nodeType": "VariableDeclaration", + "scope": 290, + "src": "3537:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 270, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3537:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "err", + "nameLocation": "3567:3:2", + "nodeType": "VariableDeclaration", + "scope": 290, + "src": "3553:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 272, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3553:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3536:35:2" + }, + "returnParameters": { + "id": 275, + "nodeType": "ParameterList", + "parameters": [], + "src": "3581:0:2" + }, + "scope": 1786, + "src": "3517:196:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 319, + "nodeType": "Block", + "src": "3770:235:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 297, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 292, + "src": "3785:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 298, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "3790:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3785:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 318, + "nodeType": "IfStatement", + "src": "3781:217:2", + "trueBody": { + "id": 317, + "nodeType": "Block", + "src": "3793:205:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b616464726573735d", + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3817:39:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9fc6ddd126630392f6812bf6b1418b5ec062ae84acc54ee474317255c7d57017", + "typeString": "literal_string \"Error: a == b not satisfied [address]\"" + }, + "value": "Error: a == b not satisfied [address]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9fc6ddd126630392f6812bf6b1418b5ec062ae84acc54ee474317255c7d57017", + "typeString": "literal_string \"Error: a == b not satisfied [address]\"" + } + ], + "id": 300, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "3813:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3813:44:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 303, + "nodeType": "EmitStatement", + "src": "3808:49:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3895:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 306, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "3909:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 304, + "name": "log_named_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3877:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$returns$__$", + "typeString": "function (string memory,address)" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3877:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 308, + "nodeType": "EmitStatement", + "src": "3872:39:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3949:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 311, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 292, + "src": "3963:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 309, + "name": "log_named_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3931:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$returns$__$", + "typeString": "function (string memory,address)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3931:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "EmitStatement", + "src": "3926:39:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 314, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "3980:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3980:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "3980:6:2" + } + ] + } + } + ] + }, + "id": 320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "3730:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 295, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 292, + "mutability": "mutable", + "name": "a", + "nameLocation": "3747:1:2", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "3739:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3739:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 294, + "mutability": "mutable", + "name": "b", + "nameLocation": "3758:1:2", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "3750:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3750:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3738:22:2" + }, + "returnParameters": { + "id": 296, + "nodeType": "ParameterList", + "parameters": [], + "src": "3770:0:2" + }, + "scope": 1786, + "src": "3721:284:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 344, + "nodeType": "Block", + "src": "4079:122:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 329, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "4094:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 330, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 324, + "src": "4099:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4094:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 343, + "nodeType": "IfStatement", + "src": "4090:104:2", + "trueBody": { + "id": 342, + "nodeType": "Block", + "src": "4102:92:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4140:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 334, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 326, + "src": "4149:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 332, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "4122:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4122:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 336, + "nodeType": "EmitStatement", + "src": "4117:36:2" + }, + { + "expression": { + "arguments": [ + { + "id": 338, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 322, + "src": "4177:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 339, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 324, + "src": "4180:1:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 337, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 320, + "src": "4168:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4168:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 341, + "nodeType": "ExpressionStatement", + "src": "4168:14:2" + } + ] + } + } + ] + }, + "id": 345, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "4020:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 322, + "mutability": "mutable", + "name": "a", + "nameLocation": "4037:1:2", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "4029:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4029:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 324, + "mutability": "mutable", + "name": "b", + "nameLocation": "4048:1:2", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "4040:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4040:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 326, + "mutability": "mutable", + "name": "err", + "nameLocation": "4065:3:2", + "nodeType": "VariableDeclaration", + "scope": 345, + "src": "4051:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 325, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4051:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4028:41:2" + }, + "returnParameters": { + "id": 328, + "nodeType": "ParameterList", + "parameters": [], + "src": "4079:0:2" + }, + "scope": 1786, + "src": "4011:190:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 374, + "nodeType": "Block", + "src": "4258:235:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 352, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "4273:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 353, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "4278:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "4273:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 373, + "nodeType": "IfStatement", + "src": "4269:217:2", + "trueBody": { + "id": 372, + "nodeType": "Block", + "src": "4281:205:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b627974657333325d", + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4305:39:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6605dedc99dd4e0a76d4678a99cc6956499fe2b523ca6525b248ca3582cef3ef", + "typeString": "literal_string \"Error: a == b not satisfied [bytes32]\"" + }, + "value": "Error: a == b not satisfied [bytes32]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6605dedc99dd4e0a76d4678a99cc6956499fe2b523ca6525b248ca3582cef3ef", + "typeString": "literal_string \"Error: a == b not satisfied [bytes32]\"" + } + ], + "id": 355, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "4301:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4301:44:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 358, + "nodeType": "EmitStatement", + "src": "4296:49:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4383:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 361, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "4397:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 359, + "name": "log_named_bytes32", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45, + "src": "4365:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,bytes32)" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4365:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 363, + "nodeType": "EmitStatement", + "src": "4360:39:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4437:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 366, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "4451:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 364, + "name": "log_named_bytes32", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45, + "src": "4419:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (string memory,bytes32)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4419:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 368, + "nodeType": "EmitStatement", + "src": "4414:39:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 369, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "4468:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4468:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "4468:6:2" + } + ] + } + } + ] + }, + "id": 375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "4218:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 347, + "mutability": "mutable", + "name": "a", + "nameLocation": "4235:1:2", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "4227:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 346, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4227:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "mutability": "mutable", + "name": "b", + "nameLocation": "4246:1:2", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "4238:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 348, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4238:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4226:22:2" + }, + "returnParameters": { + "id": 351, + "nodeType": "ParameterList", + "parameters": [], + "src": "4258:0:2" + }, + "scope": 1786, + "src": "4209:284:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 399, + "nodeType": "Block", + "src": "4567:122:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 384, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "4582:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 385, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 379, + "src": "4587:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "4582:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 398, + "nodeType": "IfStatement", + "src": "4578:104:2", + "trueBody": { + "id": 397, + "nodeType": "Block", + "src": "4590:92:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4628:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 389, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "4637:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 387, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "4610:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4610:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 391, + "nodeType": "EmitStatement", + "src": "4605:36:2" + }, + { + "expression": { + "arguments": [ + { + "id": 393, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "4665:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 394, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 379, + "src": "4668:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 392, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 375, + "src": "4656:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4656:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 396, + "nodeType": "ExpressionStatement", + "src": "4656:14:2" + } + ] + } + } + ] + }, + "id": 400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "4508:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 382, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 377, + "mutability": "mutable", + "name": "a", + "nameLocation": "4525:1:2", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "4517:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 376, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4517:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 379, + "mutability": "mutable", + "name": "b", + "nameLocation": "4536:1:2", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "4528:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 378, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4528:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 381, + "mutability": "mutable", + "name": "err", + "nameLocation": "4553:3:2", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "4539:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 380, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4539:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4516:41:2" + }, + "returnParameters": { + "id": 383, + "nodeType": "ParameterList", + "parameters": [], + "src": "4567:0:2" + }, + "scope": 1786, + "src": "4499:190:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 412, + "nodeType": "Block", + "src": "4746:33:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 408, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 402, + "src": "4766:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 409, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "4769:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 407, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 375, + "src": "4757:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4757:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 411, + "nodeType": "ExpressionStatement", + "src": "4757:14:2" + } + ] + }, + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq32", + "nameLocation": "4704:10:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 402, + "mutability": "mutable", + "name": "a", + "nameLocation": "4723:1:2", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "4715:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 401, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4715:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 404, + "mutability": "mutable", + "name": "b", + "nameLocation": "4734:1:2", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "4726:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4726:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4714:22:2" + }, + "returnParameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [], + "src": "4746:0:2" + }, + "scope": 1786, + "src": "4695:84:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 428, + "nodeType": "Block", + "src": "4855:38:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 423, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 415, + "src": "4875:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 424, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 417, + "src": "4878:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 425, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "4881:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 422, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 400, + "src": "4866:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bytes32,bytes32,string memory)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4866:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 427, + "nodeType": "ExpressionStatement", + "src": "4866:19:2" + } + ] + }, + "id": 429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq32", + "nameLocation": "4794:10:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 415, + "mutability": "mutable", + "name": "a", + "nameLocation": "4813:1:2", + "nodeType": "VariableDeclaration", + "scope": 429, + "src": "4805:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 414, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4805:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 417, + "mutability": "mutable", + "name": "b", + "nameLocation": "4824:1:2", + "nodeType": "VariableDeclaration", + "scope": 429, + "src": "4816:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 416, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4816:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 419, + "mutability": "mutable", + "name": "err", + "nameLocation": "4841:3:2", + "nodeType": "VariableDeclaration", + "scope": 429, + "src": "4827:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 418, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4827:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4804:41:2" + }, + "returnParameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "4855:0:2" + }, + "scope": 1786, + "src": "4785:108:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 458, + "nodeType": "Block", + "src": "4942:223:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 436, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "4957:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 437, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "4962:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4957:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 457, + "nodeType": "IfStatement", + "src": "4953:205:2", + "trueBody": { + "id": 456, + "nodeType": "Block", + "src": "4965:193:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b696e745d", + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4989:35:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0c510d1b16a7b86013fe25431f855bed96290957b4566f7ab53d5bf1855a3a81", + "typeString": "literal_string \"Error: a == b not satisfied [int]\"" + }, + "value": "Error: a == b not satisfied [int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_0c510d1b16a7b86013fe25431f855bed96290957b4566f7ab53d5bf1855a3a81", + "typeString": "literal_string \"Error: a == b not satisfied [int]\"" + } + ], + "id": 439, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "4985:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4985:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 442, + "nodeType": "EmitStatement", + "src": "4980:45:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5059:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 445, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "5073:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 443, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "5045:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5045:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 447, + "nodeType": "EmitStatement", + "src": "5040:35:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5109:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 450, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "5123:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 448, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "5095:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5095:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 452, + "nodeType": "EmitStatement", + "src": "5090:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 453, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5140:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5140:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 455, + "nodeType": "ExpressionStatement", + "src": "5140:6:2" + } + ] + } + } + ] + }, + "id": 459, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "4910:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 431, + "mutability": "mutable", + "name": "a", + "nameLocation": "4923:1:2", + "nodeType": "VariableDeclaration", + "scope": 459, + "src": "4919:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 430, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4919:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 433, + "mutability": "mutable", + "name": "b", + "nameLocation": "4930:1:2", + "nodeType": "VariableDeclaration", + "scope": 459, + "src": "4926:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 432, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4926:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "4918:14:2" + }, + "returnParameters": { + "id": 435, + "nodeType": "ParameterList", + "parameters": [], + "src": "4942:0:2" + }, + "scope": 1786, + "src": "4901:264:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 483, + "nodeType": "Block", + "src": "5231:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 468, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 461, + "src": "5246:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 469, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "5251:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5246:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 482, + "nodeType": "IfStatement", + "src": "5242:103:2", + "trueBody": { + "id": 481, + "nodeType": "Block", + "src": "5254:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5291:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 473, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "5300:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 471, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "5274:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5274:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 475, + "nodeType": "EmitStatement", + "src": "5269:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 477, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 461, + "src": "5328:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 478, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "5331:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 476, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 459, + "src": "5319:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$returns$__$", + "typeString": "function (int256,int256)" + } + }, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5319:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 480, + "nodeType": "ExpressionStatement", + "src": "5319:14:2" + } + ] + } + } + ] + }, + "id": 484, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "5180:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 461, + "mutability": "mutable", + "name": "a", + "nameLocation": "5193:1:2", + "nodeType": "VariableDeclaration", + "scope": 484, + "src": "5189:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 460, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5189:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 463, + "mutability": "mutable", + "name": "b", + "nameLocation": "5200:1:2", + "nodeType": "VariableDeclaration", + "scope": 484, + "src": "5196:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 462, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5196:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 465, + "mutability": "mutable", + "name": "err", + "nameLocation": "5217:3:2", + "nodeType": "VariableDeclaration", + "scope": 484, + "src": "5203:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 464, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5203:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "5188:33:2" + }, + "returnParameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [], + "src": "5231:0:2" + }, + "scope": 1786, + "src": "5171:181:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 513, + "nodeType": "Block", + "src": "5401:226:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 491, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 486, + "src": "5416:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 492, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "5421:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5416:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 512, + "nodeType": "IfStatement", + "src": "5412:208:2", + "trueBody": { + "id": 511, + "nodeType": "Block", + "src": "5424:196:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b75696e745d", + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5448:36:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3bb05d3ba160a011999668447ff4a7cdd52bf87aeb1d7b9b284ef23b37a2b183", + "typeString": "literal_string \"Error: a == b not satisfied [uint]\"" + }, + "value": "Error: a == b not satisfied [uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3bb05d3ba160a011999668447ff4a7cdd52bf87aeb1d7b9b284ef23b37a2b183", + "typeString": "literal_string \"Error: a == b not satisfied [uint]\"" + } + ], + "id": 494, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "5444:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5444:41:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 497, + "nodeType": "EmitStatement", + "src": "5439:46:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5520:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 500, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "5534:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 498, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "5505:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5505:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 502, + "nodeType": "EmitStatement", + "src": "5500:36:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5571:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 505, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 486, + "src": "5585:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 503, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "5556:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5556:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 507, + "nodeType": "EmitStatement", + "src": "5551:36:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 508, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5602:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5602:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 510, + "nodeType": "ExpressionStatement", + "src": "5602:6:2" + } + ] + } + } + ] + }, + "id": 514, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "5367:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 486, + "mutability": "mutable", + "name": "a", + "nameLocation": "5381:1:2", + "nodeType": "VariableDeclaration", + "scope": 514, + "src": "5376:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 485, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5376:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 488, + "mutability": "mutable", + "name": "b", + "nameLocation": "5389:1:2", + "nodeType": "VariableDeclaration", + "scope": 514, + "src": "5384:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 487, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5384:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5375:16:2" + }, + "returnParameters": { + "id": 490, + "nodeType": "ParameterList", + "parameters": [], + "src": "5401:0:2" + }, + "scope": 1786, + "src": "5358:269:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 538, + "nodeType": "Block", + "src": "5695:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 523, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "5710:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 524, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 518, + "src": "5715:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5710:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 537, + "nodeType": "IfStatement", + "src": "5706:103:2", + "trueBody": { + "id": 536, + "nodeType": "Block", + "src": "5718:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5755:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 528, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "5764:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 526, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "5738:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5738:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 530, + "nodeType": "EmitStatement", + "src": "5733:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 532, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "5792:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 533, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 518, + "src": "5795:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 531, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 514, + "src": "5783:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5783:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 535, + "nodeType": "ExpressionStatement", + "src": "5783:14:2" + } + ] + } + } + ] + }, + "id": 539, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "5642:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "a", + "nameLocation": "5656:1:2", + "nodeType": "VariableDeclaration", + "scope": 539, + "src": "5651:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5651:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 518, + "mutability": "mutable", + "name": "b", + "nameLocation": "5664:1:2", + "nodeType": "VariableDeclaration", + "scope": 539, + "src": "5659:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 517, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5659:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 520, + "mutability": "mutable", + "name": "err", + "nameLocation": "5681:3:2", + "nodeType": "VariableDeclaration", + "scope": 539, + "src": "5667:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 519, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5667:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "5650:35:2" + }, + "returnParameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [], + "src": "5695:0:2" + }, + "scope": 1786, + "src": "5633:183:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 572, + "nodeType": "Block", + "src": "5885:267:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 548, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "5900:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 549, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "5905:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5900:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 571, + "nodeType": "IfStatement", + "src": "5896:249:2", + "trueBody": { + "id": 570, + "nodeType": "Block", + "src": "5908:237:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b646563696d616c20696e745d", + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5932:43:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ee6ef9b326324a79dedc7af5585ef9f689364368b4e76dd3a37559719a19fe6", + "typeString": "literal_string \"Error: a == b not satisfied [decimal int]\"" + }, + "value": "Error: a == b not satisfied [decimal int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3ee6ef9b326324a79dedc7af5585ef9f689364368b4e76dd3a37559719a19fe6", + "typeString": "literal_string \"Error: a == b not satisfied [decimal int]\"" + } + ], + "id": 551, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "5928:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5928:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 554, + "nodeType": "EmitStatement", + "src": "5923:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6018:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 557, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "6032:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 558, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "6035:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 555, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "5996:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5996:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 560, + "nodeType": "EmitStatement", + "src": "5991:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6086:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 563, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "6100:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 564, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "6103:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 561, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "6064:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6064:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 566, + "nodeType": "EmitStatement", + "src": "6059:53:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 567, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6127:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6127:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 569, + "nodeType": "ExpressionStatement", + "src": "6127:6:2" + } + ] + } + } + ] + }, + "id": 573, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEqDecimal", + "nameLocation": "5831:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 541, + "mutability": "mutable", + "name": "a", + "nameLocation": "5851:1:2", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "5847:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 540, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5847:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 543, + "mutability": "mutable", + "name": "b", + "nameLocation": "5858:1:2", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "5854:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 542, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5854:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 545, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "5866:8:2", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "5861:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 544, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5861:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5846:29:2" + }, + "returnParameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [], + "src": "5885:0:2" + }, + "scope": 1786, + "src": "5822:330:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 600, + "nodeType": "Block", + "src": "6240:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 584, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 575, + "src": "6255:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 585, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "6260:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "6255:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 599, + "nodeType": "IfStatement", + "src": "6251:120:2", + "trueBody": { + "id": 598, + "nodeType": "Block", + "src": "6263:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6300:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 589, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "6309:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 587, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "6283:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6283:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "EmitStatement", + "src": "6278:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 593, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 575, + "src": "6344:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 594, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 577, + "src": "6347:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 595, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "6350:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 592, + "name": "assertEqDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 573, + 601, + 635, + 663 + ], + "referencedDeclaration": 573, + "src": "6328:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (int256,int256,uint256)" + } + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6328:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 597, + "nodeType": "ExpressionStatement", + "src": "6328:31:2" + } + ] + } + } + ] + }, + "id": 601, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEqDecimal", + "nameLocation": "6167:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 575, + "mutability": "mutable", + "name": "a", + "nameLocation": "6187:1:2", + "nodeType": "VariableDeclaration", + "scope": 601, + "src": "6183:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 574, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "6183:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 577, + "mutability": "mutable", + "name": "b", + "nameLocation": "6194:1:2", + "nodeType": "VariableDeclaration", + "scope": 601, + "src": "6190:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 576, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "6190:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 579, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "6202:8:2", + "nodeType": "VariableDeclaration", + "scope": 601, + "src": "6197:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 578, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6197:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 581, + "mutability": "mutable", + "name": "err", + "nameLocation": "6226:3:2", + "nodeType": "VariableDeclaration", + "scope": 601, + "src": "6212:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 580, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6212:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6182:48:2" + }, + "returnParameters": { + "id": 583, + "nodeType": "ParameterList", + "parameters": [], + "src": "6240:0:2" + }, + "scope": 1786, + "src": "6158:220:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 634, + "nodeType": "Block", + "src": "6449:270:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 610, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 603, + "src": "6464:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 611, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 605, + "src": "6469:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6464:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 633, + "nodeType": "IfStatement", + "src": "6460:252:2", + "trueBody": { + "id": 632, + "nodeType": "Block", + "src": "6472:240:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b646563696d616c2075696e745d", + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6496:44:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_acd59a69b2dc4bcee2d5b2a205a178a5eace192e68808cc4db1cea91cdc48141", + "typeString": "literal_string \"Error: a == b not satisfied [decimal uint]\"" + }, + "value": "Error: a == b not satisfied [decimal uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_acd59a69b2dc4bcee2d5b2a205a178a5eace192e68808cc4db1cea91cdc48141", + "typeString": "literal_string \"Error: a == b not satisfied [decimal uint]\"" + } + ], + "id": 613, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "6492:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6492:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 616, + "nodeType": "EmitStatement", + "src": "6487:54:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6584:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 619, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 605, + "src": "6598:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 620, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "6601:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 617, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "6561:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6561:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 622, + "nodeType": "EmitStatement", + "src": "6556:54:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6653:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 625, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 603, + "src": "6667:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 626, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "6670:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 623, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "6630:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6630:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 628, + "nodeType": "EmitStatement", + "src": "6625:54:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 629, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6694:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6694:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6694:6:2" + } + ] + } + } + ] + }, + "id": 635, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEqDecimal", + "nameLocation": "6393:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 603, + "mutability": "mutable", + "name": "a", + "nameLocation": "6414:1:2", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "6409:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 602, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6409:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 605, + "mutability": "mutable", + "name": "b", + "nameLocation": "6422:1:2", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "6417:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 604, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6417:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 607, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "6430:8:2", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "6425:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 606, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6425:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6408:31:2" + }, + "returnParameters": { + "id": 609, + "nodeType": "ParameterList", + "parameters": [], + "src": "6449:0:2" + }, + "scope": 1786, + "src": "6384:335:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 662, + "nodeType": "Block", + "src": "6809:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 646, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "6824:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 647, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "6829:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6824:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 661, + "nodeType": "IfStatement", + "src": "6820:120:2", + "trueBody": { + "id": 660, + "nodeType": "Block", + "src": "6832:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6869:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 651, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "6878:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 649, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "6852:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6852:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 653, + "nodeType": "EmitStatement", + "src": "6847:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 655, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "6913:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 656, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "6916:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 657, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "6919:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 654, + "name": "assertEqDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 573, + 601, + 635, + 663 + ], + "referencedDeclaration": 635, + "src": "6897:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6897:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 659, + "nodeType": "ExpressionStatement", + "src": "6897:31:2" + } + ] + } + } + ] + }, + "id": 663, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEqDecimal", + "nameLocation": "6734:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 637, + "mutability": "mutable", + "name": "a", + "nameLocation": "6755:1:2", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "6750:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 636, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6750:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 639, + "mutability": "mutable", + "name": "b", + "nameLocation": "6763:1:2", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "6758:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 638, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6758:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 641, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "6771:8:2", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "6766:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 640, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6766:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 643, + "mutability": "mutable", + "name": "err", + "nameLocation": "6795:3:2", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "6781:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 642, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6781:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6749:50:2" + }, + "returnParameters": { + "id": 645, + "nodeType": "ParameterList", + "parameters": [], + "src": "6809:0:2" + }, + "scope": 1786, + "src": "6725:222:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 692, + "nodeType": "Block", + "src": "6998:223:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 670, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 665, + "src": "7013:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 671, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 667, + "src": "7018:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7013:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 691, + "nodeType": "IfStatement", + "src": "7009:205:2", + "trueBody": { + "id": 690, + "nodeType": "Block", + "src": "7021:193:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e2062206e6f7420736174697366696564205b75696e745d", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7045:35:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_71977b46fbd6a64b4465b93c7a77bcaa06103df599ead9f7e7004b34129c9e3a", + "typeString": "literal_string \"Error: a > b not satisfied [uint]\"" + }, + "value": "Error: a > b not satisfied [uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_71977b46fbd6a64b4465b93c7a77bcaa06103df599ead9f7e7004b34129c9e3a", + "typeString": "literal_string \"Error: a > b not satisfied [uint]\"" + } + ], + "id": 673, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "7041:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7041:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 676, + "nodeType": "EmitStatement", + "src": "7036:45:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7116:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 679, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 665, + "src": "7129:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 677, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "7101:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7101:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 681, + "nodeType": "EmitStatement", + "src": "7096:35:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7166:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 684, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 667, + "src": "7179:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 682, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "7151:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7151:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 686, + "nodeType": "EmitStatement", + "src": "7146:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 687, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "7196:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7196:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 689, + "nodeType": "ExpressionStatement", + "src": "7196:6:2" + } + ] + } + } + ] + }, + "id": 693, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGt", + "nameLocation": "6964:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 665, + "mutability": "mutable", + "name": "a", + "nameLocation": "6978:1:2", + "nodeType": "VariableDeclaration", + "scope": 693, + "src": "6973:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 664, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6973:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 667, + "mutability": "mutable", + "name": "b", + "nameLocation": "6986:1:2", + "nodeType": "VariableDeclaration", + "scope": 693, + "src": "6981:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 666, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6981:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6972:16:2" + }, + "returnParameters": { + "id": 669, + "nodeType": "ParameterList", + "parameters": [], + "src": "6998:0:2" + }, + "scope": 1786, + "src": "6955:266:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 717, + "nodeType": "Block", + "src": "7289:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 702, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 695, + "src": "7304:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 703, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "7309:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7304:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 716, + "nodeType": "IfStatement", + "src": "7300:103:2", + "trueBody": { + "id": 715, + "nodeType": "Block", + "src": "7312:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7349:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 707, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 699, + "src": "7358:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 705, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "7332:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7332:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "EmitStatement", + "src": "7327:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 711, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 695, + "src": "7386:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 712, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "7389:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 710, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 693, + 718, + 748, + 773 + ], + "referencedDeclaration": 693, + "src": "7377:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7377:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 714, + "nodeType": "ExpressionStatement", + "src": "7377:14:2" + } + ] + } + } + ] + }, + "id": 718, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGt", + "nameLocation": "7236:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 700, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 695, + "mutability": "mutable", + "name": "a", + "nameLocation": "7250:1:2", + "nodeType": "VariableDeclaration", + "scope": 718, + "src": "7245:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 694, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7245:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 697, + "mutability": "mutable", + "name": "b", + "nameLocation": "7258:1:2", + "nodeType": "VariableDeclaration", + "scope": 718, + "src": "7253:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 696, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7253:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 699, + "mutability": "mutable", + "name": "err", + "nameLocation": "7275:3:2", + "nodeType": "VariableDeclaration", + "scope": 718, + "src": "7261:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 698, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7261:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "7244:35:2" + }, + "returnParameters": { + "id": 701, + "nodeType": "ParameterList", + "parameters": [], + "src": "7289:0:2" + }, + "scope": 1786, + "src": "7227:183:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 747, + "nodeType": "Block", + "src": "7457:220:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 725, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7472:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 726, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7477:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "7472:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 746, + "nodeType": "IfStatement", + "src": "7468:202:2", + "trueBody": { + "id": 745, + "nodeType": "Block", + "src": "7480:190:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e2062206e6f7420736174697366696564205b696e745d", + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7504:34:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c6338b3f9677628b4efbdc683490461f2a94469341c3d2ff3d117001fb77d49b", + "typeString": "literal_string \"Error: a > b not satisfied [int]\"" + }, + "value": "Error: a > b not satisfied [int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c6338b3f9677628b4efbdc683490461f2a94469341c3d2ff3d117001fb77d49b", + "typeString": "literal_string \"Error: a > b not satisfied [int]\"" + } + ], + "id": 728, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "7500:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7500:39:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "EmitStatement", + "src": "7495:44:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7573:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 734, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7586:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 732, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7559:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7559:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 736, + "nodeType": "EmitStatement", + "src": "7554:34:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7622:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 739, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7635:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 737, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7608:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7608:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 741, + "nodeType": "EmitStatement", + "src": "7603:34:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 742, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "7652:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7652:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 744, + "nodeType": "ExpressionStatement", + "src": "7652:6:2" + } + ] + } + } + ] + }, + "id": 748, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGt", + "nameLocation": "7425:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 723, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 720, + "mutability": "mutable", + "name": "a", + "nameLocation": "7438:1:2", + "nodeType": "VariableDeclaration", + "scope": 748, + "src": "7434:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 719, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7434:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 722, + "mutability": "mutable", + "name": "b", + "nameLocation": "7445:1:2", + "nodeType": "VariableDeclaration", + "scope": 748, + "src": "7441:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 721, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7441:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "7433:14:2" + }, + "returnParameters": { + "id": 724, + "nodeType": "ParameterList", + "parameters": [], + "src": "7457:0:2" + }, + "scope": 1786, + "src": "7416:261:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 772, + "nodeType": "Block", + "src": "7743:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 757, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 750, + "src": "7758:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 758, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "7763:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "7758:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 771, + "nodeType": "IfStatement", + "src": "7754:103:2", + "trueBody": { + "id": 770, + "nodeType": "Block", + "src": "7766:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7803:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 762, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "7812:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 760, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "7786:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7786:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 764, + "nodeType": "EmitStatement", + "src": "7781:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 766, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 750, + "src": "7840:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 767, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "7843:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 765, + "name": "assertGt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 693, + 718, + 748, + 773 + ], + "referencedDeclaration": 748, + "src": "7831:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$returns$__$", + "typeString": "function (int256,int256)" + } + }, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7831:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 769, + "nodeType": "ExpressionStatement", + "src": "7831:14:2" + } + ] + } + } + ] + }, + "id": 773, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGt", + "nameLocation": "7692:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 750, + "mutability": "mutable", + "name": "a", + "nameLocation": "7705:1:2", + "nodeType": "VariableDeclaration", + "scope": 773, + "src": "7701:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 749, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7701:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 752, + "mutability": "mutable", + "name": "b", + "nameLocation": "7712:1:2", + "nodeType": "VariableDeclaration", + "scope": 773, + "src": "7708:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 751, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7708:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 754, + "mutability": "mutable", + "name": "err", + "nameLocation": "7729:3:2", + "nodeType": "VariableDeclaration", + "scope": 773, + "src": "7715:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 753, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7715:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "7700:33:2" + }, + "returnParameters": { + "id": 756, + "nodeType": "ParameterList", + "parameters": [], + "src": "7743:0:2" + }, + "scope": 1786, + "src": "7683:181:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 806, + "nodeType": "Block", + "src": "7933:264:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 782, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 775, + "src": "7948:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 783, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "7953:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "7948:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 805, + "nodeType": "IfStatement", + "src": "7944:246:2", + "trueBody": { + "id": 804, + "nodeType": "Block", + "src": "7956:234:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e2062206e6f7420736174697366696564205b646563696d616c20696e745d", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7980:42:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85ee98c18b4560d5bfeeef41e54955cef93f7b8071348c487f1fd81bd1aaf2ad", + "typeString": "literal_string \"Error: a > b not satisfied [decimal int]\"" + }, + "value": "Error: a > b not satisfied [decimal int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_85ee98c18b4560d5bfeeef41e54955cef93f7b8071348c487f1fd81bd1aaf2ad", + "typeString": "literal_string \"Error: a > b not satisfied [decimal int]\"" + } + ], + "id": 785, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "7976:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7976:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 788, + "nodeType": "EmitStatement", + "src": "7971:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8065:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 791, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 775, + "src": "8078:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 792, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 779, + "src": "8081:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 789, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "8043:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8043:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 794, + "nodeType": "EmitStatement", + "src": "8038:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8132:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 797, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "8145:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 798, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 779, + "src": "8148:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 795, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "8110:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8110:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 800, + "nodeType": "EmitStatement", + "src": "8105:52:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 801, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "8172:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8172:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8172:6:2" + } + ] + } + } + ] + }, + "id": 807, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGtDecimal", + "nameLocation": "7879:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 780, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 775, + "mutability": "mutable", + "name": "a", + "nameLocation": "7899:1:2", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "7895:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 774, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7895:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 777, + "mutability": "mutable", + "name": "b", + "nameLocation": "7906:1:2", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "7902:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 776, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7902:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 779, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "7914:8:2", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "7909:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 778, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7909:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7894:29:2" + }, + "returnParameters": { + "id": 781, + "nodeType": "ParameterList", + "parameters": [], + "src": "7933:0:2" + }, + "scope": 1786, + "src": "7870:327:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 834, + "nodeType": "Block", + "src": "8285:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 818, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 809, + "src": "8300:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 819, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 811, + "src": "8305:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8300:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 833, + "nodeType": "IfStatement", + "src": "8296:120:2", + "trueBody": { + "id": 832, + "nodeType": "Block", + "src": "8308:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8345:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 823, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 815, + "src": "8354:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 821, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "8328:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8328:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 825, + "nodeType": "EmitStatement", + "src": "8323:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 827, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 809, + "src": "8389:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 828, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 811, + "src": "8392:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 829, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 813, + "src": "8395:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 826, + "name": "assertGtDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 807, + 835, + 869, + 897 + ], + "referencedDeclaration": 807, + "src": "8373:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (int256,int256,uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8373:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "8373:31:2" + } + ] + } + } + ] + }, + "id": 835, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGtDecimal", + "nameLocation": "8212:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 816, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 809, + "mutability": "mutable", + "name": "a", + "nameLocation": "8232:1:2", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "8228:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 808, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8228:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 811, + "mutability": "mutable", + "name": "b", + "nameLocation": "8239:1:2", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "8235:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 810, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8235:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 813, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "8247:8:2", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "8242:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 812, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8242:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 815, + "mutability": "mutable", + "name": "err", + "nameLocation": "8271:3:2", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "8257:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 814, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8257:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "8227:48:2" + }, + "returnParameters": { + "id": 817, + "nodeType": "ParameterList", + "parameters": [], + "src": "8285:0:2" + }, + "scope": 1786, + "src": "8203:220:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 868, + "nodeType": "Block", + "src": "8494:267:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 844, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 837, + "src": "8509:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 845, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 839, + "src": "8514:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8509:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 867, + "nodeType": "IfStatement", + "src": "8505:249:2", + "trueBody": { + "id": 866, + "nodeType": "Block", + "src": "8517:237:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e2062206e6f7420736174697366696564205b646563696d616c2075696e745d", + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8541:43:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2a2cca6a3a53808b9763cfdafa62d083cc161a243845052a9c6e09d6d624c69f", + "typeString": "literal_string \"Error: a > b not satisfied [decimal uint]\"" + }, + "value": "Error: a > b not satisfied [decimal uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_2a2cca6a3a53808b9763cfdafa62d083cc161a243845052a9c6e09d6d624c69f", + "typeString": "literal_string \"Error: a > b not satisfied [decimal uint]\"" + } + ], + "id": 847, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "8537:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8537:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 850, + "nodeType": "EmitStatement", + "src": "8532:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 852, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8628:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 853, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 837, + "src": "8641:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 854, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "8644:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 851, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "8605:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8605:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 856, + "nodeType": "EmitStatement", + "src": "8600:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8696:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 859, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 839, + "src": "8709:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 860, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "8712:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 857, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "8673:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8673:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 862, + "nodeType": "EmitStatement", + "src": "8668:53:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 863, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "8736:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8736:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "8736:6:2" + } + ] + } + } + ] + }, + "id": 869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGtDecimal", + "nameLocation": "8438:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 837, + "mutability": "mutable", + "name": "a", + "nameLocation": "8459:1:2", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "8454:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 836, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8454:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 839, + "mutability": "mutable", + "name": "b", + "nameLocation": "8467:1:2", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "8462:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8462:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 841, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "8475:8:2", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "8470:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 840, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8470:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8453:31:2" + }, + "returnParameters": { + "id": 843, + "nodeType": "ParameterList", + "parameters": [], + "src": "8494:0:2" + }, + "scope": 1786, + "src": "8429:332:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 896, + "nodeType": "Block", + "src": "8851:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 880, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "8866:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 881, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "8871:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8866:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 895, + "nodeType": "IfStatement", + "src": "8862:120:2", + "trueBody": { + "id": 894, + "nodeType": "Block", + "src": "8874:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8911:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 885, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "8920:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 883, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "8894:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8894:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 887, + "nodeType": "EmitStatement", + "src": "8889:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 889, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "8955:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 890, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "8958:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 891, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 875, + "src": "8961:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 888, + "name": "assertGtDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 807, + 835, + 869, + 897 + ], + "referencedDeclaration": 869, + "src": "8939:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8939:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 893, + "nodeType": "ExpressionStatement", + "src": "8939:31:2" + } + ] + } + } + ] + }, + "id": 897, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGtDecimal", + "nameLocation": "8776:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "a", + "nameLocation": "8797:1:2", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "8792:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8792:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 873, + "mutability": "mutable", + "name": "b", + "nameLocation": "8805:1:2", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "8800:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 872, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8800:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 875, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "8813:8:2", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "8808:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 874, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8808:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "mutability": "mutable", + "name": "err", + "nameLocation": "8837:3:2", + "nodeType": "VariableDeclaration", + "scope": 897, + "src": "8823:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 876, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8823:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "8791:50:2" + }, + "returnParameters": { + "id": 879, + "nodeType": "ParameterList", + "parameters": [], + "src": "8851:0:2" + }, + "scope": 1786, + "src": "8767:222:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 926, + "nodeType": "Block", + "src": "9040:223:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 904, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 899, + "src": "9055:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 905, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 901, + "src": "9059:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9055:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 925, + "nodeType": "IfStatement", + "src": "9051:205:2", + "trueBody": { + "id": 924, + "nodeType": "Block", + "src": "9062:194:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e3d2062206e6f7420736174697366696564205b75696e745d", + "id": 908, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9086:36:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ad79593ab7a8c163bd9b5379945ad36a940281a5ef1023478b9c309b02ea375e", + "typeString": "literal_string \"Error: a >= b not satisfied [uint]\"" + }, + "value": "Error: a >= b not satisfied [uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ad79593ab7a8c163bd9b5379945ad36a940281a5ef1023478b9c309b02ea375e", + "typeString": "literal_string \"Error: a >= b not satisfied [uint]\"" + } + ], + "id": 907, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "9082:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9082:41:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 910, + "nodeType": "EmitStatement", + "src": "9077:46:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9158:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 913, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 899, + "src": "9171:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 911, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "9143:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9143:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "EmitStatement", + "src": "9138:35:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9208:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 918, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 901, + "src": "9221:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "9193:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9193:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 920, + "nodeType": "EmitStatement", + "src": "9188:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 921, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "9238:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9238:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 923, + "nodeType": "ExpressionStatement", + "src": "9238:6:2" + } + ] + } + } + ] + }, + "id": 927, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGe", + "nameLocation": "9006:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 899, + "mutability": "mutable", + "name": "a", + "nameLocation": "9020:1:2", + "nodeType": "VariableDeclaration", + "scope": 927, + "src": "9015:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9015:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 901, + "mutability": "mutable", + "name": "b", + "nameLocation": "9028:1:2", + "nodeType": "VariableDeclaration", + "scope": 927, + "src": "9023:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 900, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9023:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9014:16:2" + }, + "returnParameters": { + "id": 903, + "nodeType": "ParameterList", + "parameters": [], + "src": "9040:0:2" + }, + "scope": 1786, + "src": "8997:266:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 951, + "nodeType": "Block", + "src": "9331:120:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 936, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 929, + "src": "9346:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 937, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 931, + "src": "9350:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9346:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 950, + "nodeType": "IfStatement", + "src": "9342:102:2", + "trueBody": { + "id": 949, + "nodeType": "Block", + "src": "9353:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9390:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 941, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 933, + "src": "9399:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 939, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "9373:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9373:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 943, + "nodeType": "EmitStatement", + "src": "9368:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 945, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 929, + "src": "9427:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 946, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 931, + "src": "9430:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 944, + "name": "assertGe", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 927, + 952, + 982, + 1007 + ], + "referencedDeclaration": 927, + "src": "9418:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9418:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 948, + "nodeType": "ExpressionStatement", + "src": "9418:14:2" + } + ] + } + } + ] + }, + "id": 952, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGe", + "nameLocation": "9278:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 929, + "mutability": "mutable", + "name": "a", + "nameLocation": "9292:1:2", + "nodeType": "VariableDeclaration", + "scope": 952, + "src": "9287:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 928, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9287:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 931, + "mutability": "mutable", + "name": "b", + "nameLocation": "9300:1:2", + "nodeType": "VariableDeclaration", + "scope": 952, + "src": "9295:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 930, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9295:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 933, + "mutability": "mutable", + "name": "err", + "nameLocation": "9317:3:2", + "nodeType": "VariableDeclaration", + "scope": 952, + "src": "9303:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 932, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9303:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "9286:35:2" + }, + "returnParameters": { + "id": 935, + "nodeType": "ParameterList", + "parameters": [], + "src": "9331:0:2" + }, + "scope": 1786, + "src": "9269:182:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 981, + "nodeType": "Block", + "src": "9498:220:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 959, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 954, + "src": "9513:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 960, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 956, + "src": "9517:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9513:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 980, + "nodeType": "IfStatement", + "src": "9509:202:2", + "trueBody": { + "id": 979, + "nodeType": "Block", + "src": "9520:191:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e3d2062206e6f7420736174697366696564205b696e745d", + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:35:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9dd34d7cd7d190bc9855e4326f563fd4539c0d764699b480d53bfd72aa5807a6", + "typeString": "literal_string \"Error: a >= b not satisfied [int]\"" + }, + "value": "Error: a >= b not satisfied [int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9dd34d7cd7d190bc9855e4326f563fd4539c0d764699b480d53bfd72aa5807a6", + "typeString": "literal_string \"Error: a >= b not satisfied [int]\"" + } + ], + "id": 962, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "9540:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9540:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 965, + "nodeType": "EmitStatement", + "src": "9535:45:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9614:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 968, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 954, + "src": "9627:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 966, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "9600:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9600:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 970, + "nodeType": "EmitStatement", + "src": "9595:34:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9663:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 973, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 956, + "src": "9676:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 971, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "9649:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9649:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 975, + "nodeType": "EmitStatement", + "src": "9644:34:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 976, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "9693:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9693:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 978, + "nodeType": "ExpressionStatement", + "src": "9693:6:2" + } + ] + } + } + ] + }, + "id": 982, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGe", + "nameLocation": "9466:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 957, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 954, + "mutability": "mutable", + "name": "a", + "nameLocation": "9479:1:2", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "9475:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 953, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9475:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 956, + "mutability": "mutable", + "name": "b", + "nameLocation": "9486:1:2", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "9482:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 955, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9482:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "9474:14:2" + }, + "returnParameters": { + "id": 958, + "nodeType": "ParameterList", + "parameters": [], + "src": "9498:0:2" + }, + "scope": 1786, + "src": "9457:261:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1006, + "nodeType": "Block", + "src": "9784:120:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 991, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "9799:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 992, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "9803:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9799:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1005, + "nodeType": "IfStatement", + "src": "9795:102:2", + "trueBody": { + "id": 1004, + "nodeType": "Block", + "src": "9806:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9843:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 996, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "9852:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 994, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "9826:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9826:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 998, + "nodeType": "EmitStatement", + "src": "9821:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1000, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "9880:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1001, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "9883:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 999, + "name": "assertGe", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 927, + 952, + 982, + 1007 + ], + "referencedDeclaration": 982, + "src": "9871:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$returns$__$", + "typeString": "function (int256,int256)" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9871:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1003, + "nodeType": "ExpressionStatement", + "src": "9871:14:2" + } + ] + } + } + ] + }, + "id": 1007, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGe", + "nameLocation": "9733:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 984, + "mutability": "mutable", + "name": "a", + "nameLocation": "9746:1:2", + "nodeType": "VariableDeclaration", + "scope": 1007, + "src": "9742:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 983, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9742:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 986, + "mutability": "mutable", + "name": "b", + "nameLocation": "9753:1:2", + "nodeType": "VariableDeclaration", + "scope": 1007, + "src": "9749:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 985, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9749:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 988, + "mutability": "mutable", + "name": "err", + "nameLocation": "9770:3:2", + "nodeType": "VariableDeclaration", + "scope": 1007, + "src": "9756:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 987, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9756:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "9741:33:2" + }, + "returnParameters": { + "id": 990, + "nodeType": "ParameterList", + "parameters": [], + "src": "9784:0:2" + }, + "scope": 1786, + "src": "9724:180:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1040, + "nodeType": "Block", + "src": "9973:264:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1016, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "9988:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 1017, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1011, + "src": "9992:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9988:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1039, + "nodeType": "IfStatement", + "src": "9984:246:2", + "trueBody": { + "id": 1038, + "nodeType": "Block", + "src": "9995:235:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e3d2062206e6f7420736174697366696564205b646563696d616c20696e745d", + "id": 1020, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10019:43:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f02f65375ca93c3f3c485b8b2455303d1a8668a2b626cba00789d1c4ebd8736", + "typeString": "literal_string \"Error: a >= b not satisfied [decimal int]\"" + }, + "value": "Error: a >= b not satisfied [decimal int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_0f02f65375ca93c3f3c485b8b2455303d1a8668a2b626cba00789d1c4ebd8736", + "typeString": "literal_string \"Error: a >= b not satisfied [decimal int]\"" + } + ], + "id": 1019, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "10015:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10015:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1022, + "nodeType": "EmitStatement", + "src": "10010:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10105:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1025, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "10118:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1026, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "10121:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1023, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "10083:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10083:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1028, + "nodeType": "EmitStatement", + "src": "10078:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10172:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1031, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1011, + "src": "10185:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1032, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "10188:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1029, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "10150:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10150:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1034, + "nodeType": "EmitStatement", + "src": "10145:52:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1035, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "10212:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10212:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1037, + "nodeType": "ExpressionStatement", + "src": "10212:6:2" + } + ] + } + } + ] + }, + "id": 1041, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGeDecimal", + "nameLocation": "9919:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1009, + "mutability": "mutable", + "name": "a", + "nameLocation": "9939:1:2", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "9935:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1008, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9935:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1011, + "mutability": "mutable", + "name": "b", + "nameLocation": "9946:1:2", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "9942:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1010, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9942:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1013, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "9954:8:2", + "nodeType": "VariableDeclaration", + "scope": 1041, + "src": "9949:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1012, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9949:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9934:29:2" + }, + "returnParameters": { + "id": 1015, + "nodeType": "ParameterList", + "parameters": [], + "src": "9973:0:2" + }, + "scope": 1786, + "src": "9910:327:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1068, + "nodeType": "Block", + "src": "10325:137:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1052, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1043, + "src": "10340:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 1053, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1045, + "src": "10344:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "10340:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1067, + "nodeType": "IfStatement", + "src": "10336:119:2", + "trueBody": { + "id": 1066, + "nodeType": "Block", + "src": "10347:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10384:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1057, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1049, + "src": "10393:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1055, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "10367:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10367:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1059, + "nodeType": "EmitStatement", + "src": "10362:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1061, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1043, + "src": "10428:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1062, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1045, + "src": "10431:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1063, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1047, + "src": "10434:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1060, + "name": "assertGeDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1041, + 1069, + 1103, + 1131 + ], + "referencedDeclaration": 1041, + "src": "10412:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (int256,int256,uint256)" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10412:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1065, + "nodeType": "ExpressionStatement", + "src": "10412:31:2" + } + ] + } + } + ] + }, + "id": 1069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGeDecimal", + "nameLocation": "10252:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1043, + "mutability": "mutable", + "name": "a", + "nameLocation": "10272:1:2", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "10268:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1042, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "10268:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1045, + "mutability": "mutable", + "name": "b", + "nameLocation": "10279:1:2", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "10275:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1044, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "10275:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1047, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "10287:8:2", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "10282:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10282:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1049, + "mutability": "mutable", + "name": "err", + "nameLocation": "10311:3:2", + "nodeType": "VariableDeclaration", + "scope": 1069, + "src": "10297:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1048, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10297:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "10267:48:2" + }, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [], + "src": "10325:0:2" + }, + "scope": 1786, + "src": "10243:219:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1102, + "nodeType": "Block", + "src": "10533:267:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1078, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1071, + "src": "10548:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 1079, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "10552:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10548:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1101, + "nodeType": "IfStatement", + "src": "10544:249:2", + "trueBody": { + "id": 1100, + "nodeType": "Block", + "src": "10555:238:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203e3d2062206e6f7420736174697366696564205b646563696d616c2075696e745d", + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10579:44:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1192304a51ee70969886576ac83224cad7adddc5aab218616c612e9fa634c616", + "typeString": "literal_string \"Error: a >= b not satisfied [decimal uint]\"" + }, + "value": "Error: a >= b not satisfied [decimal uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1192304a51ee70969886576ac83224cad7adddc5aab218616c612e9fa634c616", + "typeString": "literal_string \"Error: a >= b not satisfied [decimal uint]\"" + } + ], + "id": 1081, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "10575:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10575:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1084, + "nodeType": "EmitStatement", + "src": "10570:54:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10667:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1087, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1071, + "src": "10680:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1088, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1075, + "src": "10683:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1085, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "10644:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10644:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1090, + "nodeType": "EmitStatement", + "src": "10639:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10735:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1093, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "10748:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1094, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1075, + "src": "10751:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1091, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "10712:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10712:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1096, + "nodeType": "EmitStatement", + "src": "10707:53:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1097, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "10775:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10775:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1099, + "nodeType": "ExpressionStatement", + "src": "10775:6:2" + } + ] + } + } + ] + }, + "id": 1103, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGeDecimal", + "nameLocation": "10477:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1071, + "mutability": "mutable", + "name": "a", + "nameLocation": "10498:1:2", + "nodeType": "VariableDeclaration", + "scope": 1103, + "src": "10493:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1070, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10493:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1073, + "mutability": "mutable", + "name": "b", + "nameLocation": "10506:1:2", + "nodeType": "VariableDeclaration", + "scope": 1103, + "src": "10501:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1072, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10501:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1075, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "10514:8:2", + "nodeType": "VariableDeclaration", + "scope": 1103, + "src": "10509:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1074, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10509:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10492:31:2" + }, + "returnParameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [], + "src": "10533:0:2" + }, + "scope": 1786, + "src": "10468:332:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1130, + "nodeType": "Block", + "src": "10890:137:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1114, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "10905:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 1115, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "10909:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10905:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1129, + "nodeType": "IfStatement", + "src": "10901:119:2", + "trueBody": { + "id": 1128, + "nodeType": "Block", + "src": "10912:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10949:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1119, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "10958:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1117, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "10932:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10932:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1121, + "nodeType": "EmitStatement", + "src": "10927:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1123, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "10993:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1124, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "10996:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1125, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10999:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1122, + "name": "assertGeDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1041, + 1069, + 1103, + 1131 + ], + "referencedDeclaration": 1103, + "src": "10977:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10977:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1127, + "nodeType": "ExpressionStatement", + "src": "10977:31:2" + } + ] + } + } + ] + }, + "id": 1131, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertGeDecimal", + "nameLocation": "10815:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1112, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1105, + "mutability": "mutable", + "name": "a", + "nameLocation": "10836:1:2", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "10831:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1104, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10831:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1107, + "mutability": "mutable", + "name": "b", + "nameLocation": "10844:1:2", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "10839:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1106, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10839:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1109, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "10852:8:2", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "10847:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1108, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10847:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1111, + "mutability": "mutable", + "name": "err", + "nameLocation": "10876:3:2", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "10862:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1110, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10862:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "10830:50:2" + }, + "returnParameters": { + "id": 1113, + "nodeType": "ParameterList", + "parameters": [], + "src": "10890:0:2" + }, + "scope": 1786, + "src": "10806:221:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1160, + "nodeType": "Block", + "src": "11078:223:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1138, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "11093:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1139, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "11098:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11093:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1159, + "nodeType": "IfStatement", + "src": "11089:205:2", + "trueBody": { + "id": 1158, + "nodeType": "Block", + "src": "11101:193:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c2062206e6f7420736174697366696564205b75696e745d", + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11125:35:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4a5f85d4936ddbc273c762d0b3a90fefdc47bf4d5496816359b86f70b5c74f9", + "typeString": "literal_string \"Error: a < b not satisfied [uint]\"" + }, + "value": "Error: a < b not satisfied [uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4a5f85d4936ddbc273c762d0b3a90fefdc47bf4d5496816359b86f70b5c74f9", + "typeString": "literal_string \"Error: a < b not satisfied [uint]\"" + } + ], + "id": 1141, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "11121:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11121:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1144, + "nodeType": "EmitStatement", + "src": "11116:45:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11196:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1147, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "11209:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1145, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "11181:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 1148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11181:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1149, + "nodeType": "EmitStatement", + "src": "11176:35:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11246:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1152, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "11259:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1150, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "11231:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11231:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1154, + "nodeType": "EmitStatement", + "src": "11226:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1155, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "11276:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11276:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1157, + "nodeType": "ExpressionStatement", + "src": "11276:6:2" + } + ] + } + } + ] + }, + "id": 1161, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLt", + "nameLocation": "11044:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1133, + "mutability": "mutable", + "name": "a", + "nameLocation": "11058:1:2", + "nodeType": "VariableDeclaration", + "scope": 1161, + "src": "11053:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1132, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11053:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1135, + "mutability": "mutable", + "name": "b", + "nameLocation": "11066:1:2", + "nodeType": "VariableDeclaration", + "scope": 1161, + "src": "11061:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11061:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11052:16:2" + }, + "returnParameters": { + "id": 1137, + "nodeType": "ParameterList", + "parameters": [], + "src": "11078:0:2" + }, + "scope": 1786, + "src": "11035:266:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1185, + "nodeType": "Block", + "src": "11369:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1170, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1163, + "src": "11384:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1171, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "11389:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11384:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1184, + "nodeType": "IfStatement", + "src": "11380:103:2", + "trueBody": { + "id": 1183, + "nodeType": "Block", + "src": "11392:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11429:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1175, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "11438:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1173, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "11412:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11412:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1177, + "nodeType": "EmitStatement", + "src": "11407:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1179, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1163, + "src": "11466:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1180, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "11469:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1178, + "name": "assertLt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1161, + 1186, + 1216, + 1241 + ], + "referencedDeclaration": 1161, + "src": "11457:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11457:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1182, + "nodeType": "ExpressionStatement", + "src": "11457:14:2" + } + ] + } + } + ] + }, + "id": 1186, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLt", + "nameLocation": "11316:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1163, + "mutability": "mutable", + "name": "a", + "nameLocation": "11330:1:2", + "nodeType": "VariableDeclaration", + "scope": 1186, + "src": "11325:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1162, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11325:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1165, + "mutability": "mutable", + "name": "b", + "nameLocation": "11338:1:2", + "nodeType": "VariableDeclaration", + "scope": 1186, + "src": "11333:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1164, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11333:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "mutability": "mutable", + "name": "err", + "nameLocation": "11355:3:2", + "nodeType": "VariableDeclaration", + "scope": 1186, + "src": "11341:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1166, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11341:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "11324:35:2" + }, + "returnParameters": { + "id": 1169, + "nodeType": "ParameterList", + "parameters": [], + "src": "11369:0:2" + }, + "scope": 1786, + "src": "11307:183:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1215, + "nodeType": "Block", + "src": "11537:220:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1193, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "11552:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1194, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1190, + "src": "11557:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "11552:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1214, + "nodeType": "IfStatement", + "src": "11548:202:2", + "trueBody": { + "id": 1213, + "nodeType": "Block", + "src": "11560:190:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c2062206e6f7420736174697366696564205b696e745d", + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11584:34:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_62edb5e296dde1308ab599c3156f51dcd32b6d82784df4b0c0246d307d4bd055", + "typeString": "literal_string \"Error: a < b not satisfied [int]\"" + }, + "value": "Error: a < b not satisfied [int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_62edb5e296dde1308ab599c3156f51dcd32b6d82784df4b0c0246d307d4bd055", + "typeString": "literal_string \"Error: a < b not satisfied [int]\"" + } + ], + "id": 1196, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "11580:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11580:39:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1199, + "nodeType": "EmitStatement", + "src": "11575:44:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11653:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1202, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "11666:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1200, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "11639:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11639:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1204, + "nodeType": "EmitStatement", + "src": "11634:34:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11702:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1207, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1190, + "src": "11715:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1205, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "11688:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11688:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1209, + "nodeType": "EmitStatement", + "src": "11683:34:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1210, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "11732:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11732:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1212, + "nodeType": "ExpressionStatement", + "src": "11732:6:2" + } + ] + } + } + ] + }, + "id": 1216, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLt", + "nameLocation": "11505:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1188, + "mutability": "mutable", + "name": "a", + "nameLocation": "11518:1:2", + "nodeType": "VariableDeclaration", + "scope": 1216, + "src": "11514:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1187, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11514:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1190, + "mutability": "mutable", + "name": "b", + "nameLocation": "11525:1:2", + "nodeType": "VariableDeclaration", + "scope": 1216, + "src": "11521:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1189, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11521:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "11513:14:2" + }, + "returnParameters": { + "id": 1192, + "nodeType": "ParameterList", + "parameters": [], + "src": "11537:0:2" + }, + "scope": 1786, + "src": "11496:261:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1240, + "nodeType": "Block", + "src": "11823:121:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1225, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1218, + "src": "11838:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1226, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1220, + "src": "11843:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "11838:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1239, + "nodeType": "IfStatement", + "src": "11834:103:2", + "trueBody": { + "id": 1238, + "nodeType": "Block", + "src": "11846:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11883:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1230, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1222, + "src": "11892:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1228, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "11866:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11866:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1232, + "nodeType": "EmitStatement", + "src": "11861:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1234, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1218, + "src": "11920:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1235, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1220, + "src": "11923:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1233, + "name": "assertLt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1161, + 1186, + 1216, + 1241 + ], + "referencedDeclaration": 1216, + "src": "11911:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$returns$__$", + "typeString": "function (int256,int256)" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11911:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1237, + "nodeType": "ExpressionStatement", + "src": "11911:14:2" + } + ] + } + } + ] + }, + "id": 1241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLt", + "nameLocation": "11772:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1223, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1218, + "mutability": "mutable", + "name": "a", + "nameLocation": "11785:1:2", + "nodeType": "VariableDeclaration", + "scope": 1241, + "src": "11781:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1217, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11781:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1220, + "mutability": "mutable", + "name": "b", + "nameLocation": "11792:1:2", + "nodeType": "VariableDeclaration", + "scope": 1241, + "src": "11788:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1219, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11788:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1222, + "mutability": "mutable", + "name": "err", + "nameLocation": "11809:3:2", + "nodeType": "VariableDeclaration", + "scope": 1241, + "src": "11795:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1221, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11795:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "11780:33:2" + }, + "returnParameters": { + "id": 1224, + "nodeType": "ParameterList", + "parameters": [], + "src": "11823:0:2" + }, + "scope": 1786, + "src": "11763:181:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1274, + "nodeType": "Block", + "src": "12013:264:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1250, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1243, + "src": "12028:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1251, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "12033:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12028:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1273, + "nodeType": "IfStatement", + "src": "12024:246:2", + "trueBody": { + "id": 1272, + "nodeType": "Block", + "src": "12036:234:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c2062206e6f7420736174697366696564205b646563696d616c20696e745d", + "id": 1254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12060:42:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a598de9e78c706978d3e40be19632446c2f234152ee02226f88acff1b63da79a", + "typeString": "literal_string \"Error: a < b not satisfied [decimal int]\"" + }, + "value": "Error: a < b not satisfied [decimal int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a598de9e78c706978d3e40be19632446c2f234152ee02226f88acff1b63da79a", + "typeString": "literal_string \"Error: a < b not satisfied [decimal int]\"" + } + ], + "id": 1253, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12056:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12056:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1256, + "nodeType": "EmitStatement", + "src": "12051:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12145:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1259, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1243, + "src": "12158:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1260, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "12161:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1257, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "12123:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12123:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1262, + "nodeType": "EmitStatement", + "src": "12118:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12212:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1265, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "12225:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1266, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "12228:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1263, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "12190:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12190:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1268, + "nodeType": "EmitStatement", + "src": "12185:52:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1269, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "12252:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12252:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1271, + "nodeType": "ExpressionStatement", + "src": "12252:6:2" + } + ] + } + } + ] + }, + "id": 1275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLtDecimal", + "nameLocation": "11959:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1243, + "mutability": "mutable", + "name": "a", + "nameLocation": "11979:1:2", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "11975:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1242, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11975:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1245, + "mutability": "mutable", + "name": "b", + "nameLocation": "11986:1:2", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "11982:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1244, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "11982:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "11994:8:2", + "nodeType": "VariableDeclaration", + "scope": 1275, + "src": "11989:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11989:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11974:29:2" + }, + "returnParameters": { + "id": 1249, + "nodeType": "ParameterList", + "parameters": [], + "src": "12013:0:2" + }, + "scope": 1786, + "src": "11950:327:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1302, + "nodeType": "Block", + "src": "12365:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1286, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1277, + "src": "12380:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1287, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "12385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "12380:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1301, + "nodeType": "IfStatement", + "src": "12376:120:2", + "trueBody": { + "id": 1300, + "nodeType": "Block", + "src": "12388:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12425:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1291, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "12434:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1289, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "12408:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12408:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1293, + "nodeType": "EmitStatement", + "src": "12403:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1295, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1277, + "src": "12469:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1296, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "12472:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1297, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "12475:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1294, + "name": "assertLtDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1275, + 1303, + 1337, + 1365 + ], + "referencedDeclaration": 1275, + "src": "12453:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (int256,int256,uint256)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12453:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1299, + "nodeType": "ExpressionStatement", + "src": "12453:31:2" + } + ] + } + } + ] + }, + "id": 1303, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLtDecimal", + "nameLocation": "12292:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1277, + "mutability": "mutable", + "name": "a", + "nameLocation": "12312:1:2", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "12308:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1276, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "12308:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1279, + "mutability": "mutable", + "name": "b", + "nameLocation": "12319:1:2", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "12315:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1278, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "12315:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1281, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "12327:8:2", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "12322:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1280, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12322:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1283, + "mutability": "mutable", + "name": "err", + "nameLocation": "12351:3:2", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "12337:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1282, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12337:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "12307:48:2" + }, + "returnParameters": { + "id": 1285, + "nodeType": "ParameterList", + "parameters": [], + "src": "12365:0:2" + }, + "scope": 1786, + "src": "12283:220:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1336, + "nodeType": "Block", + "src": "12574:267:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1312, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "12589:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1313, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "12594:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12589:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1335, + "nodeType": "IfStatement", + "src": "12585:249:2", + "trueBody": { + "id": 1334, + "nodeType": "Block", + "src": "12597:237:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c2062206e6f7420736174697366696564205b646563696d616c2075696e745d", + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12621:43:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8057606f9e67842ac0149f4a7ffdaca59331aea176cd1419e89b7b4b21bbc6d9", + "typeString": "literal_string \"Error: a < b not satisfied [decimal uint]\"" + }, + "value": "Error: a < b not satisfied [decimal uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8057606f9e67842ac0149f4a7ffdaca59331aea176cd1419e89b7b4b21bbc6d9", + "typeString": "literal_string \"Error: a < b not satisfied [decimal uint]\"" + } + ], + "id": 1315, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12617:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12617:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1318, + "nodeType": "EmitStatement", + "src": "12612:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12708:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1321, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1305, + "src": "12721:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1322, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "12724:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1319, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "12685:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12685:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1324, + "nodeType": "EmitStatement", + "src": "12680:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12776:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1327, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1307, + "src": "12789:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1328, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "12792:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1325, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "12753:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12753:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1330, + "nodeType": "EmitStatement", + "src": "12748:53:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1331, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "12816:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12816:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1333, + "nodeType": "ExpressionStatement", + "src": "12816:6:2" + } + ] + } + } + ] + }, + "id": 1337, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLtDecimal", + "nameLocation": "12518:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1305, + "mutability": "mutable", + "name": "a", + "nameLocation": "12539:1:2", + "nodeType": "VariableDeclaration", + "scope": 1337, + "src": "12534:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1304, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12534:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1307, + "mutability": "mutable", + "name": "b", + "nameLocation": "12547:1:2", + "nodeType": "VariableDeclaration", + "scope": 1337, + "src": "12542:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12542:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1309, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "12555:8:2", + "nodeType": "VariableDeclaration", + "scope": 1337, + "src": "12550:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1308, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12550:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12533:31:2" + }, + "returnParameters": { + "id": 1311, + "nodeType": "ParameterList", + "parameters": [], + "src": "12574:0:2" + }, + "scope": 1786, + "src": "12509:332:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1364, + "nodeType": "Block", + "src": "12931:138:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1348, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "12946:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1349, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1341, + "src": "12951:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12946:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1363, + "nodeType": "IfStatement", + "src": "12942:120:2", + "trueBody": { + "id": 1362, + "nodeType": "Block", + "src": "12954:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12991:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1353, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "13000:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1351, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "12974:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12974:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1355, + "nodeType": "EmitStatement", + "src": "12969:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1357, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "13035:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1358, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1341, + "src": "13038:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1359, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "13041:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1356, + "name": "assertLtDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1275, + 1303, + 1337, + 1365 + ], + "referencedDeclaration": 1337, + "src": "13019:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13019:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1361, + "nodeType": "ExpressionStatement", + "src": "13019:31:2" + } + ] + } + } + ] + }, + "id": 1365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLtDecimal", + "nameLocation": "12856:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1339, + "mutability": "mutable", + "name": "a", + "nameLocation": "12877:1:2", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "12872:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12872:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1341, + "mutability": "mutable", + "name": "b", + "nameLocation": "12885:1:2", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "12880:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1340, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12880:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1343, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "12893:8:2", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "12888:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1342, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12888:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1345, + "mutability": "mutable", + "name": "err", + "nameLocation": "12917:3:2", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "12903:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1344, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12903:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "12871:50:2" + }, + "returnParameters": { + "id": 1347, + "nodeType": "ParameterList", + "parameters": [], + "src": "12931:0:2" + }, + "scope": 1786, + "src": "12847:222:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1394, + "nodeType": "Block", + "src": "13120:223:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1372, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1367, + "src": "13135:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1373, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1369, + "src": "13139:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13135:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1393, + "nodeType": "IfStatement", + "src": "13131:205:2", + "trueBody": { + "id": 1392, + "nodeType": "Block", + "src": "13142:194:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c3d2062206e6f7420736174697366696564205b75696e745d", + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13166:36:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d5420eec28b94f3fd7dd1c7ce81f45c79bfa9fab37300faf965a8d6272e32ff", + "typeString": "literal_string \"Error: a <= b not satisfied [uint]\"" + }, + "value": "Error: a <= b not satisfied [uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_6d5420eec28b94f3fd7dd1c7ce81f45c79bfa9fab37300faf965a8d6272e32ff", + "typeString": "literal_string \"Error: a <= b not satisfied [uint]\"" + } + ], + "id": 1375, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "13162:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13162:41:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1378, + "nodeType": "EmitStatement", + "src": "13157:46:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13238:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1381, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1367, + "src": "13251:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1379, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "13223:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13223:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1383, + "nodeType": "EmitStatement", + "src": "13218:35:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13288:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1386, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1369, + "src": "13301:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1384, + "name": "log_named_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "13273:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256)" + } + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13273:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1388, + "nodeType": "EmitStatement", + "src": "13268:35:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1389, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "13318:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13318:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1391, + "nodeType": "ExpressionStatement", + "src": "13318:6:2" + } + ] + } + } + ] + }, + "id": 1395, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLe", + "nameLocation": "13086:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1370, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1367, + "mutability": "mutable", + "name": "a", + "nameLocation": "13100:1:2", + "nodeType": "VariableDeclaration", + "scope": 1395, + "src": "13095:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1366, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13095:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1369, + "mutability": "mutable", + "name": "b", + "nameLocation": "13108:1:2", + "nodeType": "VariableDeclaration", + "scope": 1395, + "src": "13103:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1368, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13103:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13094:16:2" + }, + "returnParameters": { + "id": 1371, + "nodeType": "ParameterList", + "parameters": [], + "src": "13120:0:2" + }, + "scope": 1786, + "src": "13077:266:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1419, + "nodeType": "Block", + "src": "13411:120:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1404, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1397, + "src": "13426:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1405, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "13430:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13426:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1418, + "nodeType": "IfStatement", + "src": "13422:102:2", + "trueBody": { + "id": 1417, + "nodeType": "Block", + "src": "13433:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13470:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1409, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1401, + "src": "13479:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1407, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "13453:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13453:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1411, + "nodeType": "EmitStatement", + "src": "13448:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1413, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1397, + "src": "13507:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1414, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "13510:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1412, + "name": "assertLe", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1395, + 1420, + 1450, + 1475 + ], + "referencedDeclaration": 1395, + "src": "13498:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13498:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1416, + "nodeType": "ExpressionStatement", + "src": "13498:14:2" + } + ] + } + } + ] + }, + "id": 1420, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLe", + "nameLocation": "13358:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1397, + "mutability": "mutable", + "name": "a", + "nameLocation": "13372:1:2", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "13367:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1396, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13367:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1399, + "mutability": "mutable", + "name": "b", + "nameLocation": "13380:1:2", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "13375:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13375:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1401, + "mutability": "mutable", + "name": "err", + "nameLocation": "13397:3:2", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "13383:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1400, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13383:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "13366:35:2" + }, + "returnParameters": { + "id": 1403, + "nodeType": "ParameterList", + "parameters": [], + "src": "13411:0:2" + }, + "scope": 1786, + "src": "13349:182:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1449, + "nodeType": "Block", + "src": "13578:220:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1427, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1422, + "src": "13593:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1428, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1424, + "src": "13597:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "13593:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1448, + "nodeType": "IfStatement", + "src": "13589:202:2", + "trueBody": { + "id": 1447, + "nodeType": "Block", + "src": "13600:191:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c3d2062206e6f7420736174697366696564205b696e745d", + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13624:35:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_558ba41c44b763b352271d6c22f0cb02f5c0c4dbb25ed68172916a4e6a662555", + "typeString": "literal_string \"Error: a <= b not satisfied [int]\"" + }, + "value": "Error: a <= b not satisfied [int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_558ba41c44b763b352271d6c22f0cb02f5c0c4dbb25ed68172916a4e6a662555", + "typeString": "literal_string \"Error: a <= b not satisfied [int]\"" + } + ], + "id": 1430, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "13620:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13620:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1433, + "nodeType": "EmitStatement", + "src": "13615:45:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13694:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1436, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1422, + "src": "13707:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1434, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "13680:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13680:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1438, + "nodeType": "EmitStatement", + "src": "13675:34:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13743:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1441, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1424, + "src": "13756:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1439, + "name": "log_named_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "13729:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$returns$__$", + "typeString": "function (string memory,int256)" + } + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13729:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1443, + "nodeType": "EmitStatement", + "src": "13724:34:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1444, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "13773:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13773:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1446, + "nodeType": "ExpressionStatement", + "src": "13773:6:2" + } + ] + } + } + ] + }, + "id": 1450, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLe", + "nameLocation": "13546:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1422, + "mutability": "mutable", + "name": "a", + "nameLocation": "13559:1:2", + "nodeType": "VariableDeclaration", + "scope": 1450, + "src": "13555:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1421, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13555:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1424, + "mutability": "mutable", + "name": "b", + "nameLocation": "13566:1:2", + "nodeType": "VariableDeclaration", + "scope": 1450, + "src": "13562:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1423, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13562:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "13554:14:2" + }, + "returnParameters": { + "id": 1426, + "nodeType": "ParameterList", + "parameters": [], + "src": "13578:0:2" + }, + "scope": 1786, + "src": "13537:261:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1474, + "nodeType": "Block", + "src": "13864:120:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1459, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1452, + "src": "13879:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1460, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1454, + "src": "13883:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "13879:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1473, + "nodeType": "IfStatement", + "src": "13875:102:2", + "trueBody": { + "id": 1472, + "nodeType": "Block", + "src": "13886:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13923:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1464, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1456, + "src": "13932:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1462, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "13906:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13906:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1466, + "nodeType": "EmitStatement", + "src": "13901:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1468, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1452, + "src": "13960:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1469, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1454, + "src": "13963:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1467, + "name": "assertLe", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1395, + 1420, + 1450, + 1475 + ], + "referencedDeclaration": 1450, + "src": "13951:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$returns$__$", + "typeString": "function (int256,int256)" + } + }, + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13951:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1471, + "nodeType": "ExpressionStatement", + "src": "13951:14:2" + } + ] + } + } + ] + }, + "id": 1475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLe", + "nameLocation": "13813:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1452, + "mutability": "mutable", + "name": "a", + "nameLocation": "13826:1:2", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "13822:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1451, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13822:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1454, + "mutability": "mutable", + "name": "b", + "nameLocation": "13833:1:2", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "13829:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1453, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "13829:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1456, + "mutability": "mutable", + "name": "err", + "nameLocation": "13850:3:2", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "13836:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1455, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13836:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "13821:33:2" + }, + "returnParameters": { + "id": 1458, + "nodeType": "ParameterList", + "parameters": [], + "src": "13864:0:2" + }, + "scope": 1786, + "src": "13804:180:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1508, + "nodeType": "Block", + "src": "14053:264:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1484, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1477, + "src": "14068:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1485, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "14072:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14068:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1507, + "nodeType": "IfStatement", + "src": "14064:246:2", + "trueBody": { + "id": 1506, + "nodeType": "Block", + "src": "14075:235:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c3d2062206e6f7420736174697366696564205b646563696d616c20696e745d", + "id": 1488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14099:43:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a855fbfffc345e8a0ab544e824618dabd995fdc5bda653c7d4869b57deb1d23a", + "typeString": "literal_string \"Error: a <= b not satisfied [decimal int]\"" + }, + "value": "Error: a <= b not satisfied [decimal int]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a855fbfffc345e8a0ab544e824618dabd995fdc5bda653c7d4869b57deb1d23a", + "typeString": "literal_string \"Error: a <= b not satisfied [decimal int]\"" + } + ], + "id": 1487, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "14095:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14095:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1490, + "nodeType": "EmitStatement", + "src": "14090:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14185:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1493, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1477, + "src": "14198:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1494, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1481, + "src": "14201:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1491, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "14163:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14163:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1496, + "nodeType": "EmitStatement", + "src": "14158:52:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14252:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1499, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "14265:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1500, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1481, + "src": "14268:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1497, + "name": "log_named_decimal_int", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "14230:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,int256,uint256)" + } + }, + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14230:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1502, + "nodeType": "EmitStatement", + "src": "14225:52:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1503, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "14292:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14292:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1505, + "nodeType": "ExpressionStatement", + "src": "14292:6:2" + } + ] + } + } + ] + }, + "id": 1509, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLeDecimal", + "nameLocation": "13999:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1477, + "mutability": "mutable", + "name": "a", + "nameLocation": "14019:1:2", + "nodeType": "VariableDeclaration", + "scope": 1509, + "src": "14015:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1476, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14015:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1479, + "mutability": "mutable", + "name": "b", + "nameLocation": "14026:1:2", + "nodeType": "VariableDeclaration", + "scope": 1509, + "src": "14022:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1478, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14022:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1481, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "14034:8:2", + "nodeType": "VariableDeclaration", + "scope": 1509, + "src": "14029:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1480, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14029:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14014:29:2" + }, + "returnParameters": { + "id": 1483, + "nodeType": "ParameterList", + "parameters": [], + "src": "14053:0:2" + }, + "scope": 1786, + "src": "13990:327:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1536, + "nodeType": "Block", + "src": "14405:137:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1520, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14420:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1521, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "14424:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14420:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1535, + "nodeType": "IfStatement", + "src": "14416:119:2", + "trueBody": { + "id": 1534, + "nodeType": "Block", + "src": "14427:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14464:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1525, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1517, + "src": "14473:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1523, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "14447:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14447:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1527, + "nodeType": "EmitStatement", + "src": "14442:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1529, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14508:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1530, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "14511:1:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 1531, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1515, + "src": "14514:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1528, + "name": "assertLeDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1509, + 1537, + 1571, + 1599 + ], + "referencedDeclaration": 1509, + "src": "14492:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_int256_$_t_int256_$_t_uint256_$returns$__$", + "typeString": "function (int256,int256,uint256)" + } + }, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14492:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1533, + "nodeType": "ExpressionStatement", + "src": "14492:31:2" + } + ] + } + } + ] + }, + "id": 1537, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLeDecimal", + "nameLocation": "14332:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1511, + "mutability": "mutable", + "name": "a", + "nameLocation": "14352:1:2", + "nodeType": "VariableDeclaration", + "scope": 1537, + "src": "14348:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1510, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14348:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1513, + "mutability": "mutable", + "name": "b", + "nameLocation": "14359:1:2", + "nodeType": "VariableDeclaration", + "scope": 1537, + "src": "14355:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1512, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "14355:3:2", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1515, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "14367:8:2", + "nodeType": "VariableDeclaration", + "scope": 1537, + "src": "14362:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1514, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14362:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1517, + "mutability": "mutable", + "name": "err", + "nameLocation": "14391:3:2", + "nodeType": "VariableDeclaration", + "scope": 1537, + "src": "14377:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1516, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14377:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "14347:48:2" + }, + "returnParameters": { + "id": 1519, + "nodeType": "ParameterList", + "parameters": [], + "src": "14405:0:2" + }, + "scope": 1786, + "src": "14323:219:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1570, + "nodeType": "Block", + "src": "14613:267:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1546, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1539, + "src": "14628:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1547, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "14632:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14628:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1569, + "nodeType": "IfStatement", + "src": "14624:249:2", + "trueBody": { + "id": 1568, + "nodeType": "Block", + "src": "14635:238:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203c3d2062206e6f7420736174697366696564205b646563696d616c2075696e745d", + "id": 1550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14659:44:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32bce37771ce1d01bc601c73b51f2296c0d8e2a50c2d19a6ac89c6b917715c51", + "typeString": "literal_string \"Error: a <= b not satisfied [decimal uint]\"" + }, + "value": "Error: a <= b not satisfied [decimal uint]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_32bce37771ce1d01bc601c73b51f2296c0d8e2a50c2d19a6ac89c6b917715c51", + "typeString": "literal_string \"Error: a <= b not satisfied [decimal uint]\"" + } + ], + "id": 1549, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "14655:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14655:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1552, + "nodeType": "EmitStatement", + "src": "14650:54:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14747:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1555, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1539, + "src": "14760:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1556, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1543, + "src": "14763:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1553, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "14724:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14724:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1558, + "nodeType": "EmitStatement", + "src": "14719:53:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14815:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1561, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "14828:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1562, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1543, + "src": "14831:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1559, + "name": "log_named_decimal_uint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "14792:22:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (string memory,uint256,uint256)" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14792:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1564, + "nodeType": "EmitStatement", + "src": "14787:53:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1565, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "14855:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14855:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1567, + "nodeType": "ExpressionStatement", + "src": "14855:6:2" + } + ] + } + } + ] + }, + "id": 1571, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLeDecimal", + "nameLocation": "14557:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1539, + "mutability": "mutable", + "name": "a", + "nameLocation": "14578:1:2", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "14573:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1538, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14573:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1541, + "mutability": "mutable", + "name": "b", + "nameLocation": "14586:1:2", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "14581:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1540, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14581:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1543, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "14594:8:2", + "nodeType": "VariableDeclaration", + "scope": 1571, + "src": "14589:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1542, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14589:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14572:31:2" + }, + "returnParameters": { + "id": 1545, + "nodeType": "ParameterList", + "parameters": [], + "src": "14613:0:2" + }, + "scope": 1786, + "src": "14548:332:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1598, + "nodeType": "Block", + "src": "14970:137:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1582, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "14985:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 1583, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1575, + "src": "14989:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14985:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1597, + "nodeType": "IfStatement", + "src": "14981:119:2", + "trueBody": { + "id": 1596, + "nodeType": "Block", + "src": "14992:108:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15029:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1587, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "15038:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1585, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "15012:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15012:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "EmitStatement", + "src": "15007:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1591, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "15073:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1592, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1575, + "src": "15076:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1593, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1577, + "src": "15079:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1590, + "name": "assertGeDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1041, + 1069, + 1103, + 1131 + ], + "referencedDeclaration": 1103, + "src": "15057:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15057:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1595, + "nodeType": "ExpressionStatement", + "src": "15057:31:2" + } + ] + } + } + ] + }, + "id": 1599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertLeDecimal", + "nameLocation": "14895:15:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1573, + "mutability": "mutable", + "name": "a", + "nameLocation": "14916:1:2", + "nodeType": "VariableDeclaration", + "scope": 1599, + "src": "14911:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1572, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14911:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1575, + "mutability": "mutable", + "name": "b", + "nameLocation": "14924:1:2", + "nodeType": "VariableDeclaration", + "scope": 1599, + "src": "14919:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1574, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14919:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1577, + "mutability": "mutable", + "name": "decimals", + "nameLocation": "14932:8:2", + "nodeType": "VariableDeclaration", + "scope": 1599, + "src": "14927:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1576, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14927:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1579, + "mutability": "mutable", + "name": "err", + "nameLocation": "14956:3:2", + "nodeType": "VariableDeclaration", + "scope": 1599, + "src": "14942:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1578, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14942:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "14910:50:2" + }, + "returnParameters": { + "id": 1581, + "nodeType": "ParameterList", + "parameters": [], + "src": "14970:0:2" + }, + "scope": 1786, + "src": "14886:221:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1638, + "nodeType": "Block", + "src": "15176:288:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1609, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "15218:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1607, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "15201:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "15201:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15201:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1606, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "15191:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15191:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1615, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "15252:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1613, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "15235:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "15235:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15235:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1612, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "15225:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15225:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "15191:64:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1637, + "nodeType": "IfStatement", + "src": "15187:270:2", + "trueBody": { + "id": 1636, + "nodeType": "Block", + "src": "15257:200:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b737472696e675d", + "id": 1620, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15281:38:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_58e3ca0e65e73c038df3db6a7cab1bf7de300d13038b802ce0f4435889c48e5e", + "typeString": "literal_string \"Error: a == b not satisfied [string]\"" + }, + "value": "Error: a == b not satisfied [string]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_58e3ca0e65e73c038df3db6a7cab1bf7de300d13038b802ce0f4435889c48e5e", + "typeString": "literal_string \"Error: a == b not satisfied [string]\"" + } + ], + "id": 1619, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "15277:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15277:43:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1622, + "nodeType": "EmitStatement", + "src": "15272:48:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652061", + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15357:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + "value": " Value a" + }, + { + "id": 1625, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "15370:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c592b529b874569f165479a5a4380dedf000796f11e04035f76bfa7310b31d26", + "typeString": "literal_string \" Value a\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1623, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "15340:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15340:32:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1627, + "nodeType": "EmitStatement", + "src": "15335:37:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "202056616c75652062", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15409:11:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + "value": " Value b" + }, + { + "id": 1630, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "15422:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e4b1d025132960c3fb1a582cf2366864dc416744d1b9770aa69fe3749623ebc3", + "typeString": "literal_string \" Value b\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1628, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "15392:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15392:32:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1632, + "nodeType": "EmitStatement", + "src": "15387:37:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1633, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "15439:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15439:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1635, + "nodeType": "ExpressionStatement", + "src": "15439:6:2" + } + ] + } + } + ] + }, + "id": 1639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "15124:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1604, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1601, + "mutability": "mutable", + "name": "a", + "nameLocation": "15147:1:2", + "nodeType": "VariableDeclaration", + "scope": 1639, + "src": "15133:15:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1600, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15133:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1603, + "mutability": "mutable", + "name": "b", + "nameLocation": "15164:1:2", + "nodeType": "VariableDeclaration", + "scope": 1639, + "src": "15150:15:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1602, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15150:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "15132:34:2" + }, + "returnParameters": { + "id": 1605, + "nodeType": "ParameterList", + "parameters": [], + "src": "15176:0:2" + }, + "scope": 1786, + "src": "15115:349:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1673, + "nodeType": "Block", + "src": "15550:179:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1651, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "15592:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1649, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "15575:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "15575:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15575:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1648, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "15565:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15565:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1657, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "15626:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1655, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "15609:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "15609:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15609:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1654, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "15599:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15599:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "15565:64:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1672, + "nodeType": "IfStatement", + "src": "15561:161:2", + "trueBody": { + "id": 1671, + "nodeType": "Block", + "src": "15631:91:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15668:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1663, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1645, + "src": "15677:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1661, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "15651:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15651:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1665, + "nodeType": "EmitStatement", + "src": "15646:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1667, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "15705:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 1668, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "15708:1:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1666, + "name": "assertEq", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 320, + 345, + 375, + 400, + 459, + 484, + 514, + 539, + 1639, + 1674 + ], + "referencedDeclaration": 1639, + "src": "15696:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15696:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1670, + "nodeType": "ExpressionStatement", + "src": "15696:14:2" + } + ] + } + } + ] + }, + "id": 1674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq", + "nameLocation": "15479:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1641, + "mutability": "mutable", + "name": "a", + "nameLocation": "15502:1:2", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "15488:15:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1640, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15488:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1643, + "mutability": "mutable", + "name": "b", + "nameLocation": "15519:1:2", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "15505:15:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1642, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15505:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1645, + "mutability": "mutable", + "name": "err", + "nameLocation": "15536:3:2", + "nodeType": "VariableDeclaration", + "scope": 1674, + "src": "15522:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15522:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "15487:53:2" + }, + "returnParameters": { + "id": 1647, + "nodeType": "ParameterList", + "parameters": [], + "src": "15550:0:2" + }, + "scope": 1786, + "src": "15470:259:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1725, + "nodeType": "Block", + "src": "15819:274:2", + "statements": [ + { + "expression": { + "id": 1685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1683, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1681, + "src": "15830:2:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15835:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "15830:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1686, + "nodeType": "ExpressionStatement", + "src": "15830:9:2" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1687, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "15854:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15854:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1689, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1678, + "src": "15866:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15866:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15854:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1723, + "nodeType": "Block", + "src": "16049:37:2", + "statements": [ + { + "expression": { + "id": 1721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1719, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1681, + "src": "16064:2:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16069:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "16064:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1722, + "nodeType": "ExpressionStatement", + "src": "16064:10:2" + } + ] + }, + "id": 1724, + "nodeType": "IfStatement", + "src": "15850:236:2", + "trueBody": { + "id": 1718, + "nodeType": "Block", + "src": "15876:167:2", + "statements": [ + { + "body": { + "id": 1716, + "nodeType": "Block", + "src": "15927:105:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 1709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1703, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "15950:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1705, + "indexExpression": { + "id": 1704, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1693, + "src": "15952:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15950:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "baseExpression": { + "id": 1706, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1678, + "src": "15958:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1708, + "indexExpression": { + "id": 1707, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1693, + "src": "15960:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15958:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "15950:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1715, + "nodeType": "IfStatement", + "src": "15946:71:2", + "trueBody": { + "id": 1714, + "nodeType": "Block", + "src": "15964:53:2", + "statements": [ + { + "expression": { + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1710, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1681, + "src": "15987:2:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 1711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15992:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "15987:10:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1713, + "nodeType": "ExpressionStatement", + "src": "15987:10:2" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1696, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1693, + "src": "15908:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1697, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "15912:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15912:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15908:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1717, + "initializationExpression": { + "assignments": [ + 1693 + ], + "declarations": [ + { + "constant": false, + "id": 1693, + "mutability": "mutable", + "name": "i", + "nameLocation": "15901:1:2", + "nodeType": "VariableDeclaration", + "scope": 1717, + "src": "15896:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1692, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15896:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1695, + "initialValue": { + "hexValue": "30", + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15905:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15896:10:2" + }, + "loopExpression": { + "expression": { + "id": 1701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15922:3:2", + "subExpression": { + "id": 1700, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1693, + "src": "15922:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1702, + "nodeType": "ExpressionStatement", + "src": "15922:3:2" + }, + "nodeType": "ForStatement", + "src": "15891:141:2" + } + ] + } + } + ] + }, + "id": 1726, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkEq0", + "nameLocation": "15746:8:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1679, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1676, + "mutability": "mutable", + "name": "a", + "nameLocation": "15768:1:2", + "nodeType": "VariableDeclaration", + "scope": 1726, + "src": "15755:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1675, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15755:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "mutability": "mutable", + "name": "b", + "nameLocation": "15784:1:2", + "nodeType": "VariableDeclaration", + "scope": 1726, + "src": "15771:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1677, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15771:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "15754:32:2" + }, + "returnParameters": { + "id": 1682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1681, + "mutability": "mutable", + "name": "ok", + "nameLocation": "15815:2:2", + "nodeType": "VariableDeclaration", + "scope": 1726, + "src": "15810:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1680, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15810:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "15809:9:2" + }, + "scope": 1786, + "src": "15737:356:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1757, + "nodeType": "Block", + "src": "16159:238:2", + "statements": [ + { + "condition": { + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "16174:15:2", + "subExpression": { + "arguments": [ + { + "id": 1734, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "16184:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1735, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1730, + "src": "16187:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1733, + "name": "checkEq0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1726, + "src": "16175:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory,bytes memory) pure returns (bool)" + } + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16175:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1756, + "nodeType": "IfStatement", + "src": "16170:220:2", + "trueBody": { + "id": 1755, + "nodeType": "Block", + "src": "16191:199:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f723a2061203d3d2062206e6f7420736174697366696564205b62797465735d", + "id": 1739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16215:37:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9bb7b728691fe2872efdd27bd07c4a95b3586c3b7ec3afa731a7c21a76e39cfc", + "typeString": "literal_string \"Error: a == b not satisfied [bytes]\"" + }, + "value": "Error: a == b not satisfied [bytes]" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9bb7b728691fe2872efdd27bd07c4a95b3586c3b7ec3afa731a7c21a76e39cfc", + "typeString": "literal_string \"Error: a == b not satisfied [bytes]\"" + } + ], + "id": 1738, + "name": "log", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "16211:3:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16211:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1741, + "nodeType": "EmitStatement", + "src": "16206:47:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "20204578706563746564", + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16289:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + "value": " Expected" + }, + { + "id": 1744, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "16303:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b", + "typeString": "literal_string \" Expected\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1742, + "name": "log_named_bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 79, + "src": "16273:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,bytes memory)" + } + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16273:32:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1746, + "nodeType": "EmitStatement", + "src": "16268:37:2" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "2020202041637475616c", + "id": 1748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16341:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + "value": " Actual" + }, + { + "id": 1749, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1730, + "src": "16355:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b", + "typeString": "literal_string \" Actual\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1747, + "name": "log_named_bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 79, + "src": "16325:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (string memory,bytes memory)" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16325:32:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1751, + "nodeType": "EmitStatement", + "src": "16320:37:2" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1752, + "name": "fail", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "16372:4:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16372:6:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1754, + "nodeType": "ExpressionStatement", + "src": "16372:6:2" + } + ] + } + } + ] + }, + "id": 1758, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq0", + "nameLocation": "16108:9:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1728, + "mutability": "mutable", + "name": "a", + "nameLocation": "16131:1:2", + "nodeType": "VariableDeclaration", + "scope": 1758, + "src": "16118:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1727, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16118:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1730, + "mutability": "mutable", + "name": "b", + "nameLocation": "16147:1:2", + "nodeType": "VariableDeclaration", + "scope": 1758, + "src": "16134:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1729, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16134:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "16117:32:2" + }, + "returnParameters": { + "id": 1732, + "nodeType": "ParameterList", + "parameters": [], + "src": "16159:0:2" + }, + "scope": 1786, + "src": "16099:298:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1784, + "nodeType": "Block", + "src": "16482:131:2", + "statements": [ + { + "condition": { + "id": 1771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "16497:15:2", + "subExpression": { + "arguments": [ + { + "id": 1768, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1760, + "src": "16507:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1769, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1762, + "src": "16510:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1767, + "name": "checkEq0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1726, + "src": "16498:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory,bytes memory) pure returns (bool)" + } + }, + "id": 1770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16498:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1783, + "nodeType": "IfStatement", + "src": "16493:113:2", + "trueBody": { + "id": 1782, + "nodeType": "Block", + "src": "16514:92:2", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "hexValue": "4572726f72", + "id": 1773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16551:7:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + "value": "Error" + }, + { + "id": 1774, + "name": "err", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1764, + "src": "16560:3:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e342daa49723ff3485f4ff5f755a17b8bc9c3c33bbd312ceee37c94eebfe45c1", + "typeString": "literal_string \"Error\"" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1772, + "name": "log_named_string", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "16534:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16534:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1776, + "nodeType": "EmitStatement", + "src": "16529:35:2" + }, + { + "expression": { + "arguments": [ + { + "id": 1778, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1760, + "src": "16589:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1779, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1762, + "src": "16592:1:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1777, + "name": "assertEq0", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1758, + 1785 + ], + "referencedDeclaration": 1758, + "src": "16579:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes memory,bytes memory)" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16579:15:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1781, + "nodeType": "ExpressionStatement", + "src": "16579:15:2" + } + ] + } + } + ] + }, + "id": 1785, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "assertEq0", + "nameLocation": "16412:9:2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1760, + "mutability": "mutable", + "name": "a", + "nameLocation": "16435:1:2", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "16422:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1759, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16422:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1762, + "mutability": "mutable", + "name": "b", + "nameLocation": "16451:1:2", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "16438:14:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1761, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16438:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1764, + "mutability": "mutable", + "name": "err", + "nameLocation": "16468:3:2", + "nodeType": "VariableDeclaration", + "scope": 1785, + "src": "16454:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1763, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "16454:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "16421:51:2" + }, + "returnParameters": { + "id": 1766, + "nodeType": "ParameterList", + "parameters": [], + "src": "16482:0:2" + }, + "scope": 1786, + "src": "16403:210:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1787, + "src": "732:15884:2", + "usedErrors": [] + } + ], + "src": "704:15914:2" + } +} \ No newline at end of file diff --git a/contracts/YieldLever.sol b/src/YieldLever.sol similarity index 94% rename from contracts/YieldLever.sol rename to src/YieldLever.sol index b71406f..84d851e 100644 --- a/contracts/YieldLever.sol +++ b/src/YieldLever.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: UNLICENSED /// # Security of this contract /// This contract owns nothing between transactions. Any funds or vaults owned @@ -8,7 +8,7 @@ /// the contract can actually take ownership of a vault, but only when called /// by the owner of the vault in the first place. -pragma solidity ^0.8.11; +pragma solidity ^0.8.13; struct Vault { address owner; @@ -29,6 +29,13 @@ struct Balances { uint128 ink; // Collateral amount } +struct Debt { + uint96 max; // Maximum debt accepted for a given underlying, across all series + uint24 min; // Minimum debt accepted for a given underlying, across all series + uint8 dec; // Multiplying factor (10**dec) for max and min + uint128 sum; // Current debt for a given underlying, across all series +} + interface YieldLadle { function pools(bytes6 seriesId) external view returns (address); function build(bytes6 seriesId, bytes6 ilkId, uint8 salt) @@ -82,12 +89,14 @@ interface Cauldron { function series(bytes6 seriesId) external view returns (Series memory); function vaults(bytes12 vaultId) external view returns (Vault memory); function balances(bytes12 vaultId) external view returns (Balances memory); + function debt(bytes6 baseId, bytes6 ilkId) external view returns (Debt memory); function debtToBase(bytes6 seriesId, uint128 art) external returns (uint128 base); function give(bytes12 vaultId, address receiver) external returns(Vault memory vault); + event VaultGiven(bytes12 indexed vaultId, address indexed receiver); } contract YieldLever { @@ -119,12 +128,13 @@ contract YieldLever { /// enough to cover the flash loan. /// @param seriesId - The series Id to invest in. For example, 0x303230360000 /// for FYUSDC06LP. + /// @return vauldId - The ID of the created vault. function invest( uint256 baseAmount, uint128 borrowAmount, uint128 maxFyAmount, bytes6 seriesId - ) external { + ) external returns (bytes12) { // Check that it is a USDC series. require(cauldron.series(seriesId).baseId == usdcId); @@ -154,6 +164,8 @@ contract YieldLever { // Finally, give the vault to the sender cauldron.give(vaultId, msg.sender); + + return vaultId; } /// @notice This function is called inside the flash loan and handles the diff --git a/test/YieldLever.t.sol b/test/YieldLever.t.sol new file mode 100644 index 0000000..9ab6cc6 --- /dev/null +++ b/test/YieldLever.t.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "ds-test/test.sol"; +import "src/YieldLever.sol"; + +interface IUniswapV2Router02 { + function WETH() external pure returns (address); + function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); + function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) + external + payable + returns (uint[] memory amounts); +} + +interface AccessControl { + function grantRole(bytes4 role, address account) external; +} + +interface CheatCodes { + function prank(address) external; + // Sets an address' balance + function deal(address who, uint256 newBalance) external; + // Label an address in test traces + function label(address addr, string calldata label) external; + // Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData). + // Call this function, then emit an event, then call a function. Internally after the call, we check if + // logs were emitted in the expected order with the expected topics and data (as specified by the booleans) + function expectEmit(bool, bool, bool, bool) external; + // Set block.timestamp + function warp(uint256) external; + // When fuzzing, generate new inputs if conditional not met + function assume(bool) external; +} + +interface Pool { + function buyBasePreview(uint128 tokenOut) + external view + returns(uint128); + function buyFYTokenPreview(uint128 fyTokenOut) + external view + returns(uint128); +} + +contract HelperContract is DSTest { + CheatCodes constant cheats = CheatCodes(HEVM_ADDRESS); + IUniswapV2Router02 constant uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); + IERC20 constant usdc = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); + AccessControl constant cauldron = AccessControl(0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867); + + constructor() { + cheats.label(address(usdc), "USDC"); + cheats.label(address(uniswap), "IUniswapV2Router02"); + cheats.label(address(cauldron), "Cauldron"); + } + + function buyUsdc(uint amountOut, address receiver) external { + uint startingBalance = usdc.balanceOf(receiver); + + address[] memory path = new address[](2); + path[0] = uniswap.WETH(); + path[1] = address(usdc); + + uint inputAmount = 2 * uniswap.getAmountsIn(amountOut, path)[0]; + cheats.deal(address(this), inputAmount); + + uniswap.swapETHForExactTokens{value: inputAmount}(amountOut, path, receiver, block.timestamp); + + uint endBalance = usdc.balanceOf(receiver); + require(endBalance == amountOut + startingBalance, "USDC buy failed: Incorrect end balance"); + } + + function grantYieldLeverAccess(address yieldLeverAddress) external { + bytes4 sig = bytes4(abi.encodeWithSignature("give(bytes12,address)")); + + // Call as the Yield Admin contract + cheats.prank(0x3b870db67a45611CF4723d44487EAF398fAc51E3); + cauldron.grantRole(sig, yieldLeverAddress); + } + + receive() payable external {} + + function testBuyUsdc() external { + uint amount = 100_000_000; + this.buyUsdc(amount, address(this)); + } +} + +contract YieldLeverTest is DSTest { + YieldLever yieldLever; + HelperContract helperContract; + + IERC20 constant usdc = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); + Cauldron constant cauldron = Cauldron(0xc88191F8cb8e6D4a668B047c1C8503432c3Ca867); + YieldLadle constant ladle = YieldLadle(0x6cB18fF2A33e981D1e38A663Ca056c0a5265066A); + CheatCodes constant cheats = CheatCodes(HEVM_ADDRESS); + Pool pool; + + bytes6 constant yvUsdcIlkId = 0x303900000000; + bytes6 constant seriesId = 0x303230360000; + bytes6 constant ILK_ID = 0x303900000000; + + constructor() { + pool = Pool(ladle.pools(seriesId)); + cheats.label(address(ladle), "YieldLadle"); + cheats.label(address(pool), "Pool"); + } + + function setUp() public { + yieldLever = new YieldLever(); + helperContract = new HelperContract(); + helperContract.grantYieldLeverAccess(address(yieldLever)); + } + + /// Test the creation of a Vault. + function testBuildVault() public { + uint128 collateral = 25_000_000_000; + uint128 borrowed = 3 * collateral; + // Slippage, in tenths of a percent, 1 being no slippage + uint128 slippage = 1_001; + + helperContract.buyUsdc(collateral, address(this)); + usdc.approve(address(yieldLever), collateral); + + uint128 maxFy = (pool.buyBasePreview(borrowed) * slippage) / 1000; + + bytes12 vaultId = yieldLever.invest(collateral, borrowed, maxFy, seriesId); + + // Test some parameters + Vault memory vault = cauldron.vaults(vaultId); + assertEq(vault.owner, address(this)); + assertEq(vault.seriesId, seriesId); + assertEq(vault.ilkId, yvUsdcIlkId); + + Balances memory balances = cauldron.balances(vaultId); + assertGt(balances.ink, 0); + assertGt(balances.art, 0); + } + + function testInvest(uint128 collateral, uint128 borrowed) public { + cheats.assume(collateral >= 1_000_000); + cheats.assume(collateral <= 100_000_000_000_000); + cheats.assume(borrowed >= 1_000_000); + cheats.assume(borrowed <= 100_000_000_000_000); + + // Slippage, in tenths of a percent, 1 being no slippage + uint128 slippage = 1_001; + + helperContract.buyUsdc(collateral, address(this)); + usdc.approve(address(yieldLever), collateral); + + // Compute min debt + Series memory series = cauldron.series(seriesId); + uint128 maxFy = (pool.buyBasePreview(borrowed) * slippage) / 1000; + Debt memory debt = cauldron.debt(series.baseId, ILK_ID); + uint minDebt = debt.min * (10 ** debt.dec); + uint maxDebt = debt.max * (10 ** debt.dec); + cheats.assume(maxFy >= minDebt); + cheats.assume(maxFy <= maxDebt); + + bytes12 vaultId = yieldLever.invest(collateral, borrowed, maxFy, seriesId); + + // Test some parameters + Vault memory vault = cauldron.vaults(vaultId); + assertEq(vault.owner, address(this)); + assertEq(vault.seriesId, seriesId); + assertEq(vault.ilkId, yvUsdcIlkId); + + Balances memory balances = cauldron.balances(vaultId); + assertGt(balances.ink, 0); + assertGt(balances.art, 0); + } + + function testInvestAndUnwind() public { + uint128 collateral = 25_000_000_000; + uint128 borrowed = 3 * collateral; + // Slippage, in tenths of a percent, 1 being no slippage + uint128 slippage = 1_001; + helperContract.buyUsdc(collateral, address(this)); + usdc.approve(address(yieldLever), collateral); + uint128 maxFy = (pool.buyBasePreview(borrowed) * slippage) / 1000; + bytes12 vaultId = yieldLever.invest(collateral, borrowed, maxFy, seriesId); + + // Unwind + Balances memory balances = cauldron.balances(vaultId); + uint128 maxAmount = (pool.buyFYTokenPreview(balances.art) * slippage) / 1000; + yieldLever.unwind(vaultId, maxAmount, address(pool), balances.ink, balances.art, seriesId); + + // Test new balances + Balances memory newBalances = cauldron.balances(vaultId); + assertEq(newBalances.art, 0); + assertEq(newBalances.ink, 0); + } + + function testInvestAndUnwindAfterMaturity() public { + uint128 collateral = 25_000_000_000; + uint128 borrowed = 3 * collateral; + // Slippage, in tenths of a percent, 1 being no slippage + uint128 slippage = 1_001; + helperContract.buyUsdc(collateral, address(this)); + usdc.approve(address(yieldLever), collateral); + uint128 maxFy = (pool.buyBasePreview(borrowed) * slippage) / 1000; + bytes12 vaultId = yieldLever.invest(collateral, borrowed, maxFy, seriesId); + + // Move past maturity + Series memory series = cauldron.series(seriesId); + cheats.warp(series.maturity); + + // Unwind + Balances memory balances = cauldron.balances(vaultId); + yieldLever.unwind(vaultId, 0, address(pool), balances.ink, balances.art, seriesId); + + // Test new balances + Balances memory newBalances = cauldron.balances(vaultId); + assertEq(newBalances.art, 0); + assertEq(newBalances.ink, 0); + } +}