UNPKG

@sonicxchain/soxswap-periphery

Version:

Peripheral smart contracts for interacting with Soxswap

1,646 lines (1,645 loc) 373 kB
{ "contractName": "ISoxswapRouter", "abi": [ { "constant": true, "inputs": [], "name": "factory", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "WSOX", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": false, "inputs": [ { "name": "tokenA", "type": "address" }, { "name": "tokenB", "type": "address" }, { "name": "amountADesired", "type": "uint256" }, { "name": "amountBDesired", "type": "uint256" }, { "name": "amountAMin", "type": "uint256" }, { "name": "amountBMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "addLiquidity", "outputs": [ { "name": "amountA", "type": "uint256" }, { "name": "amountB", "type": "uint256" }, { "name": "liquidity", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "token", "type": "address" }, { "name": "amountTokenDesired", "type": "uint256" }, { "name": "amountTokenMin", "type": "uint256" }, { "name": "amountSOXMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "addLiquiditySOX", "outputs": [ { "name": "amountToken", "type": "uint256" }, { "name": "amountSOX", "type": "uint256" }, { "name": "liquidity", "type": "uint256" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "tokenA", "type": "address" }, { "name": "tokenB", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountAMin", "type": "uint256" }, { "name": "amountBMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "removeLiquidity", "outputs": [ { "name": "amountA", "type": "uint256" }, { "name": "amountB", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "token", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountTokenMin", "type": "uint256" }, { "name": "amountSOXMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "removeLiquiditySOX", "outputs": [ { "name": "amountToken", "type": "uint256" }, { "name": "amountSOX", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "tokenA", "type": "address" }, { "name": "tokenB", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountAMin", "type": "uint256" }, { "name": "amountBMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" }, { "name": "approveMax", "type": "bool" }, { "name": "v", "type": "uint8" }, { "name": "r", "type": "bytes32" }, { "name": "s", "type": "bytes32" } ], "name": "removeLiquidityWithPermit", "outputs": [ { "name": "amountA", "type": "uint256" }, { "name": "amountB", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "token", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountTokenMin", "type": "uint256" }, { "name": "amountSOXMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" }, { "name": "approveMax", "type": "bool" }, { "name": "v", "type": "uint8" }, { "name": "r", "type": "bytes32" }, { "name": "s", "type": "bytes32" } ], "name": "removeLiquiditySOXWithPermit", "outputs": [ { "name": "amountToken", "type": "uint256" }, { "name": "amountSOX", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForTokens", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountOut", "type": "uint256" }, { "name": "amountInMax", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapTokensForExactTokens", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactSOXForTokens", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountOut", "type": "uint256" }, { "name": "amountInMax", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapTokensForExactSOX", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForSOX", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountOut", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapSOXForExactTokens", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": true, "inputs": [ { "name": "amountA", "type": "uint256" }, { "name": "reserveA", "type": "uint256" }, { "name": "reserveB", "type": "uint256" } ], "name": "quote", "outputs": [ { "name": "amountB", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "reserveIn", "type": "uint256" }, { "name": "reserveOut", "type": "uint256" } ], "name": "getAmountOut", "outputs": [ { "name": "amountOut", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "amountOut", "type": "uint256" }, { "name": "reserveIn", "type": "uint256" }, { "name": "reserveOut", "type": "uint256" } ], "name": "getAmountIn", "outputs": [ { "name": "amountIn", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "path", "type": "address[]" } ], "name": "getAmountsOut", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "amountOut", "type": "uint256" }, { "name": "path", "type": "address[]" } ], "name": "getAmountsIn", "outputs": [ { "name": "amounts", "type": "uint256[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "token", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountTokenMin", "type": "uint256" }, { "name": "amountSOXMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "removeLiquiditySOXSupportingFeeOnTransferTokens", "outputs": [ { "name": "amountSOX", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "token", "type": "address" }, { "name": "liquidity", "type": "uint256" }, { "name": "amountTokenMin", "type": "uint256" }, { "name": "amountSOXMin", "type": "uint256" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" }, { "name": "approveMax", "type": "bool" }, { "name": "v", "type": "uint8" }, { "name": "r", "type": "bytes32" }, { "name": "s", "type": "bytes32" } ], "name": "removeLiquiditySOXWithPermitSupportingFeeOnTransferTokens", "outputs": [ { "name": "amountSOX", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactSOXForTokensSupportingFeeOnTransferTokens", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amountIn", "type": "uint256" }, { "name": "amountOutMin", "type": "uint256" }, { "name": "path", "type": "address[]" }, { "name": "to", "type": "address" }, { "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForSOXSupportingFeeOnTransferTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity >=0.4.23 <0.6.0;\r\n\r\ninterface ISoxswapRouter {\r\n function factory() external pure returns (address);\r\n function WSOX() external pure returns (address);\r\n\r\n function addLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint amountADesired,\r\n uint amountBDesired,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB, uint liquidity);\r\n function addLiquiditySOX(\r\n address token,\r\n uint amountTokenDesired,\r\n uint amountTokenMin,\r\n uint amountSOXMin,\r\n address to,\r\n uint deadline\r\n ) external payable returns (uint amountToken, uint amountSOX, uint liquidity);\r\n function removeLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address payable to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquiditySOX(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountSOXMin,\r\n address payable to,\r\n uint deadline\r\n ) external returns (uint amountToken, uint amountSOX);\r\n function removeLiquidityWithPermit(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address payable to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquiditySOXWithPermit(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountSOXMin,\r\n address payable to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountToken, uint amountSOX);\r\n function swapExactTokensForTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address payable to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapTokensForExactTokens(\r\n uint amountOut,\r\n uint amountInMax,\r\n address[] calldata path,\r\n address payable to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapExactSOXForTokens(uint amountOutMin, address[] calldata path, address payable to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n function swapTokensForExactSOX(uint amountOut, uint amountInMax, address[] calldata path, address payable to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapExactTokensForSOX(uint amountIn, uint amountOutMin, address[] calldata path, address payable to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapSOXForExactTokens(uint amountOut, address[] calldata path, address payable to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n\r\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\r\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\r\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\r\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\r\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\r\n\r\n function removeLiquiditySOXSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountSOXMin,\r\n address payable to,\r\n uint deadline\r\n ) external returns (uint amountSOX);\r\n function removeLiquiditySOXWithPermitSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountSOXMin,\r\n address payable to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountSOX);\r\n\r\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address payable to,\r\n uint deadline\r\n ) external;\r\n function swapExactSOXForTokensSupportingFeeOnTransferTokens(\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address payable to,\r\n uint deadline\r\n ) external payable;\r\n function swapExactTokensForSOXSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address payable to,\r\n uint deadline\r\n ) external;\r\n}\r\n", "sourcePath": "D:\\40_SonicX_DEX\\soxswap-periphery\\contracts\\interfaces\\ISoxswapRouter.sol", "ast": { "absolutePath": "/D/40_SonicX_DEX/soxswap-periphery/contracts/interfaces/ISoxswapRouter.sol", "exportedSymbols": { "ISoxswapRouter": [ 2504 ] }, "id": 2505, "nodeType": "SourceUnit", "nodes": [ { "id": 2116, "literals": [ "solidity", ">=", "0.4", ".23", "<", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:32:3" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 2504, "linearizedBaseContracts": [ 2504 ], "name": "ISoxswapRouter", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "id": 2121, "implemented": false, "kind": "function", "modifiers": [], "name": "factory", "nodeType": "FunctionDefinition", "parameters": { "id": 2117, "nodeType": "ParameterList", "parameters": [], "src": "84:2:3" }, "returnParameters": { "id": 2120, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2119, "name": "", "nodeType": "VariableDeclaration", "scope": 2121, "src": "110:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2118, "name": "address", "nodeType": "ElementaryTypeName", "src": "110:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "109:9:3" }, "scope": 2504, "src": "68:51:3", "stateMutability": "pure", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 2126, "implemented": false, "kind": "function", "modifiers": [], "name": "WSOX", "nodeType": "FunctionDefinition", "parameters": { "id": 2122, "nodeType": "ParameterList", "parameters": [], "src": "138:2:3" }, "returnParameters": { "id": 2125, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2124, "name": "", "nodeType": "VariableDeclaration", "scope": 2126, "src": "164:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2123, "name": "address", "nodeType": "ElementaryTypeName", "src": "164:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "163:9:3" }, "scope": 2504, "src": "125:48:3", "stateMutability": "pure", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 2151, "implemented": false, "kind": "function", "modifiers": [], "name": "addLiquidity", "nodeType": "FunctionDefinition", "parameters": { "id": 2143, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2128, "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 2151, "src": "213:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2127, "name": "address", "nodeType": "ElementaryTypeName", "src": "213:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2130, "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 2151, "src": "238:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2129, "name": "address", "nodeType": "ElementaryTypeName", "src": "238:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2132, "name": "amountADesired", "nodeType": "VariableDeclaration", "scope": 2151, "src": "263:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2131, "name": "uint", "nodeType": "ElementaryTypeName", "src": "263:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2134, "name": "amountBDesired", "nodeType": "VariableDeclaration", "scope": 2151, "src": "293:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2133, "name": "uint", "nodeType": "ElementaryTypeName", "src": "293:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2136, "name": "amountAMin", "nodeType": "VariableDeclaration", "scope": 2151, "src": "323:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2135, "name": "uint", "nodeType": "ElementaryTypeName", "src": "323:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2138, "name": "amountBMin", "nodeType": "VariableDeclaration", "scope": 2151, "src": "349:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2137, "name": "uint", "nodeType": "ElementaryTypeName", "src": "349:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2140, "name": "to", "nodeType": "VariableDeclaration", "scope": 2151, "src": "375:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2139, "name": "address", "nodeType": "ElementaryTypeName", "src": "375:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2142, "name": "deadline", "nodeType": "VariableDeclaration", "scope": 2151, "src": "396:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2141, "name": "uint", "nodeType": "ElementaryTypeName", "src": "396:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "202:214:3" }, "returnParameters": { "id": 2150, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2145, "name": "amountA", "nodeType": "VariableDeclaration", "scope": 2151, "src": "435:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2144, "name": "uint", "nodeType": "ElementaryTypeName", "src": "435:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2147, "name": "amountB", "nodeType": "VariableDeclaration", "scope": 2151, "src": "449:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2146, "name": "uint", "nodeType": "ElementaryTypeName", "src": "449:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2149, "name": "liquidity", "nodeType": "VariableDeclaration", "scope": 2151, "src": "463:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2148, "name": "uint", "nodeType": "ElementaryTypeName", "src": "463:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "434:44:3" }, "scope": 2504, "src": "181:298:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 2172, "implemented": false, "kind": "function", "modifiers": [], "name": "addLiquiditySOX", "nodeType": "FunctionDefinition", "parameters": { "id": 2164, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2153, "name": "token", "nodeType": "VariableDeclaration", "scope": 2172, "src": "520:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2152, "name": "address", "nodeType": "ElementaryTypeName", "src": "520:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2155, "name": "amountTokenDesired", "nodeType": "VariableDeclaration", "scope": 2172, "src": "544:23:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2154, "name": "uint", "nodeType": "ElementaryTypeName", "src": "544:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2157, "name": "amountTokenMin", "nodeType": "VariableDeclaration", "scope": 2172, "src": "578:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2156, "name": "uint", "nodeType": "ElementaryTypeName", "src": "578:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2159, "name": "amountSOXMin", "nodeType": "VariableDeclaration", "scope": 2172, "src": "608:17:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2158, "name": "uint", "nodeType": "ElementaryTypeName", "src": "608:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2161, "name": "to", "nodeType": "VariableDeclaration", "scope": 2172, "src": "636:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2160, "name": "address", "nodeType": "ElementaryTypeName", "src": "636:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2163, "name": "deadline", "nodeType": "VariableDeclaration", "scope": 2172, "src": "657:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2162, "name": "uint", "nodeType": "ElementaryTypeName", "src": "657:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "509:168:3" }, "returnParameters": { "id": 2171, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2166, "name": "amountToken", "nodeType": "VariableDeclaration", "scope": 2172, "src": "704:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2165, "name": "uint", "nodeType": "ElementaryTypeName", "src": "704:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2168, "name": "amountSOX", "nodeType": "VariableDeclaration", "scope": 2172, "src": "722:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2167, "name": "uint", "nodeType": "ElementaryTypeName", "src": "722:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2170, "name": "liquidity", "nodeType": "VariableDeclaration", "scope": 2172, "src": "738:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2169, "name": "uint", "nodeType": "ElementaryTypeName", "src": "738:4:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "703:50:3" }, "scope": 2504, "src": "485:269:3", "stateMutability": "payable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 2193, "implemented": false, "kind": "function", "modifiers": [], "name": "removeLiquidity", "nodeType": "FunctionDefinition", "parameters": { "id": 2187, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2174, "name": "tokenA", "nodeType": "VariableDeclaration", "scope": 2193, "src": "795:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2173, "name": "address", "nodeType": "ElementaryTypeName", "src": "795:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2176, "name": "tokenB", "nodeType": "VariableDeclaration", "scope": 2193, "src": "820:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": {