UNPKG

@zjbtest/contracts

Version:
1,309 lines 130 kB
{ "contractName": "IDEX", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenA", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenB", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "maxAmountA", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "maxAmountB", "type": "uint256" } ], "name": "AddedLiquidity", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenA", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenB", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "remove_share", "type": "uint256" } ], "name": "RemovedLiquidity", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "address[]", "name": "path", "type": "address[]" }, { "indexed": false, "internalType": "uint256", "name": "supply_amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "target_amount", "type": "uint256" } ], "name": "Swaped", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" } ], "name": "getLiquidityPool", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" } ], "name": "getLiquidityTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "uint256", "name": "supplyAmount", "type": "uint256" } ], "name": "getSwapTargetAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "uint256", "name": "targetAmount", "type": "uint256" } ], "name": "getSwapSupplyAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "uint256", "name": "supplyAmount", "type": "uint256" }, { "internalType": "uint256", "name": "minTargetAmount", "type": "uint256" } ], "name": "swapWithExactSupply", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "uint256", "name": "targetAmount", "type": "uint256" }, { "internalType": "uint256", "name": "maxSupplyAmount", "type": "uint256" } ], "name": "swapWithExactTarget", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" }, { "internalType": "uint256", "name": "maxAmountA", "type": "uint256" }, { "internalType": "uint256", "name": "maxAmountB", "type": "uint256" }, { "internalType": "uint256", "name": "minShareIncrement", "type": "uint256" } ], "name": "addLiquidity", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" }, { "internalType": "uint256", "name": "removeShare", "type": "uint256" }, { "internalType": "uint256", "name": "minWithdrawnA", "type": "uint256" }, { "internalType": "uint256", "name": "minWithdrawnB", "type": "uint256" } ], "name": "removeLiquidity", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxAmountA\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxAmountB\",\"type\":\"uint256\"}],\"name\":\"AddedLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remove_share\",\"type\":\"uint256\"}],\"name\":\"RemovedLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"supply_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"target_amount\",\"type\":\"uint256\"}],\"name\":\"Swaped\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAmountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAmountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minShareIncrement\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"getLiquidityTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"}],\"name\":\"getSwapSupplyAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"supplyAmount\",\"type\":\"uint256\"}],\"name\":\"getSwapTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"removeShare\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdrawnA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdrawnB\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"supplyAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTargetAmount\",\"type\":\"uint256\"}],\"name\":\"swapWithExactSupply\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSupplyAmount\",\"type\":\"uint256\"}],\"name\":\"swapWithExactTarget\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/predeploy-contracts/predeploy-contracts/contracts/dex/IDEX.sol\":\"IDEX\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/predeploy-contracts/predeploy-contracts/contracts/dex/IDEX.sol\":{\"keccak256\":\"0x139b56d71b84a9781e5da2fed311191cfd2c569653c325980e7159d12861e6c8\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://9a2d59a633b20a52f4e955c571f6832dbacabfdf9428b0a4dc8320352cf0ebc7\",\"dweb:/ipfs/QmXqfM3LYM6H1sDybKmDCFEVvJKj6RuPQqPrXWkju2hC3t\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity ^0.8.0;\n\ninterface IDEX {\n event Swaped(address indexed sender, address[] path, uint256 supply_amount, uint256 target_amount);\n event AddedLiquidity(address indexed sender, address indexed tokenA, address indexed tokenB, uint256 maxAmountA, uint256 maxAmountB);\n event RemovedLiquidity(address indexed sender, address indexed tokenA, address indexed tokenB, uint256 remove_share);\n\n // Get liquidity pool of the currency_id_a and currency_id_b.\n // Returns (liquidity_a, liquidity_b)\n function getLiquidityPool(address tokenA, address tokenB) external view returns (uint256, uint256);\n\n // Get Liquidity token address.\n // Returns (liquidity_token_address)\n function getLiquidityTokenAddress(address tokenA, address tokenB) external view returns (address);\n\n // Get swap target amount.\n // Returns (target_amount)\n function getSwapTargetAmount(address[] calldata path, uint256 supplyAmount) external view returns (uint256);\n\n // Get swap supply amount.\n // Returns (supply_amount)\n function getSwapSupplyAmount(address[] calldata path, uint256 targetAmount) external view returns (uint256);\n\n // Swap with exact supply.\n // Returns a boolean value indicating whether the operation succeeded.\n function swapWithExactSupply(address[] calldata path, uint256 supplyAmount, uint256 minTargetAmount) external returns (bool);\n\n // Swap with exact target.\n // Returns a boolean value indicating whether the operation succeeded.\n function swapWithExactTarget(address[] calldata path, uint256 targetAmount, uint256 maxSupplyAmount) external returns (bool);\n\n // Add liquidity to the trading pair.\n // Returns a boolean value indicating whether the operation succeeded.\n function addLiquidity(address tokenA, address tokenB, uint256 maxAmountA, uint256 maxAmountB, uint256 minShareIncrement) external returns (bool);\n\n // Remove liquidity from the trading pair.\n // Returns a boolean value indicating whether the operation succeeded.\n function removeLiquidity(address tokenA, address tokenB, uint256 removeShare, uint256 minWithdrawnA, uint256 minWithdrawnB) external returns (bool);\n}\n", "sourcePath": "/home/runner/work/predeploy-contracts/predeploy-contracts/contracts/dex/IDEX.sol", "ast": { "absolutePath": "/home/runner/work/predeploy-contracts/predeploy-contracts/contracts/dex/IDEX.sol", "exportedSymbols": { "IDEX": [ 711 ] }, "id": 712, "license": "GPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 583, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "46:23:1" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 711, "linearizedBaseContracts": [ 711 ], "name": "IDEX", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "id": 594, "name": "Swaped", "nodeType": "EventDefinition", "parameters": { "id": 593, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 585, "indexed": true, "mutability": "mutable", "name": "sender", "nodeType": "VariableDeclaration", "scope": 594, "src": "105:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 584, "name": "address", "nodeType": "ElementaryTypeName", "src": "105:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 588, "indexed": false, "mutability": "mutable", "name": "path", "nodeType": "VariableDeclaration", "scope": 594, "src": "129:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 586, "name": "address", "nodeType": "ElementaryTypeName", "src": "129:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 587, "nodeType": "ArrayTypeName", "src": "129:9:1", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "visibility": "internal" }, { "constant": false, "id": 590, "indexed": false, "mutability": "mutable", "name": "supply_amount", "nodeType": "VariableDeclaration", "scope": 594, "src": "145:21:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 589, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "145:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 592, "indexed": false, "mutability": "mutable", "name": "target_amount", "nodeType": "VariableDeclaration", "scope": 594, "src": "168:21:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 591, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "168:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "104:86:1" }, "src": "92:99:1" }, { "anonymous": false, "id": 606, "name": "AddedLiquidity", "nodeType": "EventDefinition", "parameters": { "id": 605, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 596, "indexed": true, "mutability": "mutable", "name": "sender", "nodeType": "VariableDeclaration", "scope": 606, "src": "217:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 595, "name": "address", "nodeType": "ElementaryTypeName", "src": "217:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 598, "indexed": true, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 606, "src": "241:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 597, "name": "address", "nodeType": "ElementaryTypeName", "src": "241:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 600, "indexed": true, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 606, "src": "265:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 599, "name": "address", "nodeType": "ElementaryTypeName", "src": "265:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 602, "indexed": false, "mutability": "mutable", "name": "maxAmountA", "nodeType": "VariableDeclaration", "scope": 606, "src": "289:18:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 601, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "289:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 604, "indexed": false, "mutability": "mutable", "name": "maxAmountB", "nodeType": "VariableDeclaration", "scope": 606, "src": "309:18:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 603, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "309:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "216:112:1" }, "src": "196:133:1" }, { "anonymous": false, "id": 616, "name": "RemovedLiquidity", "nodeType": "EventDefinition", "parameters": { "id": 615, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 608, "indexed": true, "mutability": "mutable", "name": "sender", "nodeType": "VariableDeclaration", "scope": 616, "src": "357:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 607, "name": "address", "nodeType": "ElementaryTypeName", "src": "357:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 610, "indexed": true, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 616, "src": "381:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 609, "name": "address", "nodeType": "ElementaryTypeName", "src": "381:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 612, "indexed": true, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 616, "src": "405:22:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 611, "name": "address", "nodeType": "ElementaryTypeName", "src": "405:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 614, "indexed": false, "mutability": "mutable", "name": "remove_share", "nodeType": "VariableDeclaration", "scope": 616, "src": "429:20:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 613, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "429:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "356:94:1" }, "src": "334:117:1" }, { "functionSelector": "f4f31ede", "id": 627, "implemented": false, "kind": "function", "modifiers": [], "name": "getLiquidityPool", "nodeType": "FunctionDefinition", "parameters": { "id": 621, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 618, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 627, "src": "591:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 617, "name": "address", "nodeType": "ElementaryTypeName", "src": "591:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 620, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 627, "src": "607:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 619, "name": "address", "nodeType": "ElementaryTypeName", "src": "607:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "590:32:1" }, "returnParameters": { "id": 626, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 623, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 627, "src": "646:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 622, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "646:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 625, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 627, "src": "655:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 624, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "655:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "645:18:1" }, "scope": 711, "src": "565:99:1", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "ffd73c4a", "id": 636, "implemented": false, "kind": "function", "modifiers": [], "name": "getLiquidityTokenAddress", "nodeType": "FunctionDefinition", "parameters": { "id": 632, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 629, "mutability": "mutable", "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 636, "src": "781:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 628, "name": "address", "nodeType": "ElementaryTypeName", "src": "781:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 631, "mutability": "mutable", "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 636, "src": "797:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 630, "name": "address", "nodeType": "ElementaryTypeName", "src": "797:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "780:32:1" }, "returnParameters": { "id": 635, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 634, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 636, "src": "836:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 633, "name": "address", "nodeType": "ElementaryTypeName", "src": "836:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "835:9:1" }, "scope": 711, "src": "747:98:1", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "4d60beb1", "id": 646, "implemented": false, "kind": "function", "modifiers": [], "name": "getSwapTargetAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 642, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 639, "mutability": "mutable", "name": "path", "nodeType": "VariableDeclaration", "scope": 646, "src": "942:23:1", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 637, "name": "address", "nodeType": "ElementaryTypeName", "src": "942:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 638, "nodeType": "ArrayTypeName", "src": "942:9:1", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "visibility": "internal" }, { "constant": false, "id": 641, "mutability": "mutable", "name": "supplyAmount", "nodeType": "VariableDeclaration", "scope": 646, "src": "967:20:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 640, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "967:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "941:47:1" }, "returnParameters": { "id": 645, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 644, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 646, "src": "1012:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 643, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1012:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1011:9:1" }, "scope": 711, "src": "913:108:1", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "dbcd19a2", "id": 656, "implemented": false, "kind": "function", "modifiers": [], "name": "getSwapSupplyAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 652, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 649, "mutability": "mutable", "name": "path", "nodeType": "VariableDeclaration", "scope": 656, "src": "1118:23:1", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 647, "name": "address", "nodeType": "ElementaryTypeName", "src": "1118:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 648, "nodeType": "ArrayTypeName", "src": "1118:9:1", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "visibility": "internal" }, { "constant": false, "id": 651, "mutability": "mutable", "name": "targetAmount", "nodeType": "VariableDeclaration", "scope": 656, "src": "1143:20:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 650, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1143:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1117:47:1" }, "returnParameters": { "id": 655, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 654, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 656, "src": "1188:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 653, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1188:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1187:9:1" }, "scope": 711, "src": "1089:108:1", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "6fc4b4e5", "id": 668, "implemented": false, "kind": "function", "modifiers": [], "name": "swapWithExactSupply", "nodeType": "FunctionDefinition", "parameters": { "id": 664, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 659, "mutability": "mutable", "name": "path", "nodeType": "VariableDeclaration", "scope": 668, "src": "1338:23:1", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 657, "name": "address", "nodeType": "ElementaryTypeName", "src": "1338:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "